[x265] [PATCH] xDCT16 vector code cleanup

Steve Borho steve at borho.org
Sat Jul 6 21:46:15 CEST 2013


On Tue, Jul 2, 2013 at 6:52 AM, <praveen at multicorewareinc.com> wrote:

> # HG changeset patch
> # User praveentiwari
> # Date 1372765951 -19800
> # Node ID ef51d05368cf00120fc19f629d803f95af562492
> # Parent  879245f5eedca52db300147368c523b8e12c33bc
> xDCT16 vector code cleanup
>
> diff -r 879245f5eedc -r ef51d05368cf source/common/vec/dct.inc
> --- a/source/common/vec/dct.inc Tue Jul 02 15:23:41 2013 +0530
> +++ b/source/common/vec/dct.inc Tue Jul 02 17:22:31 2013 +0530
> @@ -785,27 +785,27 @@
>      }
>  }
>
> -void xDCT16(short *pSrc, int *pDst, intptr_t nStride)
> +void xDCT16(short *src, int *dst, intptr_t nStride)
>

more nStride again; I'll quit commenting on these, just be on the lookout
for this Hungarian style



>  {
>      const int shift_1st = 3;
>      const int shift_2nd = 10;
>
> -    ALIGN_VAR_32(Short, tmp[16 * 16]);
> -    ALIGN_VAR_32(Short, tmp1[16 * 16]);
> +    ALIGN_VAR_32(Short, coef[16 * 16]);
> +    ALIGN_VAR_32(Short, block[16 * 16]);
>
>      for (int i = 0; i < 16; i++)
>      {
> -        memcpy(&tmp1[i * 16], &pSrc[i * nStride], 16 * sizeof(short));
> +        memcpy(&block[i * 16], &src[i * nStride], 16 * sizeof(short));
>      }
>
> -    partialButterfly16(tmp1, tmp, shift_1st, 16);
> -    partialButterfly16(tmp, tmp1, shift_2nd, 16);
> +    partialButterfly16(block, coef, shift_1st, 16);
> +    partialButterfly16(coef, block, shift_2nd, 16);
>  #define N (16)
>      for (int i = 0; i < N; i++)
>      {
>          for (int j = 0; j < N; j++)
>          {
> -            pDst[i * N + j] = tmp1[i * N + j];
> +            dst[i * N + j] = block[i * N + j];
>          }
>      }
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> http://mailman.videolan.org/listinfo/x265-devel
>



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


More information about the x265-devel mailing list