VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Hi,

    I am new to video field. I have to convert YUV422 to RGB565. YUV422 1280x720 is the input and RGB565 960x540 should be the output.
    I now have Y, Cb and Cr data extracted. Can someone help me with ideas on conversion and packing..

    Regards,
    Akshith
    Quote Quote  
  2. First convert to 8:8:8 RGB using the usual conversion matrices. Then reduce the number of bits from 8:8:8 to 5:6:5 and pack them into a 16 bit word.

    http://www.fourcc.org/fccyvrgb.php

    Code:
    // RGB 8:8:8 to RGB 5:6:5
    
    W16  = (R8 >> 3) << 11 // top 5 bits of R into top 5 bits of W16
    W16 |= (G8 >> 2) << 5  // top 6 bits of G into middle 6 bits of W16
    W16 |= (B8 >> 3)       // top 5 bits of B into lower 5 bits of W16
    Last edited by jagabo; 16th Aug 2013 at 15:52.
    Quote Quote  
  3. Thanks for the reply. Please suggest any tool to view RGB565 file. I have tried Xnview and rgbview, but didn't work.
    Quote Quote  



Similar Threads

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