[Mplayer-cvslog] CVS: main/libmpeg2 slice.c,1.7,1.8

Michael Niedermayer michaelni at gmx.at
Tue Oct 29 01:25:35 CET 2002


Hi

On Tuesday 29 October 2002 00:54, Arpi wrote:
> Hi,
>
> > Log Message:
> > fixing quant_store scaling
> >
> >
> >  #ifdef MPEG12_POSTPROC
> > -	picture->current_frame->quant_store[code][(offset>>4)+1] =
> > picture->quantizer_scale;
> > +	picture->current_frame->quant_store[code][(offset>>4)+1] =
> > picture->quantizer_scale>>1;
>
> hmm i don't understand this "fix"... shouldn't quent store containt quant,
> instead of quant>>1 ?
yes, see
static inline int get_quantizer_scale (picture_t * picture)
...
    if (picture->q_scale_type)
	return non_linear_quantizer_scale [quantizer_scale_code];
    else
	return quantizer_scale_code << 1;
                                    ^^^^
the quant>>1 just reverses that scaling, i dunno if the mpeg2 standart calls 
quant or quant>>1 quantizer but quant>>1 seems to be equivalent to quant in 
h263,mpeg4 & mpeg1 and so we either must >>1 it or pass a isMpeg2 flag 
around, the first seemed simpler ...

[...]

Michael



More information about the MPlayer-cvslog mailing list