[x265] [PATCH] pixel: Replaced convert16to32 from vector class to intrinsic

Steve Borho steve at borho.org
Fri Oct 11 08:38:48 CEST 2013


On Fri, Oct 11, 2013 at 1:31 AM, <yuvaraj at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Yuvaraj Venkatesh <yuvaraj at multicorewareinc.com>
> # Date 1381473045 -19800
> #      Fri Oct 11 12:00:45 2013 +0530
> # Node ID 7ddc170e0ef7e1c4323409a0ea5e6587cdfe5134
> # Parent  7320ecd0901c8338b5a1e1c121d2da44619ee17d
> pixel: Replaced convert16to32 from vector class to intrinsic
>

sorry, this function is gone since it was unreferenced.  However, you can
use this logic for the dct functions which do a buffer copy as their final
step.


> diff -r 7320ecd0901c -r 7ddc170e0ef7 source/common/vec/pixel-sse3.cpp
> --- a/source/common/vec/pixel-sse3.cpp  Thu Oct 10 22:11:58 2013 -0500
> +++ b/source/common/vec/pixel-sse3.cpp  Fri Oct 11 12:00:45 2013 +0530
> @@ -622,14 +622,16 @@
>
>      for (i = 0; i < num; i += 8)
>      {
> -        Vec8s im16;
> -        Vec4i im32L, im32H;
> +        __m128i im16;
> +        __m128i im32L, im32H;
> +        __m128i sign;
>
> -        im16.load(org);
> -        im32L = extend_low(im16);
> -        im32H = extend_high(im16);
> -        im32L.store(dst);
> -        im32H.store(dst + 4);
> +        im16 = _mm_loadu_si128((__m128i*)org);
> +        sign = _mm_srai_epi16(im16, 15);
> +        im32L = _mm_unpacklo_epi16(im16, sign);
> +        im32H = _mm_unpackhi_epi16(im16, sign);
> +        _mm_storeu_si128((__m128i*)dst, im32L);
> +        _mm_storeu_si128((__m128i*)(dst + 4), im32H);
>
>          org += 8;
>          dst += 8;
> _______________________________________________
> 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/20131011/0b6339f8/attachment-0001.html>


More information about the x265-devel mailing list