VideoHelp Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Member
    Join Date
    Jun 2006
    Location
    United States
    Search Comp PM
    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.
    Quote Quote  
  2. 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
    Quote Quote  
  3. 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...
    Quote Quote  
  4. 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
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!