changeset 11967:4f4b81257d19

Adds support for the film grain effect and deblocking filters in xvid patch by Jan Knutar <jknutar@nic.fi>
author attila
date Tue, 17 Feb 2004 12:52:19 +0000
parents b58fdd5d8e8d
children e2f1ded0cf88
files DOCS/man/en/mplayer.1 libmpcodecs/vd_xvid4.c
diffstat 2 files changed, 21 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Tue Feb 17 12:43:07 2004 +0000
+++ b/DOCS/man/en/mplayer.1	Tue Feb 17 12:52:19 2004 +0000
@@ -2402,10 +2402,21 @@
 .
 .PD 0
 .RSs
+.IPs deblock-chroma
+Activate xvid internal postprocessing filter: chroma deblock filter.
+See also \-vf pp, which is faster than XviD's own filter.
+.IPs deblock-luma
+Activate xvid internal postprocessing filter: luma deblock filter.
+See also \-vf pp, which is faster than XviD's own filter.
 .IPs dr2\ \ 
 Activate direct rendering method 2.
 .IPs nodr2
 Deactivate direct rendering method 2.
+.IPs filmeffect
+Activate XviD internal film grain effect.
+Adds artificial film grain to the video. 
+May increase perceived quality, while lowering true quality.
+Also see \-vf noise.
 .RE
 .PD 1
 .
--- a/libmpcodecs/vd_xvid4.c	Tue Feb 17 12:43:07 2004 +0000
+++ b/libmpcodecs/vd_xvid4.c	Tue Feb 17 12:52:19 2004 +0000
@@ -43,10 +43,16 @@
  ****************************************************************************/
 
 static int do_dr2 = 1;
+static int filmeffect = 0;
+static int lumadeblock = 0;
+static int chromadeblock = 0;
 
 m_option_t xvid_dec_opts[] = {
 	{ "dr2", &do_dr2, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{ "nodr2", &do_dr2, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+	{ "filmeffect", &filmeffect, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+	{ "deblock-luma", &lumadeblock, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+	{ "deblock-chroma", &chromadeblock, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
@@ -194,7 +200,10 @@
 	dec.bitstream = data;
 	dec.length = len;
 
-	dec.general |= XVID_LOWDELAY;
+	dec.general |= XVID_LOWDELAY 
+	        | (filmeffect ? XVID_FILMEFFECT : 0 )
+	        | (lumadeblock ? XVID_DEBLOCKY : 0 )
+	        | (chromadeblock ? XVID_DEBLOCKUV : 0 );
 
 	dec.output.csp = p->cs;