changeset 12680:244186fe0ab6

vbv: Fix vbv lookahead computation on analysis load+-scalefactor
author Kirithika <kirithika@multicorewareinc.com>
date Wed, 19 Aug 2020 10:57:12 +0530
parents bbf011c4e8b4
children 2001cec71acb
files source/encoder/slicetype.cpp
diffstat 1 files changed, 3 insertions(+-), 3 deletions(-) [+]
line wrap: on
line diff
--- a/source/encoder/slicetype.cpp	Mon Jul 27 13:40:17 2020 +0530
+++ b/source/encoder/slicetype.cpp	Wed Aug 19 10:57:12 2020 +0530
@@ -1513,7 +1513,7 @@ void Lookahead::slicetypeDecide()
                 if (!fenc)
                     break;
             }
-            vbvLookahead(frames, numFrames, true);
+            vbvLookahead(frames, numFrames, false);
         }
     }
 
@@ -1784,7 +1784,7 @@ void Lookahead::slicetypeDecide()
 void Lookahead::vbvLookahead(Lowres **frames, int numFrames, int keyframe)
 {
     int prevNonB = 0, curNonB = 1, idx = 0;
-    while (curNonB < numFrames && frames[curNonB]->sliceType == X265_TYPE_B)
+    while (curNonB < numFrames && IS_X265_TYPE_B(frames[curNonB]->sliceType))
         curNonB++;
     int nextNonB = keyframe ? prevNonB : curNonB;
     int nextB = prevNonB + 1;
@@ -1851,7 +1851,7 @@ void Lookahead::vbvLookahead(Lowres **fr
         }
         prevNonB = curNonB;
         curNonB++;
-        while (curNonB <= numFrames && frames[curNonB]->sliceType == X265_TYPE_B)
+        while (curNonB <= numFrames && IS_X265_TYPE_B(frames[curNonB]->sliceType))
             curNonB++;
     }