This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

YUV420 to RGB conversion for VFPC

Hi all,

I wanted to check whether Openmax components for VFPC support YUV420 to RGB conversion or not ?

I want to divert the o/p of decoder (YUV420) to frame buffer window, which expects the data to be in RGB format only.


Thanks in advance,
Sweta

  • Hi,

    This is possible in hardware but we dont have driver for that as of now. So OMX also doesnt support that. Any reason for using gprx as display and not video pipelines.

    Regards,

    Hardik Shah

  • Hi Hardik,

    Thanks for the confirmation. I want to display 3 windows on a single device as PIP (Picture in Picture). But Netra supports only two video windows.

    So for two or more than two window overlay use cases, I wanted to convert YUV to RGB so that I can have total five windows (two video and three graphics) for my use case.

    Btw, is there any plan to develop these drivers ? Is there any neon routine for this conversion ?

    Regards,
    Sweta

  • Hi,

    This can be done using simple scalar driver where you take three channels and scale it to how you wanted. Or else you can try doing with EDMA where you copy first big picture one and than copy 2 smaller pictures.

  • Hi,

     

    Another way to do this is to connect video to compositor and remove unwanted area by alpha blending..

     

    Thx,

    Brijesh

  • Hi Brijesh,

    Thanks for this solution. I am not much aware of compositor. From where can I get mode details on this ? Is this a s/w module ? Is it based on OMX or V4L2 ?

    Let me give you my use case detail. I want to create a simple application to achieve following.


    Do you think I can achieve this by blending or transparency keying or any other method ?

    Regards,
    Sweta

  • Sorry, somehow, image didn't get inserted.

    Please see it attached.


    Regards,
    Sweta

  • Hi Sweta,

     

    I now can understand what you are trying to do. There is no way to have 3 video pipeline connected to compositor, we could have at max 2 video and 3 grpx.

    I think what Hardik suggested would be a better option, you could use any Mem2Mem driver to composite 3 videos and create one frame, which you could display using video display path.

     

    Thanks,

    Brijesh Jadav

  • Hi Brijesh,

    Thanks for clarification. I have one more question to find out whether two video windows can accommodate my use case or not.

    If I use alpha blending, is it possible that I make middle part of video window transparent to show the background video window ?

    eg. I will have my first video window in back ground and front video window will contain 3 logical portions (left part, transparent part and right part)

    Thanks,
    Sweta

  • Hi Sweta,

     

    It can be done if your front video contains fixed color in the middle part, then you could use color keying to make that path of the video transparent. Otherwise it is not possible to give different alpha value for each pixel for video window.

     

    Thx,

    Brijesh

  • Hi Brijesh,

    Thanks for the solution. I understand that transperant color keying can serve the purpose.

    In addition, one thing I wanted to confirm is that, two video windows can be overlaid on each other (without color keying or any other operation), showing the content of both the video windows as shown below.

    While I tried this, I can see only one video window which has higher priority. Is it a limitation ?

    Regards,
    Sweta

  • Hi Sweta,

     

    We dont suppor small video window over big video window, even compositor requires all input windows to be of same size.

     

    Thx,

    Brijesh

  • Hi Brijesh,

    Thanks again. Let me double check my understanding and expectation from overlay.

    If I want to perform color keying, I need to have both video windows of same size (eg. 1920x1080).

    Then, on the front window, I will apply color keying and I should be able see the back window. Correct ?

    Can I please have the sample application for Color keying between two video windows ?
    I modified PSP examples taking reference of VPSS driver userguide but I am not able to achieve the functionality of seeing both video windows.

    Regards,
    Sweta

  • Hi Sweta,

     

    We dont have sample application demonstrating this feature, please follow the user guide.

     

    Thx,

    Brijesh

  • Hi Brijesh,


    I have written simple application to implement above use case(Color keying between two video window "/dev/video1" and "/dev/video2").
    Please find application as attachment video1.c which will display video on /dev/video1 and video2.c which will display video on /dev/video2 with color keying configuration.

    Problem:

    Using above application I tried to implement color keying for video window. But It is not working. Would you please verify this applications and tell me what is missing? Is there any special sequence for color keying?

    Execution Steps:
    #echo 0 > /sys/devices/platform/vpss/graphics0/enabled
    #echo 0 > /sys/devices/platform/vpss/graphics1/enabled
    #echo 0 > /sys/devices/platform/vpss/graphics2/enabled
    #echo hdcompmux:hdmi > /sys/devices/platform/vpss/video1/nodes
    #./video2 &
    #./video1 &

    Observation:
        It display the video on TV  of video2 application  but it is not able to display the output of vidoe1 on TV. But when I kill the video application then board will show video1 output on TV. It seems that my both video are displaying on TV but because of improper setting of color keying it is not showing the both video on TV same time.

    Thanks & Regards,
    Hitesh Patel

    files.zip