[XviD-devel] vop flag question

MAILER-DAEMON MAILER-DAEMON
Thu Jun 23 21:36:18 CEST 2005


On Wed, 22 Jun 2005, Pascal Massimino wrote:

> > Also looking through the code I couldn't find an option for
> > a 1-channel image so I'm feeding a 3-channel image.
> > I use XVID_CSP_I420  and set Cb & Cr channel to 0.
> > Is there a better option?
> > 
> > Finally I tested the XVID_VOP_GREYSCALE option by the two following 
> > tests.
> > The src images are a sequence of greyscale images using XVID_CSP_I420 
> > option and setting Cb & Cr channel to 0. The image size is 1008x752.
> > All options were the same for both encoding except for the
> > XVID_VOP_GREYSCALE flag.
> 
> 	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.

I also had another question about encoding a 1 channel greyscale image.

I encoded it two different ways.
First test was encoded by setting the Y to the greyscale value and setting
Cb & Cr to 0, and setting the csp to XVID_CSP_I420 . I also set the 
XVID_VOP_GREYSCALE flag,so the values of Cb & Cr
should not matter.

The second test was encoded by using the XVID_CSP_BGR color space and 
setting the values of BGR to the same greyscale value. I also set the
XVID_VOP_GREYSCALE flag, and when decoding just ask back the Y value.
So this case basically does the YUV conversion on the RGB images and then
just encodes the Y.

The results from the two tests are very interesting. For the same Q factor
the second test(feeding it RGB) frame size is significantly smaller. The 
difference gets smaller as the Q factor goes up, but at Q factor of 7
the difference is about 1KB, and about 0.5KB at Q = 18. The PSNR is better
for the first case, even at the same fr size(so the Q factor will be 
bigger for the first case since it needs a higher Q factor to compress it
more). Another thing about the 2nd test is that you can get a smaller 
frame size that is not possible with the first test(For the examples I 
ran 1st test at Q=31 and 2nd test at Q=22 have about the same fr size).

Which leads to my question, is there something going on in the YUV
conversion that makes it compress better?

thanks.


More information about the XviD-devel mailing list