[x265] [PATCH 1 of 2] intra: replace 64x64 scaled reference pixel copy loop by memcpy

Steve Borho steve at borho.org
Sat Mar 28 04:22:56 CET 2015


On 03/27, Min Chen wrote:
> # HG changeset patch
> # User Min Chen <chenm003 at 163.com>
> # Date 1427503356 25200
> # Node ID 6c739f92b1b18bf20531afea00480c86db1a9f0e
> # Parent  dc7a6c5fbda13173004e6193f185ea857d7a22c8
> intra: replace 64x64 scaled reference pixel copy loop by memcpy

shouldn't change outputs, queued for default

> diff -r dc7a6c5fbda1 -r 6c739f92b1b1 source/encoder/search.cpp
> --- a/source/encoder/search.cpp	Thu Mar 26 11:24:23 2015 -0500
> +++ b/source/encoder/search.cpp	Fri Mar 27 17:42:36 2015 -0700
> @@ -1234,13 +1234,8 @@
>          primitives.scale1D_128to64(nScale + 1, intraNeighbourBuf[0] + 1, 0);
>  
>          // we do not estimate filtering for downscaled samples
> -        for (int x = 1; x < 65; x++)
> -        {
> -            intraNeighbourBuf[0][x] = nScale[x];           // Top pixel
> -            intraNeighbourBuf[0][x + 64] = nScale[x + 64]; // Left pixel
> -            intraNeighbourBuf[1][x] = nScale[x];           // Top pixel
> -            intraNeighbourBuf[1][x + 64] = nScale[x + 64]; // Left pixel
> -        }
> +        memcpy(&intraNeighbourBuf[0][1], &nScale[1], 2 * 64 * sizeof(pixel));   // Top & Left pixels
> +        memcpy(&intraNeighbourBuf[1][1], &nScale[1], 2 * 64 * sizeof(pixel));
>  
>          scaleTuSize = 32;
>          scaleStride = 32;
> @@ -1467,14 +1462,8 @@
>                      intraNeighbourBuf[1][0] = intraNeighbourBuf[0][0];
>                      primitives.scale1D_128to64(nScale + 1, intraNeighbourBuf[0] + 1, 0);
>  
> -                    // TO DO: primitive
> -                    for (int x = 1; x < 65; x++)
> -                    {
> -                        intraNeighbourBuf[0][x] = nScale[x];           // Top pixel
> -                        intraNeighbourBuf[0][x + 64] = nScale[x + 64]; // Left pixel
> -                        intraNeighbourBuf[1][x] = nScale[x];           // Top pixel
> -                        intraNeighbourBuf[1][x + 64] = nScale[x + 64]; // Left pixel
> -                    }
> +                    memcpy(&intraNeighbourBuf[0][1], &nScale[1], 2 * 64 * sizeof(pixel));
> +                    memcpy(&intraNeighbourBuf[1][1], &nScale[1], 2 * 64 * sizeof(pixel));
>  
>                      scaleTuSize = 32;
>                      scaleStride = 32;
> 
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel

-- 
Steve Borho


More information about the x265-devel mailing list