[FFmpeg-cvslog] avfilter/x86/vf_blend : reorganize init in order to add 16 bit version

Martin Vignali git at videolan.org
Sat Feb 24 22:46:06 EET 2018


ffmpeg | branch: master | Martin Vignali <martin.vignali at gmail.com> | Sat Feb 17 20:49:12 2018 +0100| [7590d58b61462ef1f802fc75a092662758d4039a] | committer: Martin Vignali

avfilter/x86/vf_blend : reorganize init in order to add 16 bit version

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7590d58b61462ef1f802fc75a092662758d4039a
---

 libavfilter/x86/vf_blend_init.c | 8 +++++---
 1 file 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;
         }
     }
+    }
 }



More information about the ffmpeg-cvslog mailing list