[x265] [PATCH] xDST4 renamed and code cleanup

praveen at multicorewareinc.com praveen at multicorewareinc.com
Mon Jul 8 13:22:24 CEST 2013


# HG changeset patch
# User praveentiwari
# Date 1373282534 -19800
# Node ID fb95da9bd85ffe33c1c42958dc7e621053eedba4
# Parent  8c8996bbec6ba6e5fadf97b460243084f9fed5c7
xDST4 renamed and code cleanup

diff -r 8c8996bbec6b -r fb95da9bd85f source/common/vec/dct.inc
--- a/source/common/vec/dct.inc	Mon Jul 08 16:39:11 2013 +0530
+++ b/source/common/vec/dct.inc	Mon Jul 08 16:52:14 2013 +0530
@@ -165,7 +165,7 @@
 }
 
 #if INSTRSET < 4
-void xDST4(short *src, int *dst, intptr_t nStride)
+void dst4(short *src, int *dst, intptr_t stride)
 {
     const int shift_1st = 1;
     const int shift_2nd = 8;
@@ -175,7 +175,7 @@
 
     for (int i = 0; i < 4; i++)
     {
-        memcpy(&block[i * 4], &src[i * nStride], 4 * sizeof(short));
+        memcpy(&block[i * 4], &src[i * stride], 4 * sizeof(short));
     }
 
     fastForwardDst(block, coef, shift_1st);
@@ -202,17 +202,17 @@
     { 55, -84, 74, -29, 55, -84, 74, -29 },
 };
 
-void xDST4(short *src, int *dst, intptr_t nStride)
+void dst4(short *src, int *dst, intptr_t stride)
 {
     // Const
     __m128i c_1     = _mm_set1_epi32(1);
     __m128i c_128   = _mm_set1_epi32(128);
 
     // Load
-    __m128i T20  = _mm_loadl_epi64((__m128i*)&src[0 * nStride]);
-    __m128i T21  = _mm_loadl_epi64((__m128i*)&src[1 * nStride]);
-    __m128i T22  = _mm_loadl_epi64((__m128i*)&src[2 * nStride]);
-    __m128i T23  = _mm_loadl_epi64((__m128i*)&src[3 * nStride]);
+    __m128i T20  = _mm_loadl_epi64((__m128i*)&src[0 * stride]);
+    __m128i T21  = _mm_loadl_epi64((__m128i*)&src[1 * stride]);
+    __m128i T22  = _mm_loadl_epi64((__m128i*)&src[2 * stride]);
+    __m128i T23  = _mm_loadl_epi64((__m128i*)&src[3 * stride]);
 
     __m128i T30  = _mm_unpacklo_epi64(T20, T21);
     __m128i T31  = _mm_unpacklo_epi64(T22, T23);
@@ -4086,7 +4086,7 @@
 
     // TODO: in 16bpp mode, the intermediate must be 32-bits
 #if !HIGH_BIT_DEPTH && INSTRSET > 4
-    p.dct[DST_4x4] = xDST4;
+    p.dct[DST_4x4] = dst4;
     p.dct[DCT_4x4] = xDCT4;
     p.dct[DCT_8x8] = xDCT8;
     p.dct[DCT_16x16] = xDCT16;


More information about the x265-devel mailing list