[x264-devel] [PATCH] Reorder the options for each preset in the help text.

Georgi Chorbadzhiyski gf at unixsol.org
Tue Dec 9 14:21:50 CET 2014


I was trying to understand the differences between x264 presets but the
help text was unnecessary difficult to parse, because options for each
preset were ordered differently.

I've made a simple patch that changes the help text and IMHO it makes it
easier to see what each preset sets/changes relative to the others.

If it makes sense please apply the attached patch.

Here is how --fullhelp looks before and after the patch:

   Before                                           After

 - ultrafast:                                    - ultrafast:
   --no-8x8dct --aq-mode 0 --b-adapt 0             --no-8x8dct --no-cabac --no-deblock
   --bframes 0 --no-cabac --no-deblock             --aq-mode 0 --b-adapt 0 --no-weightb
   --no-mbtree --me dia --no-mixed-refs            --bframes 0 --scenecut 0
   --partitions none --rc-lookahead 0 --ref 1      --no-mbtree --no-mixed-refs
   --scenecut 0 --subme 0 --trellis 0              --partitions none --me dia
   --no-weightb --weightp 0                        --rc-lookahead 0 --ref 1 --subme 0
 - superfast:                                      --weightp 0 --trellis 0
   --no-mbtree --me dia --no-mixed-refs          - superfast:
   --partitions i8x8,i4x4 --rc-lookahead 0         --no-mbtree --no-mixed-refs
   --ref 1 --subme 1 --trellis 0 --weightp 1       --partitions i8x8,i4x4 --me dia
 - veryfast:                                       --rc-lookahead 0 --ref 1 --subme 1
   --no-mixed-refs --rc-lookahead 10               --weightp 1 --trellis 0
   --ref 1 --subme 2 --trellis 0 --weightp 1     - veryfast:
 - faster:                                         --no-mixed-refs
   --no-mixed-refs --rc-lookahead 20               --rc-lookahead 10 --ref 1 --subme 2
   --ref 2 --subme 4 --weightp 1                   --weightp 1 --trellis 0
 - fast:                                         - faster:
   --rc-lookahead 30 --ref 2 --subme 6             --no-mixed-refs
   --weightp 1                                     --rc-lookahead 20 --ref 2 --subme 4
 - medium:                                         --weightp 1
   Default settings apply.                       - fast:
 - slow:                                           --rc-lookahead 30 --ref 2 --subme 6
   --b-adapt 2 --direct auto --me umh              --weightp 1
   --rc-lookahead 50 --ref 5 --subme 8           - medium:
 - slower:                                         Default settings apply.
   --b-adapt 2 --direct auto --me umh            - slow:
   --partitions all --rc-lookahead 60              --rc-lookahead 50 --ref 5 --subme 8
   --ref 8 --subme 9 --trellis 2                   --b-adapt 2 --direct auto --me umh
 - veryslow:                                     - slower:
   --b-adapt 2 --bframes 8 --direct auto           --rc-lookahead 60 --ref 8 --subme 9
   --me umh --merange 24 --partitions all          --b-adapt 2 --direct auto --me umh
   --ref 16 --subme 10 --trellis 2                 --trellis 2 --partitions all
   --rc-lookahead 60                             - veryslow:
 - placebo:                                        --rc-lookahead 60 --ref 16 --subme 10
   --bframes 16 --b-adapt 2 --direct auto          --b-adapt 2 --direct auto --me umh
   --slow-firstpass --no-fast-pskip                --trellis 2 --partitions all
   --me tesa --merange 24 --partitions all         --bframes 8 --merange 24
   --rc-lookahead 60 --ref 16 --subme 11         - placebo:
   --trellis 2                                     --rc-lookahead 60 --ref 16 --subme 11
                                                   --b-adapt 2 --direct auto --me tesa
                                                   --trellis 2 --partitions all
                                                   --bframes 16 --merange 24

-- 
Georgi Chorbadzhiyski | http://georgi.unixsol.org/ | http://github.com/gfto/
-------------- next part --------------
From e240606c398a2f40ebae9033dcde876c152c09e4 Mon Sep 17 00:00:00 2001
From: Georgi Chorbadzhiyski <gf at unixsol.org>
Date: Tue, 9 Dec 2014 14:58:36 +0200
Subject: [PATCH] Reorder the options for each preset in the help text.

The options in each preset are grouped the same way as the other presets.
This makes it easier to see the differences between presets.

This is just a change in the help text - there are no functional changes.
---
 x264.c | 52 ++++++++++++++++++++++++++++------------------------
 1 file changed, 28 insertions(+), 24 deletions(-)

diff --git a/x264.c b/x264.c
index 427d06c..0406c2c 100644
--- a/x264.c
+++ b/x264.c
@@ -574,45 +574,49 @@ static void help( x264_param_t *defaults, int longhelp )
     H0( "      --preset <string>       Use a preset to select encoding settings [medium]\n"
         "                                  Overridden by user settings.\n" );
     H2( "                                  - ultrafast:\n"
-        "                                    --no-8x8dct --aq-mode 0 --b-adapt 0\n"
-        "                                    --bframes 0 --no-cabac --no-deblock\n"
-        "                                    --no-mbtree --me dia --no-mixed-refs\n"
-        "                                    --partitions none --rc-lookahead 0 --ref 1\n"
-        "                                    --scenecut 0 --subme 0 --trellis 0\n"
-        "                                    --no-weightb --weightp 0\n"
+        "                                    --no-8x8dct --no-cabac --no-deblock\n"
+        "                                    --aq-mode 0 --b-adapt 0 --no-weightb\n"
+        "                                    --bframes 0 --scenecut 0\n"
+        "                                    --no-mbtree --no-mixed-refs\n"
+        "                                    --partitions none --me dia\n"
+        "                                    --rc-lookahead 0 --ref 1 --subme 0\n"
+        "                                    --weightp 0 --trellis 0\n"
         "                                  - superfast:\n"
-        "                                    --no-mbtree --me dia --no-mixed-refs\n"
-        "                                    --partitions i8x8,i4x4 --rc-lookahead 0\n"
-        "                                    --ref 1 --subme 1 --trellis 0 --weightp 1\n"
+        "                                    --no-mbtree --no-mixed-refs\n"
+        "                                    --partitions i8x8,i4x4 --me dia\n"
+        "                                    --rc-lookahead 0 --ref 1 --subme 1\n"
+        "                                    --weightp 1 --trellis 0\n"
         "                                  - veryfast:\n"
-        "                                    --no-mixed-refs --rc-lookahead 10\n"
-        "                                    --ref 1 --subme 2 --trellis 0 --weightp 1\n"
+        "                                    --no-mixed-refs\n"
+        "                                    --rc-lookahead 10 --ref 1 --subme 2\n"
+        "                                    --weightp 1 --trellis 0\n"
         "                                  - faster:\n"
-        "                                    --no-mixed-refs --rc-lookahead 20\n"
-        "                                    --ref 2 --subme 4 --weightp 1\n"
+        "                                    --no-mixed-refs\n"
+        "                                    --rc-lookahead 20 --ref 2 --subme 4\n"
+        "                                    --weightp 1\n"
         "                                  - fast:\n"
         "                                    --rc-lookahead 30 --ref 2 --subme 6\n"
         "                                    --weightp 1\n"
         "                                  - medium:\n"
         "                                    Default settings apply.\n"
         "                                  - slow:\n"
-        "                                    --b-adapt 2 --direct auto --me umh\n"
         "                                    --rc-lookahead 50 --ref 5 --subme 8\n"
+        "                                    --b-adapt 2 --direct auto --me umh\n"
         "                                  - slower:\n"
+        "                                    --rc-lookahead 60 --ref 8 --subme 9\n"
         "                                    --b-adapt 2 --direct auto --me umh\n"
-        "                                    --partitions all --rc-lookahead 60\n"
-        "                                    --ref 8 --subme 9 --trellis 2\n"
+        "                                    --trellis 2 --partitions all\n"
         "                                  - veryslow:\n"
-        "                                    --b-adapt 2 --bframes 8 --direct auto\n"
-        "                                    --me umh --merange 24 --partitions all\n"
-        "                                    --ref 16 --subme 10 --trellis 2\n"
-        "                                    --rc-lookahead 60\n"
+        "                                    --rc-lookahead 60 --ref 16 --subme 10\n"
+        "                                    --b-adapt 2 --direct auto --me umh\n"
+        "                                    --trellis 2 --partitions all\n"
+        "                                    --bframes 8 --merange 24\n"
         "                                  - placebo:\n"
-        "                                    --bframes 16 --b-adapt 2 --direct auto\n"
-        "                                    --slow-firstpass --no-fast-pskip\n"
-        "                                    --me tesa --merange 24 --partitions all\n"
         "                                    --rc-lookahead 60 --ref 16 --subme 11\n"
-        "                                    --trellis 2\n" );
+        "                                    --b-adapt 2 --direct auto --me tesa\n"
+        "                                    --trellis 2 --partitions all\n"
+        "                                    --bframes 16 --merange 24\n"
+        "                                    --slow-firstpass --no-fast-pskip\n" );
     else H0( "                                  - ultrafast,superfast,veryfast,faster,fast\n"
              "                                  - medium,slow,slower,veryslow,placebo\n" );
     H0( "      --tune <string>         Tune the settings for a particular type of source\n"
-- 
1.8.4



More information about the x264-devel mailing list