changeset 9805:79bdc8a266ac

XviD : Added a few options : "interlacing", "packed", "divx5bvop", "greyscale". Renamed "me_colour" to "chroma_me". Some documentation.
author rguyom
date Wed, 02 Apr 2003 22:13:44 +0000
parents e20ef33d172a
children 5908dc15bc33
files DOCS/en/mplayer.1 libmpcodecs/ve_xvid.c
diffstat 2 files changed, 46 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/en/mplayer.1	Wed Apr 02 21:33:19 2003 +0000
+++ b/DOCS/en/mplayer.1	Wed Apr 02 22:13:44 2003 +0000
@@ -3394,6 +3394,8 @@
 switch to fixed quantizer mode and specify the quantizer to be used
 .IPs me_quality=<0\-6>
 specify the motion detection quality (default=4)
+.IPs interlacing
+enable support for interlaced content (default=off)
 .IPs 4mv
 use 4 motion vectors per macro-block, might give better compression at the
 cost of a slower encoding (default=off)
@@ -3427,6 +3429,33 @@
 .IPs kfreduction=<0\-100>
 (default=30, 2pass mode only)
 .RE
+.br
+The folowing options are only available with the unstable (cvs -HEAD)
+version of XviD. Be warned that these options are experimental and may
+not work as intended.
+.
+.RSS
+.IPs packed
+create a bitstream that can be decoded delay-free (default=off)
+.IPs divx5bvop
+generate DivX5 compatible B-frames (default=on)
+.IPs greyscale
+encode in black & white (default=off)
+.IPs qpel
+enable quarter-pixel motion estimation (default=off)
+.IPs gmc
+enable global motion compensation, may save bits on panning scenes (default=off)
+.IPs chroma_me
+uses chroma information to estimate motion (default=off)
+.IPs reduced
+enable encoding reduced resolution frames (default=off)
+.IPs max_bframes=<0\-4>
+maximum number of B frames to put between I/P frames (default=0
+.IPs bquant_ratio=<0\-1000>
+quantizer ratio between B and non B frames, 150=1.50 (default=150)
+.IPs bquant_offset=<-1000\-1000>
+quantizer offset between B and non B frames, 100=1.00 (default=100)
+.RE
 
 
 .\" --------------------------------------------------------------------------
--- a/libmpcodecs/ve_xvid.c	Wed Apr 02 21:33:19 2003 +0000
+++ b/libmpcodecs/ve_xvid.c	Wed Apr 02 22:13:44 2003 +0000
@@ -83,14 +83,18 @@
 static int xvidenc_kfreduction = -1;
 static int xvidenc_fixed_quant = 0;
 static int xvidenc_debug = 0;
+static int xvidenc_interlacing = 0;
 #ifdef XVID_API_UNSTABLE
+static int xvidenc_packed = 0;
+static int xvidenc_divx5bvop = 1;
+static int xvidenc_greyscale = 0;
 static int xvidenc_lumi_mask = 0;
 static int xvidenc_qpel = 0;
 static int xvidenc_max_bframes = 0;
 static int xvidenc_bquant_ratio = 150;
 static int xvidenc_bquant_offset = 100;
 static int xvidenc_gmc = 0;
-static int xvidenc_me_colour = 0;
+static int xvidenc_chroma_me = 0;
 static int xvidenc_reduced = 0;
 static int xvidenc_xstat=0;
 static int xvidenc_hqac=0;
@@ -117,7 +121,11 @@
     { "kfreduction", &xvidenc_kfreduction, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, /* for XVID_MODE_2PASS_2 */
     { "fixed_quant", &xvidenc_fixed_quant, CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL}, /* for XVID_MODE_FIXED_QUANT */
     { "debug", &xvidenc_debug, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    { "interlacing", &xvidenc_interlacing, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #ifdef XVID_API_UNSTABLE
+    { "packed", &xvidenc_packed, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    { "divx5bvop", &xvidenc_divx5bvop, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    { "greyscale", &xvidenc_greyscale, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     //{ "lumi_mask", &xvidenc_lumi_mask, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     { "extrastat", &xvidenc_xstat, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     { "qpel", &xvidenc_qpel, CONF_TYPE_FLAG, 0, 0, 1, NULL},
@@ -126,7 +134,7 @@
     { "bquant_offset", &xvidenc_bquant_offset, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL},
     { "reduced", &xvidenc_reduced, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     { "gmc", &xvidenc_gmc, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-    { "me_colour", &xvidenc_me_colour, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    { "chroma_me", &xvidenc_chroma_me, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     { "hq_ac", &xvidenc_hqac, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     { "vhq", &xvidenc_vhq, CONF_TYPE_FLAG, 0, 0, 1, NULL},
     { "chroma_opt", &xvidenc_pref, CONF_TYPE_FLAG, 0, 0, 1, NULL},
@@ -210,11 +218,14 @@
     enc_param.max_bframes = xvidenc_max_bframes;
     enc_param.bquant_ratio = xvidenc_bquant_ratio;
     enc_param.bquant_offset = xvidenc_bquant_offset;
+    if (xvidenc_divx5bvop) 
+	enc_param.global |= XVID_GLOBAL_DX50BVOP;
+    if (xvidenc_packed) 
+	enc_param.global |= XVID_GLOBAL_PACKED;
     if (xvidenc_reduced)
 	enc_param.global |= XVID_GLOBAL_REDUCED;
     if (xvidenc_xstat)
 	enc_param.global |= XVID_GLOBAL_EXTRASTATS;
-
 #endif
     enc_param.rc_reaction_delay_factor = xvidenc_rc_reaction_delay_factor;
     enc_param.rc_averaging_period = xvidenc_rc_averaging_period;
@@ -245,6 +256,8 @@
 	fp->enc_frame.general |= XVID_INTER4V;
     if (xvidenc_lumi_mask)
 	fp->enc_frame.general |= XVID_LUMIMASKING;
+    if (xvidenc_interlacing)
+	fp->enc_frame.general |= XVID_INTERLACING;
 #ifdef XVID_API_UNSTABLE
     if (xvidenc_qpel) {
 	fp->enc_frame.general |= XVID_QUARTERPEL;
@@ -256,7 +269,7 @@
 	fp->enc_frame.general |= XVID_GMC;
     if (xvidenc_xstat)
 	fp->enc_frame.general |= XVID_EXTRASTATS;
-    if (xvidenc_me_colour)
+    if (xvidenc_chroma_me)
 	fp->enc_frame.motion |= PMV_CHROMA16 | PMV_CHROMA8;
     if(xvidenc_reduced)
 	fp->enc_frame.general |= XVID_REDUCED;