From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/fmtconvert: Remove unused AVCodecContext parameter Date: Tue, 20 Sep 2022 03:31:30 +0200 Message-ID: <GV1P250MB0737C5EFAB92E78F9A1750FD8F4C9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <GV1P250MB073725FAE399D1279610E70A8F4C9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> 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 --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); -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-09-20 1:31 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-20 1:29 [FFmpeg-devel] [PATCH 1/3] avcodec/cavsdsp: Remove unused function parameter Andreas Rheinhardt 2022-09-20 1:31 ` [FFmpeg-devel] [PATCH 2/3] avcodec/blockdsp: Remove unused AVCodecContext parameter Andreas Rheinhardt 2022-09-20 1:31 ` Andreas Rheinhardt [this message] 2022-09-21 15:05 ` [FFmpeg-devel] [PATCH 1/3] avcodec/cavsdsp: Remove unused function parameter Andreas Rheinhardt 2022-09-21 15:16 ` Rémi Denis-Courmont
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=GV1P250MB0737C5EFAB92E78F9A1750FD8F4C9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git