[x265] [PATCH] intra-sse3.cpp: Replace PredIntraAng4_m_26 vector class function with intrinsic

dnyaneshwar at multicorewareinc.com dnyaneshwar at multicorewareinc.com
Fri Oct 11 12:41:13 CEST 2013


# HG changeset patch
# User Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
# Date 1381487932 -19800
#      Fri Oct 11 16:08:52 2013 +0530
# Node ID 29c8344ad787504e1534027aa11fef82efd5e261
# Parent  36926872eec337ae917d1b9d4f09bccd65f24eaf
intra-sse3.cpp: Replace PredIntraAng4_m_26 vector class function with intrinsic.

diff -r 36926872eec3 -r 29c8344ad787 source/common/vec/intra-sse3.cpp
--- a/source/common/vec/intra-sse3.cpp	Fri Oct 11 16:06:09 2013 +0530
+++ b/source/common/vec/intra-sse3.cpp	Fri Oct 11 16:08:52 2013 +0530
@@ -1861,37 +1861,41 @@
 
 void PredIntraAng4_m_26(pixel* dst, int dstStride, pixel *refMain, int dirMode)
 {
-    PRED_INTRA_ANG4_START
-
-        tmp16_1 = (Vec16uc)load_partial(const_int(8), refMain - 3);
-
-    row41 = extend_low(tmp16_1);    //offsets(-4,-3,-2,-1)
-    tmp2uq = reinterpret_i(tmp16_1);
-    tmp2uq = tmp2uq >> 8;
-    tmp16_2 = reinterpret_i(tmp2uq);
-    row42 = extend_low(tmp16_2);    //offsets(-3,-2,-1,0)
-
-    row31 = row42;                  //offsets(-3,-2,-1,0)
-    tmp2uq = reinterpret_i(tmp16_1);
-    tmp2uq = tmp2uq >> 16;
-    tmp16_2 = reinterpret_i(tmp2uq);
-    row32 = extend_low(tmp16_2);    //offsets(-2,-1,0,1)
-
-    row21 = row32;                  //offsets(-2,-1,0,1)
-    tmp2uq = reinterpret_i(tmp16_1);
-    tmp2uq = tmp2uq >> 24;
-    tmp16_2 = reinterpret_i(tmp2uq);
-    row22 = extend_low(tmp16_2);    //offsets(-1,0,1,2)
-
-    row11 = row22;                  //offsets(-1,0,1,2)
-    tmp2uq = reinterpret_i(tmp16_1);
-    tmp2uq = tmp2uq >> 32;
-    tmp16_2 = reinterpret_i(tmp2uq);
-    row12 = extend_low(tmp16_2);    //offsets(0,1,2,3)
-
-    v_deltaPos = v_ipAngle = -26;
-
-    PRED_INTRA_ANG4_END
+    PRED_INTRA_ANGLE_4_START
+
+    tmp16_1 = _mm_loadl_epi64((__m128i*)(refMain - 3));
+    row41 = _mm_unpacklo_epi8(tmp16_1, _mm_setzero_si128());
+
+    tmp2 = tmp16_1;
+    tmp2 = _mm_srl_epi64(tmp2,_mm_cvtsi32_si128(8));
+
+    tmp16_2 = tmp2;
+    row42 = _mm_unpacklo_epi8(tmp16_2, _mm_setzero_si128());
+
+    row31 = row42;
+    tmp2 = tmp16_1;
+    tmp2 = _mm_srl_epi64(tmp2,_mm_cvtsi32_si128(16));
+
+    tmp16_2 = tmp2;
+    row32 = _mm_unpacklo_epi8(tmp16_2, _mm_setzero_si128());
+
+    row21 = row32;
+    tmp2 = tmp16_1;
+    tmp2 = _mm_srl_epi64(tmp2,_mm_cvtsi32_si128(24));
+
+    tmp16_2 = tmp2;
+    row22 = _mm_unpacklo_epi8(tmp16_2, _mm_setzero_si128());
+
+    row11 = row22;
+    tmp2 = tmp16_1;
+    tmp2 = _mm_srl_epi64(tmp2,_mm_cvtsi32_si128(32));
+
+    tmp16_2 = tmp2;
+    row12 = _mm_unpacklo_epi8(tmp16_2, _mm_setzero_si128());
+
+    deltaPos = ipAngle = _mm_set1_epi16(-26);
+
+    PRED_INTRA_ANGLE_4_END
 }
 
 void PredIntraAng4_m_32(pixel* dst, int dstStride, pixel *refMain, int /*dirMode*/)


More information about the x265-devel mailing list