From 62bf74eb329152294e9ee41e05ca51f8d785c8f1 Mon Sep 17 00:00:00 2001
From: Adarsh Krishnan Ramasubramonian <aramasub@qti.qualcomm.com>
Date: Sun, 11 Aug 2019 00:33:32 +0100
Subject: [PATCH] Fix-443: Fix to the merged version of JVET-O0919 and
 JVET-O0650 to use joint Cb-Cr table

---
 source/Lib/CommonLib/Quant.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/source/Lib/CommonLib/Quant.cpp b/source/Lib/CommonLib/Quant.cpp
index 7d724e3c3..51c11513d 100644
--- a/source/Lib/CommonLib/Quant.cpp
+++ b/source/Lib/CommonLib/Quant.cpp
@@ -168,7 +168,12 @@ QpParam::QpParam(const TransformUnit& tu, const ComponentID &compIDX, const int
 
 #if JVET_O0919_TS_MIN_QP
 #if JVET_O0650_SIGNAL_CHROMAQP_MAPPING_TABLE
-  *this = QpParam(QP <= -MAX_INT ? tu.cu->qp : QP, compID, tu.cs->sps->getQpBDOffset(toChannelType(compID)), tu.cs->sps->getMinQpPrimeTsMinus4(toChannelType(compID)), chromaQpOffset, tu.chromaFormat, dqp, tu.cs->sps);
+#if JVET_O0105_ICT
+  const bool useJQP = isChroma(compID) && (abs(TU::getICTMode(tu)) == 2);
+#else
+  const bool useJQP = isChroma(compID) && tu.jointCbCr;
+#endif
+  *this = QpParam(QP <= -MAX_INT ? tu.cu->qp : QP, useJQP ? JOINT_CbCr : compID, tu.cs->sps->getQpBDOffset(toChannelType(compID)), tu.cs->sps->getMinQpPrimeTsMinus4(toChannelType(compID)), chromaQpOffset, tu.chromaFormat, dqp, tu.cs->sps);
 #else
   *this = QpParam(QP <= -MAX_INT ? tu.cu->qp : QP, toChannelType(compID), tu.cs->sps->getQpBDOffset(toChannelType(compID)), tu.cs->sps->getMinQpPrimeTsMinus4(toChannelType(compID)), chromaQpOffset, tu.chromaFormat, dqp);
 #endif
-- 
GitLab