I need to convert YUV420 video frames into RGB565 format. I've found a formula for converting (.c, c++) where you give the function the Y,U and V components and it will convert it to an RGB image.
However, I'm not sure how to extract the YUV data from the video capture buffer in order to
pass to the conversion function.
The video capture buffer is defined as:
static WORD *pwYUVBuffer;
This buffer will contain one video frame of 640x480 in YUV420 format.
Does anyone have a C or C++ routine that will loop through each pixel in a YUV420 buffer and convert the image to rgb? I've looked around the net but I could only find code that assumes you
already have the Y, U and V components to pass to the function.
I appreciate any help you could offer.
Thanks.
+ Reply to Thread
Results 1 to 4 of 4
-
-
Please see the attached file for the conversion......
Pls let me know if you can accelerate the application,
Pls let me know if you are having difficult in understanding or compiling it....
sigu_joseph@yahoo.co.uk
Regards,
Sigu Joseph.
yuv_to_bgr.c -
Just to add to the orginal post, you have requested for a program which converts yuv 420 to rgb 565, where as above c file that I have posted will be doing the conversion of yuv 420 to bgr 888...
-
Dear All
glad to see ur posts
few doubts....
Now we got a converted data then how we show it in a device ..
Actually this process is known rendering?
few valid info's
here the code is for conversion of YUV 420 planar to BGR 888. YUV is available in packed format also..so depends on ur device the output data change from packed to planar...more clearly packed format structure like this way
eg UYVY (sub of YUV 422) -> U0Y0V0Y1 the two Y component shared between single U & V component...........
For planar format structure plz see code
Is there any code available for convert YUV 420 planar to YUV 422 Packed (Conversion b/w YUV)It is very helpful
Similar Threads
-
Advice needed for converting MJPEG from Canon camera
By cdowdy in forum Video ConversionReplies: 5Last Post: 4th Jun 2016, 12:26 -
Help needed converting HD h.264 Freeview recordings (New Zealand)
By Chopmeister in forum Video ConversionReplies: 26Last Post: 25th Sep 2011, 02:18 -
Help needed Converting to AVCHD to play on Panasonic TV
By LOWTECH in forum Video ConversionReplies: 8Last Post: 31st Aug 2011, 12:52 -
help needed converting and editing an flv please
By Witzend in forum Newbie / General discussionsReplies: 6Last Post: 23rd Aug 2011, 15:04 -
trouble converting/xb360 essential settings needed
By Captain Slow in forum Newbie / General discussionsReplies: 8Last Post: 17th May 2011, 19:14