[XviD-devel] xvid 2 pass -mplayer bug

Marco "elcabesa" Belli elcabesa at inwind.it
Sun Feb 9 19:59:47 CET 2003


i have found a bug inside xvid or mplayer that make mplayer crash using 2 pass 
and lumi_mask.
since ed gom read this forum and he makde the xvid_vbr.c file of mplayer i'm 
posting here the bug

mplayer 2 pass ocde inside  static int vbr_getquant_2pass2(void *sstate)
 make quant not able to change more than two form previous frame


if(state->last_quant && capped_to_max_framesize == 0) {

			if (quant > state->last_quant + 2)
			{
				quant = state->last_quant + 2;

			}
			if (quant < state->last_quant - 2)
			{

				quant = state->last_quant - 2;
			}

		}
	}

	return(quant);

but  quant that mplayer give to xvid is changed by dapt_quant

pEnc->current->quant =
				adaptive_quantization(pEnc->current->image.y,
								  pEnc->mbParam.edged_width, temp_dquants,
								  pEnc->current->quant, pEnc->current->quant,
								  2 * pEnc->current->quant,
								  pEnc->mbParam.mb_width,
								  pEnc->mbParam.mb_height);


this is what happen

mplayer set quant 4
xvid lumi_mask adapt quant change it to 10
mplayer get last_quant by xvid =10
then mplayer give a new quant ., it choose 5 but then it MUST CHANGE it to 8
xvid lumi mask adapt it to 15
mplayer try to lower it but it can laso do 13
...
etc etc

if there are more than 80 -90 black frames.. mencoder simply crash

byee
please tell me how to fix it
 do you prefere limit lumi_mask power or xvid_vbr module?



More information about the XviD-devel mailing list