VideoHelp.com Forum
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Member
    Join Date: Jun 2006
    Location: United States
    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. Member
    Join Date: Jan 2008
    Location: India
    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. Member
    Join Date: Jan 2008
    Location: India
    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. Member
    Join Date: Apr 2008
    Location: US
    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

  1. Replies: 26
    Last Post: 25th Sep 2011, 02:18
  2. Help needed Converting to AVCHD to play on Panasonic TV
    By LOWTECH in forum Video Conversion
    Replies: 8
    Last Post: 31st Aug 2011, 12:52
  3. help needed converting and editing an flv please
    By Witzend in forum Newbie / General discussions
    Replies: 6
    Last Post: 23rd Aug 2011, 15:04
  4. trouble converting/xb360 essential settings needed
    By Captain Slow in forum Newbie / General discussions
    Replies: 8
    Last Post: 17th May 2011, 19:14
  5. Advice needed for converting MJPEG from Canon camera
    By cdowdy in forum Video Conversion
    Replies: 4
    Last Post: 18th Apr 2010, 11:00
Search   Contact us   About   Advertise   Forum   RSS Feeds   Statistics   Tools