<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 28, 2013 at 4:19 AM, <span dir="ltr"><<a href="mailto:sumalatha@multicorewareinc.com" target="_blank">sumalatha@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"># HG changeset patch<br>
# User sumalatha<br>
</div># Date 1372410936 -19800<br>
# Node ID b2a3aba00d81b2f15aa0cb1fffa295a3b628c387<br>
# Parent c79ed90edca573a569751842243331c588137836<br>
<div class="im">Removed maxCUDepth parameter from CLI option<br></div></blockquote><div><br></div><div style>Nearly perfect. I needed to tweak the print statement to remove a couple of extra spaces, but this has been queued for the main repo.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
</div>diff -r c79ed90edca5 -r b2a3aba00d81 source/common/common.cpp<br>
--- a/source/common/common.cpp Fri Jun 28 02:09:19 2013 -0500<br>
+++ b/source/common/common.cpp Fri Jun 28 14:45:36 2013 +0530<br>
@@ -88,7 +88,6 @@<br>
param->bipredSearchRange = 4;<br>
param->internalBitDepth = 8;<br>
param->maxCUSize = 64;<br>
- param->maxCUDepth = 4;<br>
param->tuQTMaxLog2Size = 5;<br>
param->tuQTMinLog2Size = 2;<br>
param->tuQTMaxInterDepth = 3;<br>
@@ -152,8 +151,13 @@<br>
return 1;<br>
<div class="im"> }<br>
<br>
+static inline uint32_t getMaxCuDepth(uint32_t maxCuSize)<br>
</div>+{<br>
<div class="im">+ return (uint32_t)(log(maxCuSize)/log(2)) - 2;<br>
</div>+}<br>
<div class="im"> int x265_check_params(x265_param_t *param)<br>
{<br>
+ uint32_t maxCUDepth = getMaxCuDepth(param->maxCUSize);<br>
#define CONFIRM(expr, msg) check_failed |= _confirm(param, expr, msg)<br>
int check_failed = 0; /* abort if there is a fatal configuration problem */<br>
<br>
</div>@@ -177,8 +181,8 @@<br>
<div class="im"> "Search Range must be more than 0");<br>
CONFIRM(param->keyframeInterval < -1,<br>
"Keyframe interval must be -1 (open-GOP) 0 (auto) 1 (intra-only) or greater than 1");<br>
</div>- CONFIRM(param->maxCUdQPDepth > param->maxCUDepth - 1,<br>
- "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth");<br>
<div class="im">+ CONFIRM(param->maxCUdQPDepth > maxCUDepth - 1,<br>
</div>+ "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth");<br>
<div class="im"><br>
CONFIRM(param->cbQpOffset < -12, "Min. Chroma Cb QP Offset is -12");<br>
</div> CONFIRM(param->cbQpOffset > 12, "Max. Chroma Cb QP Offset is 12");<br>
@@ -187,13 +191,13 @@<br>
<br>
CONFIRM(param->qpAdaptionRange <= 0,<br>
<div class="im"> "QP Adaptation Range must be more than 0");<br>
</div>- CONFIRM((param->maxCUSize >> param->maxCUDepth) < 4,<br>
+ CONFIRM((param->maxCUSize >> maxCUDepth) < 4,<br>
"Minimum partition width size should be larger than or equal to 8");<br>
<div class="im"> CONFIRM(param->maxCUSize < 16,<br>
"Maximum partition width size should be larger than or equal to 16");<br>
</div>- CONFIRM((param->sourceWidth % (param->maxCUSize >> (param->maxCUDepth - 1))) != 0,<br>
<div class="im">+ CONFIRM((param->sourceWidth % (param->maxCUSize >> (maxCUDepth - 1))) != 0,<br>
"Resulting coded frame width must be a multiple of the minimum CU size");<br>
</div>- CONFIRM((param->sourceHeight % (param->maxCUSize >> (param->maxCUDepth - 1))) != 0,<br>
<div class="im">+ CONFIRM((param->sourceHeight % (param->maxCUSize >> (maxCUDepth - 1))) != 0,<br>
"Resulting coded frame height must be a multiple of the minimum CU size");<br>
<br>
CONFIRM(param->tuQTMinLog2Size < 2,<br>
</div>@@ -205,13 +209,13 @@<br>
<div class="im"><br>
CONFIRM(param->tuQTMaxLog2Size < param->tuQTMinLog2Size,<br>
"QuadtreeTULog2MaxSize must be greater than or equal to m_uiQuadtreeTULog2MinSize.");<br>
</div>- CONFIRM((1u << param->tuQTMinLog2Size) > (param->maxCUSize >> (param->maxCUDepth - 1)),<br>
<div class="im">+ CONFIRM((1u << param->tuQTMinLog2Size) > (param->maxCUSize >> (maxCUDepth - 1)),<br>
"QuadtreeTULog2MinSize must not be greater than minimum CU size"); // HS<br>
</div>- CONFIRM((1u << param->tuQTMinLog2Size) > (param->maxCUSize >> (param->maxCUDepth - 1)),<br>
<div class="im">+ CONFIRM((1u << param->tuQTMinLog2Size) > (param->maxCUSize >> (maxCUDepth - 1)),<br>
"QuadtreeTULog2MinSize must not be greater than minimum CU size"); // HS<br>
</div>- CONFIRM((1u << param->tuQTMinLog2Size) > (param->maxCUSize >> param->maxCUDepth),<br>
<div class="im">+ CONFIRM((1u << param->tuQTMinLog2Size) > (param->maxCUSize >> maxCUDepth),<br>
"Minimum CU width must be greater than minimum transform size.");<br>
</div>- CONFIRM((1u << param->tuQTMinLog2Size) > (param->maxCUSize >> param->maxCUDepth),<br>
<div class="im">+ CONFIRM((1u << param->tuQTMinLog2Size) > (param->maxCUSize >> maxCUDepth),<br>
"Minimum CU height must be greater than minimum transform size.");<br>
CONFIRM(param->tuQTMaxInterDepth < 1,<br>
"QuadtreeTUMaxDepthInter must be greater than or equal to 1");<br>
</div>@@ -258,20 +262,21 @@<br>
<div class="im"><br>
void x265_set_globals(x265_param_t *param, uint32_t inputBitDepth)<br>
{<br>
+ uint32_t maxCUDepth = getMaxCuDepth(param->maxCUSize);<br>
// set max CU width & height<br>
g_uiMaxCUWidth = param->maxCUSize;<br>
g_uiMaxCUHeight = param->maxCUSize;<br>
<br>
// compute actual CU depth with respect to config depth and max transform size<br>
g_uiAddCUDepth = 0;<br>
</div>- while ((param->maxCUSize >> param->maxCUDepth) > (1u << (param->tuQTMinLog2Size + g_uiAddCUDepth)))<br>
<div class="im">+ while ((param->maxCUSize >> maxCUDepth) > (1u << (param->tuQTMinLog2Size + g_uiAddCUDepth)))<br>
{<br>
g_uiAddCUDepth++;<br>
}<br>
<br>
</div>- param->maxCUDepth += g_uiAddCUDepth;<br>
<div class="im">+ maxCUDepth += g_uiAddCUDepth;<br>
g_uiAddCUDepth++;<br>
</div>- g_uiMaxCUDepth = param->maxCUDepth;<br>
<div class="im">+ g_uiMaxCUDepth = maxCUDepth;<br>
<br>
// set internal bit-depth and constants<br>
#if HIGH_BIT_DEPTH<br>
</div>@@ -293,7 +298,7 @@<br>
<div class="im"> #if HIGH_BIT_DEPTH<br>
x265_log(param, X265_LOG_INFO, "Internal bit depth : %d\n", param->internalBitDepth);<br>
#endif<br>
</div>- x265_log(param, X265_LOG_INFO, "CU size / depth : %d / %d\n", param->maxCUSize, param->maxCUDepth);<br>
<div class="im">+ x265_log(param, X265_LOG_INFO, "CU size : %d \n", param->maxCUSize);<br>
x265_log(param, X265_LOG_INFO, "RQT trans. size (min / max) : %d / %d\n", 1 << param->tuQTMinLog2Size, 1 << param->tuQTMaxLog2Size);<br>
x265_log(param, X265_LOG_INFO, "Max RQT depth inter / intra : %d / %d\n", param->tuQTMaxInterDepth, param->tuQTMaxIntraDepth);<br>
<br>
</div>diff -r c79ed90edca5 -r b2a3aba00d81 source/x265.h<br>
--- a/source/x265.h Fri Jun 28 02:09:19 2013 -0500<br>
+++ b/source/x265.h Fri Jun 28 14:45:36 2013 +0530<br>
@@ -171,7 +171,6 @@<br>
<br>
// coding unit (CU) definition<br>
uint32_t maxCUSize; ///< max. CU width and height in pixels<br>
- uint32_t maxCUDepth; ///< max. CU recursion/split depth<br>
<br>
// transform unit (TU) definition<br>
uint32_t tuQTMaxLog2Size;<br>
diff -r c79ed90edca5 -r b2a3aba00d81 source/x265opts.h<br>
--- a/source/x265opts.h Fri Jun 28 02:09:19 2013 -0500<br>
+++ b/source/x265opts.h Fri Jun 28 14:45:36 2013 +0530<br>
@@ -28,7 +28,6 @@<br>
OPT("wpp", param->bEnableWavefront, no_argument, 0, "Enable Wavefront Parallel Processing")<br>
OPT("no-wpp", param->bEnableWavefront, no_argument, 0, "Disable Wavefront Parallel Processing")<br>
OPT("ctu", param->maxCUSize, required_argument, 's', "Maximum CU size (default: 64x64)")<br>
-OPT("cu-depth", param->maxCUDepth, required_argument, 'd', "Maximum CU recursion depth (default: 4)")<br>
OPT("tu-maxlog2", param->tuQTMaxLog2Size, required_argument, 0, "Maximum TU size in logarithm base 2")<br>
OPT("tu-minlog2", param->tuQTMinLog2Size, required_argument, 0, "Minimum TU size in logarithm base 2")<br>
OPT("tu-intra-depth", param->tuQTMaxIntraDepth, required_argument, 0, "Max TU recursive depth for intra CUs")<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="http://mailman.videolan.org/listinfo/x265-devel" target="_blank">http://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>