summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/en/mplayer.111
-rw-r--r--libmpcodecs/vd_xvid4.c11
2 files changed, 21 insertions, 1 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index cb883a9f1c..9abd225bc3 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -2402,10 +2402,21 @@ Specify additional parameters when decoding with XviD.
.
.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
.
diff --git a/libmpcodecs/vd_xvid4.c b/libmpcodecs/vd_xvid4.c
index 7c200fc47b..9389955edb 100644
--- a/libmpcodecs/vd_xvid4.c
+++ b/libmpcodecs/vd_xvid4.c
@@ -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 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags)
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;