Skip to content

Commit 73f4668

Browse files
committed
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ö <[email protected]>
1 parent 87e5da9 commit 73f4668

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

libswscale/aarch64/swscale.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,12 @@ av_cold void ff_sws_init_swscale_aarch64(SwsInternal *c)
300300
c->chrToYV12 = ff_bgr24ToUV_neon;
301301
break;
302302
case AV_PIX_FMT_BGRA:
303+
c->lumToYV12 = ff_bgra32ToY_neon;
303304
#if HAVE_DOTPROD
304305
if (have_dotprod(cpu_flags)) {
305306
c->lumToYV12 = ff_bgra32ToY_neon_dotprod;
306307
}
307-
else
308308
#endif
309-
c->lumToYV12 = ff_bgra32ToY_neon;
310309
if (c->chrSrcHSubSample)
311310
c->chrToYV12 = ff_bgra32ToUV_half_neon;
312311
else
@@ -320,13 +319,12 @@ av_cold void ff_sws_init_swscale_aarch64(SwsInternal *c)
320319
c->chrToYV12 = ff_rgb24ToUV_neon;
321320
break;
322321
case AV_PIX_FMT_RGBA:
322+
c->lumToYV12 = ff_rgba32ToY_neon;
323323
#if HAVE_DOTPROD
324324
if (have_dotprod(cpu_flags)) {
325325
c->lumToYV12 = ff_rgba32ToY_neon_dotprod;
326326
}
327-
else
328327
#endif
329-
c->lumToYV12 = ff_rgba32ToY_neon;
330328
if (c->chrSrcHSubSample)
331329
c->chrToYV12 = ff_rgba32ToUV_half_neon;
332330
else

0 commit comments

Comments
 (0)