comparison dsputil.h @ 10827:3d011a01a6a0 libavcodec

Add support for hard-coded MDCT-related ff_sine_windows tables.
author reimar
date Sat, 09 Jan 2010 13:28:04 +0000
parents 5da7180afadf
children a8620b001ed3
comparison
equal deleted inserted replaced
10826:59c35482189e 10827:3d011a01a6a0
739 } FFTContext; 739 } FFTContext;
740 740
741 #if CONFIG_HARDCODED_TABLES 741 #if CONFIG_HARDCODED_TABLES
742 #define COSTABLE_CONST const 742 #define COSTABLE_CONST const
743 #define SINTABLE_CONST const 743 #define SINTABLE_CONST const
744 #define SINETABLE_CONST const
744 #else 745 #else
745 #define COSTABLE_CONST 746 #define COSTABLE_CONST
746 #define SINTABLE_CONST 747 #define SINTABLE_CONST
748 #define SINETABLE_CONST
747 #endif 749 #endif
748 750
749 #define COSTABLE(size) \ 751 #define COSTABLE(size) \
750 COSTABLE_CONST DECLARE_ALIGNED_16(FFTSample, ff_cos_##size[size/2]) 752 COSTABLE_CONST DECLARE_ALIGNED_16(FFTSample, ff_cos_##size[size/2])
751 #define SINTABLE(size) \ 753 #define SINTABLE(size) \
752 SINTABLE_CONST DECLARE_ALIGNED_16(FFTSample, ff_sin_##size[size/2]) 754 SINTABLE_CONST DECLARE_ALIGNED_16(FFTSample, ff_sin_##size[size/2])
755 #define SINETABLE(size) \
756 SINETABLE_CONST DECLARE_ALIGNED_16(float, ff_sine_##size[size])
753 extern COSTABLE(16); 757 extern COSTABLE(16);
754 extern COSTABLE(32); 758 extern COSTABLE(32);
755 extern COSTABLE(64); 759 extern COSTABLE(64);
756 extern COSTABLE(128); 760 extern COSTABLE(128);
757 extern COSTABLE(256); 761 extern COSTABLE(256);
844 * Generate a sine window. 848 * Generate a sine window.
845 * @param window pointer to half window 849 * @param window pointer to half window
846 * @param n size of half window 850 * @param n size of half window
847 */ 851 */
848 void ff_sine_window_init(float *window, int n); 852 void ff_sine_window_init(float *window, int n);
849 extern float ff_sine_32 [ 32]; 853 /**
850 extern float ff_sine_64 [ 64]; 854 * initialize the specified entry of ff_sine_windows
851 extern float ff_sine_128 [ 128]; 855 */
852 extern float ff_sine_256 [ 256]; 856 void ff_init_ff_sine_windows(int index);
853 extern float ff_sine_512 [ 512]; 857 extern SINETABLE( 32);
854 extern float ff_sine_1024[1024]; 858 extern SINETABLE( 64);
855 extern float ff_sine_2048[2048]; 859 extern SINETABLE( 128);
856 extern float ff_sine_4096[4096]; 860 extern SINETABLE( 256);
857 extern float * const ff_sine_windows[13]; 861 extern SINETABLE( 512);
862 extern SINETABLE(1024);
863 extern SINETABLE(2048);
864 extern SINETABLE(4096);
865 extern SINETABLE_CONST float * const ff_sine_windows[13];
858 866
859 int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale); 867 int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale);
860 void ff_imdct_calc_c(FFTContext *s, FFTSample *output, const FFTSample *input); 868 void ff_imdct_calc_c(FFTContext *s, FFTSample *output, const FFTSample *input);
861 void ff_imdct_half_c(FFTContext *s, FFTSample *output, const FFTSample *input); 869 void ff_imdct_half_c(FFTContext *s, FFTSample *output, const FFTSample *input);
862 void ff_mdct_calc_c(FFTContext *s, FFTSample *output, const FFTSample *input); 870 void ff_mdct_calc_c(FFTContext *s, FFTSample *output, const FFTSample *input);