[x265] [PATCH 2 of 4] level: make --tune zero-latency have zero-latency at the decoder (closes #99)

Steve Borho steve at borho.org
Wed Jan 21 16:29:42 CET 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1421853181 21600
#      Wed Jan 21 09:13:01 2015 -0600
# Node ID 21b73398d9b6c4a165eb389668e0ab1d0c61d12a
# Parent  15119ec537e0ed00b6a9f7bcb06b636a2fcc2fb5
level: make --tune zero-latency have zero-latency at the decoder (closes #99)

diff -r 15119ec537e0 -r 21b73398d9b6 source/encoder/level.cpp
--- a/source/encoder/level.cpp	Wed Jan 21 09:12:16 2015 -0600
+++ b/source/encoder/level.cpp	Wed Jan 21 09:13:01 2015 -0600
@@ -199,8 +199,8 @@
  * circumstances it will be quite noisy */
 bool enforceLevel(x265_param& param, VPS& vps)
 {
-    vps.numReorderPics = (param.bBPyramid && param.bframes > 1) ? 2 : 1;
-    vps.maxDecPicBuffering = X265_MIN(MAX_NUM_REF, X265_MAX(vps.numReorderPics + 1, (uint32_t)param.maxNumReferences) + vps.numReorderPics);
+    vps.numReorderPics = (param.bBPyramid && param.bframes > 1) ? 2 : !!param.bframes;
+    vps.maxDecPicBuffering = X265_MIN(MAX_NUM_REF, X265_MAX(vps.numReorderPics + 2, (uint32_t)param.maxNumReferences) + vps.numReorderPics);
 
     /* no level specified by user, just auto-detect from the configuration */
     if (param.levelIdc <= 0)


More information about the x265-devel mailing list