From: "Martin Storsjö" <martin@martin.st> To: ffmpeg-devel@ffmpeg.org Cc: Krzysztof Pyrkosz <ffmpeg@szaka.eu> Subject: [FFmpeg-devel] [PATCH] swscale: aarch64: Simplify the assignment of lumToYV12 Date: Tue, 4 Mar 2025 10:31:25 +0200 Message-ID: <20250304083125.40223-1-martin@martin.st> (raw) We normally don't need else statements here; the common pattern is to assign lower level SIMD implementations first, then conditionally reassign higher level ones afterwards, if supported. --- Sorry, I didn't notice this while reviewing the patch, until after pushing it. --- libswscale/aarch64/swscale.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libswscale/aarch64/swscale.c b/libswscale/aarch64/swscale.c index 18746b1b19..6e5a721c1f 100644 --- a/libswscale/aarch64/swscale.c +++ b/libswscale/aarch64/swscale.c @@ -300,13 +300,12 @@ av_cold void ff_sws_init_swscale_aarch64(SwsInternal *c) c->chrToYV12 = ff_bgr24ToUV_neon; break; case AV_PIX_FMT_BGRA: + c->lumToYV12 = ff_bgra32ToY_neon; #if HAVE_DOTPROD if (have_dotprod(cpu_flags)) { c->lumToYV12 = ff_bgra32ToY_neon_dotprod; } - else #endif - c->lumToYV12 = ff_bgra32ToY_neon; if (c->chrSrcHSubSample) c->chrToYV12 = ff_bgra32ToUV_half_neon; else @@ -320,13 +319,12 @@ av_cold void ff_sws_init_swscale_aarch64(SwsInternal *c) c->chrToYV12 = ff_rgb24ToUV_neon; break; case AV_PIX_FMT_RGBA: + c->lumToYV12 = ff_rgba32ToY_neon; #if HAVE_DOTPROD if (have_dotprod(cpu_flags)) { c->lumToYV12 = ff_rgba32ToY_neon_dotprod; } - else #endif - c->lumToYV12 = ff_rgba32ToY_neon; if (c->chrSrcHSubSample) c->chrToYV12 = ff_rgba32ToUV_half_neon; else -- 2.39.5 (Apple Git-154) _______________________________________________ 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".
reply other threads:[~2025-03-04 8:31 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250304083125.40223-1-martin@martin.st \ --to=martin@martin.st \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=ffmpeg@szaka.eu \ /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