[x265] [PATCH For REVIEW] Bidir ME: new logic adapted from x264

Derek Buitenhuis derek.buitenhuis at gmail.com
Mon Sep 30 15:14:51 CEST 2013


On 9/30/2013 8:05 AM, deepthidevaki at multicorewareinc.com wrote:
> # HG changeset patch
> # User Deepthi Devaki <deepthidevaki at multicorewareinc.com>
> # Date 1380523193 -19800
> # Node ID bb238e8b36007aad896884009c720d26df8775c5
> # Parent  55edc34e253c14d3eccb83a7d1db43774349ff9a
> Bidir ME: new logic adapted from x264
> 
> L0 and L1 MVs from unidir ME used for bidir MV. bidir cost is calculated from the average of references. Performance/PSNR with new bidir with commandline
> x265.exe FourPeople_1280x720_60.y4m  -f 100 --b-adapt 0 -b 3 --ref 1 --hash 1 -o four.hevc -r recon.yuv
> New:  (2.24 fps), 515.16 kb/s, Global PSNR: 39.704
> Orig: (2.05 fps), 519.47 kb/s, Global PSNR: 39.711

[...]

> -void TEncSearch::predInterSearch(TComDataCU* cu, TComYuv* fencYuv, TComYuv* predYuv, bool bUseMRG)
> +void TEncSearch::predInterSearch(TComDataCU* cu, TComYuv* /*fencYuv*/, TComYuv* predYuv, bool bUseMRG)

Um, no.

> +template<int lx, int ly>
> +void pixelavg_pp(pixel* dst, intptr_t dstride, pixel* src0, pixel* src1, intptr_t sstride0, intptr_t sstride1)
> +{
> +    for( int y = 0; y < ly; y++ )
> +    {
> +        for( int x = 0; x < lx; x++ )
> +        {
> +            dst[x] = ( src0[x] + src1[x] + 1 ) >> 1;
> +        }
> +        src0 += sstride0;
> +        src1 += sstride1;
> +        dst += dstride;
> +    }
> +}

Why the template?

- Derek


More information about the x265-devel mailing list