[x265] [PATCH 3 of 7] encoder: ignore param->rc.qgSize when delta-qp coding is disabled

deepthi at multicorewareinc.com deepthi at multicorewareinc.com
Sat Apr 18 08:22:05 CEST 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1428596457 18000
#      Thu Apr 09 11:20:57 2015 -0500
# Node ID aaf3c4712b8c140c39c98ba385500ade64272a97
# Parent  a30aaefa68de138b8fc2745ba02a3bcaaf42acff
encoder: ignore param->rc.qgSize when delta-qp coding is disabled

This was causing maxCuDQPDepth to be negative and check failures for cases like:
BasketballDrive_1920x1080_50.y4m --preset superfast --psy-rd 1 --ctu 16 --no-wpp

diff -r a30aaefa68de -r aaf3c4712b8c source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Wed Apr 08 11:52:50 2015 +0530
+++ b/source/encoder/encoder.cpp	Thu Apr 09 11:20:57 2015 -0500
@@ -1582,12 +1582,16 @@
     bool bIsVbv = m_param->rc.vbvBufferSize > 0 && m_param->rc.vbvMaxBitrate > 0;
 
     if (!m_param->bLossless && (m_param->rc.aqMode || bIsVbv))
+    {
         pps->bUseDQP = true;
+        pps->maxCuDQPDepth = g_log2Size[m_param->maxCUSize] - g_log2Size[m_param->rc.qgSize];
+        X265_CHECK(pps->maxCuDQPDepth <= 2, "max CU DQP depth cannot be greater than 2\n");
+    }
     else
+    {
         pps->bUseDQP = false;
-
-    pps->maxCuDQPDepth = g_log2Size[m_param->maxCUSize] - g_log2Size[m_param->rc.qgSize];
-    X265_CHECK(pps->maxCuDQPDepth <= 2, "max CU DQP depth cannot be greater than 2");
+        pps->maxCuDQPDepth = 0;
+    }
 
     pps->chromaQpOffset[0] = m_param->cbQpOffset;
     pps->chromaQpOffset[1] = m_param->crQpOffset;


More information about the x265-devel mailing list