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.

[solved]Problem Using OSD Window 0 and Video Window 0



Hi,

I have a problem and I will be appreciated for any help or advice.

-Enabling the video window 0 is a constraint before enabling the osd window 0.

-Currently I need only osd window 0 because we think rgb565 is suitable for our requirements. Hence while I was experimenting with the VPBE example in spraap3a document, (http://focus.ti.com/lit/an/spraap3a/spraap3a.pdf) I decided to disable the image that video window 0 displays (also disabling video window 1 and cursor window), so only the osd window 0 display shall remain on the display screen.

-While trying this, I realized that if I don't queue a frame buffer of video window 0, creating a channel for osd window 0 returns NULL.

That is:

 

//test.c

// enqueue the 1st frame buffer
  if ( IOM_COMPLETED != FVID_queue( vid0Handle, vid0AllocFB[0] ) ) {
    return;
  }

If I comment out the code above, then:

//configureOsdWin0_TIDSP_RGB565.c

osd0Handle = FVID_create( "/VPBE0", IOM_INOUT, NULL, &beinitParams, &gioAttrs );

the FVID_create function above returns NULL.

-Do you have any idea why this should happen?

-To solve this, I decided to queue a frame buffer (of video wnd 0) which is set to NULL.  (vid0AllocFB[0]->frameBufferPtr = NULL;)

In this case, I can see the image in osd window 0, and of course there is no image in video window 0. But the visible parts of the video window 0 is now set to a distorted green, and the edges of the video window 0 is vibrating.

How can I correct this?

Thank you in advance,

A. Erman Kulunyar

 

 

 

  • Firstly, I would say based on the VPBE User's Guide (SPRU952) in Section 1.2.1, the following restriction exists for the OSD module in the VPBE.

    • Both the OSD windows and VIDWIN1 should be fully contained inside VIDWIN0.  This means that both the Y and X position of either the OSD windows or VIDWIN1 should be greater (not equal) to the Y and X position of VIDWIN0.
      This also requires VIDWIN0 to be enabled when using either the OSD windows or VIDWIN1.

    Therefore, this substantiates the ddc_vpbe driver in forcing the VIDWIN0 to be enabled, created, etc.  Based on your comments and code samples, it appears the FVID_create() for OSDWIN0 is checking if VIDWIN0 is enabled.  This is true as I looked at pspdrivers\drivers\vpbe\src\ddc_vpbe.c and the DDC_VPBEOpenHandle() does a check if the PSP_VPBE_VIDEO_0 is active.  If not, it returns a NULL handle for PSP_VPBE_OSD_0 or PSP_VPBE_OSD_1.  This agrees with the observations you have made.

    Elric said:

    -To solve this, I decided to queue a frame buffer (of video wnd 0) which is set to NULL.  (vid0AllocFB[0]->frameBufferPtr = NULL;)

    In this case, I can see the image in osd window 0, and of course there is no image in video window 0. But the visible parts of the video window 0 is now set to a distorted green, and the edges of the video window 0 is vibrating.

    How can I correct this?


    Did the FVID_queue() complete successfully, without an error status, when providing it a NULL frame buffer as in (vid0AllocFB[0]->frameBufferPtr = NULL;)?
    In the pspdrivers\drivers\vpbe\src\ddc_vpbe.c, DDC_VPBEQueueFrameBuffer() performs a check on the frame buffer, which I would have thought returns an error.

  • Hi,

    I am aware of constraints about video window 0 before activating the osd window 0 or 1. But I thought "activating" process is done by callind FVID_create(). But the problem is, FVID_create() for osdwin0 fails when FVID_create is successfully called for vidwin0 but no frame buffer is enqued of vidwin0. I think this is an interesting problem. Maybe enqueing a frame buffer for vidwin0 is a part of enabling it?

    BrandonAzbell said:
    Did the FVID_queue() complete successfully, without an error status, when providing it a NULL frame buffer as in (vid0AllocFB[0]->frameBufferPtr = NULL;)?
    In the pspdrivers\drivers\vpbe\src\ddc_vpbe.c, DDC_VPBEQueueFrameBuffer() performs a check on the frame buffer, which I would have thought returns an error.

    I am not working on my computer now, but I guess the example application was designed to terminate when a FVID function returns NULL, hence it should return without an error.

  • The places in the ddc_vpbe.c that I see checks for "Active" are including a test of (TRUE == handleOsdCH->PlaneActive).  There are two places where this variable is set true, in DDC_VPBEStartEngine() and DDC_VPBEQueueFrameBuffer().
    Therefore, your comment about enqueing a frame buffer for the first time on vidwin0 is valid.

    But in the DDC_VPBEStartEngine(), it seems to be implying a valid frame buffer in the queue.  So, I would say your comment about needing to queue a frame buffer for vidwin0 is very likely.
    I'm basing this on inspection of the driver code as I haven't tried running it.