<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 5, 2018 at 3:12 PM, Divya Manivannan <span dir="ltr"><<a href="mailto:divya@multicorewareinc.com" target="_blank">divya@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Divya Manivannan <<a href="mailto:divya@multicorewareinc.com">divya@multicorewareinc.com</a>><br>
# Date 1519726842 -19800<br>
# Tue Feb 27 15:50:42 2018 +0530<br>
# Node ID 59c02e68410fcb2846cd7a021e2639<wbr>f96e0a9609<br>
# Parent 4c0d8a22625d0b13a9808329cb9bf8<wbr>c03f7c6035<br>
Add max-ausize-factor option to control the maximum AU size defined in specification<br>
<br>
diff -r 4c0d8a22625d -r 59c02e68410f doc/reST/cli.rst<br>
--- a/doc/reST/cli.rst Thu Jan 25 11:37:21 2018 +0530<br>
+++ b/doc/reST/cli.rst Tue Feb 27 15:50:42 2018 +0530<br>
@@ -1857,6 +1857,11 @@<br>
the more bits it will try to spend on signaling information (motion<br>
vectors and splits) and less on residual. This feature is intended<br>
for experimentation.<br>
+<br>
+.. option:: --max-ausize-factor <float><br>
+<br>
+ It controls the maximum AU size defined in specification. It represents<br>
+ the percentage of maximum AU size used. Default is 1. Range is 0.5 to 1.<br>
<br>
Loop filters<br>
============<br>
diff -r 4c0d8a22625d -r 59c02e68410f source/CMakeLists.txt<br>
--- a/source/CMakeLists.txt Thu Jan 25 11:37:21 2018 +0530<br>
+++ b/source/CMakeLists.txt Tue Feb 27 15:50:42 2018 +0530<br>
@@ -29,7 +29,7 @@<br>
option(STATIC_LINK_CRT "Statically link C runtime for release builds" OFF)<br>
mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)<br>
# X265_BUILD must be incremented each time the public API is changed<br>
-set(X265_BUILD 152)<br>
+set(X265_BUILD 153)<br>
configure_file("${PROJECT_<wbr>SOURCE_DIR}/<a href="http://x265.def.in" rel="noreferrer" target="_blank">x265.def.in</a>"<br>
"${PROJECT_BINARY_DIR}/x265.<wbr>def")<br>
configure_file("${PROJECT_<wbr>SOURCE_DIR}/<a href="http://x265_config.h.in" rel="noreferrer" target="_blank">x265_config.h.in</a>"<br>
diff -r 4c0d8a22625d -r 59c02e68410f source/common/param.cpp<br>
--- a/source/common/param.cpp Thu Jan 25 11:37:21 2018 +0530<br>
+++ b/source/common/param.cpp Tue Feb 27 15:50:42 2018 +0530<br>
@@ -295,6 +295,7 @@<br>
param->forceFlush = 0;<br>
param->bDisableLookahead = 0;<br>
param->bCopyPicToFrame = 1;<br>
+ param->maxAUSizeFactor = 1;<br>
<br>
/* DCT Approximations */<br>
param->bLowPassDct = 0;<br>
@@ -1012,6 +1013,7 @@<br>
OPT("analysis-save") p->analysisSave = strdup(value);<br>
OPT("analysis-load") p->analysisLoad = strdup(value);<br>
OPT("radl") p->radl = atoi(value);<br>
+ OPT("max-ausize-factor") p->maxAUSizeFactor = atof(value);<br>
else<br>
return X265_PARAM_BAD_NAME;<br>
}<br>
@@ -1367,6 +1369,8 @@<br>
"Invalid refine-inter value, refine-inter levels 0 to 3 supported");<br>
CHECK(param->intraRefine > 4 || param->intraRefine < 0,<br>
"Invalid refine-intra value, refine-intra levels 0 to 3 supported");<br>
+ CHECK(param->maxAUSizeFactor < 0.5 || param->maxAUSizeFactor > 1.0,<br>
+ "Supported factor for controlling max AU size is from 0.5 to 1");<br>
#if !X86_64<br>
CHECK(param->searchMethod == X265_SEA && (param->sourceWidth > 840 || param->sourceHeight > 480),<br>
"SEA motion search does not support resolutions greater than 480p in 32 bit build");<br>
@@ -1740,6 +1744,7 @@<br>
BOOL(p->bLowPassDct, "lowpass-dct");<br>
s += sprintf(s, " refine-mv-type=%d", p->bMVType);<br>
s += sprintf(s, " copy-pic=%d", p->bCopyPicToFrame);<br>
+ s += sprintf(s, " max-ausize-factor=%.1f", p->maxAUSizeFactor);<br>
#undef BOOL<br>
return buf;<br>
}<br>
diff -r 4c0d8a22625d -r 59c02e68410f source/encoder/ratecontrol.cpp<br>
--- a/source/encoder/ratecontrol.<wbr>cpp Thu Jan 25 11:37:21 2018 +0530<br>
+++ b/source/encoder/ratecontrol.<wbr>cpp Tue Feb 27 15:50:42 2018 +0530<br>
@@ -1302,6 +1302,7 @@<br>
/* 1.5 * MaxLumaSr * (AuCpbRemovalTime[ n ] - AuCpbRemovalTime[ n - 1 ]) / MinCr */<br>
rce->frameSizeMaximum = 8 * 1.5 * enc->m_vps.ptl.<wbr>maxLumaSrForLevel * m_frameDuration / mincr;<br>
}<br>
+ rce->frameSizeMaximum *= m_param->maxAUSizeFactor;<br>
}<br>
}<br>
if (!m_isAbr && m_2pass && m_param->rc.rateControlMode == X265_RC_CRF)<br>
diff -r 4c0d8a22625d -r 59c02e68410f source/x265.h<br>
--- a/source/x265.h Thu Jan 25 11:37:21 2018 +0530<br>
+++ b/source/x265.h Tue Feb 27 15:50:42 2018 +0530<br>
@@ -1548,6 +1548,11 @@<br>
<br>
/*Number of RADL pictures allowed in front of IDR*/<br>
int radl;<br>
+<br>
+ /* This value controls the maximum AU size defined in specification<br>
+ * It represents the percentage of maximum AU size used.<br>
+ * Default is 1 (which is 100%). Range is 0.5 to 1. */<br>
+ double maxAUSizeFactor;<br>
} x265_param;<br>
<br>
/* x265_param_alloc:<br>
diff -r 4c0d8a22625d -r 59c02e68410f source/x265cli.h<br>
--- a/source/x265cli.h Thu Jan 25 11:37:21 2018 +0530<br>
+++ b/source/x265cli.h Tue Feb 27 15:50:42 2018 +0530<br>
@@ -293,6 +293,7 @@<br>
{ "refine-mv-type", required_argument, NULL, 0 },<br>
{ "copy-pic", no_argument, NULL, 0 },<br>
{ "no-copy-pic", no_argument, NULL, 0 },<br>
+ { "max-ausize-factor", required_argument, NULL, 0 },<br>
{ 0, 0, 0, 0 },<br>
{ 0, 0, 0, 0 },<br>
{ 0, 0, 0, 0 },<br>
@@ -516,6 +517,8 @@<br>
H1(" MAX_MAX_QP+1 floats for lambda table, then again for lambda2 table\n");<br>
H1(" Blank lines and lines starting with hash(#) are ignored\n");<br>
H1(" Comma is considered to be white-space\n");<br>
+ H0(" --max-ausize-factor <float> This value controls the maximum AU size defined in specification.\n");<br>
+ H0(" It represents the percentage of maximum AU size used. Default %.1f\n", param->maxAUSizeFactor);<br>
H0("\nLoop filters (deblock and SAO):\n");<br>
H0(" --[no-]deblock Enable Deblocking Loop Filter, optionally specify tC:Beta offsets Default %s\n", OPT(param->bEnableLoopFilter))<wbr>;<br>
H0(" --[no-]sao Enable Sample Adaptive Offset. Default %s\n", OPT(param->bEnableSAO));<br>
<br>______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">Pushed.</div></div>