[x265] [PATCH] Fix VBV macroblocking that comes up with the last Intra frame

kirithika at multicorewareinc.com kirithika at multicorewareinc.com
Thu Dec 26 04:38:01 CET 2019


# HG changeset patch
# User Kirithika <kirithika at multicorewareinc.com>
# Date 1577092232 -19800
#      Mon Dec 23 14:40:32 2019 +0530
# Node ID 09a92be151a276aec54f402456ca97576f5cfef3
# Parent  a8a2c4c37267305d1a6b828ad06f83b5c9c81d00
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.

diff -r a8a2c4c37267 -r 09a92be151a2 source/encoder/slicetype.cpp
--- 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 @@
     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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 1108 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20191226/fd7e141f/attachment.bin>


More information about the x265-devel mailing list