mirror of
https://github.com/mpv-player/mpv
synced 2025-01-12 01:49:33 +00:00
allow using of float fixed_quant
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11930 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
32da6308a7
commit
742843458f
@ -987,22 +987,20 @@ static int set_create_struct(xvid_mplayer_module_t *mod)
|
|||||||
/* Quantizer mode uses the same plugin, we have only to define
|
/* Quantizer mode uses the same plugin, we have only to define
|
||||||
* a constant quantizer zone beginning at frame 0 */
|
* a constant quantizer zone beginning at frame 0 */
|
||||||
if(pass == MODE_QUANT) {
|
if(pass == MODE_QUANT) {
|
||||||
int base, incr;
|
XVIDRational squant;
|
||||||
|
squant = xvid_d2q(xvidenc_quantizer,128);
|
||||||
base = 100;
|
|
||||||
incr = (int)xvidenc_quantizer*base;
|
|
||||||
|
|
||||||
create->zones[create->num_zones].mode = XVID_ZONE_QUANT;
|
create->zones[create->num_zones].mode = XVID_ZONE_QUANT;
|
||||||
create->zones[create->num_zones].frame = 0;
|
create->zones[create->num_zones].frame = 0;
|
||||||
create->zones[create->num_zones].base = base;
|
create->zones[create->num_zones].base = squant.num;
|
||||||
create->zones[create->num_zones].increment = incr;
|
create->zones[create->num_zones].increment = squant.den;
|
||||||
create->num_zones++;
|
create->num_zones++;
|
||||||
|
|
||||||
mp_msg(MSGT_MENCODER, MSGL_INFO,
|
mp_msg(MSGT_MENCODER, MSGL_INFO,
|
||||||
"xvid: Fixed Quant Rate Control -- quantizer=%d/%d=%2.2f\n",
|
"xvid: Fixed Quant Rate Control -- quantizer=%d/%d=%2.2f\n",
|
||||||
incr,
|
squant.num,
|
||||||
base,
|
squant.den,
|
||||||
(float)(incr)/(float)(base));
|
(float)(squant.num)/(float)(squant.den));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
mp_msg(MSGT_MENCODER, MSGL_INFO,
|
mp_msg(MSGT_MENCODER, MSGL_INFO,
|
||||||
|
Loading…
Reference in New Issue
Block a user