changeset 12679:882b00bc0b52 Release_3.4

vbv: Fix vbv lookahead computation on analysis load+-scalefactor
author Kirithika <kirithika@multicorewareinc.com>
date Wed, 19 Aug 2020 10:57:05 +0530
parents 2d287c472f05
children 4fa8211845ac
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:47:31 2020 +0530
+++ b/source/encoder/slicetype.cpp	Wed Aug 19 10:57:05 2020 +0530
@@ -1513,7 +1513,7 @@ void Lookahead::slicetypeDecide()
                 if (!fenc)
                     break;
             }
-            vbvLookahead(frames, numFrames, true);
+            vbvLookahead(frames, numFrames, false);
         }
     }
 
@@ -1774,7 +1774,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;
@@ -1841,7 +1841,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++;
     }