[x265] [PATCH] sei: disable HRD with warning when vbv is off

kavitha at multicorewareinc.com kavitha at multicorewareinc.com
Tue Jun 17 15:27:40 CEST 2014


# HG changeset patch
# User Kavitha Sampath <kavitha at multicorewareinc.com>
# Date 1403011445 -19800
#      Tue Jun 17 18:54:05 2014 +0530
# Node ID 571b1696f1f3f4dba0b88e7d6706b1998b1028b5
# Parent  3a19a9fdb103979e65a9daf15c46c0735e8d743e
sei: disable HRD with warning when vbv is off

diff -r 3a19a9fdb103 -r 571b1696f1f3 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Tue Jun 17 14:07:26 2014 +0530
+++ b/source/encoder/ratecontrol.cpp	Tue Jun 17 18:54:05 2014 +0530
@@ -330,6 +330,12 @@
         m_param->rc.vbvMaxBitrate = 0;
     }
     m_isVbv = m_param->rc.vbvMaxBitrate > 0 && m_param->rc.vbvBufferSize > 0;
+    if (m_param->bEmitHRDSEI && !m_isVbv)
+    {
+        x265_log(m_param, X265_LOG_WARNING, "NAL HRD parameters require VBV parameters, ignored\n");
+        m_param->bEmitHRDSEI = 0;
+    }
+
     m_isCbr = m_param->rc.rateControlMode == X265_RC_ABR && m_isVbv && m_param->rc.vbvMaxBitrate == m_param->rc.bitrate;
     m_bframes = m_param->bframes;
     m_bframeBits = 0;


More information about the x265-devel mailing list