[x265] [PATCH] vbv: Fix vbv lookahead computation on analysis load+scalefactor

Aruna Matheswaran aruna at multicorewareinc.com
Wed Aug 19 08:23:59 CEST 2020


Pushed to master and cherry-picked the fix into Release_3.4.

On Tue, Aug 18, 2020 at 5:53 PM Kirithika Kalirathnam <
kirithika at multicorewareinc.com> wrote:

> From b3916d57398109761198c970c5cbb1d70f5767cf Mon Sep 17 00:00:00 2001
> From: Kirithika <kirithika at multicorewareinc.com>
> Date: Tue, 18 Aug 2020 14:21:18 +0530
> Subject: [PATCH] vbv: Fix vbv lookahead computation on analysis
>  load+scalefactor
>
> ---
>  source/encoder/slicetype.cpp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/source/encoder/slicetype.cpp b/source/encoder/slicetype.cpp
> index 81d2adbe6..4e52e584c 100644
> --- a/source/encoder/slicetype.cpp
> +++ b/source/encoder/slicetype.cpp
> @@ -1513,7 +1513,7 @@ void Lookahead::slicetypeDecide()
>                  if (!fenc)
>                      break;
>              }
> -            vbvLookahead(frames, numFrames, true);
> +            vbvLookahead(frames, numFrames, false);
>          }
>      }
>
> @@ -1784,7 +1784,7 @@ void Lookahead::slicetypeDecide()
>  void Lookahead::vbvLookahead(Lowres **frames, int numFrames, int keyframe)
>  {
>      int prevNonB = 0, curNonB = 1, idx = 0;
> -    while (curNonB < numFrames && frames[curNonB]->sliceType ==
> X265_TYPE_B)
> +    while (curNonB < numFrames &&
> IS_X265_TYPE_B(frames[curNonB]->sliceType))
>          curNonB++;
>      int nextNonB = keyframe ? prevNonB : curNonB;
>      int nextB = prevNonB + 1;
> @@ -1851,7 +1851,7 @@ void Lookahead::vbvLookahead(Lowres **frames, int
> numFrames, int keyframe)
>          }
>          prevNonB = curNonB;
>          curNonB++;
> -        while (curNonB <= numFrames && frames[curNonB]->sliceType ==
> X265_TYPE_B)
> +        while (curNonB <= numFrames &&
> IS_X265_TYPE_B(frames[curNonB]->sliceType))
>              curNonB++;
>      }
>
> --
> 2.24.0.windows.2
>
> *Thanks,*
> *Kirithika*
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>


-- 
Regards,
*Aruna Matheswaran,*
Video Codec Engineer,
Media & AI analytics BU,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200819/ddc1bfd4/attachment.html>


More information about the x265-devel mailing list