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.

DM6437 - problem with using Video0 and OSD0 - number of frames\sec falls

Hello!

I created two video channels - Video0 and OSD0 and channel the cursor

-------------------------------------------------------------------------------------------------------------------------------

    hGioVpbeVid0 = FVID_create("/VPBE0",IOM_INOUT,NULL,&vpbeChannelParams,NULL);

    hGioVpbeVenc = FVID_create("/VPBE0",IOM_INOUT,NULL,&vpbeChannelParams,NULL); (VENC само собой)

    hOsd0Handle = FVID_create ("/VPBE0",IOM_INOUT, NULL,&vpbeChannelParams,&gioAttrs);

    hCursorHandle = FVID_create("/VPBE0",IOM_INOUT,NULL,&cursorChannelParams,&gioAttrs);

-----------------------------------------------------------------------------------------------------------------------------------

Then in the main body of the program do the separate image processing in these channels

----------------------------------------------------------------------------------------------------------------------------------

  /* loop forever performing video capture and display */

  while (!done && status == 0) {

 

    /* grab a fresh video input frame */

    FVID_exchange(hGioVpfeCcdc, &frameBuffPtr);

 

process_image_color( (void*)(frameBuffPtr->frame.frameBufferPtr), 480, 640);

BCACHE_wbInv((void*)(frameBuffPtr->frame.frameBufferPtr), 576*720*2, 1);

 

    process_2D2D( (void*)(frameBuffPtr->frame.frameBufferPtr), 576, 720);

    BCACHE_wbInv((void*)(osd0AllocFB->frame.frameBufferPtr), 128*128, 1);

 

    /* display the OSD frame */

    FVID_exchange(hOsd0Handle,&osd0AllocFB);

 

    /* display the video frame */

    FVID_exchange(hGioVpbeVid0, &frameBuffP

--------------------------------------------------------------------------------------------------------------------------------

The problem is that when using the OSD channel(FVID_exchange (hOsd0Handle, & osd0AllocFB);)the number of frames / sec falls sharply. 

Visually -in two times.
Does anyone can tell - is it normally or something I'm doing wrong?
Thank you.
Igor.

  • Hi Igor,

    Could you please mention the BIOS PSP version, which you are using currently?

    Regards,

    Sandeep K

     

  • Hi Sandeep,

    bios_5_41_04_18

    thanks,

    Igor

  • Hi Igor,

    Basically I want to know the PSP release version, so that i can go through the driver and analyse the problem.

    Regards,

    Sandeep K

  • Sorry,

    dvsdk_1_11_00_00,

    pspdrivers_1_10_03,

    CCS v3.3.3.3.38.2,

    CGT  7.0.3,

    XDC 3.20.01.51

  • Hi Igor,

    The FVID_exchange() internally calls GIO_submit() without the callback function (refer fvid.h). So the GIO_submit() without callback function is a synchronous call. So the control comes back to the application only after the completion of IO. So this might be causing some latency. Therefore the frame rate has reduced once after introducing the FVID_exchange() for OSD. This is inevitable.

    To confirm this, what you can do is, calculate the time taken for FVID_exchange() of OSD by using the appropriate BIOS API's, like,

    =========================================================================================================

       /* Taking snapshot of Low resolultion timer count */
        initLTimeVal = CLK_getltime();

        /* Taking snapshot of High resolultion timer count */
        initHTimeVal = CLK_gethtime();

        FVID_exchange(......);

         /* Capture the End Time */
        EndHTime = CLK_gethtime();
        EndLTime = CLK_getltime();

        /** Calculating the time elapsed in milli sec using LOW resolution timer */
        /* Calculate the difference in L time (low resolultion time)             */
        if(EndLTime >= initLTimeVal)
        {
                 /* If 'L' clk is not wraped  */ 
                 TotalLtime = (EndLTime - initLTimeVal) ;
         }
        else
        {
             /* If 'L' clk is wraped      */
             TotalLtime = (0xFFFFFFFF - initLTimeVal) + EndLTime;
        }

         /* calculate absolute time in cpu cycles from the L time counter         */
         LCPUcycles = TotalLtime * CLK_cpuCyclesPerLtime();

         /* calculate absolute time in milli secs from the Low resolution counter  */
         AbsoluteLTime = LCPUcycles / GBL_getFrequency();

    ==================================================================================================================

    Note: Refer BIOS user guide for more info.

    Once this is confirmed, we can work on avoiding the latency.

    Thanks and Regards,

    Sandeep K

  • Sandeep, thank you very much.

    I will inform about the results. Where should I put the information? Here?

    Thanks and regards,

    Igor

  • Yes, please -- let's keep it in the forum thread if possible.