diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-08-27 07:30:30 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2020-08-27 07:30:30 +0800 |
commit | 71ec3e4583def61fbb32a4815376773ef7c80dee (patch) | |
tree | a98e85b05a9184ccbda1d6438bf64874b2b277db /libavfilter/x86 | |
parent | ca8e5dedc7fabae3df76ea11d9952070cbb19620 (diff) |
Revert "avfilter/yadif: simplify the code for better readability"
This reverts commit 2a9b934675b9e2d3850b46f8a618c19b03f02551.
Diffstat (limited to 'libavfilter/x86')
-rw-r--r-- | libavfilter/x86/vf_bwdif_init.c | 2 | ||||
-rw-r--r-- | libavfilter/x86/vf_yadif_init.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/x86/vf_bwdif_init.c b/libavfilter/x86/vf_bwdif_init.c index 817bd84663..b1e70b3bc6 100644 --- a/libavfilter/x86/vf_bwdif_init.c +++ b/libavfilter/x86/vf_bwdif_init.c @@ -55,7 +55,7 @@ av_cold void ff_bwdif_init_x86(BWDIFContext *bwdif) { YADIFContext *yadif = &bwdif->yadif; int cpu_flags = av_get_cpu_flags(); - int bit_depth = yadif->depth; + int bit_depth = (!yadif->csp) ? 8 : yadif->csp->comp[0].depth; if (bit_depth <= 8) { #if ARCH_X86_32 diff --git a/libavfilter/x86/vf_yadif_init.c b/libavfilter/x86/vf_yadif_init.c index ecf012af7c..c39bc44da6 100644 --- a/libavfilter/x86/vf_yadif_init.c +++ b/libavfilter/x86/vf_yadif_init.c @@ -60,7 +60,8 @@ void ff_yadif_filter_line_10bit_ssse3(void *dst, void *prev, void *cur, av_cold void ff_yadif_init_x86(YADIFContext *yadif) { int cpu_flags = av_get_cpu_flags(); - int bit_depth = yadif->depth; + int bit_depth = (!yadif->csp) ? 8 + : yadif->csp->comp[0].depth; if (bit_depth >= 15) { #if ARCH_X86_32 |