[x265] [PATCH] xIDCT4_C code cleanup

Steve Borho steve at borho.org
Sat Jul 6 21:22:14 CEST 2013


On Fri, Jul 5, 2013 at 5:42 AM, <praveen at multicorewareinc.com> wrote:

> # HG changeset patch
> # User praveentiwari
> # Date 1373020937 -19800
> # Node ID 5ff0843668f49bfd232ef1aa08524ad8278b70b1
> # Parent  cd21b61ba794b138aca6d0fc58e46323c45c018d
> xIDCT4_C code cleanup
>
> diff -r cd21b61ba794 -r 5ff0843668f4 source/common/dct.cpp
> --- a/source/common/dct.cpp     Fri Jul 05 16:09:17 2013 +0530
> +++ b/source/common/dct.cpp     Fri Jul 05 16:12:17 2013 +0530
> @@ -591,31 +591,31 @@
>      }
>  }
>
> -void xIDCT4_C(int *pSrc, short *pDst, intptr_t stride)
> +void xIDCT4_C(int *src, short *dst, intptr_t stride)
>

we also need to rename all these methods to idct4_c, etc.


>  {
>      const int shift_1st = 7;
>      const int shift_2nd = 12;
>
> -    ALIGN_VAR_32(Short, tmp[4 * 4]);
> -    ALIGN_VAR_32(Short, tmp2[4 * 4]);
> +    ALIGN_VAR_32(Short, coef[4 * 4]);
> +    ALIGN_VAR_32(Short, coef2[4 * 4]);
>
>  #define N (4)
>      for (int i = 0; i < N; i++)
>      {
>          for (int j = 0; j < N; j++)
>          {
> -            tmp2[i * N + j] = (short)pSrc[i * N + j];
> +            coef2[i * N + j] = (short)src[i * N + j];
>          }
>      }
>
>  #undef N
>
> -    partialButterflyInverse4(tmp2, tmp, shift_1st, 4); // Forward DST BY
> FAST ALGORITHM, block input, tmp output
> -    partialButterflyInverse4(tmp, tmp2, shift_2nd, 4); // Forward DST BY
> FAST ALGORITHM, tmp input, coeff output
> +    partialButterflyInverse4(coef2, coef, shift_1st, 4); // Forward DST
> BY FAST ALGORITHM, block input, coef output
> +    partialButterflyInverse4(coef, coef2, shift_2nd, 4); // Forward DST
> BY FAST ALGORITHM, coef input, coeff output
>
>      for (int i = 0; i < 4; i++)
>      {
> -        memcpy(&pDst[i * stride], &tmp2[i * 4], 4 * sizeof(short));
> +        memcpy(&dst[i * stride], &coef2[i * 4], 4 * sizeof(short));
>      }
>  }
>
> _______________________________________________
> 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/940ec3f0/attachment.html>


More information about the x265-devel mailing list