changeset 12593:2db562627201 Release_3.1

Fix VBV macroblocking that comes up with the last Intra frame This patch enables the VBV Lookahead computation of an I Slice to consider the last MiniGop frames available in the lookahead,hence fixing the VBV macroblocking issue that comes due to lack of frames in the Lookahead at the end of the video.
author Kirithika <kirithika@multicorewareinc.com>
date Mon, 23 Dec 2019 14:40:32 +0530
parents 7d72c29a7ead
children a62d540af8b8
files source/encoder/slicetype.cpp
diffstat 1 files changed, 1 insertions(+-), 1 deletions(-) [+]
line wrap: on
line diff
--- a/source/encoder/slicetype.cpp	Fri Nov 08 15:30:50 2019 +0530
+++ b/source/encoder/slicetype.cpp	Mon Dec 23 14:40:32 2019 +0530
@@ -1567,7 +1567,7 @@ void Lookahead::vbvLookahead(Lowres **fr
     if (m_param->bBPyramid && curNonB - prevNonB > 1)
         curBRef = (prevNonB + curNonB + 1) / 2;
     int miniGopEnd = keyframe ? prevNonB : curNonB;
-    while (curNonB < numFrames + !keyframe)
+    while (curNonB <= numFrames)
     {
         /* P/I cost: This shouldn't include the cost of nextNonB */
         if (nextNonB != curNonB)