[x265] [PATCH] TComYuv::copyPartToPartYuv, blockcopy_pp asm integration

chen chenm003 at 163.com
Mon Nov 18 15:00:34 CET 2013


This version is right

At 2013-11-18 21:45:41,praveen at multicorewareinc.com wrote:
># HG changeset patch
># User Praveen Tiwari
># Date 1384782332 -19800
># Node ID 68d8ca28ac05b93accc6931abd576a56b621a492
># Parent  024d6ddf57596b6f77100b3bdcac555ddbec7c0a
>TComYuv::copyPartToPartYuv, blockcopy_pp asm integration
>
>diff -r 024d6ddf5759 -r 68d8ca28ac05 source/Lib/TLibCommon/TComYuv.cpp
>--- a/source/Lib/TLibCommon/TComYuv.cpp Mon Nov 18 18:44:32 2013 +0530
>+++ b/source/Lib/TLibCommon/TComYuv.cpp Mon Nov 18 19:15:32 2013 +0530
>@@ -246,10 +246,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)
>@@ -260,7 +262,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);
>@@ -270,7 +272,6 @@
>     uint32_t srcstride = getStride();
>     uint32_t dststride = dstPicYuv->getStride();
> 
>-    int part = partitionFromSizes(width, height);
>     primitives.luma_copy_pp[part](dst, dststride, src, srcstride);
> }
> 
>@@ -286,7 +287,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);
>@@ -298,8 +299,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[m_csp][part](dstU, dststride, srcU, srcstride);
>+    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)
>diff -r 024d6ddf5759 -r 68d8ca28ac05 source/Lib/TLibCommon/TComYuv.h
>--- a/source/Lib/TLibCommon/TComYuv.h Mon Nov 18 18:44:32 2013 +0530
>+++ b/source/Lib/TLibCommon/TComYuv.h Mon Nov 18 19:15:32 2013 +0530
>@@ -139,9 +139,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);
>_______________________________________________
>x265-devel mailing list
>x265-devel at videolan.org
>https://mailman.videolan.org/listinfo/x265-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131118/db8d86f2/attachment-0001.html>


More information about the x265-devel mailing list