[x265] [PATCH] TComYuv.cpp, blockcpy_pp asm integration
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Wed Nov 13 11:53:03 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1384339140 -19800
# Node ID c0da70471ba63f052bd0e0cdf81af3d0ca9150a4
# Parent c4ca80d19105ccf1ba2ec14dd65915f2820a660d
TComYuv.cpp, blockcpy_pp asm integration
diff -r c4ca80d19105 -r c0da70471ba6 source/Lib/TLibCommon/TComYuv.cpp
--- a/source/Lib/TLibCommon/TComYuv.cpp Tue Nov 12 19:10:23 2013 +0530
+++ b/source/Lib/TLibCommon/TComYuv.cpp Wed Nov 13 16:09:00 2013 +0530
@@ -245,10 +245,12 @@
void TComYuv::copyPartToPartYuv(TComYuv* 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::copyPartToPartYuv(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, bool bLuma, bool bChroma)
@@ -259,7 +261,7 @@
copyPartToPartChroma(dstPicYuv, partIdx, width >> m_hChromaShift, height >> m_vChromaShift);
}
-void TComYuv::copyPartToPartLuma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)
+void TComYuv::copyPartToPartLuma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t part)
{
Pel* src = getLumaAddr(partIdx);
Pel* dst = dstPicYuv->getLumaAddr(partIdx);
@@ -269,7 +271,6 @@
uint32_t srcstride = getStride();
uint32_t dststride = dstPicYuv->getStride();
- int part = partitionFromSizes(width, height);
primitives.luma_copy_pp[part](dst, dststride, src, srcstride);
}
@@ -285,7 +286,7 @@
primitives.luma_copy_ps[part](dst, dststride, src, srcstride);
}
-void TComYuv::copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)
+void TComYuv::copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t part)
{
Pel* srcU = getCbAddr(partIdx);
Pel* srcV = getCrAddr(partIdx);
@@ -297,8 +298,8 @@
uint32_t srcstride = getCStride();
uint32_t dststride = dstPicYuv->getCStride();
- primitives.blockcpy_pp(width, height, dstU, dststride, srcU, srcstride);
- primitives.blockcpy_pp(width, height, dstV, dststride, srcV, srcstride);
+ primitives.chroma_copy_pp[part](dstU, dststride, srcU, srcstride);
+ primitives.chroma_copy_pp[part](dstV, dststride, srcV, srcstride);
}
void TComYuv::copyPartToPartChroma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height)
diff -r c4ca80d19105 -r c0da70471ba6 source/Lib/TLibCommon/TComYuv.h
--- a/source/Lib/TLibCommon/TComYuv.h Tue Nov 12 19:10:23 2013 +0530
+++ b/source/Lib/TLibCommon/TComYuv.h Wed Nov 13 16:09:00 2013 +0530
@@ -136,9 +136,9 @@
// 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);
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 width, uint32_t height);
+ void copyPartToPartLuma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t part);
void copyPartToPartLuma(TShortYUV* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);
- void copyPartToPartChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height);
+ 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(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t width, uint32_t height, uint32_t chromaId);
More information about the x265-devel
mailing list