swscale: aarch64: Simplify the assignment of lumToYV12

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.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö
2025-03-04 10:29:36 +02:00
parent 87e5da9067
commit 73f4668ef8

View File

@ -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