[x265] [PATCH] preset: disable rectangular and AMP partitions at medium preset
Steve Borho
steve at borho.org
Thu May 29 03:08:09 CEST 2014
# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1401325637 18000
# Wed May 28 20:07:17 2014 -0500
# Node ID 7fcd041eb30c4720e881dd3f224e27be87896c24
# Parent eb236aec3757761506a322830c345adae7b9341e
preset: disable rectangular and AMP partitions at medium preset
This gives a considerable speed-up (50-70%) at the default preset for not much
loss in compression efficiency (2-3%). AMP is rarely useful, at non-RDO presets
we were only considering AMP merge anyway, and rect can be approximated by a
split and two merges.
diff -r eb236aec3757 -r 7fcd041eb30c doc/reST/cli.rst
--- a/doc/reST/cli.rst Wed May 28 17:43:30 2014 -0500
+++ b/doc/reST/cli.rst Wed May 28 20:07:17 2014 -0500
@@ -365,7 +365,7 @@
.. option:: --rect, --no-rect
Enable analysis of rectangular motion partitions Nx2N and 2NxN
- (50/50 splits, two directions). Default enabled
+ (50/50 splits, two directions). Default disabled
.. option:: --amp, --no-amp
@@ -373,7 +373,7 @@
directions). This setting has no effect if rectangular partitions
are disabled. Even though there are four possible AMP partitions,
only the most likely candidate is tested, based on the results of
- the rectangular mode tests. Default enabled
+ the rectangular mode tests. Default disabled
.. option:: --max-merge <1..5>
diff -r eb236aec3757 -r 7fcd041eb30c doc/reST/presets.rst
--- a/doc/reST/presets.rst Wed May 28 17:43:30 2014 -0500
+++ b/doc/reST/presets.rst Wed May 28 20:07:17 2014 -0500
@@ -38,9 +38,9 @@
+--------------+-----------+-----------+----------+--------+------+--------+------+--------+----------+---------+
| subme | 0 | 1 | 1 | 2 | 2 | 2 | 3 | 3 | 4 | 5 |
+--------------+-----------+-----------+----------+--------+------+--------+------+--------+----------+---------+
-| rect | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
+| rect | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
+--------------+-----------+-----------+----------+--------+------+--------+------+--------+----------+---------+
-| amp | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 |
+| amp | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 |
+--------------+-----------+-----------+----------+--------+------+--------+------+--------+----------+---------+
| max-merge | 2 | 2 | 2 | 2 | 2 | 2 | 3 | 3 | 4 | 5 |
+--------------+-----------+-----------+----------+--------+------+--------+------+--------+----------+---------+
diff -r eb236aec3757 -r 7fcd041eb30c source/common/param.cpp
--- a/source/common/param.cpp Wed May 28 17:43:30 2014 -0500
+++ b/source/common/param.cpp Wed May 28 20:07:17 2014 -0500
@@ -137,8 +137,8 @@
param->bEnableWeightedBiPred = 0;
param->bEnableEarlySkip = 0;
param->bEnableCbfFastMode = 0;
- param->bEnableAMP = 1;
- param->bEnableRectInter = 1;
+ param->bEnableAMP = 0;
+ param->bEnableRectInter = 0;
param->rdLevel = 3;
param->bEnableSignHiding = 1;
param->bEnableTransformSkip = 0;
@@ -259,8 +259,6 @@
param->bFrameAdaptive = 0;
param->subpelRefine = 0;
param->searchMethod = X265_DIA_SEARCH;
- param->bEnableRectInter = 0;
- param->bEnableAMP = 0;
param->bEnableEarlySkip = 1;
param->bEnableCbfFastMode = 1;
param->bEnableSAO = 0;
@@ -278,8 +276,6 @@
param->searchRange = 44;
param->bFrameAdaptive = 0;
param->subpelRefine = 1;
- param->bEnableRectInter = 0;
- param->bEnableAMP = 0;
param->bEnableEarlySkip = 1;
param->bEnableCbfFastMode = 1;
param->bEnableWeightedPred = 0;
@@ -294,8 +290,6 @@
param->maxCUSize = 32;
param->bFrameAdaptive = 0;
param->subpelRefine = 1;
- param->bEnableRectInter = 0;
- param->bEnableAMP = 0;
param->bEnableEarlySkip = 1;
param->bEnableCbfFastMode = 1;
param->maxNumReferences = 1;
@@ -305,8 +299,6 @@
{
param->lookaheadDepth = 15;
param->bFrameAdaptive = 0;
- param->bEnableRectInter = 0;
- param->bEnableAMP = 0;
param->bEnableEarlySkip = 1;
param->bEnableCbfFastMode = 1;
param->maxNumReferences = 1;
@@ -315,8 +307,6 @@
else if (!strcmp(preset, "fast"))
{
param->lookaheadDepth = 15;
- param->bEnableRectInter = 0;
- param->bEnableAMP = 0;
}
else if (!strcmp(preset, "medium"))
{
@@ -324,6 +314,7 @@
}
else if (!strcmp(preset, "slow"))
{
+ param->bEnableRectInter = 1;
param->lookaheadDepth = 25;
param->rdLevel = 4;
param->subpelRefine = 3;
@@ -332,6 +323,8 @@
}
else if (!strcmp(preset, "slower"))
{
+ param->bEnableAMP = 1;
+ param->bEnableRectInter = 1;
param->lookaheadDepth = 30;
param->bframes = 8;
param->tuQTMaxInterDepth = 2;
@@ -343,6 +336,8 @@
}
else if (!strcmp(preset, "veryslow"))
{
+ param->bEnableAMP = 1;
+ param->bEnableRectInter = 1;
param->lookaheadDepth = 40;
param->bframes = 8;
param->tuQTMaxInterDepth = 3;
@@ -355,6 +350,8 @@
}
else if (!strcmp(preset, "placebo"))
{
+ param->bEnableAMP = 1;
+ param->bEnableRectInter = 1;
param->lookaheadDepth = 60;
param->searchRange = 92;
param->bframes = 8;
More information about the x265-devel
mailing list