diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2018-02-17 20:49:12 +0100 |
---|---|---|
committer | Martin Vignali <martin.vignali@gmail.com> | 2018-02-24 21:44:13 +0100 |
commit | 7590d58b61462ef1f802fc75a092662758d4039a (patch) | |
tree | eb4fdcb1b286aee80a56ede7e0340ae7315fd269 /libavfilter/x86 | |
parent | e3fc36a84c4335fcb347ed82911f98339279ec39 (diff) | |
download | ffmpeg-7590d58b61462ef1f802fc75a092662758d4039a.tar.gz |
avfilter/x86/vf_blend : reorganize init in order to add 16 bit version
Diffstat (limited to 'libavfilter/x86')
-rw-r--r-- | libavfilter/x86/vf_blend_init.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavfilter/x86/vf_blend_init.c b/libavfilter/x86/vf_blend_init.c index 6e782e4edb..b88ea7a7d2 100644 --- a/libavfilter/x86/vf_blend_init.c +++ b/libavfilter/x86/vf_blend_init.c @@ -73,7 +73,8 @@ av_cold void ff_blend_init_x86(FilterParams *param, int is_16bit) { int cpu_flags = av_get_cpu_flags(); - if (EXTERNAL_SSE2(cpu_flags) && param->opacity == 1 && !is_16bit) { + if (!is_16bit) { + if (EXTERNAL_SSE2(cpu_flags) && param->opacity == 1) { switch (param->mode) { case BLEND_ADDITION: param->blend = ff_blend_addition_sse2; break; case BLEND_GRAINMERGE: param->blend = ff_blend_grainmerge_sse2; break; @@ -95,7 +96,7 @@ av_cold void ff_blend_init_x86(FilterParams *param, int is_16bit) case BLEND_NEGATION: param->blend = ff_blend_negation_sse2; break; } } - if (EXTERNAL_SSSE3(cpu_flags) && param->opacity == 1 && !is_16bit) { + if (EXTERNAL_SSSE3(cpu_flags) && param->opacity == 1) { switch (param->mode) { case BLEND_DIFFERENCE: param->blend = ff_blend_difference_ssse3; break; case BLEND_EXTREMITY: param->blend = ff_blend_extremity_ssse3; break; @@ -103,7 +104,7 @@ av_cold void ff_blend_init_x86(FilterParams *param, int is_16bit) } } - if (EXTERNAL_AVX2_FAST(cpu_flags) && param->opacity == 1 && !is_16bit) { + if (EXTERNAL_AVX2_FAST(cpu_flags) && param->opacity == 1) { switch (param->mode) { case BLEND_ADDITION: param->blend = ff_blend_addition_avx2; break; case BLEND_GRAINMERGE: param->blend = ff_blend_grainmerge_avx2; break; @@ -124,4 +125,5 @@ av_cold void ff_blend_init_x86(FilterParams *param, int is_16bit) case BLEND_NEGATION: param->blend = ff_blend_negation_avx2; break; } } + } } |