[x265] [PATCH 2 of 2] Introduce refine-intra level 3
bhavna at multicorewareinc.com
bhavna at multicorewareinc.com
Wed Aug 9 14:41:16 CEST 2017
# HG changeset patch
# User Kavitha Sampath <kavitha at multicorewareinc.com>
# Date 1499769682 -19800
# Tue Jul 11 16:11:22 2017 +0530
# Node ID 0111b64fadfbe424c1144399134952d960dba43d
# Parent 81f17d9c7c273e4b282be66bf8bcd193e25a1d2e
Introduce refine-intra level 3
diff -r 81f17d9c7c27 -r 0111b64fadfb doc/reST/cli.rst
--- a/doc/reST/cli.rst Mon Jul 24 12:58:03 2017 +0530
+++ b/doc/reST/cli.rst Tue Jul 11 16:11:22 2017 +0530
@@ -893,7 +893,7 @@
This option should be coupled with analysis-reuse-mode option, --analysis-reuse-level 10.
The ctu size of load should be double the size of save. Default 0.
-.. option:: --refine-intra <0|1|2>
+.. option:: --refine-intra <0..3>
Enables refinement of intra blocks in current encode.
@@ -907,6 +907,8 @@
(a) only depth when angular mode is chosen by the save encode.
(b) depth and mode when other intra modes are chosen by the save encode.
+ Level 3 - Perform analysis of intra modes for depth reused from first encode.
+
Default 0.
.. option:: --refine-inter <0..3>
diff -r 81f17d9c7c27 -r 0111b64fadfb source/common/param.cpp
--- a/source/common/param.cpp Mon Jul 24 12:58:03 2017 +0530
+++ b/source/common/param.cpp Tue Jul 11 16:11:22 2017 +0530
@@ -1320,8 +1320,8 @@
"Supported values for bCTUInfo are 0, 1, 2, 4, 6");
CHECK(param->interRefine > 3 || param->interRefine < 0,
"Invalid refine-inter value, refine-inter levels 0 to 3 supported");
- CHECK(param->intraRefine > 2 || param->intraRefine < 0,
- "Invalid refine-intra value, refine-intra levels 0 to 2 supported");
+ CHECK(param->intraRefine > 3 || param->intraRefine < 0,
+ "Invalid refine-intra value, refine-intra levels 0 to 3 supported");
#if !X86_64
CHECK(param->searchMethod == X265_SEA && (param->sourceWidth > 840 || param->sourceHeight > 480),
"SEA motion search does not support resolutions greater than 480p in 32 bit build");
diff -r 81f17d9c7c27 -r 0111b64fadfb source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp Mon Jul 24 12:58:03 2017 +0530
+++ b/source/encoder/analysis.cpp Tue Jul 11 16:11:22 2017 +0530
@@ -511,7 +511,9 @@
Mode& mode = md.pred[0];
md.bestMode = &mode;
mode.cu.initSubCU(parentCTU, cuGeom, qp);
- if (m_param->intraRefine != 2 || parentCTU.m_lumaIntraDir[cuGeom.absPartIdx] <= 1)
+ bool reuseModes = !((m_param->intraRefine == 3) ||
+ (m_param->intraRefine == 2 && parentCTU.m_lumaIntraDir[cuGeom.absPartIdx] > DC_IDX));
+ if (reuseModes)
{
memcpy(mode.cu.m_lumaIntraDir, parentCTU.m_lumaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);
memcpy(mode.cu.m_chromaIntraDir, parentCTU.m_chromaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);
@@ -2271,7 +2273,9 @@
PartSize size = (PartSize)parentCTU.m_partSize[cuGeom.absPartIdx];
if (parentCTU.isIntra(cuGeom.absPartIdx))
{
- if (m_param->intraRefine != 2 || parentCTU.m_lumaIntraDir[cuGeom.absPartIdx] <= 1)
+ bool reuseModes = !((m_param->intraRefine == 3) ||
+ (m_param->intraRefine == 2 && parentCTU.m_lumaIntraDir[cuGeom.absPartIdx] > DC_IDX));
+ if (reuseModes)
{
memcpy(mode.cu.m_lumaIntraDir, parentCTU.m_lumaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);
memcpy(mode.cu.m_chromaIntraDir, parentCTU.m_chromaIntraDir + cuGeom.absPartIdx, cuGeom.numPartitions);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265-clone-2.patch
Type: text/x-patch
Size: 3577 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20170809/314106ec/attachment.bin>
More information about the x265-devel
mailing list