diff mbox series

[FFmpeg-devel,2/4] libavfilter/x86/vf_threshold_init: remove condition s->depth == 16

Message ID 20210827045144.73794-2-jianhua.wu@intel.com
State New
Headers show
Series [FFmpeg-devel,1/4] libavfilter/x86/vf_hflip: add ff_flip_byte/short_avx512()
Related show

Checks

Context Check Description
andriy/commit_msg_x86 warning The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/commit_msg_ppc warning The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Wu Jianhua Aug. 27, 2021, 4:51 a.m. UTC
As we all know the 10bit samples would also be stored as a 16bits type,
the condition judgment will lead the SIMD optimizations to be uninitialized
when the depth is 10.

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
---
 libavfilter/x86/vf_threshold_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Oct. 3, 2021, 7:35 a.m. UTC | #1
NAK, the x86 code is not working correctly with other depths, as there is
fixed 0x80 (for 8bit and 0x8000 for 16bit) variable.
diff mbox series

Patch

diff --git a/libavfilter/x86/vf_threshold_init.c b/libavfilter/x86/vf_threshold_init.c
index 8e42296791..71bde15097 100644
--- a/libavfilter/x86/vf_threshold_init.c
+++ b/libavfilter/x86/vf_threshold_init.c
@@ -48,7 +48,7 @@  av_cold void ff_threshold_init_x86(ThresholdContext *s)
         if (EXTERNAL_AVX2_FAST(cpu_flags)) {
             s->threshold = ff_threshold8_avx2;
         }
-    } else if (s->depth == 16) {
+    } else {
         if (EXTERNAL_SSE4(cpu_flags)) {
             s->threshold = ff_threshold16_sse4;
         }