[x265] [PATCH 1/1] Set tuQTMaxLog2Size to MIN(5, maxLog2CUSize)
Nicolas Morey-Chaisemartin
nmorey at kalray.eu
Mon Oct 27 20:03:53 CET 2014
# HG changeset patch
# User Nicolas Morey-Chaisemartin <nmorey at kalray.eu>
# Date 1414077353 -7200
# Thu Oct 23 16:15:53 2014 +0200
[PATCH 1/1] Set tuQTMaxLog2Size to MIN(5, maxLog2CUSize)
---
source/common/param.cpp | 2 +-
source/encoder/encoder.cpp | 2 +-
source/encoder/search.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/source/common/param.cpp b/source/common/param.cpp
index 9d8a4b3..a260317 100644
--- a/source/common/param.cpp
+++ b/source/common/param.cpp
@@ -883,7 +883,7 @@ int x265_check_params(x265_param *param)
return check_failed;
uint32_t maxLog2CUSize = (uint32_t)g_log2Size[param->maxCUSize];
- uint32_t tuQTMaxLog2Size = maxLog2CUSize - 1;
+ uint32_t tuQTMaxLog2Size = X265_MAX(maxLog2CUSize - 1, 5);
uint32_t tuQTMinLog2Size = 2; //log2(4)
/* These checks might be temporary */
diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp
index 341705c..db2ce03 100644
--- a/source/encoder/encoder.cpp
+++ b/source/encoder/encoder.cpp
@@ -1209,7 +1209,7 @@ void Encoder::initSPS(SPS *sps)
sps->log2MinCodingBlockSize = g_maxLog2CUSize - g_maxCUDepth;
sps->log2DiffMaxMinCodingBlockSize = g_maxCUDepth;
- sps->quadtreeTULog2MaxSize = g_log2Size[m_param->maxCUSize] - 1;
+ sps->quadtreeTULog2MaxSize = X265_MAX(g_log2Size[m_param->maxCUSize] - 1, 5);
sps->quadtreeTULog2MinSize = 2;
sps->quadtreeTUMaxDepthInter = m_param->tuQTMaxInterDepth;
sps->quadtreeTUMaxDepthIntra = m_param->tuQTMaxIntraDepth;
diff --git a/source/encoder/search.cpp b/source/encoder/search.cpp
index 86dea43..4c49f86 100644
--- a/source/encoder/search.cpp
+++ b/source/encoder/search.cpp
@@ -63,7 +63,7 @@ bool Search::initSearch(const x265_param& param, ScalingList& scalingList)
m_param = ¶m;
m_bEnableRDOQ = param.rdLevel >= 4;
m_bFrameParallel = param.frameNumThreads > 1;
- m_numLayers = g_log2Size[param.maxCUSize] - 2;
+ m_numLayers = g_log2Size[param.maxCUSize] - 2 + 1;
m_rdCost.setPsyRdScale(param.psyRd);
m_me.setSearchMethod(param.searchMethod);
More information about the x265-devel
mailing list