<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 29, 2017 at 1:59 PM, <span dir="ltr"><<a href="mailto:bhavna@multicorewareinc.com" target="_blank">bhavna@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 Bhavna Hariharan <<a href="mailto:bhavna@multicorewareinc.com">bhavna@multicorewareinc.com</a>><br>
# Date 1498715657 -19800<br>
# Thu Jun 29 11:24:17 2017 +0530<br>
# Node ID cfc95a9dc971aa5c417d9be2bb6eea<wbr>e34e166505<br>
# Parent 67dcf6e79090acb619c5ac499ef5da<wbr>0b73c3a48b<br>
Introduce intra refine levels 1 and 2<br></blockquote><div><br></div><div>Pushed to default branch</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
diff -r 67dcf6e79090 -r cfc95a9dc971 doc/reST/cli.rst<br>
--- a/doc/reST/cli.rst Wed Jun 28 11:54:05 2017 -0500<br>
+++ b/doc/reST/cli.rst Thu Jun 29 11:24:17 2017 +0530<br>
@@ -893,11 +893,22 @@<br>
This option should be coupled with analysis-reuse-mode option, --analysis-reuse-level 10.<br>
The ctu size of load should be double the size of save. Default 0.<br>
<br>
-.. option:: --refine-intra<br>
+.. option:: --refine-intra <0|1|2><br>
<br>
- Enables refinement of intra blocks in current encode. Evaluates all<br>
- intra modes for blocks of size one smaller than the min-cu-size of the<br>
- incoming analysis data from the previous encode. Default disabled.<br>
+ Enables refinement of intra blocks in current encode.<br>
+<br>
+ Level 0 - Forces both mode and depth from the previous encode.<br>
+<br>
+ Level 1 - Evaluates all intra modes for blocks of size one smaller than<br>
+ the min-cu-size of the incoming analysis data from the previous encode,<br>
+ forces modes for blocks of larger size.<br>
+<br>
+ Level 2 - Evaluates all intra modes for blocks of size one smaller than<br>
+ the min-cu-size of the incoming analysis data from the previous encode.<br>
+ For larger blocks, force only depth when angular mode is chosen by the<br>
+ previous encode, force depth and mode when other intra modes are chosen.<br>
+<br>
+ Default 0.<br>
<br>
.. option:: --refine-inter-depth<br>
<br>
diff -r 67dcf6e79090 -r cfc95a9dc971 source/CMakeLists.txt<br>
--- a/source/CMakeLists.txt Wed Jun 28 11:54:05 2017 -0500<br>
+++ b/source/CMakeLists.txt Thu Jun 29 11:24:17 2017 +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 128)<br>
+set(X265_BUILD 129)<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 67dcf6e79090 -r cfc95a9dc971 source/common/param.cpp<br>
--- a/source/common/param.cpp Wed Jun 28 11:54:05 2017 -0500<br>
+++ b/source/common/param.cpp Thu Jun 29 11:24:17 2017 +0530<br>
@@ -969,7 +969,7 @@<br>
OPT("const-vbv") p->rc.bEnableConstVbv = atobool(value);<br>
OPT("ctu-info") p->bCTUInfo = atoi(value);<br>
OPT("scale-factor") p->scaleFactor = atoi(value);<br>
- OPT("refine-intra")p-><wbr>intraRefine = atobool(value);<br>
+ OPT("refine-intra")p-><wbr>intraRefine = atoi(value);<br>
OPT("refine-inter")p-><wbr>interRefine = atobool(value);<br>
OPT("refine-mv")p->mvRefine = atobool(value);<br>
else<br>
diff -r 67dcf6e79090 -r cfc95a9dc971 source/encoder/analysis.cpp<br>
--- a/source/encoder/analysis.cpp Wed Jun 28 11:54:05 2017 -0500<br>
+++ b/source/encoder/analysis.cpp Thu Jun 29 11:24:17 2017 +0530<br>
@@ -511,8 +511,11 @@<br>
Mode& mode = md.pred[0];<br>
md.bestMode = &mode;<br>
mode.cu.initSubCU(parentCTU, cuGeom, qp);<br>
- memcpy(mode.cu.m_lumaIntraDir, parentCTU.m_lumaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);<br>
- memcpy(mode.cu.m_<wbr>chromaIntraDir, parentCTU.m_chromaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);<br>
+ if (m_param->intraRefine != 2 || parentCTU.m_lumaIntraDir[<wbr>cuGeom.absPartIdx] <= 1)<br>
+ {<br>
+ memcpy(mode.cu.m_lumaIntraDir, parentCTU.m_lumaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);<br>
+ memcpy(mode.cu.m_<wbr>chromaIntraDir, parentCTU.m_chromaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);<br>
+ }<br>
checkIntra(mode, cuGeom, (PartSize)parentCTU.m_<wbr>partSize[cuGeom.absPartIdx]);<br>
<br>
if (m_bTryLossless)<br>
@@ -2250,8 +2253,11 @@<br>
PartSize size = (PartSize)parentCTU.m_<wbr>partSize[cuGeom.absPartIdx];<br>
if (parentCTU.isIntra(cuGeom.<wbr>absPartIdx))<br>
{<br>
- memcpy(mode.cu.m_lumaIntraDir, parentCTU.m_lumaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);<br>
- memcpy(mode.cu.m_<wbr>chromaIntraDir, parentCTU.m_chromaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);<br>
+ if (m_param->intraRefine != 2 || parentCTU.m_lumaIntraDir[<wbr>cuGeom.absPartIdx] <= 1)<br>
+ {<br>
+ memcpy(mode.cu.m_lumaIntraDir, parentCTU.m_lumaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);<br>
+ memcpy(mode.cu.m_<wbr>chromaIntraDir, parentCTU.m_chromaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);<br>
+ }<br>
checkIntra(mode, cuGeom, size);<br>
}<br>
else<br>
diff -r 67dcf6e79090 -r cfc95a9dc971 source/x265cli.h<br>
--- a/source/x265cli.h Wed Jun 28 11:54:05 2017 -0500<br>
+++ b/source/x265cli.h Thu Jun 29 11:24:17 2017 +0530<br>
@@ -254,8 +254,7 @@<br>
{ "analysis-reuse-file", required_argument, NULL, 0 },<br>
{ "analysis-reuse-level", required_argument, NULL, 0 },<br>
{ "scale-factor", required_argument, NULL, 0 },<br>
- { "refine-intra", no_argument, NULL, 0 },<br>
- { "no-refine-intra",no_argument, NULL, 0 },<br>
+ { "refine-intra", required_argument, NULL, 0 },<br>
{ "refine-inter", no_argument, NULL, 0 },<br>
{ "no-refine-inter",no_argument, NULL, 0 },<br>
{ "strict-cbr", no_argument, NULL, 0 },<br>
@@ -450,7 +449,7 @@<br>
H0(" --analysis-reuse-file <filename> Specify file name used for either dumping or reading analysis data. Deault x265_analysis.dat\n");<br>
H0(" --analysis-reuse-level <1..10> Level of analysis reuse indicates amount of info stored/reused in save/load mode, 1:least..10:most. Default %d\n", param->analysisReuseLevel);<br>
H0(" --scale-factor <int> Specify factor by which input video is scaled down for analysis save mode. Default %d\n", param->scaleFactor);<br>
- H0(" --[no-]refine-intra Enable intra refinement for load mode. Default %s\n", OPT(param->intraRefine));<br>
+ H0(" --refine-intra <int> Enable intra refinement for load mode. Default %d\n", param->intraRefine);<br>
H0(" --[no-]refine-inter Enable inter refinement for load mode. Default %s\n", OPT(param->interRefine));<br>
H0(" --[no-]refine-mv Enable mv refinement for load mode. Default %s\n", OPT(param->mvRefine));<br>
H0(" --aq-mode <integer> Mode for Adaptive Quantization - 0:none 1:uniform AQ 2:auto variance 3:auto variance with bias to dark scenes. Default %d\n", param->rc.aqMode);<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>
</blockquote></div><br></div></div>