[x265] [PATCH] TComYuv::copyPartToPartChroma, blockcopy_ps asm integration
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Tue Nov 19 14:45:28 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1384868719 -19800
# Node ID 64fd92a0ef556e894769c259d49513d335eadd49
# Parent 8c402f58e89f4c79b362b768187c3ad656aebc9f
TComYuv::copyPartToPartChroma, blockcopy_ps asm integration
diff -r 8c402f58e89f -r 64fd92a0ef55 source/Lib/TLibCommon/TComYuv.cpp
--- a/source/Lib/TLibCommon/TComYuv.cpp Tue Nov 19 19:12:11 2013 +0530
+++ b/source/Lib/TLibCommon/TComYuv.cpp Tue Nov 19 19:15:19 2013 +0530
@@ -260,10 +260,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)
@@ -279,7 +281,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);
@@ -287,7 +289,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);
}
@@ -307,7 +308,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);
@@ -317,8 +318,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 8c402f58e89f -r 64fd92a0ef55 source/Lib/TLibCommon/TComYuv.h
--- a/source/Lib/TLibCommon/TComYuv.h Tue Nov 19 19:12:11 2013 +0530
+++ b/source/Lib/TLibCommon/TComYuv.h Tue Nov 19 19:15:19 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 8c402f58e89f -r 64fd92a0ef55 source/Lib/TLibEncoder/TEncSearch.cpp
--- a/source/Lib/TLibEncoder/TEncSearch.cpp Tue Nov 19 19:12:11 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp Tue Nov 19 19:15:19 2013 +0530
@@ -1125,13 +1125,13 @@
::memcpy(coeffDstV, coeffSrcV, sizeof(TCoeff) * numCoeffC);
}
+ int part = partitionFromSizes(1 << trSizeLog2, 1 << trSizeLog2);
//===== copy reconstruction =====
- m_qtTempTransformSkipTComYuv.copyPartToPartLuma(&m_qtTempTComYuv[qtlayer], absPartIdx, 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