[x265] [PATCH] TComYuv::copyPartToYuv, asm code integration for blockcopy_pp
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Fri Nov 15 16:01:18 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1384527669 -19800
# Node ID 33f2b360afdb3246d55557be861cf806d220c421
# Parent a089e7fc1509e44a8f338fffa8443a5e5d1a5a43
TComYuv::copyPartToYuv, asm code integration for blockcopy_pp
diff -r a089e7fc1509 -r 33f2b360afdb source/Lib/TLibCommon/TComYuv.cpp
--- a/source/Lib/TLibCommon/TComYuv.cpp Fri Nov 15 20:01:10 2013 +0530
+++ b/source/Lib/TLibCommon/TComYuv.cpp Fri Nov 15 20:31:09 2013 +0530
@@ -208,11 +208,16 @@
void TComYuv::copyPartToYuv(TComYuv* dstPicYuv, uint32_t partIdx)
{
- copyPartToLuma(dstPicYuv, partIdx);
- copyPartToChroma(dstPicYuv, partIdx);
+ uint32_t height = dstPicYuv->getHeight();
+ uint32_t width = dstPicYuv->getWidth();
+
+ int part = partitionFromSizes(width, height);
+
+ copyPartToLuma(dstPicYuv, partIdx, part);
+ copyPartToChroma(dstPicYuv, partIdx, part);
}
-void TComYuv::copyPartToLuma(TComYuv* dstPicYuv, uint32_t partIdx)
+void TComYuv::copyPartToLuma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t part)
{
Pel* src = getLumaAddr(partIdx);
Pel* dst = dstPicYuv->getLumaAddr(0);
@@ -220,14 +225,10 @@
uint32_t srcstride = getStride();
uint32_t dststride = dstPicYuv->getStride();
- uint32_t height = dstPicYuv->getHeight();
- uint32_t width = dstPicYuv->getWidth();
-
- int part = partitionFromSizes(width, height);
primitives.luma_copy_pp[part](dst, dststride, src, srcstride);
}
-void TComYuv::copyPartToChroma(TComYuv* dstPicYuv, uint32_t partIdx)
+void TComYuv::copyPartToChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t part)
{
Pel* srcU = getCbAddr(partIdx);
Pel* srcV = getCrAddr(partIdx);
@@ -237,11 +238,8 @@
uint32_t srcstride = getCStride();
uint32_t dststride = dstPicYuv->getCStride();
- uint32_t uiCHeight = dstPicYuv->getCHeight();
- uint32_t uiCWidth = dstPicYuv->getCWidth();
-
- primitives.blockcpy_pp(uiCWidth, uiCHeight, dstU, dststride, srcU, srcstride);
- primitives.blockcpy_pp(uiCWidth, uiCHeight, 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::copyPartToPartYuv(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, bool bLuma, bool bChroma)
diff -r a089e7fc1509 -r 33f2b360afdb source/Lib/TLibCommon/TComYuv.h
--- a/source/Lib/TLibCommon/TComYuv.h Fri Nov 15 20:01:10 2013 +0530
+++ b/source/Lib/TLibCommon/TComYuv.h Fri Nov 15 20:31:09 2013 +0530
@@ -133,8 +133,8 @@
// Copy the part of Big YUV buffer to other Small YUV buffer
void copyPartToYuv(TComYuv* dstPicYuv, uint32_t srcPartIdx);
- void copyPartToLuma(TComYuv* dstPicYuv, uint32_t srcPartIdx);
- void copyPartToChroma(TComYuv* dstPicYuv, uint32_t srcPartIdx);
+ void copyPartToLuma(TComYuv* dstPicYuv, uint32_t srcPartIdx, uint32_t part);
+ void copyPartToChroma(TComYuv* dstPicYuv, uint32_t srcPartIdx, uint32_t part);
// Copy YUV partition buffer to other YUV partition buffer
void copyPartToPartYuv(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, bool bLuma = true, bool bChroma = true);
More information about the x265-devel
mailing list