diff mbox series

[FFmpeg-devel,3/7] avcodec/[e]ac3enc: Don't invade CONFIG_ namespace

Message ID 20201205203340.19357-3-andreas.rheinhardt@gmail.com
State Accepted
Commit 496ff9f2e5abb08ddf086c7a3c9e8b922d60dd24
Headers show
Series [FFmpeg-devel,1/7] avcodec/[e]ac3enc: Make encoders init-threadsafe, fix race
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Dec. 5, 2020, 8:33 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/ac3enc.h          | 6 +++---
 libavcodec/ac3enc_fixed.c    | 2 +-
 libavcodec/ac3enc_float.c    | 2 +-
 libavcodec/ac3enc_template.c | 8 ++++----
 libavcodec/eac3enc.c         | 2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h
index b4e566b4ef..6d8f186a1a 100644
--- a/libavcodec/ac3enc.h
+++ b/libavcodec/ac3enc.h
@@ -41,8 +41,8 @@ 
 #include "put_bits.h"
 #include "audiodsp.h"
 
-#ifndef CONFIG_AC3ENC_FLOAT
-#define CONFIG_AC3ENC_FLOAT 0
+#ifndef AC3ENC_FLOAT
+#define AC3ENC_FLOAT 0
 #endif
 
 #define OFFSET(param) offsetof(AC3EncodeContext, options.param)
@@ -52,7 +52,7 @@ 
 #define AC3ENC_TYPE_AC3         1
 #define AC3ENC_TYPE_EAC3        2
 
-#if CONFIG_AC3ENC_FLOAT
+#if AC3ENC_FLOAT
 #define AC3_NAME(x) ff_ac3_float_ ## x
 #define MAC_COEF(d,a,b) ((d)+=(a)*(b))
 #define COEF_MIN (-16777215.0/16777216.0)
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index 879e364d4e..7818dd8c35 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -27,7 +27,7 @@ 
  */
 
 #define FFT_FLOAT 0
-#undef CONFIG_AC3ENC_FLOAT
+#define AC3ENC_FLOAT 0
 #include "internal.h"
 #include "audiodsp.h"
 #include "ac3enc.h"
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index ef23b417cf..45bfed34f9 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -26,7 +26,7 @@ 
  * floating-point AC-3 encoder.
  */
 
-#define CONFIG_AC3ENC_FLOAT 1
+#define AC3ENC_FLOAT 1
 #include "internal.h"
 #include "audiodsp.h"
 #include "ac3enc.h"
diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
index da5d67afc9..cbb7f63f79 100644
--- a/libavcodec/ac3enc_template.c
+++ b/libavcodec/ac3enc_template.c
@@ -90,7 +90,7 @@  static void apply_mdct(AC3EncodeContext *s)
             AC3Block *block = &s->blocks[blk];
             const SampleType *input_samples = &s->planar_samples[ch][blk * AC3_BLOCK_SIZE];
 
-#if CONFIG_AC3ENC_FLOAT
+#if AC3ENC_FLOAT
             s->fdsp->vector_fmul(s->windowed_samples, input_samples,
                                 s->mdct_window, AC3_WINDOW_SIZE);
 #else
@@ -114,7 +114,7 @@  static void apply_mdct(AC3EncodeContext *s)
 static void apply_channel_coupling(AC3EncodeContext *s)
 {
     LOCAL_ALIGNED_16(CoefType, cpl_coords,      [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]);
-#if CONFIG_AC3ENC_FLOAT
+#if AC3ENC_FLOAT
     LOCAL_ALIGNED_16(int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]);
 #else
     int32_t (*fixed_cpl_coords)[AC3_MAX_CHANNELS][16] = cpl_coords;
@@ -124,7 +124,7 @@  static void apply_channel_coupling(AC3EncodeContext *s)
     int cpl_start, num_cpl_coefs;
 
     memset(cpl_coords,       0, AC3_MAX_BLOCKS * sizeof(*cpl_coords));
-#if CONFIG_AC3ENC_FLOAT
+#if AC3ENC_FLOAT
     memset(fixed_cpl_coords, 0, AC3_MAX_BLOCKS * sizeof(*cpl_coords));
 #endif
 
@@ -265,7 +265,7 @@  static void apply_channel_coupling(AC3EncodeContext *s)
         if (!block->cpl_in_use)
             continue;
 
-#if CONFIG_AC3ENC_FLOAT
+#if AC3ENC_FLOAT
         s->ac3dsp.float_to_fixed24(fixed_cpl_coords[blk][1],
                                    cpl_coords[blk][1],
                                    s->fbw_channels * 16);
diff --git a/libavcodec/eac3enc.c b/libavcodec/eac3enc.c
index 00721aa645..585588a480 100644
--- a/libavcodec/eac3enc.c
+++ b/libavcodec/eac3enc.c
@@ -24,7 +24,7 @@ 
  * E-AC-3 encoder
  */
 
-#define CONFIG_AC3ENC_FLOAT 1
+#define AC3ENC_FLOAT 1
 
 #include "libavutil/attributes.h"
 #include "ac3enc.h"