ff_init_ff_cos_tabs is only used for the floating point FFT and only if hardcoded tables are disabled.
Showing the changes to libavcodec (2 of 2 files). Show all
Unified · Split
| @@ -109,8 +109,16 @@ struct FFTContext { · 108 unmodified lines | ||
| 109 | 109 | |
| 110 | 110 | #if CONFIG_HARDCODED_TABLES |
| 111 | 111 | #define COSTABLE_CONST const |
| 112 | +#define ff_init_ff_cos_tabs(index) | |
| 112 | 113 | #else |
| 113 | 114 | #define COSTABLE_CONST |
| 115 | +#define ff_init_ff_cos_tabs FFT_NAME(ff_init_ff_cos_tabs) | |
| 116 | + | |
| 117 | +/** | |
| 118 | + * Initialize the cosine table in ff_cos_tabs[index] | |
| 119 | + * @param index index in ff_cos_tabs array of the table to initialize | |
| 120 | + */ | |
| 121 | +void ff_init_ff_cos_tabs(int index); | |
| 114 | 122 | #endif |
| 115 | 123 | |
| 116 | 124 | #define COSTABLE(size) \ |
| @@ -132,14 +140,6 @@ extern COSTABLE(65536); · 15 unmodified lines | ||
| 132 | 140 | extern COSTABLE(131072); |
| 133 | 141 | extern COSTABLE_CONST FFTSample* const FFT_NAME(ff_cos_tabs)[18]; |
| 134 | 142 | |
| 135 | −#define ff_init_ff_cos_tabs FFT_NAME(ff_init_ff_cos_tabs) | |
| 136 | − | |
| 137 | −/** | |
| 138 | − * Initialize the cosine table in ff_cos_tabs[index] | |
| 139 | − * @param index index in ff_cos_tabs array of the table to initialize | |
| 140 | − */ | |
| 141 | −void ff_init_ff_cos_tabs(int index); | |
| 142 | − | |
| 143 | 143 | #define ff_fft_init FFT_NAME(ff_fft_init) |
| 144 | 144 | #define ff_fft_end FFT_NAME(ff_fft_end) |
| 145 | 145 | |
| @@ -113,6 +113,10 @@ static CosTabsInitOnce cos_tabs_init_once[] = { · 112 unmodified lines | ||
| 113 | 113 | { init_ff_cos_tabs_131072, AV_ONCE_INIT }, |
| 114 | 114 | }; |
| 115 | 115 | |
| 116 | +av_cold void ff_init_ff_cos_tabs(int index) | |
| 117 | +{ | |
| 118 | + ff_thread_once(&cos_tabs_init_once[index].control, cos_tabs_init_once[index].func); | |
| 119 | +} | |
| 116 | 120 | #endif |
| 117 | 121 | COSTABLE_CONST FFTSample * const FFT_NAME(ff_cos_tabs)[] = { |
| 118 | 122 | NULL, NULL, NULL, NULL, |
| @@ -148,12 +152,6 @@ static int split_radix_permutation(int i, int n, int inverse) · 29 unmodified lines | ||
| 148 | 152 | else return split_radix_permutation(i, m, inverse)*4 - 1; |
| 149 | 153 | } |
| 150 | 154 | |
| 151 | −av_cold void ff_init_ff_cos_tabs(int index) | |
| 152 | −{ | |
| 153 | −#if (!CONFIG_HARDCODED_TABLES) && (!FFT_FIXED_32) | |
| 154 | − ff_thread_once(&cos_tabs_init_once[index].control, cos_tabs_init_once[index].func); | |
| 155 | −#endif | |
| 156 | −} | |
| 157 | 155 | |
| 158 | 156 | static const int avx_tab[] = { |
| 159 | 157 | 0, 4, 1, 5, 8, 12, 9, 13, 2, 6, 3, 7, 10, 14, 11, 15 |