From 22f914878734068f9b601cbfc796f182f36b98cc Mon Sep 17 00:00:00 2001 From: Xiang Li <xlxiangli@tencent.com> Date: Tue, 23 Oct 2018 14:52:30 -0700 Subject: [PATCH] Integration of JVET-L0553 on the fix of initial QP signaling --- source/Lib/CommonLib/TypeDef.h | 2 ++ source/Lib/EncoderLib/EncLib.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/source/Lib/CommonLib/TypeDef.h b/source/Lib/CommonLib/TypeDef.h index d8e34d3bbd..1c7469a6d0 100644 --- a/source/Lib/CommonLib/TypeDef.h +++ b/source/Lib/CommonLib/TypeDef.h @@ -50,6 +50,8 @@ #include <assert.h> #include <cassert> +#define JVET_L0553_FIX_INITQP 1 + #define JVET_L0147_ALF_SUBSAMPLED_LAPLACIAN 1 // Subsampled Laplacian calculation #define JVET_L0191_LM_WO_LMS 1 // NO LMS regression. min/max are used instead diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index 38661820cc..43573b1ab2 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -1234,7 +1234,11 @@ void EncLib::xInitPPS(PPS &pps, const SPS &sps) { baseQp = getBaseQP()-26; } +#if JVET_L0553_FIX_INITQP + const int maxDQP = 37; +#else const int maxDQP = 25; +#endif const int minDQP = -26 + sps.getQpBDOffset(CHANNEL_TYPE_LUMA); pps.setPicInitQPMinus26( std::min( maxDQP, std::max( minDQP, baseQp ) )); -- GitLab