[MPlayer-dev-eng] [PATCH] add support for latest x264 options

Guillaume POIRIER poirierg at gmail.com
Sun Oct 1 22:31:35 CEST 2006


Hi there,
Attached patch does $SUBJ. The doc part can be improved I imagine, but
I lack the technical background to do so.

Please review.

Guillaume
-- 
With DADVSI (http://en.wikipedia.org/wiki/DADVSI), France finally has
a lead on USA on selling out individuals right to corporations!
Vive la France!
-------------- next part --------------
Index: libmpcodecs/ve_x264.c
===================================================================
--- libmpcodecs/ve_x264.c	(r??vision 20015)
+++ libmpcodecs/ve_x264.c	(copie de travail)
@@ -120,6 +120,10 @@
 static char *cqm8iy = NULL;
 static char *cqm8py = NULL;
 static int globalheader=0;
+static int direct_8x8 = -1;
+static int deadzone_inter = 21;
+static int deadzone_intra = 11;
+static int interlaced = 0;
 
 m_option_t x264encopts_conf[] = {
     {"bitrate", &bitrate, CONF_TYPE_INT, CONF_RANGE, 0, 24000000, NULL},
@@ -207,6 +211,11 @@
     {"novisualize", &visualize, CONF_TYPE_FLAG, 0, 1, 0, NULL},
     {"global", &globalheader, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     {"noglobal", &globalheader, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"direct_8x8", &direct_8x8, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
+    {"deadzone_inter", &deadzone_inter, CONF_TYPE_INT, CONF_RANGE, 0, 32, NULL},
+    {"deadzone_intra", &deadzone_intra, CONF_TYPE_INT, CONF_RANGE, 0, 32, NULL},
+    {"interlaced", &interlaced, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nointerlaced", &interlaced, CONF_TYPE_FLAG, 0, 0, 0, NULL},
     {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
@@ -342,6 +351,10 @@
     mod->param.vui.i_sar_height = d_height*width;
     mod->param.i_threads = threads;
     if(globalheader) mod->param.b_repeat_headers = 0;
+    mod->param.analyse.i_direct_8x8_inference = direct_8x8;
+    mod->param.b_interlaced = interlaced;
+    mod->param.analyse.i_luma_deadzone[0] = deadzone_inter;
+    mod->param.analyse.i_luma_deadzone[1] = deadzone_intra;
 
     if(cqm != NULL)
     {
Index: DOCS/man/en/mplayer.1
===================================================================
--- DOCS/man/en/mplayer.1	(r??vision 20015)
+++ DOCS/man/en/mplayer.1	(copie de travail)
@@ -9270,6 +9270,10 @@
 .RE
 .
 .TP
+.B (no)interlaced
+enable pure-interlaced mode
+.
+.TP
 .B direct_pred=<0\-3>
 Determines the type of motion prediction used for direct macroblocks
 in B-frames.
@@ -9294,6 +9298,20 @@
 .RE
 .
 .TP
+.B direct_8x8=<-1\-1>
+direct prediction size
+.PD 0
+.RSs
+.IPs -1
+smallest possible according to level (default)
+.IPs 0
+4x4
+.IPs 1
+8x8
+.RE
+.PD 1
+.
+.TP
 .B (no)weight_b
 Use weighted prediction in B-frames.
 Without this option, bidirectionally predicted macroblocks give
@@ -9433,6 +9451,16 @@
 This option has no effect without B-frames.
 .
 .TP
+.B deadzone_inter=<0\-32>
+set the size of the inter luma quantization deadzone for non-trellis
+quantization (default: 21)
+.
+.TP
+.B deadzone_intra=<0\-32>
+set the size of the intra luma quantization deadzone for non-trellis
+quantization (default: 11)
+.
+.TP
 .B trellis=<0\-2>
 rate-distortion optimal quantization
 .PD 0


More information about the MPlayer-dev-eng mailing list