From fb9e995db8b49f45d476aec8bf325a24bb3fe572 Mon Sep 17 00:00:00 2001 From: rguyom Date: Wed, 2 Apr 2003 22:27:35 +0000 Subject: [PATCH] XviD: - "greyscale" is supported in the stable tree - a few typos git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9807 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/en/mplayer.1 | 6 +++--- libmpcodecs/ve_xvid.c | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/DOCS/en/mplayer.1 b/DOCS/en/mplayer.1 index cc3bf3789b..01a09d6ab0 100644 --- a/DOCS/en/mplayer.1 +++ b/DOCS/en/mplayer.1 @@ -3418,6 +3418,8 @@ use MPEG quantizers instead of H.263 (default=off) .IPs mod_quant decide whether to use MPEG or H.263 quantizers on a frame-by-frame basis. (default=off, 2pass mode only) +.IPs greyscale +encode in black & white (default=off) .IPs debug save per-frame statistics in xvid.dbg (default=off) .br @@ -3439,8 +3441,6 @@ not work as intended. 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 @@ -3450,7 +3450,7 @@ 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 +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> diff --git a/libmpcodecs/ve_xvid.c b/libmpcodecs/ve_xvid.c index 72d4477db3..c70378f0be 100644 --- a/libmpcodecs/ve_xvid.c +++ b/libmpcodecs/ve_xvid.c @@ -30,7 +30,7 @@ #warning ** ** #warning ** Y O U '' R E U S I N G U N S T A B L E S O F T W A R E ** #warning ** ** -#warning ** Streams produced by this version aren''nt probably compatible ** +#warning ** Streams produced by this version aren''t probably compatible ** #warning ** with anything else, even the xvid decoder itself. There are ** #warning ** bugs, this code could crash, could blow up your PC or the ** #warning ** whole building ! ** @@ -84,10 +84,10 @@ static int xvidenc_kfreduction = -1; static int xvidenc_fixed_quant = 0; static int xvidenc_debug = 0; static int xvidenc_interlacing = 0; +static int xvidenc_greyscale = 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; @@ -122,10 +122,10 @@ struct config xvidencopts_conf[] = { { "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}, + { "greyscale", &xvidenc_greyscale, 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}, @@ -186,7 +186,7 @@ config(struct vf_instance_s* vf, "** **\n" "** Y O U ' R E U S I N G U N S T A B L E S O F T W A R E **\n" "** **\n" - "** Streams produced by this version aren'nt probably compatible **\n" + "** Streams produced by this version aren't probably compatible **\n" "** with anything else, even the xvid decoder itself. There are **\n" "** bugs, this code could crash, could blow up your PC or the **\n" "** whole building ! **\n" @@ -227,6 +227,8 @@ config(struct vf_instance_s* vf, if (xvidenc_xstat) enc_param.global |= XVID_GLOBAL_EXTRASTATS; #endif + if (xvidenc_greyscale) + enc_param.global |= XVID_GREYSCALE; enc_param.rc_reaction_delay_factor = xvidenc_rc_reaction_delay_factor; enc_param.rc_averaging_period = xvidenc_rc_averaging_period; enc_param.rc_buffer = xvidenc_rc_buffer;