[x265] [PATCH] TComYuv::copyToPicLuma, blockcopy_pp asm integration

praveen at multicorewareinc.com praveen at multicorewareinc.com
Tue Nov 19 13:35:55 CET 2013


# HG changeset patch
# User Praveen Tiwari
# Date 1384864542 -19800
# Node ID b00d291161564186bdda3530ac584f4fcc027aed
# Parent  2f5f538d2cbca3b46e8d27d860e9787cc19f406f
TComYuv::copyToPicLuma, blockcopy_pp asm integration

diff -r 2f5f538d2cbc -r b00d29116156 source/Lib/TLibCommon/TComYuv.cpp
--- a/source/Lib/TLibCommon/TComYuv.cpp	Mon Nov 18 16:44:31 2013 -0600
+++ b/source/Lib/TLibCommon/TComYuv.cpp	Tue Nov 19 18:05:42 2013 +0530
@@ -103,8 +103,15 @@
 
 void TComYuv::copyToPicYuv(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth, uint32_t partIdx)
 {
+    int width, height;
+
+    width  = m_width >> partDepth;
+    height = m_height >> partDepth;
+
+    int part = partitionFromSizes(width, height);
+
     copyToPicLuma(destPicYuv, cuAddr, absZOrderIdx, partDepth, partIdx);
-    copyToPicChroma(destPicYuv, cuAddr, absZOrderIdx, partDepth, partIdx);
+    copyToPicChroma(destPicYuv, cuAddr, absZOrderIdx, part, partDepth, partIdx);
 }
 
 void TComYuv::copyToPicLuma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth, uint32_t partIdx)
@@ -125,12 +132,11 @@
     primitives.luma_copy_pp[part](dst, dststride, src, srcstride);
 }
 
-void TComYuv::copyToPicChroma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth, uint32_t partIdx)
+void TComYuv::copyToPicChroma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t part, uint32_t partDepth, uint32_t partIdx)
 {
-    int width, height;
+    int width;
 
     width  = m_cwidth >> partDepth;
-    height = m_cheight >> partDepth;
 
     Pel* srcU = getCbAddr(partIdx, width);
     Pel* srcV = getCrAddr(partIdx, width);
@@ -140,8 +146,8 @@
     uint32_t srcstride = getCStride();
     uint32_t dststride = destPicYuv->getCStride();
 
-    primitives.blockcpy_pp(width, height, dstU, dststride, srcU, srcstride);
-    primitives.blockcpy_pp(width, height, dstV, dststride, srcV, srcstride);
+    primitives.chroma_copy_pp[m_csp][part](dstU, dststride, srcU, srcstride);
+    primitives.chroma_copy_pp[m_csp][part](dstV, dststride, srcV, srcstride);
 }
 
 void TComYuv::copyFromPicYuv(TComPicYuv* srcPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx)
diff -r 2f5f538d2cbc -r b00d29116156 source/Lib/TLibCommon/TComYuv.h
--- a/source/Lib/TLibCommon/TComYuv.h	Mon Nov 18 16:44:31 2013 -0600
+++ b/source/Lib/TLibCommon/TComYuv.h	Tue Nov 19 18:05:42 2013 +0530
@@ -119,7 +119,7 @@
     //  Copy YUV buffer to picture buffer
     void    copyToPicYuv(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth = 0, uint32_t partIdx = 0);
     void    copyToPicLuma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth = 0, uint32_t partIdx = 0);
-    void    copyToPicChroma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t partDepth = 0, uint32_t partIdx = 0);
+    void    copyToPicChroma(TComPicYuv* destPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx, uint32_t part, uint32_t partDepth = 0, uint32_t partIdx = 0);
 
     //  Copy YUV buffer from picture buffer
     void    copyFromPicYuv(TComPicYuv* srcPicYuv, uint32_t cuAddr, uint32_t absZOrderIdx);


More information about the x265-devel mailing list