[x265] [PATCH] cutree: when cutree enabled P_SLICE CU QP always calculated from qpoffset,
gopu at multicorewareinc.com
gopu at multicorewareinc.com
Wed Apr 2 07:52:10 CEST 2014
# HG changeset patch
# User Gopu Govindaswamy
# Date 1396417894 -19800
# Wed Apr 02 11:21:34 2014 +0530
# Node ID 931b4cd4da91dc667efd16d26b4e9ea834007623
# Parent 03bad90e94adce6fb89c6d5edb86919a1e783402
cutree: when cutree enabled P_SLICE CU QP always calculated from qpoffset,
diff -r 03bad90e94ad -r 931b4cd4da91 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Wed Apr 02 06:51:35 2014 +0530
+++ b/source/encoder/frameencoder.cpp Wed Apr 02 11:21:34 2014 +0530
@@ -1228,7 +1228,17 @@
int block_y = (cuAddr / m_pic->getPicSym()->getFrameWidthInCU()) * noOfBlocks;
int block_x = (cuAddr * noOfBlocks) - block_y * m_pic->getPicSym()->getFrameWidthInCU();
- double *qpoffs = (m_pic->getSlice()->isReferenced() && m_cfg->param->rc.cuTree) ? m_pic->m_lowres.qpOffset : m_pic->m_lowres.qpAqOffset;
+ double *qpoffs;
+ if (m_cfg->param->rc.cuTree)
+ {
+ if(m_pic->getSlice()->isReferenced() || m_pic->getSlice()->getSliceType() == P_SLICE)
+ qpoffs = m_pic->m_lowres.qpOffset;
+ else
+ qpoffs = m_pic->m_lowres.qpAqOffset;
+ }
+ else
+ qpoffs = m_pic->m_lowres.qpAqOffset;
+
int cnt = 0, idx = 0;
for (int h = 0; h < noOfBlocks && block_y < maxBlockRows; h++, block_y++)
{
More information about the x265-devel
mailing list