[x265] [PATCH] vbv: Fix vbv lookahead computation on analysis load+scalefactor

Kirithika Kalirathnam kirithika at multicorewareinc.com
Tue Aug 18 14:23:15 CEST 2020


>From b3916d57398109761198c970c5cbb1d70f5767cf Mon Sep 17 00:00:00 2001
From: Kirithika <kirithika at multicorewareinc.com>
Date: Tue, 18 Aug 2020 14:21:18 +0530
Subject: [PATCH] vbv: Fix vbv lookahead computation on analysis
 load+scalefactor

---
 source/encoder/slicetype.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/source/encoder/slicetype.cpp b/source/encoder/slicetype.cpp
index 81d2adbe6..4e52e584c 100644
--- a/source/encoder/slicetype.cpp
+++ b/source/encoder/slicetype.cpp
@@ -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 **frames, int
numFrames, int keyframe)
         }
         prevNonB = curNonB;
         curNonB++;
-        while (curNonB <= numFrames && frames[curNonB]->sliceType ==
X265_TYPE_B)
+        while (curNonB <= numFrames &&
IS_X265_TYPE_B(frames[curNonB]->sliceType))
             curNonB++;
     }

-- 
2.24.0.windows.2

*Thanks,*
*Kirithika*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200818/a82936b7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.patch
Type: application/octet-stream
Size: 1583 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200818/a82936b7/attachment.obj>


More information about the x265-devel mailing list