diff mbox series

[FFmpeg-devel] avcodec/ac3dsp: Remove unused parameter

Message ID AS8P250MB07444427318EB54F453FDCC18F529@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 76d8f0dd143ce72b4f3de2a55f9efa9d8ffd358e
Headers show
Series [FFmpeg-devel] avcodec/ac3dsp: Remove unused parameter | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 26, 2022, 1:08 p.m. UTC
Forgotten in fd98594a8831ce037a495b6d7e090bd8f81e83a1.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/ac3dec.c              | 2 +-
 libavcodec/ac3dsp.c              | 8 ++++----
 libavcodec/ac3dsp.h              | 8 ++++----
 libavcodec/ac3enc.c              | 2 +-
 libavcodec/arm/ac3dsp_init_arm.c | 2 +-
 libavcodec/mips/ac3dsp_mips.c    | 3 ++-
 libavcodec/x86/ac3dsp_init.c     | 2 +-
 7 files changed, 14 insertions(+), 13 deletions(-)

Comments

Andreas Rheinhardt Sept. 28, 2022, 9:59 p.m. UTC | #1
Andreas Rheinhardt:
> Forgotten in fd98594a8831ce037a495b6d7e090bd8f81e83a1.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavcodec/ac3dec.c              | 2 +-
>  libavcodec/ac3dsp.c              | 8 ++++----
>  libavcodec/ac3dsp.h              | 8 ++++----
>  libavcodec/ac3enc.c              | 2 +-
>  libavcodec/arm/ac3dsp_init_arm.c | 2 +-
>  libavcodec/mips/ac3dsp_mips.c    | 3 ++-
>  libavcodec/x86/ac3dsp_init.c     | 2 +-
>  7 files changed, 14 insertions(+), 13 deletions(-)
> 
> diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
> index aba8e0fb7f..340f6e1e37 100644
> --- a/libavcodec/ac3dec.c
> +++ b/libavcodec/ac3dec.c
> @@ -236,7 +236,7 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
>      if (!s->fdsp)
>          return AVERROR(ENOMEM);
>  
> -    ff_ac3dsp_init(&s->ac3dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
> +    ff_ac3dsp_init(&s->ac3dsp);
>      av_lfg_init(&s->dith_state, 0);
>  
>      if (USE_FIXED)
> diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c
> index afd6b557bf..22cb5f242e 100644
> --- a/libavcodec/ac3dsp.c
> +++ b/libavcodec/ac3dsp.c
> @@ -374,7 +374,7 @@ void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix,
>          ac3_downmix_c(samples, matrix, out_ch, in_ch, len);
>  }
>  
> -av_cold void ff_ac3dsp_init(AC3DSPContext *c, int bit_exact)
> +av_cold void ff_ac3dsp_init(AC3DSPContext *c)
>  {
>      c->ac3_exponent_min = ac3_exponent_min_c;
>      c->float_to_fixed24 = float_to_fixed24_c;
> @@ -390,10 +390,10 @@ av_cold void ff_ac3dsp_init(AC3DSPContext *c, int bit_exact)
>      c->downmix_fixed         = NULL;
>  
>  #if ARCH_ARM
> -    ff_ac3dsp_init_arm(c, bit_exact);
> +    ff_ac3dsp_init_arm(c);
>  #elif ARCH_X86
> -    ff_ac3dsp_init_x86(c, bit_exact);
> +    ff_ac3dsp_init_x86(c);
>  #elif ARCH_MIPS
> -    ff_ac3dsp_init_mips(c, bit_exact);
> +    ff_ac3dsp_init_mips(c);
>  #endif
>  }
> diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h
> index a23b11526e..33e51e202e 100644
> --- a/libavcodec/ac3dsp.h
> +++ b/libavcodec/ac3dsp.h
> @@ -105,10 +105,10 @@ typedef struct AC3DSPContext {
>      void (*downmix_fixed)(int32_t **samples, int16_t **matrix, int len);
>  } AC3DSPContext;
>  
> -void ff_ac3dsp_init    (AC3DSPContext *c, int bit_exact);
> -void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact);
> -void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact);
> -void ff_ac3dsp_init_mips(AC3DSPContext *c, int bit_exact);
> +void ff_ac3dsp_init    (AC3DSPContext *c);
> +void ff_ac3dsp_init_arm(AC3DSPContext *c);
> +void ff_ac3dsp_init_x86(AC3DSPContext *c);
> +void ff_ac3dsp_init_mips(AC3DSPContext *c);
>  
>  void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix,
>                         int out_ch, int in_ch, int len);
> diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
> index a090576823..279dd5c20e 100644
> --- a/libavcodec/ac3enc.c
> +++ b/libavcodec/ac3enc.c
> @@ -2613,7 +2613,7 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
>  
>      ff_audiodsp_init(&s->adsp);
>      ff_me_cmp_init(&s->mecc, avctx);
> -    ff_ac3dsp_init(&s->ac3dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
> +    ff_ac3dsp_init(&s->ac3dsp);
>  
>      dprint_options(s);
>  
> diff --git a/libavcodec/arm/ac3dsp_init_arm.c b/libavcodec/arm/ac3dsp_init_arm.c
> index 9217a7d0c2..a64aa6ae82 100644
> --- a/libavcodec/arm/ac3dsp_init_arm.c
> +++ b/libavcodec/arm/ac3dsp_init_arm.c
> @@ -44,7 +44,7 @@ void ff_ac3_bit_alloc_calc_bap_armv6(int16_t *mask, int16_t *psd,
>  
>  void ff_ac3_update_bap_counts_arm(uint16_t mant_cnt[16], uint8_t *bap, int len);
>  
> -av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact)
> +av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c)
>  {
>      int cpu_flags = av_get_cpu_flags();
>  
> diff --git a/libavcodec/mips/ac3dsp_mips.c b/libavcodec/mips/ac3dsp_mips.c
> index 8f62c03aaf..a5eaaf8eb2 100644
> --- a/libavcodec/mips/ac3dsp_mips.c
> +++ b/libavcodec/mips/ac3dsp_mips.c
> @@ -401,7 +401,8 @@ static void ac3_downmix_mips(float **samples, float (*matrix)[2],
>  #endif /* HAVE_MIPSFPU */
>  #endif /* HAVE_INLINE_ASM */
>  
> -void ff_ac3dsp_init_mips(AC3DSPContext *c, int bit_exact) {
> +void ff_ac3dsp_init_mips(AC3DSPContext *c)
> +{
>  #if HAVE_INLINE_ASM
>  #if HAVE_MIPSDSP
>      c->bit_alloc_calc_bap = ac3_bit_alloc_calc_bap_mips;
> diff --git a/libavcodec/x86/ac3dsp_init.c b/libavcodec/x86/ac3dsp_init.c
> index 75a341bc95..43b3b4ac85 100644
> --- a/libavcodec/x86/ac3dsp_init.c
> +++ b/libavcodec/x86/ac3dsp_init.c
> @@ -33,7 +33,7 @@ int ff_ac3_compute_mantissa_size_sse2(uint16_t mant_cnt[6][16]);
>  void ff_ac3_extract_exponents_sse2 (uint8_t *exp, int32_t *coef, int nb_coefs);
>  void ff_ac3_extract_exponents_ssse3(uint8_t *exp, int32_t *coef, int nb_coefs);
>  
> -av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact)
> +av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c)
>  {
>      int cpu_flags = av_get_cpu_flags();
>  

Will apply this patch later tonight unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index aba8e0fb7f..340f6e1e37 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -236,7 +236,7 @@  static av_cold int ac3_decode_init(AVCodecContext *avctx)
     if (!s->fdsp)
         return AVERROR(ENOMEM);
 
-    ff_ac3dsp_init(&s->ac3dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
+    ff_ac3dsp_init(&s->ac3dsp);
     av_lfg_init(&s->dith_state, 0);
 
     if (USE_FIXED)
diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c
index afd6b557bf..22cb5f242e 100644
--- a/libavcodec/ac3dsp.c
+++ b/libavcodec/ac3dsp.c
@@ -374,7 +374,7 @@  void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix,
         ac3_downmix_c(samples, matrix, out_ch, in_ch, len);
 }
 
-av_cold void ff_ac3dsp_init(AC3DSPContext *c, int bit_exact)
+av_cold void ff_ac3dsp_init(AC3DSPContext *c)
 {
     c->ac3_exponent_min = ac3_exponent_min_c;
     c->float_to_fixed24 = float_to_fixed24_c;
@@ -390,10 +390,10 @@  av_cold void ff_ac3dsp_init(AC3DSPContext *c, int bit_exact)
     c->downmix_fixed         = NULL;
 
 #if ARCH_ARM
-    ff_ac3dsp_init_arm(c, bit_exact);
+    ff_ac3dsp_init_arm(c);
 #elif ARCH_X86
-    ff_ac3dsp_init_x86(c, bit_exact);
+    ff_ac3dsp_init_x86(c);
 #elif ARCH_MIPS
-    ff_ac3dsp_init_mips(c, bit_exact);
+    ff_ac3dsp_init_mips(c);
 #endif
 }
diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h
index a23b11526e..33e51e202e 100644
--- a/libavcodec/ac3dsp.h
+++ b/libavcodec/ac3dsp.h
@@ -105,10 +105,10 @@  typedef struct AC3DSPContext {
     void (*downmix_fixed)(int32_t **samples, int16_t **matrix, int len);
 } AC3DSPContext;
 
-void ff_ac3dsp_init    (AC3DSPContext *c, int bit_exact);
-void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact);
-void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact);
-void ff_ac3dsp_init_mips(AC3DSPContext *c, int bit_exact);
+void ff_ac3dsp_init    (AC3DSPContext *c);
+void ff_ac3dsp_init_arm(AC3DSPContext *c);
+void ff_ac3dsp_init_x86(AC3DSPContext *c);
+void ff_ac3dsp_init_mips(AC3DSPContext *c);
 
 void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix,
                        int out_ch, int in_ch, int len);
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index a090576823..279dd5c20e 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -2613,7 +2613,7 @@  av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
 
     ff_audiodsp_init(&s->adsp);
     ff_me_cmp_init(&s->mecc, avctx);
-    ff_ac3dsp_init(&s->ac3dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
+    ff_ac3dsp_init(&s->ac3dsp);
 
     dprint_options(s);
 
diff --git a/libavcodec/arm/ac3dsp_init_arm.c b/libavcodec/arm/ac3dsp_init_arm.c
index 9217a7d0c2..a64aa6ae82 100644
--- a/libavcodec/arm/ac3dsp_init_arm.c
+++ b/libavcodec/arm/ac3dsp_init_arm.c
@@ -44,7 +44,7 @@  void ff_ac3_bit_alloc_calc_bap_armv6(int16_t *mask, int16_t *psd,
 
 void ff_ac3_update_bap_counts_arm(uint16_t mant_cnt[16], uint8_t *bap, int len);
 
-av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact)
+av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c)
 {
     int cpu_flags = av_get_cpu_flags();
 
diff --git a/libavcodec/mips/ac3dsp_mips.c b/libavcodec/mips/ac3dsp_mips.c
index 8f62c03aaf..a5eaaf8eb2 100644
--- a/libavcodec/mips/ac3dsp_mips.c
+++ b/libavcodec/mips/ac3dsp_mips.c
@@ -401,7 +401,8 @@  static void ac3_downmix_mips(float **samples, float (*matrix)[2],
 #endif /* HAVE_MIPSFPU */
 #endif /* HAVE_INLINE_ASM */
 
-void ff_ac3dsp_init_mips(AC3DSPContext *c, int bit_exact) {
+void ff_ac3dsp_init_mips(AC3DSPContext *c)
+{
 #if HAVE_INLINE_ASM
 #if HAVE_MIPSDSP
     c->bit_alloc_calc_bap = ac3_bit_alloc_calc_bap_mips;
diff --git a/libavcodec/x86/ac3dsp_init.c b/libavcodec/x86/ac3dsp_init.c
index 75a341bc95..43b3b4ac85 100644
--- a/libavcodec/x86/ac3dsp_init.c
+++ b/libavcodec/x86/ac3dsp_init.c
@@ -33,7 +33,7 @@  int ff_ac3_compute_mantissa_size_sse2(uint16_t mant_cnt[6][16]);
 void ff_ac3_extract_exponents_sse2 (uint8_t *exp, int32_t *coef, int nb_coefs);
 void ff_ac3_extract_exponents_ssse3(uint8_t *exp, int32_t *coef, int nb_coefs);
 
-av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact)
+av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c)
 {
     int cpu_flags = av_get_cpu_flags();