[x265] [PATCH] slicetype: bug fix for estimated frame costs

Aarthi Priya Thirumalai aarthi at multicorewareinc.com
Wed Oct 23 13:01:32 CEST 2013


On Wed, Oct 23, 2013 at 4:04 PM, Aarthi Thirumalai <
aarthi at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Aarthi Thirumalai
> # Date 1382524433 -19800
> #      Wed Oct 23 16:03:53 2013 +0530
> # Node ID 49ef6218538704a89f30c6d2aa77bf2166d4f0fe
> # Parent  6d96d64c4e9a2c526b57274760a7147241328cb3
> slicetype: bug fix for estimated frame costs
>
> diff -r 6d96d64c4e9a -r 49ef62185387 source/encoder/slicetype.cpp
> --- a/source/encoder/slicetype.cpp      Tue Oct 22 23:36:36 2013 +0530
> +++ b/source/encoder/slicetype.cpp      Wed Oct 23 16:03:53 2013 +0530
> @@ -150,7 +150,7 @@
>          break;
>      case P_SLICE:
>          d0 = poc - l0poc;
> -        frames[0] = lastNonB;
> +        frames[0] = &pic->getSlice()->getRefPic(REF_PIC_LIST_0,
> 0)->m_lowres;
>          frames[d0] = &pic->m_lowres;
>          p0 = 0;
>          p1 = d0;
> @@ -162,7 +162,7 @@
>          {
>              // L1 reference is truly in the future
>              d1 = l1poc - poc;
> -            frames[0] = lastNonB;
> +            frames[0] = &pic->getSlice()->getRefPic(REF_PIC_LIST_0,
> 0)->m_lowres;
>

lastNonB is set in slicetypeDecide() for each frame - when bframes >0 . So
, when bframes = 0, lastNonB always refer to the initial I frame instead of
the nearest P frame reference when getEstimatedPictureCost() is invoked
from Rate control.

>              frames[d0] = &pic->m_lowres;
>              frames[d0 + d1] = &pic->getSlice()->getRefPic(REF_PIC_LIST_1,
> 0)->m_lowres;
>              p0 = 0;
> @@ -171,7 +171,7 @@
>          }
>          else
>          {
> -            frames[0] = lastNonB;
> +            frames[0] = &pic->getSlice()->getRefPic(REF_PIC_LIST_0,
> 0)->m_lowres;
>              frames[d0] = &pic->m_lowres;
>              p0 = 0;
>              p1 = d0;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131023/f1cf7da3/attachment.html>


More information about the x265-devel mailing list