Rename CONFIG_FFT_FLOAT ---> FFT_FLOAT
The define does not originate from configure, so it should not have a name that is CONFIG_-prefixed.
This commit is contained in:
		@@ -26,7 +26,7 @@
 | 
				
			|||||||
 * fixed-point AC-3 encoder.
 | 
					 * fixed-point AC-3 encoder.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CONFIG_FFT_FLOAT 0
 | 
					#define FFT_FLOAT 0
 | 
				
			||||||
#undef CONFIG_AC3ENC_FLOAT
 | 
					#undef CONFIG_AC3ENC_FLOAT
 | 
				
			||||||
#include "internal.h"
 | 
					#include "internal.h"
 | 
				
			||||||
#include "ac3enc.h"
 | 
					#include "ac3enc.h"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,7 +20,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include "libavutil/arm/cpu.h"
 | 
					#include "libavutil/arm/cpu.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CONFIG_FFT_FLOAT 0
 | 
					#define FFT_FLOAT 0
 | 
				
			||||||
#include "libavcodec/fft.h"
 | 
					#include "libavcodec/fft.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ff_fft_fixed_calc_neon(FFTContext *s, FFTComplex *z);
 | 
					void ff_fft_fixed_calc_neon(FFTContext *s, FFTComplex *z);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
    double (*func)(double) = do_sin ? sin : cos;
 | 
					    double (*func)(double) = do_sin ? sin : cos;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    printf("/* This file was automatically generated. */\n");
 | 
					    printf("/* This file was automatically generated. */\n");
 | 
				
			||||||
    printf("#define CONFIG_FFT_FLOAT %d\n", !fixed);
 | 
					    printf("#define FFT_FLOAT %d\n", !fixed);
 | 
				
			||||||
    printf("#include \"libavcodec/%s\"\n", do_sin ? "rdft.h" : "fft.h");
 | 
					    printf("#include \"libavcodec/%s\"\n", do_sin ? "rdft.h" : "fft.h");
 | 
				
			||||||
    for (i = 4; i <= BITS; i++) {
 | 
					    for (i = 4; i <= BITS; i++) {
 | 
				
			||||||
        int m = 1 << i;
 | 
					        int m = 1 << i;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,5 +16,5 @@
 | 
				
			|||||||
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
					 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CONFIG_FFT_FLOAT 0
 | 
					#define FFT_FLOAT 0
 | 
				
			||||||
#include "fft-test.c"
 | 
					#include "fft-test.c"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,7 +19,7 @@
 | 
				
			|||||||
#ifndef AVCODEC_FFT_INTERNAL_H
 | 
					#ifndef AVCODEC_FFT_INTERNAL_H
 | 
				
			||||||
#define AVCODEC_FFT_INTERNAL_H
 | 
					#define AVCODEC_FFT_INTERNAL_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define FIX15(v) (v)
 | 
					#define FIX15(v) (v)
 | 
				
			||||||
#define sqrthalf (float)M_SQRT1_2
 | 
					#define sqrthalf (float)M_SQRT1_2
 | 
				
			||||||
@@ -62,7 +62,7 @@ void ff_mdct_calcw_c(FFTContext *s, FFTDouble *output, const FFTSample *input);
 | 
				
			|||||||
#define CMULL(dre, dim, are, aim, bre, bim)     \
 | 
					#define CMULL(dre, dim, are, aim, bre, bim)     \
 | 
				
			||||||
    CMULS(dre, dim, are, aim, bre, bim, 0)
 | 
					    CMULS(dre, dim, are, aim, bre, bim, 0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* CONFIG_FFT_FLOAT */
 | 
					#endif /* FFT_FLOAT */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define ff_imdct_calc_c FFT_NAME(ff_imdct_calc_c)
 | 
					#define ff_imdct_calc_c FFT_NAME(ff_imdct_calc_c)
 | 
				
			||||||
#define ff_imdct_half_c FFT_NAME(ff_imdct_half_c)
 | 
					#define ff_imdct_half_c FFT_NAME(ff_imdct_half_c)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,7 +29,7 @@
 | 
				
			|||||||
#include "libavutil/log.h"
 | 
					#include "libavutil/log.h"
 | 
				
			||||||
#include "libavutil/time.h"
 | 
					#include "libavutil/time.h"
 | 
				
			||||||
#include "fft.h"
 | 
					#include "fft.h"
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
#include "dct.h"
 | 
					#include "dct.h"
 | 
				
			||||||
#include "rdft.h"
 | 
					#include "rdft.h"
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -51,7 +51,7 @@
 | 
				
			|||||||
   pim += (MUL16(are, bim) + MUL16(bre, aim));\
 | 
					   pim += (MUL16(are, bim) + MUL16(bre, aim));\
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
#   define RANGE 1.0
 | 
					#   define RANGE 1.0
 | 
				
			||||||
#   define REF_SCALE(x, bits)  (x)
 | 
					#   define REF_SCALE(x, bits)  (x)
 | 
				
			||||||
#   define FMT "%10.6f"
 | 
					#   define FMT "%10.6f"
 | 
				
			||||||
@@ -148,7 +148,7 @@ static void mdct_ref(FFTSample *output, FFTSample *input, int nbits)
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
static void idct_ref(float *output, float *input, int nbits)
 | 
					static void idct_ref(float *output, float *input, int nbits)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int n = 1<<nbits;
 | 
					    int n = 1<<nbits;
 | 
				
			||||||
@@ -248,7 +248,7 @@ int main(int argc, char **argv)
 | 
				
			|||||||
    int do_inverse = 0;
 | 
					    int do_inverse = 0;
 | 
				
			||||||
    FFTContext s1, *s = &s1;
 | 
					    FFTContext s1, *s = &s1;
 | 
				
			||||||
    FFTContext m1, *m = &m1;
 | 
					    FFTContext m1, *m = &m1;
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
    RDFTContext r1, *r = &r1;
 | 
					    RDFTContext r1, *r = &r1;
 | 
				
			||||||
    DCTContext d1, *d = &d1;
 | 
					    DCTContext d1, *d = &d1;
 | 
				
			||||||
    int fft_size_2;
 | 
					    int fft_size_2;
 | 
				
			||||||
@@ -320,7 +320,7 @@ int main(int argc, char **argv)
 | 
				
			|||||||
        ff_fft_init(s, fft_nbits, do_inverse);
 | 
					        ff_fft_init(s, fft_nbits, do_inverse);
 | 
				
			||||||
        fft_ref_init(fft_nbits, do_inverse);
 | 
					        fft_ref_init(fft_nbits, do_inverse);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
    case TRANSFORM_RDFT:
 | 
					    case TRANSFORM_RDFT:
 | 
				
			||||||
        if (do_inverse)
 | 
					        if (do_inverse)
 | 
				
			||||||
            av_log(NULL, AV_LOG_INFO,"IDFT_C2R");
 | 
					            av_log(NULL, AV_LOG_INFO,"IDFT_C2R");
 | 
				
			||||||
@@ -375,7 +375,7 @@ int main(int argc, char **argv)
 | 
				
			|||||||
        fft_ref(tab_ref, tab1, fft_nbits);
 | 
					        fft_ref(tab_ref, tab1, fft_nbits);
 | 
				
			||||||
        err = check_diff((FFTSample *)tab_ref, (FFTSample *)tab, fft_size * 2, 1.0);
 | 
					        err = check_diff((FFTSample *)tab_ref, (FFTSample *)tab, fft_size * 2, 1.0);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
    case TRANSFORM_RDFT:
 | 
					    case TRANSFORM_RDFT:
 | 
				
			||||||
        fft_size_2 = fft_size >> 1;
 | 
					        fft_size_2 = fft_size >> 1;
 | 
				
			||||||
        if (do_inverse) {
 | 
					        if (do_inverse) {
 | 
				
			||||||
@@ -444,7 +444,7 @@ int main(int argc, char **argv)
 | 
				
			|||||||
                    memcpy(tab, tab1, fft_size * sizeof(FFTComplex));
 | 
					                    memcpy(tab, tab1, fft_size * sizeof(FFTComplex));
 | 
				
			||||||
                    s->fft_calc(s, tab);
 | 
					                    s->fft_calc(s, tab);
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
                case TRANSFORM_RDFT:
 | 
					                case TRANSFORM_RDFT:
 | 
				
			||||||
                    memcpy(tab2, tab1, fft_size * sizeof(FFTSample));
 | 
					                    memcpy(tab2, tab1, fft_size * sizeof(FFTSample));
 | 
				
			||||||
                    r->rdft_calc(r, tab2);
 | 
					                    r->rdft_calc(r, tab2);
 | 
				
			||||||
@@ -474,7 +474,7 @@ int main(int argc, char **argv)
 | 
				
			|||||||
    case TRANSFORM_FFT:
 | 
					    case TRANSFORM_FFT:
 | 
				
			||||||
        ff_fft_end(s);
 | 
					        ff_fft_end(s);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
    case TRANSFORM_RDFT:
 | 
					    case TRANSFORM_RDFT:
 | 
				
			||||||
        ff_rdft_end(r);
 | 
					        ff_rdft_end(r);
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,15 +22,15 @@
 | 
				
			|||||||
#ifndef AVCODEC_FFT_H
 | 
					#ifndef AVCODEC_FFT_H
 | 
				
			||||||
#define AVCODEC_FFT_H
 | 
					#define AVCODEC_FFT_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef CONFIG_FFT_FLOAT
 | 
					#ifndef FFT_FLOAT
 | 
				
			||||||
#define CONFIG_FFT_FLOAT 1
 | 
					#define FFT_FLOAT 1
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <stdint.h>
 | 
					#include <stdint.h>
 | 
				
			||||||
#include "config.h"
 | 
					#include "config.h"
 | 
				
			||||||
#include "libavutil/mem.h"
 | 
					#include "libavutil/mem.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "avfft.h"
 | 
					#include "avfft.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -51,7 +51,7 @@ typedef struct FFTComplex {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
typedef struct FFTContext FFTContext;
 | 
					typedef struct FFTContext FFTContext;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* CONFIG_FFT_FLOAT */
 | 
					#endif /* FFT_FLOAT */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct FFTDComplex {
 | 
					typedef struct FFTDComplex {
 | 
				
			||||||
    FFTDouble re, im;
 | 
					    FFTDouble re, im;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,5 +16,5 @@
 | 
				
			|||||||
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
					 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CONFIG_FFT_FLOAT 0
 | 
					#define FFT_FLOAT 0
 | 
				
			||||||
#include "fft_template.c"
 | 
					#include "fft_template.c"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,5 +16,5 @@
 | 
				
			|||||||
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
					 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CONFIG_FFT_FLOAT 1
 | 
					#define FFT_FLOAT 1
 | 
				
			||||||
#include "fft_template.c"
 | 
					#include "fft_template.c"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -157,7 +157,7 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse)
 | 
				
			|||||||
    s->mdct_calc   = ff_mdct_calc_c;
 | 
					    s->mdct_calc   = ff_mdct_calc_c;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
    if (ARCH_ARM)     ff_fft_init_arm(s);
 | 
					    if (ARCH_ARM)     ff_fft_init_arm(s);
 | 
				
			||||||
    if (ARCH_PPC)     ff_fft_init_ppc(s);
 | 
					    if (ARCH_PPC)     ff_fft_init_ppc(s);
 | 
				
			||||||
    if (ARCH_X86)     ff_fft_init_x86(s);
 | 
					    if (ARCH_X86)     ff_fft_init_x86(s);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,7 +16,7 @@
 | 
				
			|||||||
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
					 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CONFIG_FFT_FLOAT 0
 | 
					#define FFT_FLOAT 0
 | 
				
			||||||
#include "mdct_template.c"
 | 
					#include "mdct_template.c"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* same as ff_mdct_calcw_c with double-width unscaled output */
 | 
					/* same as ff_mdct_calcw_c with double-width unscaled output */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,5 +16,5 @@
 | 
				
			|||||||
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
					 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CONFIG_FFT_FLOAT 1
 | 
					#define FFT_FLOAT 1
 | 
				
			||||||
#include "mdct_template.c"
 | 
					#include "mdct_template.c"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,7 +31,7 @@
 | 
				
			|||||||
 * MDCT/IMDCT transforms.
 | 
					 * MDCT/IMDCT transforms.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CONFIG_FFT_FLOAT
 | 
					#if FFT_FLOAT
 | 
				
			||||||
#   define RSCALE(x) (x)
 | 
					#   define RSCALE(x) (x)
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#   define RSCALE(x) ((x) >> 1)
 | 
					#   define RSCALE(x) ((x) >> 1)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user