[XviD-devel] vop flag question

MAILER-DAEMON MAILER-DAEMON
Thu Jul 14 18:19:16 CEST 2005


On Mon, 11 Jul 2005, Pascal Massimino wrote:

> On Thu, 2005-06-23 at 21:36, MAILER-DAEMON at edu.bnhof.de wrote:
> 
> > > 	hmm... try setting the Cb & Cr values to '127' instead.
> > > 
> > 
> > Thanks. That is a good idea. Slipped my mind that Cb & Cr is centered.
> > I'll try it and post the results just in case anyone is interested.
> > 
> 	you should really use a value of ~127 for Cb/Cr before
> 	comparing. Because, even if the flag XVID_VOP_GREYSCALE
> 	discards the Cb/Cr for *INTER* blocks, these chroma values
> 	still matter for INTRA prediction. Actually, the default 
> 	prediction value is '128', more or less, but with rounding
> 	taken into account, the idct(fdct(.)) fixed point is more
> 	or less around '127', dependent of 'Q'. 
> 	That why i suggested you this value.
> 

Thanks for pointing this out. I was always courious why the dc values
are all coded even if the the 'cbp' says to don't code Cb/Cr. In 
CodeBlockIntra when coding block coeffs it always codes the dc but
checks the 'cpb' when coding the ac. If the block pattern of the
MB indicates that Cb/Cr is not coded why are the dc coded anyway?
For that matter all dc of the blocks in the MB is coded regardless
of what the indicated block pattern in the MB header says.

For my hack I've changed it so if XVID_VOP_GREYSCALE is set the dc
of the Cb/Cr block is always set to the smallest length one( {0x03, 2} ).
Anyone knwo if this would cause any problems?

thanks


More information about the XviD-devel mailing list