[x265] [PATCH] blockcpy_sp asm integration

praveen at multicorewareinc.com praveen at multicorewareinc.com
Tue Nov 19 16:54:32 CET 2013


# HG changeset patch
# User Praveen Tiwari
# Date 1384876463 -19800
# Node ID 759afecfcae72fa9b90748d17d5883db41a398ff
# Parent  7b50f202dc9dc07399c722c5f5dac88299974083
blockcpy_sp asm integration

diff -r 7b50f202dc9d -r 759afecfcae7 source/common/TShortYUV.cpp
--- a/source/common/TShortYUV.cpp	Tue Nov 19 20:29:29 2013 +0530
+++ b/source/common/TShortYUV.cpp	Tue Nov 19 21:24:23 2013 +0530
@@ -56,6 +56,8 @@
     m_width  = width;
     m_height = height;
 
+    m_part = partitionFromSizes(m_width, m_height);
+
     m_cwidth  = width  >> m_hChromaShift;
     m_cheight = height >> m_vChromaShift;
     m_csp = csp;
@@ -192,7 +194,8 @@
     unsigned int srcStride = m_width;
     unsigned int dstStride = dstPicYuv->getStride();
 
-    primitives.blockcpy_ps(width, height, dst, dstStride, src, srcStride);
+    int part = partitionFromSizes(width, height);
+    primitives.luma_copy_sp[part](dst, dstStride, src, srcStride);
 }
 
 void TShortYUV::copyPartToPartChroma(TShortYUV* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height)
@@ -287,13 +290,15 @@
 
 void TShortYUV::copyPartToPartChroma(TComYuv* dstPicYuv, unsigned int partIdx, unsigned int width, unsigned int height, unsigned int chromaId)
 {
+    width, height;
+
     if (chromaId == 0)
     {
         int16_t* srcU = getCbAddr(partIdx);
         Pel* dstU = dstPicYuv->getCbAddr(partIdx);
         unsigned int srcStride = m_cwidth;
         unsigned int dstStride = dstPicYuv->getCStride();
-        primitives.blockcpy_ps(width, height, dstU, dstStride, srcU, srcStride);
+        primitives.chroma_copy_sp[m_csp][m_part](dstU, dstStride, srcU, srcStride);
     }
     else if (chromaId == 1)
     {
@@ -301,7 +306,7 @@
         Pel* dstV = dstPicYuv->getCrAddr(partIdx);
         unsigned int srcStride = m_cwidth;
         unsigned int dstStride = dstPicYuv->getCStride();
-        primitives.blockcpy_ps(width, height, dstV, dstStride, srcV, srcStride);
+        primitives.chroma_copy_sp[m_csp][m_part](dstV, dstStride, srcV, srcStride);
     }
     else
     {
@@ -312,7 +317,7 @@
 
         unsigned int srcStride = m_cwidth;
         unsigned int dstStride = dstPicYuv->getCStride();
-        primitives.blockcpy_ps(width, height, dstU, dstStride, srcU, srcStride);
-        primitives.blockcpy_ps(width, height, dstV, dstStride, srcV, srcStride);
+        primitives.chroma_copy_sp[m_csp][m_part](dstU, dstStride, srcU, srcStride);
+        primitives.chroma_copy_sp[m_csp][m_part](dstV, dstStride, srcV, srcStride);
     }
 }
diff -r 7b50f202dc9d -r 759afecfcae7 source/common/TShortYUV.h
--- a/source/common/TShortYUV.h	Tue Nov 19 20:29:29 2013 +0530
+++ b/source/common/TShortYUV.h	Tue Nov 19 21:24:23 2013 +0530
@@ -54,7 +54,7 @@
     }
 
     int m_csp;
-
+    int m_part;
 public:
 
     int16_t* m_bufY;


More information about the x265-devel mailing list