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.

VPBE - Attempting to creating an OSD video channel always returning a NULL



I have a VPBE problem which I would appreciate some help with. I can successfully display RGB888 data using VID0 window. What I can't do is display RGB565 images (as an overlay), using OSD0 window. What I've noticed, is that after creating a VID0 channel, allocating a frame buffer and queueing this frame buffer, subsequent FVID_create() for OSD0 always return a NULL. Looks like this problem was noted in the earlier postings, but resolved by configuring and queueing VID0 window, which I've done. Based on TI examples and documentation, I would think it would be as simple as repeating the same VID0 steps for VID1 or OSD windows, but so far this has not been the case. Any help with this issue would be much appreciated.  

  • This does sound very much like some prior postings, and as you mention the major reason that allocating OSD0 would fail would be if VID0 was not already prepared, but you could also get NULL for other reasons such as if it could not allocate the buffer space or if there was some other problem in the configuration. My suggestion would be to start with the SPRAAP3 example code as that successfully opens all of the VID/OSD windows simultaneously, a comparison to that may bring out any potential configuration problems, alternatively modifying the SPRAAP3 example to your settings bit by bit until it breaks could also show the source of the issue.

  • In addition;

    There are possible two ways that FVID_create() for OSD0 window returns NULL.

    First is, vidwin0 is not configured properly. That is, FVID_create() for vidwin0 must return successfully and at least a single frame buffer must be enqued for vidwin0.

    Other is, the PSP_VPBEOsdConfigParams for OSD0 is not configured properly. That is the other parameter that is send to FVID_create along with surface id in PSP_VPBEChannelParams. For example, the width or size may not be correct, or a the pitch value may be incorrect, if anything in config parameters is incopatible with osd0 requirements or with your image, it is likely that FVID_create will return NULL.

     

    You may also look in C:\dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\drivers\vpbe\doc for VPBE driver usage document, also there is an example for vidwin0 and explanation for configuring osdwins.

  • FVID_create() for vidwin0 returns a non-NULL and a single frame buffer is enqued. If no other channels are created, then RGB88 data is output in vidwin0. Since vidwin1 also supports RGB888, I configured the vidwin1 channel using the same params as vidwin0 (since they both support RGB 888). I configured the vidwin1 channel to see if the problem is parameter related. For this case, FVID_create() for vidwin0 successfully returns, but the FVID_create() for vidwin1 returns NULL. I get the same result if OSD0 is configured instead of vidwin1 (returns a NULL). So the problem doesn't appear to be parameter related. In the VPBE examples, PSP_VPBEOsdConfigParams.segID  = DDR2. I currently have segID=0 for all PSP_VPBEOsdConfigParams defined. What is segID?

     

     

     

     

      

  • You can use RGB888 ony for one video window at a time. If you intent to use for both video windows, it is normal that FVID_create for vidwin1 returns NULL. Also neither of the osd windows support rgb888. You can use rgb565 for osd windows, but again you can configure one them for rgb565 at a time, not both.

    segID, as far as I know, is the field where you define your image data is. PSP_VPBEOsdConfigParams.segID  = DDR2 means that the image data is in DDR2 location. In the VPBE example that I give it's folder in the above message, it doesn't specify anyting in segID. Rather, it directly allocated memory from DDR2 and reads the image data from there in a loop. You may look to both examples, they are useful. At least, I had problems of creating channel for Osd windows but after examining the examples, problems are easily solved.

    Note: I got a mail from TI knowledge base that tells SPRAAP3A example may be for the "beta version" and they recomended the VPBE example in "C:\dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\drivers\system.....". (I don't remember the exact path now) If you use this example and it's document in /doc folder, it shall be much clearer.

  • I decided to back up to square 1 and use the SPRAAP3A example as a starting point. I reconfigured vidwin0 to support RGB888 (vs YUV422). Vidwin1 and cursor windows are not needed and were removed. Aside from parameter changes, osdwin0 was left unchanged (configured for RGB565). FVID_create() successfully returns a handle for vidwin0. However, the ptr returned from FVID_alloc() is returning a NULL  (although the value returned from the call = IOM_COMPLETED). The ensuing FVID_alloc() fails. A memory check after FVID_alloc() doesn't indicate a memory problem. Any thoughts on why FVID_alloc() would be returning a null ptr?