0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

Adds support for the film grain effect and deblocking filters in xvid

patch by Jan Knutar <jknutar@nic.fi>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11968 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
attila 2004-02-17 12:52:19 +00:00
parent 268daef9cd
commit f44c5934d0
2 changed files with 21 additions and 1 deletions

View File

@ -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
.

View File

@ -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;