[x265] [PATCH 2 of 3] Replace (maskmovq) by (blendvb + movq)

Min Chen chenm003 at 163.com
Mon Sep 23 06:40:07 CEST 2013


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1379911046 -28800
# Node ID cec05efee900c68cb09ddd4135133836bb2e9c3b
# Parent  03157da9b90043fdcc6e92fb4afa11dfaca0223e
Replace (maskmovq) by (blendvb + movq)

diff -r 03157da9b900 -r cec05efee900 source/common/vec/ipfilter8.inc
--- a/source/common/vec/ipfilter8.inc	Mon Sep 23 12:36:58 2013 +0800
+++ b/source/common/vec/ipfilter8.inc	Mon Sep 23 12:37:26 2013 +0800
@@ -958,7 +958,8 @@
             val = _mm_packus_epi16(val, val);
 
             // TODO: optimize me: in here the really encode's size always be equal to 4
-            _mm_maskmoveu_si128(val, leftmask, (char*)&dst[col]);
+            __m128i oldval = _mm_loadl_epi64((__m128i*)&dst[col]);
+            _mm_storel_epi64((__m128i*)&dst[col], _mm_blendv_epi8(oldval, val, leftmask));
         }
 
         src += srcStride;



More information about the x265-devel mailing list