[x265] [PATCH] TShortYUV.cpp, added code to use new pixelsub_ps asm primitives

murugan at multicorewareinc.com murugan at multicorewareinc.com
Wed Nov 13 08:01:33 CET 2013


# HG changeset patch
# User Murugan Vairavel <murugan at multicorewareinc.com>
# Date 1384326072 -19800
#      Wed Nov 13 12:31:12 2013 +0530
# Node ID 69d4c1cfc8bed7c63bfdaa1073196e0874d14ebe
# Parent  c4ca80d19105ccf1ba2ec14dd65915f2820a660d
TShortYUV.cpp, added code to use new pixelsub_ps asm primitives

diff -r c4ca80d19105 -r 69d4c1cfc8be source/common/TShortYUV.cpp
--- a/source/common/TShortYUV.cpp	Tue Nov 12 19:10:23 2013 +0530
+++ b/source/common/TShortYUV.cpp	Wed Nov 13 12:31:12 2013 +0530
@@ -95,7 +95,8 @@
     int src1Stride = srcYuv1->getStride();
     int dstStride  = m_width;
 
-    primitives.pixelsub_ps(x, y, dst, dstStride, src0, src1, src0Stride, src1Stride);
+    int part = partitionFromSizes(x, y);
+    primitives.luma_sub_ps[part](dst, dstStride, src0, src1, src0Stride, src1Stride);
 }
 
 void TShortYUV::subtractChroma(TComYuv* srcYuv0, TComYuv* srcYuv1, unsigned int trUnitIdx, unsigned int partSize)
@@ -113,8 +114,9 @@
     int src1Stride = srcYuv1->getCStride();
     int dstStride  = m_cwidth;
 
-    primitives.pixelsub_ps(x, y, dstU, dstStride, srcU0, srcU1, src0Stride, src1Stride);
-    primitives.pixelsub_ps(x, y, dstV, dstStride, srcV0, srcV1, src0Stride, src1Stride);
+    int part = partitionFromSizes(2 * x, 2 * y);
+    primitives.chroma_sub_ps[part](dstU, dstStride, srcU0, srcU1, src0Stride, src1Stride);
+    primitives.chroma_sub_ps[part](dstV, dstStride, srcV0, srcV1, src0Stride, src1Stride);
 }
 
 void TShortYUV::addClip(TShortYUV* srcYuv0, TShortYUV* srcYuv1, unsigned int trUnitIdx, unsigned int partSize)


More information about the x265-devel mailing list