[x265] [PATCH] asm : Hook up luma_hps with the encoder

nabajit at multicorewareinc.com nabajit at multicorewareinc.com
Tue Dec 10 14:34:28 CET 2013


# HG changeset patch
# User Nabajit Deka
# Date 1386682458 -19800
#      Tue Dec 10 19:04:18 2013 +0530
# Node ID 85110eaada8ea1741426b07efc1ca7d2e9855e63
# Parent  34694c6343dd8c065eb7222105fbf813f04b07a8
asm : Hook up luma_hps with the encoder.

diff -r 34694c6343dd -r 85110eaada8e source/Lib/TLibCommon/TComPrediction.cpp
--- a/source/Lib/TLibCommon/TComPrediction.cpp	Tue Dec 10 19:01:25 2013 +0530
+++ b/source/Lib/TLibCommon/TComPrediction.cpp	Tue Dec 10 19:04:18 2013 +0530
@@ -449,7 +449,7 @@
         int tmpStride = width;
         int filterSize = NTAPS_LUMA;
         int halfFilterSize = (filterSize >> 1);
-        primitives.ipfilter_ps[FILTER_H_P_S_8](src - (halfFilterSize - 1) * srcStride,  srcStride, m_immedVals, tmpStride, width, height + filterSize - 1, g_lumaFilter[xFrac]);
+        primitives.luma_hps[partEnum](src, srcStride, m_immedVals, tmpStride, xFrac, 1);
         primitives.luma_vsp[partEnum](m_immedVals + (halfFilterSize - 1) * tmpStride, tmpStride, dst, dstStride, yFrac);
     }
 }
@@ -467,6 +467,8 @@
     int xFrac = mv->x & 0x3;
     int yFrac = mv->y & 0x3;
 
+    int partEnum = partitionFromSizes(width, height);
+
     assert((width % 4) + (height % 4) == 0);
     assert(dstStride == MAX_CU_SIZE);
 
@@ -476,7 +478,7 @@
     }
     else if (yFrac == 0)
     {
-        primitives.ipfilter_ps[FILTER_H_P_S_8](ref, refStride, dst, dstStride, width, height, g_lumaFilter[xFrac]);
+        primitives.luma_hps[partEnum](ref, refStride, dst, dstStride, xFrac, 0);
     }
     else if (xFrac == 0)
     {
@@ -487,7 +489,7 @@
         int tmpStride = width;
         int filterSize = NTAPS_LUMA;
         int halfFilterSize = (filterSize >> 1);
-        primitives.ipfilter_ps[FILTER_H_P_S_8](ref - (halfFilterSize - 1) * refStride, refStride, m_immedVals, tmpStride, width, height + filterSize - 1, g_lumaFilter[xFrac]);
+        primitives.luma_hps[partEnum](ref, refStride, m_immedVals, tmpStride, xFrac, 1);
         primitives.ipfilter_ss[FILTER_V_S_S_8](m_immedVals + (halfFilterSize - 1) * tmpStride, tmpStride, dst, dstStride, width, height, yFrac);
     }
 }
diff -r 34694c6343dd -r 85110eaada8e source/encoder/motion.cpp
--- a/source/encoder/motion.cpp	Tue Dec 10 19:01:25 2013 +0530
+++ b/source/encoder/motion.cpp	Tue Dec 10 19:04:18 2013 +0530
@@ -1155,10 +1155,7 @@
 
             int filterSize = NTAPS_LUMA;
             int halfFilterSize = filterSize >> 1;
-            primitives.ipfilter_ps[FILTER_H_P_S_8](fref - (halfFilterSize - 1) * ref->lumaStride, ref->lumaStride,
-                                                   immed, blockwidth,
-                                                   blockwidth, blockheight + filterSize - 1,
-                                                   g_lumaFilter[xFrac]);
+            primitives.luma_hps[partEnum](fref, ref->lumaStride,immed, blockwidth, xFrac, 1);
             primitives.luma_vsp[partEnum](immed + (halfFilterSize - 1) * blockwidth, blockwidth, subpelbuf, FENC_STRIDE, yFrac);
         }
         return cmp(fenc, FENC_STRIDE, subpelbuf, FENC_STRIDE);


More information about the x265-devel mailing list