Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

B/W Video to RGB using the VIP

Hello,

I would like to display b/w video to VGA screen using the vip 9.1.

Is it possible in the vip to transfer Y to RGB?

The color space conversion need 3 color components inputs.

Any idea?

Thank you!

Reuven

7 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Of course you can't create color where there is none.

    But if you're just trying to get the luma into the RGB space what you'll want to do is fake the Cr and Cb color planes. Set them both to appropriate 0 levels. For 10-bit data I believe the value is 0x200.

    Jake
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I don't think you need to go through a conversion: just set R = G = B = Y

    You can check this link: http://www.dvd-replica.com/dvd/colorrgb2.php to verify this. You must enter 128 (=0x80 corresponding to Jakes 0x200 for 10 bit systems) for the Cr and Cb values, you will see that the Y value entered shows up in R,G and B

    Josy
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you for both answers.

    My question is not the mathematical way but how to do it in the VIP (Video suite IP by Altera)?

    Reuven
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I believe you can use the color plane sequencer to duplicate color planes:

    Y -> Y:Y:Y
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you!

    I thought about it but i do not like it so much, so many steps:

    1. Y -> 2 Y streams.

    2. Y -> 2 Y stream (now I have 3 Y streams).

    3. Y -> (Y, Y) stream.

    4. Y & (Y, Y) -> (Y,Y,Y) stream.

    I think it will be better to develop by myself a Y -> (Y,Y,Y) code.

    Reuven
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Truly it seems the easiest place to do this is at the INPUT of the CVI on the "vid_data" port. Just fake the Cr and CB values going into the core.

    Jake