History

Rename CONFIG_FFT_FLOAT ---> FFT_FLOAT

The define does not originate from configure, so it should not have a name that is CONFIG_-prefixed.

Diego Biurrun committed 12 years ago

Commit 794fcf71 parent 63debaa13 files · +24 −24Browse files

Unified · Split

13 files
  1. libavcodec/ac3enc_fixed.c +1 −1
  2. libavcodec/arm/fft_fixed_init_arm.c +1 −1
  3. libavcodec/cos_tablegen.c +1 −1
  4. libavcodec/fft-fixed-test.c +1 −1
  5. libavcodec/fft-internal.h +2 −2
  6. libavcodec/fft-test.c +8 −8
  7. libavcodec/fft.h +4 −4
  8. libavcodec/fft_fixed.c +1 −1
  9. libavcodec/fft_float.c +1 −1
  10. libavcodec/fft_template.c +1 −1
  11. libavcodec/mdct_fixed.c +1 −1
  12. libavcodec/mdct_float.c +1 −1
  13. libavcodec/mdct_template.c +1 −1
libavcodec/ac3enc_fixed.c+1−1
@@ -26,7 +26,7 @@ · 25 unmodified lines
26 * fixed-point AC-3 encoder.26 * fixed-point AC-3 encoder.
27 */27 */
28 28
29#define CONFIG_FFT_FLOAT 029#define FFT_FLOAT 0
30#undef CONFIG_AC3ENC_FLOAT30#undef CONFIG_AC3ENC_FLOAT
31#include "internal.h"31#include "internal.h"
32#include "ac3enc.h"32#include "ac3enc.h"
libavcodec/arm/fft_fixed_init_arm.c+1−1
@@ -20,7 +20,7 @@ · 19 unmodified lines
20 20
21#include "libavutil/arm/cpu.h"21#include "libavutil/arm/cpu.h"
22 22
23#define CONFIG_FFT_FLOAT 023#define FFT_FLOAT 0
24#include "libavcodec/fft.h"24#include "libavcodec/fft.h"
25 25
26void ff_fft_fixed_calc_neon(FFTContext *s, FFTComplex *z);26void ff_fft_fixed_calc_neon(FFTContext *s, FFTComplex *z);
libavcodec/cos_tablegen.c+1−1
@@ -57,7 +57,7 @@ int main(int argc, char *argv[]) · 56 unmodified lines
57 double (*func)(double) = do_sin ? sin : cos;57 double (*func)(double) = do_sin ? sin : cos;
58 58
59 printf("/* This file was automatically generated. */\n");59 printf("/* This file was automatically generated. */\n");
60 printf("#define CONFIG_FFT_FLOAT %d\n", !fixed);60 printf("#define FFT_FLOAT %d\n", !fixed);
61 printf("#include \"libavcodec/%s\"\n", do_sin ? "rdft.h" : "fft.h");61 printf("#include \"libavcodec/%s\"\n", do_sin ? "rdft.h" : "fft.h");
62 for (i = 4; i <= BITS; i++) {62 for (i = 4; i <= BITS; i++) {
63 int m = 1 << i;63 int m = 1 << i;
libavcodec/fft-fixed-test.c+1−1
@@ -16,5 +16,5 @@ · 15 unmodified lines
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */17 */
18 18
19#define CONFIG_FFT_FLOAT 019#define FFT_FLOAT 0
20#include "fft-test.c"20#include "fft-test.c"
libavcodec/fft-internal.h+2−2
@@ -19,7 +19,7 @@ · 18 unmodified lines
19#ifndef AVCODEC_FFT_INTERNAL_H19#ifndef AVCODEC_FFT_INTERNAL_H
20#define AVCODEC_FFT_INTERNAL_H20#define AVCODEC_FFT_INTERNAL_H
21 21
22#if CONFIG_FFT_FLOAT22#if FFT_FLOAT
23 23
24#define FIX15(v) (v)24#define FIX15(v) (v)
25#define sqrthalf (float)M_SQRT1_225#define sqrthalf (float)M_SQRT1_2
@@ -62,7 +62,7 @@ void ff_mdct_calcw_c(FFTContext *s, FFTDouble *output, const FFTSample *input); · 36 unmodified lines
62#define CMULL(dre, dim, are, aim, bre, bim) \62#define CMULL(dre, dim, are, aim, bre, bim) \
63 CMULS(dre, dim, are, aim, bre, bim, 0)63 CMULS(dre, dim, are, aim, bre, bim, 0)
64 64
65#endif /* CONFIG_FFT_FLOAT */65#endif /* FFT_FLOAT */
66 66
67#define ff_imdct_calc_c FFT_NAME(ff_imdct_calc_c)67#define ff_imdct_calc_c FFT_NAME(ff_imdct_calc_c)
68#define ff_imdct_half_c FFT_NAME(ff_imdct_half_c)68#define ff_imdct_half_c FFT_NAME(ff_imdct_half_c)
libavcodec/fft-test.c+8−8
@@ -29,7 +29,7 @@ · 28 unmodified lines
29#include "libavutil/log.h"29#include "libavutil/log.h"
30#include "libavutil/time.h"30#include "libavutil/time.h"
31#include "fft.h"31#include "fft.h"
32#if CONFIG_FFT_FLOAT32#if FFT_FLOAT
33#include "dct.h"33#include "dct.h"
34#include "rdft.h"34#include "rdft.h"
35#endif35#endif
@@ -51,7 +51,7 @@ · 15 unmodified lines
51 pim += (MUL16(are, bim) + MUL16(bre, aim));\51 pim += (MUL16(are, bim) + MUL16(bre, aim));\
52}52}
53 53
54#if CONFIG_FFT_FLOAT54#if FFT_FLOAT
55# define RANGE 1.055# define RANGE 1.0
56# define REF_SCALE(x, bits) (x)56# define REF_SCALE(x, bits) (x)
57# define FMT "%10.6f"57# define FMT "%10.6f"
@@ -148,7 +148,7 @@ static void mdct_ref(FFTSample *output, FFTSample *input, int nbits) · 90 unmodified lines
148 }148 }
149}149}
150 150
151#if CONFIG_FFT_FLOAT151#if FFT_FLOAT
152static void idct_ref(float *output, float *input, int nbits)152static void idct_ref(float *output, float *input, int nbits)
153{153{
154 int n = 1<<nbits;154 int n = 1<<nbits;
@@ -248,7 +248,7 @@ int main(int argc, char **argv) · 93 unmodified lines
248 int do_inverse = 0;248 int do_inverse = 0;
249 FFTContext s1, *s = &s1;249 FFTContext s1, *s = &s1;
250 FFTContext m1, *m = &m1;250 FFTContext m1, *m = &m1;
251#if CONFIG_FFT_FLOAT251#if FFT_FLOAT
252 RDFTContext r1, *r = &r1;252 RDFTContext r1, *r = &r1;
253 DCTContext d1, *d = &d1;253 DCTContext d1, *d = &d1;
254 int fft_size_2;254 int fft_size_2;
@@ -320,7 +320,7 @@ int main(int argc, char **argv) · 65 unmodified lines
320 ff_fft_init(s, fft_nbits, do_inverse);320 ff_fft_init(s, fft_nbits, do_inverse);
321 fft_ref_init(fft_nbits, do_inverse);321 fft_ref_init(fft_nbits, do_inverse);
322 break;322 break;
323#if CONFIG_FFT_FLOAT323#if FFT_FLOAT
324 case TRANSFORM_RDFT:324 case TRANSFORM_RDFT:
325 if (do_inverse)325 if (do_inverse)
326 av_log(NULL, AV_LOG_INFO,"IDFT_C2R");326 av_log(NULL, AV_LOG_INFO,"IDFT_C2R");
@@ -375,7 +375,7 @@ int main(int argc, char **argv) · 48 unmodified lines
375 fft_ref(tab_ref, tab1, fft_nbits);375 fft_ref(tab_ref, tab1, fft_nbits);
376 err = check_diff((FFTSample *)tab_ref, (FFTSample *)tab, fft_size * 2, 1.0);376 err = check_diff((FFTSample *)tab_ref, (FFTSample *)tab, fft_size * 2, 1.0);
377 break;377 break;
378#if CONFIG_FFT_FLOAT378#if FFT_FLOAT
379 case TRANSFORM_RDFT:379 case TRANSFORM_RDFT:
380 fft_size_2 = fft_size >> 1;380 fft_size_2 = fft_size >> 1;
381 if (do_inverse) {381 if (do_inverse) {
@@ -444,7 +444,7 @@ int main(int argc, char **argv) · 62 unmodified lines
444 memcpy(tab, tab1, fft_size * sizeof(FFTComplex));444 memcpy(tab, tab1, fft_size * sizeof(FFTComplex));
445 s->fft_calc(s, tab);445 s->fft_calc(s, tab);
446 break;446 break;
447#if CONFIG_FFT_FLOAT447#if FFT_FLOAT
448 case TRANSFORM_RDFT:448 case TRANSFORM_RDFT:
449 memcpy(tab2, tab1, fft_size * sizeof(FFTSample));449 memcpy(tab2, tab1, fft_size * sizeof(FFTSample));
450 r->rdft_calc(r, tab2);450 r->rdft_calc(r, tab2);
@@ -474,7 +474,7 @@ int main(int argc, char **argv) · 23 unmodified lines
474 case TRANSFORM_FFT:474 case TRANSFORM_FFT:
475 ff_fft_end(s);475 ff_fft_end(s);
476 break;476 break;
477#if CONFIG_FFT_FLOAT477#if FFT_FLOAT
478 case TRANSFORM_RDFT:478 case TRANSFORM_RDFT:
479 ff_rdft_end(r);479 ff_rdft_end(r);
480 break;480 break;
libavcodec/fft.h+4−4
@@ -22,15 +22,15 @@ · 21 unmodified lines
22#ifndef AVCODEC_FFT_H22#ifndef AVCODEC_FFT_H
23#define AVCODEC_FFT_H23#define AVCODEC_FFT_H
24 24
25#ifndef CONFIG_FFT_FLOAT25#ifndef FFT_FLOAT
26#define CONFIG_FFT_FLOAT 126#define FFT_FLOAT 1
27#endif27#endif
28 28
29#include <stdint.h>29#include <stdint.h>
30#include "config.h"30#include "config.h"
31#include "libavutil/mem.h"31#include "libavutil/mem.h"
32 32
33#if CONFIG_FFT_FLOAT33#if FFT_FLOAT
34 34
35#include "avfft.h"35#include "avfft.h"
36 36
@@ -51,7 +51,7 @@ typedef struct FFTComplex { · 14 unmodified lines
51 51
52typedef struct FFTContext FFTContext;52typedef struct FFTContext FFTContext;
53 53
54#endif /* CONFIG_FFT_FLOAT */54#endif /* FFT_FLOAT */
55 55
56typedef struct FFTDComplex {56typedef struct FFTDComplex {
57 FFTDouble re, im;57 FFTDouble re, im;
libavcodec/fft_fixed.c+1−1
@@ -16,5 +16,5 @@ · 15 unmodified lines
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */17 */
18 18
19#define CONFIG_FFT_FLOAT 019#define FFT_FLOAT 0
20#include "fft_template.c"20#include "fft_template.c"
libavcodec/fft_float.c+1−1
@@ -16,5 +16,5 @@ · 15 unmodified lines
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */17 */
18 18
19#define CONFIG_FFT_FLOAT 119#define FFT_FLOAT 1
20#include "fft_template.c"20#include "fft_template.c"
libavcodec/fft_template.c+1−1
@@ -157,7 +157,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) · 156 unmodified lines
157 s->mdct_calc = ff_mdct_calc_c;157 s->mdct_calc = ff_mdct_calc_c;
158#endif158#endif
159 159
160#if CONFIG_FFT_FLOAT160#if FFT_FLOAT
161 if (ARCH_ARM) ff_fft_init_arm(s);161 if (ARCH_ARM) ff_fft_init_arm(s);
162 if (ARCH_PPC) ff_fft_init_ppc(s);162 if (ARCH_PPC) ff_fft_init_ppc(s);
163 if (ARCH_X86) ff_fft_init_x86(s);163 if (ARCH_X86) ff_fft_init_x86(s);
libavcodec/mdct_fixed.c+1−1
@@ -16,7 +16,7 @@ · 15 unmodified lines
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */17 */
18 18
19#define CONFIG_FFT_FLOAT 019#define FFT_FLOAT 0
20#include "mdct_template.c"20#include "mdct_template.c"
21 21
22/* same as ff_mdct_calcw_c with double-width unscaled output */22/* same as ff_mdct_calcw_c with double-width unscaled output */
libavcodec/mdct_float.c+1−1
@@ -16,5 +16,5 @@ · 15 unmodified lines
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */17 */
18 18
19#define CONFIG_FFT_FLOAT 119#define FFT_FLOAT 1
20#include "mdct_template.c"20#include "mdct_template.c"
libavcodec/mdct_template.c+1−1
@@ -31,7 +31,7 @@ · 30 unmodified lines
31 * MDCT/IMDCT transforms.31 * MDCT/IMDCT transforms.
32 */32 */
33 33
34#if CONFIG_FFT_FLOAT34#if FFT_FLOAT
35# define RSCALE(x) (x)35# define RSCALE(x) (x)
36#else36#else
37# define RSCALE(x) ((x) >> 1)37# define RSCALE(x) ((x) >> 1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t