[x265] [PATCH] rc: add cli option for 2 pass rate control

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Thu Jul 24 18:16:20 CEST 2014


# HG changeset patch
# User Aarthi Thirumalai
# Date 1406218558 -19800
#      Thu Jul 24 21:45:58 2014 +0530
# Node ID 5d56988ebdcfdd56ef9960f4b6cf5d352e1c340c
# Parent  47407360120a1d92478bd67c082ddc7df8ea1932
rc: add cli option for 2 pass rate control

diff -r 47407360120a -r 5d56988ebdcf source/common/param.cpp
--- a/source/common/param.cpp	Wed Jul 23 23:57:59 2014 -0500
+++ b/source/common/param.cpp	Thu Jul 24 21:45:58 2014 +0530
@@ -755,6 +755,16 @@
                          &p->vui.defDispWinBottomOffset) != 4;
     }
     OPT("nr") p->noiseReduction = atoi(value);
+    OPT("pass")
+    {
+        int pass = Clip3(0, 3, atoi(value));
+        p->rc.bStatWrite = pass & 1;
+        p->rc.bStatRead = pass & 2;
+    }
+    OPT("stats")
+    {
+        p->rc.statFileName = strdup(value);
+    }
     else
         return X265_PARAM_BAD_NAME;
 #undef OPT
diff -r 47407360120a -r 5d56988ebdcf source/x265.cpp
--- a/source/x265.cpp	Wed Jul 23 23:57:59 2014 -0500
+++ b/source/x265.cpp	Thu Jul 24 21:45:58 2014 +0530
@@ -194,6 +194,8 @@
     { "b-intra",              no_argument, NULL, 0 },
     { "no-b-intra",           no_argument, NULL, 0 },
     { "nr",             required_argument, NULL, 0 },
+    { "stats",          required_argument, NULL, 0 },
+    { "pass",           required_argument, NULL, 0 },
     { 0, 0, 0, 0 }
 };
 
@@ -412,6 +414,11 @@
     H0("   --cbqpoffs <integer>          Chroma Cb QP Offset. Default %d\n", param->cbQpOffset);
     H0("   --crqpoffs <integer>          Chroma Cr QP Offset. Default %d\n", param->crQpOffset);
     H0("   --[no-]hrd                    Enable HRD parameters signalling. Default %s\n", OPT(param->bEmitHRDSEI));
+    H0("   --stats                       FileName for stats file in multipass pass rate control. Default %s\n", OPT(param->rc.statFileName));
+    H0("   --pass                        Multi pass rate control.\n"
+       "                                   - 1 : First pass , cretes stats file\n"
+       "                                   - 2 : Last pass, does not overwrite stats file\n"
+       "                                   - 3 : Nth pass, overwrites stats file\n");
     H0("   --rd <0..6>                   Level of RD in mode decision 0:least....6:full RDO. Default %d\n", param->rdLevel);
     H0("   --psy-rd <0..2.0>             Strength of psycho-visual optimization. Requires slow preset or below. Default %f\n", param->psyRd);
     H0("   --[no-]signhide               Hide sign bit of one coeff per TU (rdo). Default %s\n", OPT(param->bEnableSignHiding));


More information about the x265-devel mailing list