Add XviD's luminance masking (option name: lumi_mask)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15639 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
gpoirier 2005-06-04 20:54:49 +00:00
parent 3815bd0be4
commit 0836c5a899
3 changed files with 22 additions and 1 deletions

View File

@ -41,7 +41,7 @@ MPlayer (1.0)
* audio encoding modularized
* AAC (FAAC) audio encoding
* border processing adaptive quantization in libavcodec
* XviD's encoding zones
* XviD's encoding zones and luminance masking
Ports:
* improved timer function on Mac OS X

View File

@ -7593,6 +7593,17 @@ wide search
.PD 1
.
.TP
.B (no)lumi_mask
Adaptive quantization allows each macroblock quantizer to vary inside
each frame.
This is a 'psychosensory' setting that is supposed to make use of the
fact that the human eye tends to notice fewer details in very bright
and very dark parts of the picture.
It compresses those areas more strongly than medium ones, which will
save bits that can be spent again on other frames, raising overall
subjective quality and possibly reducing PSNR.
.
.TP
.B min_iquant=<0\-31>
minimum I-frame quantizer (default: 2)
.

View File

@ -169,6 +169,7 @@ static int xvidenc_stats = 0;
static int xvidenc_max_key_interval = 0; /* Let xvidcore set a 10s interval by default */
static int xvidenc_frame_drop_ratio = 0;
static int xvidenc_greyscale = 0;
static int xvidenc_luminance_masking = 0;
static int xvidenc_debug = 0;
static int xvidenc_psnr = 0;
@ -245,6 +246,8 @@ m_option_t xvidencopts_conf[] =
{"max_key_interval", &xvidenc_max_key_interval, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
{"greyscale", &xvidenc_greyscale, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"nogreyscale", &xvidenc_greyscale, CONF_TYPE_FLAG, 0, 1, 0, NULL},
{"lumi_mask", &xvidenc_luminance_masking, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"nolumi_mask", &xvidenc_luminance_masking, CONF_TYPE_FLAG, 0, 1, 0, NULL},
{"turbo", &xvidenc_turbo, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"debug", &xvidenc_debug, CONF_TYPE_INT , 0 ,0,-1,NULL},
{"stats", &xvidenc_stats, CONF_TYPE_FLAG, 0, 0, 1, NULL},
@ -1049,6 +1052,13 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
create->num_plugins++;
doZones = 1;
}
if (xvidenc_luminance_masking) {
create->plugins[create->num_plugins].func = xvid_plugin_lumimasking;
create->plugins[create->num_plugins].param = NULL;
create->num_plugins++;
}
// parse zones
if (xvidenc_zones != NULL && doZones > 0) // do not apply zones in CQ, and first pass mode (xvid vfw doesn't allow them in those modes either)
{