diff mbox series

[FFmpeg-devel,3/3] avcodec/fmtconvert: Remove unused AVCodecContext parameter

Message ID GV1P250MB0737C5EFAB92E78F9A1750FD8F4C9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 9beba053117342dd7619b009c2f87eed77725807
Headers show
Series [FFmpeg-devel,1/3] avcodec/cavsdsp: Remove unused function 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. 20, 2022, 1:31 a.m. UTC
Unused since d74a8cb7e42f703be5796eeb485f06af710ae8ca.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/aarch64/fmtconvert_init.c |  4 +---
 libavcodec/ac3dec.c                  |  2 +-
 libavcodec/ac3dec.h                  |  1 +
 libavcodec/arm/fmtconvert_init_arm.c |  3 +--
 libavcodec/fmtconvert.c              | 11 +++++------
 libavcodec/fmtconvert.h              | 12 ++++++------
 libavcodec/mips/fmtconvert_mips.c    |  1 -
 libavcodec/ppc/fmtconvert_altivec.c  |  3 +--
 libavcodec/x86/fmtconvert_init.c     |  2 +-
 tests/checkasm/fmtconvert.c          |  2 +-
 10 files changed, 18 insertions(+), 23 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/aarch64/fmtconvert_init.c b/libavcodec/aarch64/fmtconvert_init.c
index 210e74b654..e0990afabc 100644
--- a/libavcodec/aarch64/fmtconvert_init.c
+++ b/libavcodec/aarch64/fmtconvert_init.c
@@ -22,7 +22,6 @@ 
 
 #include "libavutil/attributes.h"
 #include "libavutil/aarch64/cpu.h"
-#include "libavcodec/avcodec.h"
 #include "libavcodec/fmtconvert.h"
 
 void ff_int32_to_float_fmul_array8_neon(FmtConvertContext *c, float *dst,
@@ -31,8 +30,7 @@  void ff_int32_to_float_fmul_array8_neon(FmtConvertContext *c, float *dst,
 void ff_int32_to_float_fmul_scalar_neon(float *dst, const int32_t *src,
                                         float mul, int len);
 
-av_cold void ff_fmt_convert_init_aarch64(FmtConvertContext *c,
-                                         AVCodecContext *avctx)
+av_cold void ff_fmt_convert_init_aarch64(FmtConvertContext *c)
 {
     int cpu_flags = av_get_cpu_flags();
 
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 5d0add40fe..ac6298d57e 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -205,7 +205,7 @@  static av_cold int ac3_decode_init(AVCodecContext *avctx)
 #if (USE_FIXED)
     s->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & AV_CODEC_FLAG_BITEXACT);
 #else
-    ff_fmt_convert_init(&s->fmt_conv, avctx);
+    ff_fmt_convert_init(&s->fmt_conv);
     s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
 #endif
     if (!s->fdsp)
diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h
index 9444124974..88651ae61f 100644
--- a/libavcodec/ac3dec.h
+++ b/libavcodec/ac3dec.h
@@ -57,6 +57,7 @@ 
 
 #include "ac3.h"
 #include "ac3dsp.h"
+#include "avcodec.h"
 #include "bswapdsp.h"
 #include "get_bits.h"
 #include "fft.h"
diff --git a/libavcodec/arm/fmtconvert_init_arm.c b/libavcodec/arm/fmtconvert_init_arm.c
index e88255d619..e12f83c842 100644
--- a/libavcodec/arm/fmtconvert_init_arm.c
+++ b/libavcodec/arm/fmtconvert_init_arm.c
@@ -22,7 +22,6 @@ 
 
 #include "libavutil/attributes.h"
 #include "libavutil/arm/cpu.h"
-#include "libavcodec/avcodec.h"
 #include "libavcodec/fmtconvert.h"
 
 void ff_int32_to_float_fmul_array8_neon(FmtConvertContext *c, float *dst,
@@ -37,7 +36,7 @@  void ff_int32_to_float_fmul_array8_vfp(FmtConvertContext *c, float *dst,
                                        const int32_t *src, const float *mul,
                                        int len);
 
-av_cold void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx)
+av_cold void ff_fmt_convert_init_arm(FmtConvertContext *c)
 {
     int cpu_flags = av_get_cpu_flags();
 
diff --git a/libavcodec/fmtconvert.c b/libavcodec/fmtconvert.c
index 00f55f8f1e..cedfd61138 100644
--- a/libavcodec/fmtconvert.c
+++ b/libavcodec/fmtconvert.c
@@ -22,7 +22,6 @@ 
 
 #include "config.h"
 #include "libavutil/attributes.h"
-#include "avcodec.h"
 #include "fmtconvert.h"
 
 static void int32_to_float_fmul_scalar_c(float *dst, const int32_t *src,
@@ -42,19 +41,19 @@  static void int32_to_float_fmul_array8_c(FmtConvertContext *c, float *dst,
         c->int32_to_float_fmul_scalar(&dst[i], &src[i], *mul++, 8);
 }
 
-av_cold void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx)
+av_cold void ff_fmt_convert_init(FmtConvertContext *c)
 {
     c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_c;
     c->int32_to_float_fmul_array8 = int32_to_float_fmul_array8_c;
 
 #if ARCH_AARCH64
-    ff_fmt_convert_init_aarch64(c, avctx);
+    ff_fmt_convert_init_aarch64(c);
 #elif ARCH_ARM
-    ff_fmt_convert_init_arm(c, avctx);
+    ff_fmt_convert_init_arm(c);
 #elif ARCH_PPC
-    ff_fmt_convert_init_ppc(c, avctx);
+    ff_fmt_convert_init_ppc(c);
 #elif ARCH_X86
-    ff_fmt_convert_init_x86(c, avctx);
+    ff_fmt_convert_init_x86(c);
 #endif
 #if HAVE_MIPSFPU
     ff_fmt_convert_init_mips(c);
diff --git a/libavcodec/fmtconvert.h b/libavcodec/fmtconvert.h
index b2df7a9629..da244e05a5 100644
--- a/libavcodec/fmtconvert.h
+++ b/libavcodec/fmtconvert.h
@@ -23,7 +23,7 @@ 
 #ifndef AVCODEC_FMTCONVERT_H
 #define AVCODEC_FMTCONVERT_H
 
-#include "avcodec.h"
+#include <stdint.h>
 
 typedef struct FmtConvertContext {
     /**
@@ -56,12 +56,12 @@  typedef struct FmtConvertContext {
 
 } FmtConvertContext;
 
-void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx);
+void ff_fmt_convert_init(FmtConvertContext *c);
 
-void ff_fmt_convert_init_aarch64(FmtConvertContext *c, AVCodecContext *avctx);
-void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx);
-void ff_fmt_convert_init_ppc(FmtConvertContext *c, AVCodecContext *avctx);
-void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx);
+void ff_fmt_convert_init_aarch64(FmtConvertContext *c);
+void ff_fmt_convert_init_arm(FmtConvertContext *c);
+void ff_fmt_convert_init_ppc(FmtConvertContext *c);
+void ff_fmt_convert_init_x86(FmtConvertContext *c);
 void ff_fmt_convert_init_mips(FmtConvertContext *c);
 
 #endif /* AVCODEC_FMTCONVERT_H */
diff --git a/libavcodec/mips/fmtconvert_mips.c b/libavcodec/mips/fmtconvert_mips.c
index 89c699854e..c39e853575 100644
--- a/libavcodec/mips/fmtconvert_mips.c
+++ b/libavcodec/mips/fmtconvert_mips.c
@@ -49,7 +49,6 @@ 
  */
 #include "config.h"
 #include "libavutil/attributes.h"
-#include "libavcodec/avcodec.h"
 #include "libavcodec/fmtconvert.h"
 #include "libavutil/mips/asmdefs.h"
 
diff --git a/libavcodec/ppc/fmtconvert_altivec.c b/libavcodec/ppc/fmtconvert_altivec.c
index 7323eff0bd..2e34de7c90 100644
--- a/libavcodec/ppc/fmtconvert_altivec.c
+++ b/libavcodec/ppc/fmtconvert_altivec.c
@@ -54,8 +54,7 @@  static void int32_to_float_fmul_scalar_altivec(float *dst, const int32_t *src,
 
 #endif /* HAVE_ALTIVEC */
 
-av_cold void ff_fmt_convert_init_ppc(FmtConvertContext *c,
-                                     AVCodecContext *avctx)
+av_cold void ff_fmt_convert_init_ppc(FmtConvertContext *c)
 {
 #if HAVE_ALTIVEC
     if (!PPC_ALTIVEC(av_get_cpu_flags()))
diff --git a/libavcodec/x86/fmtconvert_init.c b/libavcodec/x86/fmtconvert_init.c
index 58b396856e..acbc334565 100644
--- a/libavcodec/x86/fmtconvert_init.c
+++ b/libavcodec/x86/fmtconvert_init.c
@@ -35,7 +35,7 @@  void ff_int32_to_float_fmul_array8_sse2(FmtConvertContext *c, float *dst, const
 
 #endif /* HAVE_X86ASM */
 
-av_cold void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx)
+av_cold void ff_fmt_convert_init_x86(FmtConvertContext *c)
 {
 #if HAVE_X86ASM
     int cpu_flags = av_get_cpu_flags();
diff --git a/tests/checkasm/fmtconvert.c b/tests/checkasm/fmtconvert.c
index aef74479f6..e103a664d0 100644
--- a/tests/checkasm/fmtconvert.c
+++ b/tests/checkasm/fmtconvert.c
@@ -56,7 +56,7 @@  void checkasm_check_fmtconvert(void)
     for (i = 0; i < FF_ARRAY_ELEMS(scale_arr); i++)
         scale_arr[i] = (FF_ARRAY_ELEMS(scale_arr) - FF_ARRAY_ELEMS(scale_arr) / 2) / 13;
 
-    ff_fmt_convert_init(&c, NULL);
+    ff_fmt_convert_init(&c);
 
     memset(dst0, 0, sizeof(*dst0) * BUF_SIZE);
     memset(dst1, 0, sizeof(*dst1) * BUF_SIZE);