[x265] [PATCH] TComYuv::copyPartToPartYuv, asm code intergration for blockcopy_ps
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Mon Nov 18 16:30:57 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1384788645 -19800
# Node ID 49a556cf22721d846a94e07c1933fcd092b898dd
# Parent 59646d515e79b4d0f9a3a72c77c7af17a83bf3d9
TComYuv::copyPartToPartYuv, asm code intergration for blockcopy_ps
diff -r 59646d515e79 -r 49a556cf2272 source/Lib/TLibCommon/TComYuv.cpp
--- a/source/Lib/TLibCommon/TComYuv.cpp Mon Nov 18 20:53:29 2013 +0530
+++ b/source/Lib/TLibCommon/TComYuv.cpp Mon Nov 18 21:00:45 2013 +0530
@@ -256,10 +256,12 @@
void TComYuv::copyPartToPartYuv(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, bool bLuma, bool bChroma)
{
+ int part = partitionFromSizes(width, height);
+
if (bLuma)
- copyPartToPartLuma(dstPicYuv, partIdx, width, height);
+ copyPartToPartLuma(dstPicYuv, partIdx, part);
if (bChroma)
- copyPartToPartChroma(dstPicYuv, partIdx, width >> m_hChromaShift, height >> m_vChromaShift);
+ copyPartToPartChroma(dstPicYuv, partIdx, part);
}
void TComYuv::copyPartToPartLuma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t part)
@@ -275,7 +277,7 @@
primitives.luma_copy_pp[part](dst, dststride, src, srcstride);
}
-void TComYuv::copyPartToPartLuma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)
+void TComYuv::copyPartToPartLuma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t part)
{
Pel* src = getLumaAddr(partIdx);
int16_t* dst = dstPicYuv->getLumaAddr(partIdx);
@@ -283,7 +285,6 @@
uint32_t srcstride = getStride();
uint32_t dststride = dstPicYuv->m_width;
- int part = partitionFromSizes(width, height);
primitives.luma_copy_ps[part](dst, dststride, src, srcstride);
}
@@ -303,7 +304,7 @@
primitives.chroma_copy_pp[m_csp][part](dstV, dststride, srcV, srcstride);
}
-void TComYuv::copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)
+void TComYuv::copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t part)
{
Pel* srcU = getCbAddr(partIdx);
Pel* srcV = getCrAddr(partIdx);
@@ -313,8 +314,8 @@
uint32_t srcstride = getCStride();
uint32_t dststride = dstPicYuv->m_cwidth;
- primitives.blockcpy_sp(width, height, dstU, dststride, srcU, srcstride);
- primitives.blockcpy_sp(width, height, dstV, dststride, srcV, srcstride);
+ primitives.chroma_copy_ps[m_csp][part](dstU, dststride, srcU, srcstride);
+ primitives.chroma_copy_ps[m_csp][part](dstV, dststride, srcV, srcstride);
}
void TComYuv::copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, uint32_t chromaId)
diff -r 59646d515e79 -r 49a556cf2272 source/Lib/TLibCommon/TComYuv.h
--- a/source/Lib/TLibCommon/TComYuv.h Mon Nov 18 20:53:29 2013 +0530
+++ b/source/Lib/TLibCommon/TComYuv.h Mon Nov 18 21:00:45 2013 +0530
@@ -140,9 +140,9 @@
void copyPartToPartYuv(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, bool bLuma = true, bool bChroma = true);
void copyPartToPartYuv(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, bool bLuma = true, bool bChroma = true);
void copyPartToPartLuma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t part);
- void copyPartToPartLuma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);
+ void copyPartToPartLuma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t part);
void copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t part);
- void copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);
+ void copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t part);
void copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, uint32_t chromaId);
void copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, uint32_t chromaId);
diff -r 59646d515e79 -r 49a556cf2272 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp Mon Nov 18 20:53:29 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp Mon Nov 18 21:00:45 2013 +0530
@@ -1126,12 +1126,12 @@
}
//===== copy reconstruction =====
- m_qtTempTransformSkipTComYuv.copyPartToPartLuma(&m_qtTempTComYuv[qtlayer], absPartIdx, 1 << trSizeLog2, 1 << trSizeLog2);
+ int part = partitionFromSizes(1 << trSizeLog2, 1 << trSizeLog2);
+ m_qtTempTransformSkipTComYuv.copyPartToPartLuma(&m_qtTempTComYuv[qtlayer], absPartIdx, part);
if (!bLumaOnly && !bSkipChroma)
{
- uint32_t trSizeCLog2 = (bChromaSame ? trSizeLog2 : trSizeLog2 - 1);
- m_qtTempTransformSkipTComYuv.copyPartToPartChroma(&m_qtTempTComYuv[qtlayer], absPartIdx, 1 << trSizeCLog2, 1 << trSizeCLog2);
+ m_qtTempTransformSkipTComYuv.copyPartToPartChroma(&m_qtTempTComYuv[qtlayer], absPartIdx, part);
}
uint32_t zOrder = cu->getZorderIdxInCU() + absPartIdx;
More information about the x265-devel
mailing list