[x265] [PATCH] Fix Initialization of Vbv-End flag error with multiple layers

Karam Singh karam.singh at multicorewareinc.com
Fri Oct 4 09:13:49 UTC 2024


This patch has been pushed to the master branch.
*__________________________*
*Karam Singh*
*Ph.D. IIT Guwahati*
Senior Software (Video Coding) Engineer
Mobile: +91 8011279030
Block 9A, 6th floor, DLF Cyber City
Manapakkam, Chennai 600 089


On Fri, Oct 4, 2024 at 2:12 PM Yaswanth Sastry <
yaswanth.sastry at multicorewareinc.com> wrote:

> From 876a66a23aa4e6e8ed055073b774039ac9bd447a Mon Sep 17 00:00:00 2001
> From: yaswanthsastry <yaswanth.sastry at multicorewareinc.com>
> Date: Thu, 3 Oct 2024 16:24:50 +0530
> Subject: [PATCH] Fix Initialization of VBV-End Flag error with multiple
> layers
>
> ---
>  source/encoder/encoder.cpp     | 2 +-
>  source/encoder/ratecontrol.cpp | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp
> index f890cff10..ff3f2f8e5 100644
> --- a/source/encoder/encoder.cpp
> +++ b/source/encoder/encoder.cpp
> @@ -1713,7 +1713,7 @@ int Encoder::encode(const x265_picture* pic_in,
> x265_picture** pic_out)
>              inFrame[layer]->m_poc = (!layer) ? (++m_pocLast) : m_pocLast;
>              inFrame[layer]->m_userData = inputPic[0]->userData;
>              inFrame[layer]->m_pts = inputPic[0]->pts;
> -              inFrame[layer]->vbvEndFlag = inputPic[layer]->vbvEndFlag;
> +            inFrame[layer]->vbvEndFlag = inputPic[0]->vbvEndFlag;
>
>              if ((m_param->bEnableSceneCutAwareQp & BACKWARD) &&
> m_param->rc.bStatRead)
>              {
> diff --git a/source/encoder/ratecontrol.cpp
> b/source/encoder/ratecontrol.cpp
> index fc79e88ab..d031e8d99 100644
> --- a/source/encoder/ratecontrol.cpp
> +++ b/source/encoder/ratecontrol.cpp
> @@ -1466,7 +1466,7 @@ int RateControl::rateControlStart(Frame* curFrame,
> RateControlEntry* rce, Encode
>           if (m_param->vbvBufferEnd && ((curFrame->vbvEndFlag) ||
> ((m_param->totalFrames) && (rce->encodeOrder >= (m_param->vbvEndFrameAdjust
> * m_param->totalFrames)))))
>           {
>                if (m_totalFrames == -1)
> -                   m_totalFrames = curFrame->vbvEndFlag ? (1 /
> m_param->vbvEndFrameAdjust) * rce->encodeOrder : m_param->totalFrames;
> + m_totalFrames = curFrame->vbvEndFlag ? static_cast<int>((1 /
> m_param->vbvEndFrameAdjust) * rce->encodeOrder) : m_param->totalFrames;
>                rce->remainingVbvEndFrames = ((m_totalFrames) -
> (rce->encodeOrder));
>                rce->vbvEndAdj = true;
>                rce->targetFill = 0;
> --
> 2.37.3.windows.1
>
> _______________________________________________
> 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/20241004/d107dc29/attachment.htm>


More information about the x265-devel mailing list