[x265] [PATCH] pixel-sse41.cpp: Modified sse_ss8 function using faster macro PROCESS_SSE_SS4x1

Steve Borho steve at borho.org
Tue Oct 15 19:05:06 CEST 2013


On Tue, Oct 15, 2013 at 3:52 AM, <dnyaneshwar at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Dnyaneshwar Gorade <dnyaneshwar at multicorewareinc.com>
> # Date 1381826441 -19800
> #      Tue Oct 15 14:10:41 2013 +0530
> # Node ID e00905521f015292f9ccc1ae83b1476c3c433310
> # Parent  1019dc55ec1b7f6b4ba7d15126d96167998c4031
> pixel-sse41.cpp: Modified sse_ss8 function using faster macro
> PROCESS_SSE_SS4x1.
>

these all need to be packaged together in one patch with the change in the
macro itself, otherwise the build is broken for a stretch of commits, which
is always bad when you're trying to isolate a change that introduced a bug


>
> diff -r 1019dc55ec1b -r e00905521f01 source/common/vec/pixel-sse41.cpp
> --- a/source/common/vec/pixel-sse41.cpp Tue Oct 15 14:07:36 2013 +0530
> +++ b/source/common/vec/pixel-sse41.cpp Tue Oct 15 14:10:41 2013 +0530
> @@ -5361,14 +5361,16 @@
>  {
>      int rows = ly;
>      __m128i sum  = _mm_setzero_si128();
> -    __m128i m1, n1, diff, sign1, sign2, tmp1, tmp2;
> +    __m128i m1, n1, diff, sign, tmp1, tmp2;
>
>      for (; rows != 0; rows--)
>      {
>          PROCESS_SSE_SS4x1(0);
>
> -        m1 = _mm_unpackhi_epi16(m1, sign1);
> -        n1 = _mm_unpackhi_epi16(n1, sign2);
> +        sign = _mm_srai_epi16(m1, 15);
> +        m1 = _mm_unpackhi_epi16(m1, sign);
> +        sign = _mm_srai_epi16(n1, 15);
> +        n1 = _mm_unpackhi_epi16(n1, sign);
>          diff = _mm_sub_epi32(m1, n1);
>          diff = _mm_mullo_epi32(diff, diff);
>          sum = _mm_add_epi32(sum, diff);
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>



-- 
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131015/76c5dde2/attachment.html>


More information about the x265-devel mailing list