[x265] [PATCH 3 of 3] lambda: disable chroma QP offsets temporarily

deepthi at multicorewareinc.com deepthi at multicorewareinc.com
Mon Jun 16 13:19:41 CEST 2014


# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1402917246 -19800
#      Mon Jun 16 16:44:06 2014 +0530
# Node ID f535b1aed91cabc7d9dd1b55a5dd42edad63d536
# Parent  4d76a9c8b5abbf143e5869d55cf80a8816d99a68
lambda: disable chroma QP offsets temporarily

diff -r 4d76a9c8b5ab -r f535b1aed91c source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Mon Jun 16 16:35:16 2014 +0530
+++ b/source/encoder/frameencoder.cpp	Mon Jun 16 16:44:06 2014 +0530
@@ -364,6 +364,12 @@
 
 void FrameEncoder::setLambda(int qp, int row)
 {  
+    TComSlice*  slice = m_pic->getSlice();
+    int chromaQPOffset = slice->getPPS()->getChromaCbQpOffset() + slice->getSliceQpDeltaCb();
+    X265_CHECK(chromaQPOffset == 0, "chroma QP offsets disabled temporarily");
+    chromaQPOffset = slice->getPPS()->getChromaCrQpOffset() + slice->getSliceQpDeltaCr();
+    X265_CHECK(chromaQPOffset == 0, "chroma QP offsets disabled temporarily");
+
     m_rows[row].m_search.setQP(qp);
 }
 
@@ -500,7 +506,11 @@
     }
 
     int qp = slice->getSliceQp();
-     
+    int chromaQPOffset = slice->getPPS()->getChromaCbQpOffset() + slice->getSliceQpDeltaCb();
+    X265_CHECK(chromaQPOffset == 0, "chroma QP offsets disabled temporarily");
+    chromaQPOffset = slice->getPPS()->getChromaCrQpOffset() + slice->getSliceQpDeltaCr();
+    X265_CHECK(chromaQPOffset == 0, "chroma QP offsets disabled temporarily");
+
     double lambda = x265_lambda2_tab[qp];
 
 #define SPEC_QP(x) X265_MIN(x, QP_MAX_SPEC)


More information about the x265-devel mailing list