[x265] [PATCH] lookahead: fix cost estimation, use previous result when calculation is skipped

Deepthi Nandakumar deepthi at multicorewareinc.com
Wed Sep 18 18:08:05 CEST 2013


On Wed, Sep 18, 2013 at 6:21 PM, <deepthidevaki at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Deepthi Devaki <deepthidevaki at multicorewareinc.com>
> # Date 1379508562 -19800
> # Node ID f3f6eb53a7854220ef06c5b0f925e485929ab31f
> # Parent  9d5d4e4e6d6ca312cb443f18fe6880127e5f6c75
> lookahead: fix cost estimation, use previous result when calculation is
> skipped
>
> diff -r 9d5d4e4e6d6c -r f3f6eb53a785 source/encoder/slicetype.cpp
> --- a/source/encoder/slicetype.cpp      Wed Sep 18 11:34:10 2013 +0530
> +++ b/source/encoder/slicetype.cpp      Wed Sep 18 18:19:22 2013 +0530
> @@ -363,8 +363,11 @@
>      for (int i = 0; i < 1 + bBidir; i++)
>      {
>          if (!bDoSearch[i])
> +        {
> +            /* Use previously calculated cost */
> +            COPY2_IF_LT(bcost, *fenc_costs[i], listused, i + 1);
>              continue;
> -
> +        }
>

Thanks, this is a good catch. However, we also need to initialise
lowresMvCosts in lowres::create to COST_MAX, to prevent the possibility of
reading uninitialised memory.

         int numc = 0;
>          MV mvc[4], mvp;
>          MV *fenc_mv = fenc_mvs[i];
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20130918/f176c488/attachment-0001.html>


More information about the x265-devel mailing list