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.

OMAP3530 - Question about offset locations for video layers

I am trying to figure out how display (with an offset) a smaller video2 and/or fb0 on top of video1.
For example:
video1 - configured for 1280x720 (using DVI output to TV)
video2 - configured for 320x180
fb0 - configured for 100x100

I want video2 to display at offset 960,540 on top of video1 (bottom right corner)
I want fb0 to display at offset 40,20 (also on top of video1)

For the v4l2 buffer (video2), I tried using ioctl(VIDIOC_S_FMT) with V4L2_BUF_TYPE_VIDEO_OVERLAY type and setting the fmt.win.x.left/top to 960,540 but that doesn't work. It seems to just shrink the top left corner down (and doesn't move the bottom right along with it).

The only options I see for x/y offsets with fb0 are the xoffset/yoffset var_screeninfo, but I believe that is used for panning. So I don't know how to do this with fb0 either.

Can someone give me a clue how to do this?

  • CraigSmith said:
    It seems to just shrink the top left corner down (and doesn't move the bottom right along with it).

    I have not had a chance to try out the multiple video windows capability of the OMAP3 display driver so I cannot say for sure if this is expected or not (I have only used left and top of 0), but based on  your description it could be that the driver is considering width and height relative to left and top. As an experiment, have you tried setting left=960 top=540 width=1280 and height=720 for video2? If your description holds than this should put the 320x180 video in the opposite corner, the issue could be if the width and height values end up changing the size fo the buffer which could have a negative software impact, either way this sounds like an issue with the display driver.

    CraigSmith said:
    The only options I see for x/y offsets with fb0 are the xoffset/yoffset var_screeninfo, but I believe that is used for panning.

    You are correct that these offsets are for panning.

  • Hi,

    Currently frame buffer driver doesn't support windowing of the picture that means you cannot adjust the top and left window.  For video2 this is possible using the VIDIOC_S_FMT using the following steps.

     

    1, Set the picture size to 320X180 using the VIDIOC_S_FMT with type V4L2_BUF_TYPE_VIDEO_OUTPUT

    fmt.fmt.pix.width = 320;

    fmt.fmt.pix.height = 180;

    2. Now set your windowing left and top parameters to 960 and 540 respectively using the VIDIOC_S_FMT ioctl with type V4L2_BUF_TYPE_VIDEO_OVERLAY.  Also you need to set the window size as 320X180 to complete the ioctl as below.

     

    fmt.fmt.win.w.left = 960
    fmt.fmt.win.w.top = 540
    fmt.fmt.win.w.width = 320;
    fmt.fmt.win.w.height = 180;

     

    After this start streaming and you will see the display window on the bottom right corner of the screen.  I  tried this at my end and it worked for me.

     

    Thanks and Regards,

    Hardik Shah