From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH] avfilter, avcodec/*_init.h: Use #if to disable code Date: Fri, 13 May 2022 11:19:24 +0200 Message-ID: <DB6PR0101MB2214B9C7F13193BF22BA9C1D8FCA9@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com> (raw) Should fix the compilation issue reported in https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html and should also prevent such issues on arches other than X86. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/v210dec_init.h | 3 ++- libavcodec/v210enc_init.h | 3 ++- libavfilter/af_afirdsp.h | 3 ++- libavfilter/vf_blend_init.h | 3 ++- libavfilter/vf_eq.h | 3 ++- libavfilter/vf_gblur_init.h | 3 ++- libavfilter/vf_hflip_init.h | 3 ++- libavfilter/vf_nlmeans_init.h | 6 +++--- libavfilter/vf_threshold_init.h | 3 ++- 9 files changed, 19 insertions(+), 11 deletions(-) diff --git a/libavcodec/v210dec_init.h b/libavcodec/v210dec_init.h index 305ab3911e..707c101ab0 100644 --- a/libavcodec/v210dec_init.h +++ b/libavcodec/v210dec_init.h @@ -54,8 +54,9 @@ static void v210_planar_unpack_c(const uint32_t *src, uint16_t *y, uint16_t *u, static av_unused av_cold void ff_v210dec_init(V210DecContext *s) { s->unpack_frame = v210_planar_unpack_c; - if (ARCH_X86) + #if ARCH_X86 ff_v210_x86_init(s); + #endif } #endif /* AVCODEC_V210DEC_INIT_H */ diff --git a/libavcodec/v210enc_init.h b/libavcodec/v210enc_init.h index 6d81cac319..09828d4a14 100644 --- a/libavcodec/v210enc_init.h +++ b/libavcodec/v210enc_init.h @@ -83,8 +83,9 @@ static av_cold av_unused void ff_v210enc_init(V210EncContext *s) s->sample_factor_8 = 2; s->sample_factor_10 = 1; - if (ARCH_X86) + #if ARCH_X86 ff_v210enc_init_x86(s); + #endif } #endif /* AVCODEC_V210ENC_INIT_H */ diff --git a/libavfilter/af_afirdsp.h b/libavfilter/af_afirdsp.h index 05182bebb4..8127194836 100644 --- a/libavfilter/af_afirdsp.h +++ b/libavfilter/af_afirdsp.h @@ -54,8 +54,9 @@ static av_unused void ff_afir_init(AudioFIRDSPContext *dsp) { dsp->fcmul_add = fcmul_add_c; - if (ARCH_X86) + #if ARCH_X86 ff_afir_init_x86(dsp); + #endif } #endif /* AVFILTER_AFIRDSP_H */ diff --git a/libavfilter/vf_blend_init.h b/libavfilter/vf_blend_init.h index 5fb2599490..b377219806 100644 --- a/libavfilter/vf_blend_init.h +++ b/libavfilter/vf_blend_init.h @@ -194,8 +194,9 @@ static av_unused void ff_blend_init(FilterParams *param, int depth) param->blend = depth > 8 ? depth > 16 ? blend_copybottom_32 : blend_copybottom_16 : blend_copybottom_8; } - if (ARCH_X86) + #if ARCH_X86 ff_blend_init_x86(param, depth); + #endif } #endif /* AVFILTER_BLEND_INIT_H */ diff --git a/libavfilter/vf_eq.h b/libavfilter/vf_eq.h index a5756977d2..d68fb7295e 100644 --- a/libavfilter/vf_eq.h +++ b/libavfilter/vf_eq.h @@ -123,8 +123,9 @@ void ff_eq_init_x86(EQContext *eq); static av_unused void ff_eq_init(EQContext *eq) { eq->process = process_c; - if (ARCH_X86) + #if ARCH_X86 ff_eq_init_x86(eq); + #endif } #endif /* AVFILTER_EQ_H */ diff --git a/libavfilter/vf_gblur_init.h b/libavfilter/vf_gblur_init.h index 0fee64bc98..9ff28c6f59 100644 --- a/libavfilter/vf_gblur_init.h +++ b/libavfilter/vf_gblur_init.h @@ -115,8 +115,9 @@ static av_unused void ff_gblur_init(GBlurContext *s) s->horiz_slice = horiz_slice_c; s->verti_slice = verti_slice_c; s->postscale_slice = postscale_c; - if (ARCH_X86) + #if ARCH_X86 ff_gblur_init_x86(s); + #endif } #endif /* AVFILTER_GBLUR_INIT_H */ diff --git a/libavfilter/vf_hflip_init.h b/libavfilter/vf_hflip_init.h index b58cfec901..63f9e3b92a 100644 --- a/libavfilter/vf_hflip_init.h +++ b/libavfilter/vf_hflip_init.h @@ -101,8 +101,9 @@ static av_unused int ff_hflip_init(FlipContext *s, int step[4], int nb_planes) return AVERROR_BUG; } } - if (ARCH_X86) + #if ARCH_X86 ff_hflip_init_x86(s, step, nb_planes); + #endif return 0; } diff --git a/libavfilter/vf_nlmeans_init.h b/libavfilter/vf_nlmeans_init.h index 04ad8801b6..87fca13b2e 100644 --- a/libavfilter/vf_nlmeans_init.h +++ b/libavfilter/vf_nlmeans_init.h @@ -129,11 +129,11 @@ static av_unused void ff_nlmeans_init(NLMeansDSPContext *dsp) dsp->compute_safe_ssd_integral_image = compute_safe_ssd_integral_image_c; dsp->compute_weights_line = compute_weights_line_c; - if (ARCH_AARCH64) + #if ARCH_AARCH64 ff_nlmeans_init_aarch64(dsp); - - if (ARCH_X86) + #elif ARCH_X86 ff_nlmeans_init_x86(dsp); + #endif } #endif /* AVFILTER_NLMEANS_INIT_H */ diff --git a/libavfilter/vf_threshold_init.h b/libavfilter/vf_threshold_init.h index e79d2bb63d..c86e9da7f2 100644 --- a/libavfilter/vf_threshold_init.h +++ b/libavfilter/vf_threshold_init.h @@ -84,8 +84,9 @@ static av_unused void ff_threshold_init(ThresholdContext *s) s->bpc = 2; } - if (ARCH_X86) + #if ARCH_X86 ff_threshold_init_x86(s); + #endif } #endif /* AVFILTER_THRESHOLD_INIT_H */ -- 2.32.0 _______________________________________________ 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 reply other threads:[~2022-05-13 9:19 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-13 9:19 Andreas Rheinhardt [this message] 2022-05-13 9:25 ` Hendrik Leppkes 2022-05-13 9:44 ` Soft Works
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=DB6PR0101MB2214B9C7F13193BF22BA9C1D8FCA9@DB6PR0101MB2214.eurprd01.prod.exchangelabs.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