[x265] [PATCH] asm: fixed hash mismatch on 16bpp due to intra_pred_ang

yuvaraj at multicorewareinc.com yuvaraj at multicorewareinc.com
Thu Jan 30 08:29:46 CET 2014


# HG changeset patch
# User Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
# Date 1391066733 -19800
#      Thu Jan 30 12:55:33 2014 +0530
# Branch stable
# Node ID c0ec570c0105d6fdf46e7c0e4afa9dabb04e13b7
# Parent  86743912a5b0459645e5aeccd1c35313e3f0af58
asm: fixed hash mismatch on 16bpp due to intra_pred_ang

diff -r 86743912a5b0 -r c0ec570c0105 source/common/x86/intrapred16.asm
--- a/source/common/x86/intrapred16.asm	Wed Jan 29 18:44:49 2014 +0530
+++ b/source/common/x86/intrapred16.asm	Thu Jan 30 12:55:33 2014 +0530
@@ -36,6 +36,7 @@
 %endrep
 
 const pw_unpack0wd, times 4 db 0,1,8,8
+const pw_1023,      times 8 dw 1023
 
 SECTION .text
 
@@ -1125,8 +1126,9 @@
     psubw       m1,             m2
     psraw       m1,             1
     paddw       m0,             m1
-    pmovsxwd    m0,             m0
-    packusdw    m0,             m0
+    pxor        m1,             m1
+    pmaxsw      m0,             m1
+    pminsw      m0,             [pw_1023]
 
 .quit:
     movh        [r0],           m0
@@ -1153,8 +1155,9 @@
     psubw       m1,             m2
     psraw       m1,             1
     paddw       m0,             m1
-    pmovsxwd    m0,             m0
-    packusdw    m0,             m0
+    pxor        m1,             m1
+    pmaxsw      m0,             m1
+    pminsw      m0,             [pw_1023]
 
     pextrw      [r0],           m0, 0
     pextrw      [r0 + r1],      m0, 1
diff -r 86743912a5b0 -r c0ec570c0105 source/test/intrapredharness.cpp
--- a/source/test/intrapredharness.cpp	Wed Jan 29 18:44:49 2014 +0530
+++ b/source/test/intrapredharness.cpp	Thu Jan 30 12:55:33 2014 +0530
@@ -149,6 +149,10 @@
 
 bool IntraPredHarness::check_angular_primitive(const intra_pred_t ref[][NUM_INTRA_MODE], const intra_pred_t opt[][NUM_INTRA_MODE])
 {
+#if HIGH_BIT_DEPTH
+    int old_depth = X265_DEPTH;
+    X265_DEPTH = 10;
+#endif
     int j = ADI_BUF_STRIDE;
 
     int pmode;
@@ -183,6 +187,9 @@
                         ref[size - 2][pmode](pixel_out_c, FENC_STRIDE, refLeft, refAbove, pmode, bFilter);
                         opt[size - 2][pmode](pixel_out_vec, FENC_STRIDE, refLeft, refAbove, pmode, bFilter);
                         printf("\nFailed for width %d mode %d bfilter %d row %d \t", width, p, bFilter, k);
+#if HIGH_BIT_DEPTH
+    X265_DEPTH = old_depth;
+#endif
                         return false;
                     }
                 }
@@ -191,7 +198,9 @@
             j += FENC_STRIDE;
         }
     }
-
+#if HIGH_BIT_DEPTH
+    X265_DEPTH = old_depth;
+#endif
     return true;
 }
 


More information about the x265-devel mailing list