changeset 12595:52135ffd9bcd

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 a8a2c4c37267
children 2e84224f404a
files source/encoder/slicetype.cpp
diffstat 1 files changed, 1 insertions(+-), 1 deletions(-) [+]
line wrap: on
line diff
--- a/source/encoder/slicetype.cpp	Tue Dec 10 17:37:23 2019 +0530
+++ b/source/encoder/slicetype.cpp	Mon Dec 23 14:40:32 2019 +0530
@@ -1775,7 +1775,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)