[x265] [PATCH] tune: Introduce --tune animation option
Pradeep Ramachandran
pradeep at multicorewareinc.com
Sat Dec 22 12:13:08 CET 2018
# HG changeset patch
# User Bhavna Hariharan <bhavna at multicorewareinc.com>
# Date 1544167366 -19800
# Fri Dec 07 12:52:46 2018 +0530
# Node ID 4145914367cc7cac206255048a6a7080b1f608ec
# Parent 1f44f1f1623d677c80469e713ed642f6673af91d
tune: Introduce --tune animation option
diff -r 1f44f1f1623d -r 4145914367cc doc/reST/cli.rst
--- a/doc/reST/cli.rst Mon Dec 17 16:49:08 2018 +0530
+++ b/doc/reST/cli.rst Fri Dec 07 12:52:46 2018 +0530
@@ -388,7 +388,7 @@
be applied after :option:`--preset` but before all other parameters. Default none.
See :ref:`tunings <tunings>` for more detail.
- **Values:** psnr, ssim, grain, zero-latency, fast-decode.
+ **Values:** psnr, ssim, grain, zero-latency, fast-decode, animation.
.. option:: --slices <integer>
diff -r 1f44f1f1623d -r 4145914367cc doc/reST/presets.rst
--- a/doc/reST/presets.rst Mon Dec 17 16:49:08 2018 +0530
+++ b/doc/reST/presets.rst Fri Dec 07 12:52:46 2018 +0530
@@ -128,6 +128,8 @@
+--------------+-----------------------------------------------------+
| zerolatency | no lookahead, no B frames, no cutree |
+--------------+-----------------------------------------------------+
+| animation | improves encode quality for animated content |
++--------------+-----------------------------------------------------+
@@ -203,3 +205,14 @@
x265 performance. If you can tolerate any latency on the encoder, you
can increase performance by increasing the number of frame threads. Each
additional frame thread adds one frame of latency.
+
+Animation
+~~~~~~~~~
+
+:option:`--tune` *animation* adjusts encoder settings to optimize the encode
+quality for animation content without impacting the encode speed. This is done by:
+
+ * :option:`--psy-rd` 0.4
+ * :option:`--aq-strength` 0.4
+ * :option:`--deblock` 1:1
+ * :option:`--bframes` Increase by 2
\ No newline at end of file
diff -r 1f44f1f1623d -r 4145914367cc source/common/param.cpp
--- a/source/common/param.cpp Mon Dec 17 16:49:08 2018 +0530
+++ b/source/common/param.cpp Fri Dec 07 12:52:46 2018 +0530
@@ -535,6 +535,14 @@
param->bEnableSAO = 0;
param->rc.bEnableConstVbv = 1;
}
+ else if (!strcmp(tune, "animation"))
+ {
+ param->bframes = (param->bframes + 2) >= param->lookaheadDepth? param->bframes : param->bframes + 2;
+ param->psyRd = 0.4;
+ param->rc.aqStrength = 0.4;
+ param->deblockingFilterBetaOffset = 1;
+ param->deblockingFilterTCOffset = 1;
+ }
else
return -1;
}
More information about the x265-devel
mailing list