diff options
author | James Almer <jamrial@gmail.com> | 2024-05-14 11:17:54 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-05-14 11:17:54 -0300 |
commit | 14aff7e45ec6a78a0e22b7debd9a407c6cfad69b (patch) | |
tree | 349e234bf88b414ac74ae0982a9a62c09ab457ba | |
parent | 3fa98f274afa1b51deb4621c50622424df1f55bc (diff) | |
download | ffmpeg-14aff7e45ec6a78a0e22b7debd9a407c6cfad69b.tar.gz |
x86/vvc/vvcdsp_init: coalesce function initializers
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/x86/vvc/vvcdsp_init.c | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/libavcodec/x86/vvc/vvcdsp_init.c b/libavcodec/x86/vvc/vvcdsp_init.c index ce4660d933..0e68971b2c 100644 --- a/libavcodec/x86/vvc/vvcdsp_init.c +++ b/libavcodec/x86/vvc/vvcdsp_init.c @@ -318,48 +318,41 @@ void ff_vvc_dsp_init_x86(VVCDSPContext *const c, const int bd) #if ARCH_X86_64 const int cpu_flags = av_get_cpu_flags(); - if (bd == 8) { + switch (bd) { + case 8: if (EXTERNAL_SSE4(cpu_flags)) { MC_LINK_SSE4(8); } if (EXTERNAL_AVX2_FAST(cpu_flags)) { + ALF_INIT(8); + AVG_INIT(8, avx2); MC_LINKS_AVX2(8); } - } else if (bd == 10) { + break; + case 10: if (EXTERNAL_SSE4(cpu_flags)) { MC_LINK_SSE4(10); } if (EXTERNAL_AVX2_FAST(cpu_flags)) { + ALF_INIT(10); + AVG_INIT(10, avx2); MC_LINKS_AVX2(10); MC_LINKS_16BPC_AVX2(10); } - } else if (bd == 12) { + break; + case 12: if (EXTERNAL_SSE4(cpu_flags)) { MC_LINK_SSE4(12); } if (EXTERNAL_AVX2_FAST(cpu_flags)) { + ALF_INIT(12); + AVG_INIT(12, avx2); MC_LINKS_AVX2(12); MC_LINKS_16BPC_AVX2(12); } - } - - if (EXTERNAL_AVX2(cpu_flags)) { - switch (bd) { - case 8: - ALF_INIT(8); - AVG_INIT(8, avx2); - break; - case 10: - ALF_INIT(10); - AVG_INIT(10, avx2); - break; - case 12: - ALF_INIT(12); - AVG_INIT(12, avx2); - break; - default: - break; - } + break; + default: + break; } #endif } |