[x265] [PATCH] TShortYUV.cpp, added code to use new pixelsub_ps asm primitives

Deepthi Nandakumar deepthi at multicorewareinc.com
Wed Nov 13 10:18:50 CET 2013


This patch cannot be accepted.

1. For generic 8bpp I420 optimizations, we can avoid the extra call to
partitionFromSizes in chroma by passing in part, instead of partsize. This
will remove the downshift and then upscale by 2 (!!)

2. We will need to handle multiple color spaces separately as luma and
chroma tables are now aligned only for I420.


On Wed, Nov 13, 2013 at 12:31 PM, <murugan at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Murugan Vairavel <murugan at multicorewareinc.com>
> # Date 1384326072 -19800
> #      Wed Nov 13 12:31:12 2013 +0530
> # Node ID 69d4c1cfc8bed7c63bfdaa1073196e0874d14ebe
> # Parent  c4ca80d19105ccf1ba2ec14dd65915f2820a660d
> TShortYUV.cpp, added code to use new pixelsub_ps asm primitives
>
> diff -r c4ca80d19105 -r 69d4c1cfc8be source/common/TShortYUV.cpp
> --- a/source/common/TShortYUV.cpp       Tue Nov 12 19:10:23 2013 +0530
> +++ b/source/common/TShortYUV.cpp       Wed Nov 13 12:31:12 2013 +0530
> @@ -95,7 +95,8 @@
>      int src1Stride = srcYuv1->getStride();
>      int dstStride  = m_width;
>
> -    primitives.pixelsub_ps(x, y, dst, dstStride, src0, src1, src0Stride,
> src1Stride);
> +    int part = partitionFromSizes(x, y);
> +    primitives.luma_sub_ps[part](dst, dstStride, src0, src1, src0Stride,
> src1Stride);
>  }
>
>  void TShortYUV::subtractChroma(TComYuv* srcYuv0, TComYuv* srcYuv1,
> unsigned int trUnitIdx, unsigned int partSize)
> @@ -113,8 +114,9 @@
>      int src1Stride = srcYuv1->getCStride();
>      int dstStride  = m_cwidth;
>
> -    primitives.pixelsub_ps(x, y, dstU, dstStride, srcU0, srcU1,
> src0Stride, src1Stride);
> -    primitives.pixelsub_ps(x, y, dstV, dstStride, srcV0, srcV1,
> src0Stride, src1Stride);
> +    int part = partitionFromSizes(2 * x, 2 * y);
> +    primitives.chroma_sub_ps[part](dstU, dstStride, srcU0, srcU1,
> src0Stride, src1Stride);
> +    primitives.chroma_sub_ps[part](dstV, dstStride, srcV0, srcV1,
> src0Stride, src1Stride);
>  }
>
>  void TShortYUV::addClip(TShortYUV* srcYuv0, TShortYUV* srcYuv1, unsigned
> int trUnitIdx, unsigned int partSize)
> _______________________________________________
> 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/20131113/c85dd5f3/attachment.html>


More information about the x265-devel mailing list