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