Mercurial > mplayer.hg
changeset 15638:189da3c3116b
Add XviD's luminance masking (option name: lumi_mask)
author | gpoirier |
---|---|
date | Sat, 04 Jun 2005 20:54:49 +0000 |
parents | d9aec92f6d12 |
children | f26450da61a1 |
files | ChangeLog DOCS/man/en/mplayer.1 libmpcodecs/ve_xvid4.c |
diffstat | 3 files changed, 22 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Jun 04 19:33:06 2005 +0000 +++ b/ChangeLog Sat Jun 04 20:54:49 2005 +0000 @@ -41,7 +41,7 @@ * 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
--- a/DOCS/man/en/mplayer.1 Sat Jun 04 19:33:06 2005 +0000 +++ b/DOCS/man/en/mplayer.1 Sat Jun 04 20:54:49 2005 +0000 @@ -7593,6 +7593,17 @@ .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) .
--- a/libmpcodecs/ve_xvid4.c Sat Jun 04 19:33:06 2005 +0000 +++ b/libmpcodecs/ve_xvid4.c Sat Jun 04 20:54:49 2005 +0000 @@ -169,6 +169,7 @@ 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 @@ {"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 @@ 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) {