On 01/02/2010, at 5:50 AM, (*)·´`·.¸.»ÐëÄdMäñ·´`·.¸.»(*) wrote:

Mark you're a genius :) it works !

However, I changed the conversion formulas for reasons explained here:

http://www.fourcc.org/fccyvrgb.php (see Avery Lee's JFIF Clarification )

This also depends on the colour space you are using, 420mpeg2 or 420jpeg.

this was my code:

                        // if (ITU601) {
                                yc =((16843 * r) + (33030 * g) + (6423 * 
b)>>16) + 16;
                                uc =(-(9699 * r) - (19071 * g) + (28770 * 
b)>>16) + 128;
                                vc =((28770 * r) - (24117 * g) - (4653 * 
b)>>16) + 128;

Integer conversion is faster than floating point.
I do recommend optimising your code this way.

Thanks again for your time.

No Problem. One day I hope to get a job writing YUV video filters :-)
Mark
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to