[x265] [PATCH] estimateCUCost : best cost between inter and intra, and calculated the rowsatd

Steve Borho steve at borho.org
Wed Aug 14 08:58:09 CEST 2013


On Wed, Aug 14, 2013 at 1:21 AM, <gopu at multicorewareinc.com> wrote:

> # HG changeset patch
> # User ggopu
> # Date 1376461292 -19800
> # Node ID bc21438114a63558abff32278ba54bddca234e65
> # Parent  a2026f0e1556e129d7c86d951b9d3e694a43fac6
> estimateCUCost : best cost between inter and intra, and calculated the
> rowsatd
>
> diff -r a2026f0e1556 -r bc21438114a6 source/encoder/slicetype.cpp
> --- a/source/encoder/slicetype.cpp      Tue Aug 13 22:10:41 2013 -0500
> +++ b/source/encoder/slicetype.cpp      Wed Aug 14 11:51:32 2013 +0530
> @@ -193,10 +193,10 @@
>          // TODO: add bidir
>      }
>
> +    int bcost = me.COST_MAX, cost;
>      if (!fenc->bIntraCalculated)
>      {
>          Int nLog2SizeMinus2 = g_convertToBit[cu_size]; // partition size
> -        int bcost = me.COST_MAX, cost;
>
>          fenc->bIntraCalculated = true;
>
> @@ -236,7 +236,28 @@
>          }
>          fenc->lowresMvCosts[0][0][cu_xy] = bcost;
>      }
> -
> +
> +    if (!b_bidir)
> +    {
> +        int icost = *fenc_costs[0];
> +        if(*fenc_costs[1] < icost)
> +            icost = *fenc_costs[1];
> +
> +        int b_intra = icost < bcost;
> +        if (b_intra)
> +        {
> +            bcost = icost;
> +        }
>

the meaning of b_intra here is backwards. you've calculated icost as the
least (best) inter cost


> +        fenc->intraMbs[b - p0] += b_intra;
> +    }
> +
> +    if (p0 != p1)
> +    {
> +        int bcost_aq = bcost;
> +        fenc->rowSatds[b - p0][p1 - b][cuy] += bcost_aq;
> +        fenc->costEst[b - p0][p1 - b] += bcost;
> +    }
>

lowresCosts also needs to be set

+
>      return 0;
>

this function should probably return void


>  }
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>



-- 
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.videolan.org/private/x265-devel/attachments/20130814/ffd932b9/attachment-0001.html>


More information about the x265-devel mailing list