conv: 16 bit YUV 4:2:2 (planar) => 32 bit TrueColor (LE: bgr-)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello,

	I have been playing with latest xawtv and bttv, and trying
	to have those two pass between each other data in
	YCrCb 4:2:2 Planar format (in grabdisplay mode). I have modifed
	bttv to set  the driver and output format as follows:

		btwrite(BT848_COLOR_FMT_YCrCb422, BT848_COLOR_FMT);
		p.palette=VIDEO_PALETTE_YUV422;

	it mostly work, in that I get the output image, except that
	it looks as if I was looking at picture thru a green glass..
	I tried to capure an image of this, but screen snapshoot
	show up all fine.

	I tried to change yuv422p_to_rgb24() function
	in xawtv-3.62:libng/color_yuv2rgb.c to use
	"YCrCb to RGB" conversion as defined in Bt data
	scheets but it does not seem to make difference in
	terms of correctness of conversion.

	    *(d++) = 1.164*(*y-16)+1.596*(*v-128);
	    *(d++) = 1.164*(*y-16)-0.813*(*v-128)-0.391*(*u-128);
	    *(d++) = 1.164*(*y-16)+2.018*(*u-128);

	any ideas what I might be overlooking?

-- 
Adam
http://www.eax.com	The Supreme Headquarters of the 32 bit registers





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux