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.

Output FPS setting on swMs

We have a little trouble setting swMs' output FPS on dvr_rdk 4.0.


If layoutInfo->outputFPS is set to 30, we get actual FPS 32 from swMs, so we have to change outputFPS to 28 to get 30 FPS as a workaround.
In our test, setting outputFPS 23 can get FPS 25 for PAL system.

It looks something wrong in our design. Can you give me some clues about this problem.
Thanks.

void swMs_setDefaultChannel(SwMsLink_CreateParams *swMsCreateArgs )
{
SwMsLink_LayoutPrm *layoutInfo = NULL ;
SwMsLink_LayoutWinInfo *winInfo = NULL ;

UInt32 outWidth = 1920 ;
UInt32 outHeight = 1080 ;

layoutInfo = &swMsCreateArgs->layoutPrm;

memset(layoutInfo, 0, sizeof(*layoutInfo));

layoutInfo->onlyCh2WinMapChanged = 0 ;

layoutInfo->outputFPS = 28 ; // in order to get 30 fps

layoutInfo->numWin = 1 ;

winInfo = &layoutInfo->winInfo[0];

winInfo->width = outWidth ;
winInfo->height = outHeight ;
winInfo->startX = 0 ;
winInfo->startY = 0 ;
winInfo->channelNum = 0 ;
winInfo->bypass = 0 ;
}

  • Pls modify /dvr_rdk/mcfw/src_bios6/links_m3vpss/swMs/swMsLink_drv.c

    SwMsLink_drvGetTimerPeriod()

        if (layoutParams->outputFPS == 0 || layoutParams->outputFPS > 200)
        {
            pObj->timerPeriod = SW_MS_LINK_TIMER_DEFAULT_PERIOD;
        }
        else
        {
            pObj->timerPeriod =
                  (1000/(layoutParams->outputFPS+(layoutParams->outputFPS/10)));
                  //(1000/(layoutParams->outputFPS));
        }

    to

        if (layoutParams->outputFPS == 0 || layoutParams->outputFPS > 200)
        {
            pObj->timerPeriod = SW_MS_LINK_TIMER_DEFAULT_PERIOD;
        }
        else
        {
            pObj->timerPeriod =
                  (1000/(layoutParams->outputFPS));
        }

  • Hello, Badri

    It works. Thank you very much.

    Why the timerPeriod is set as (1000/(layoutParams->outputFPS+(layoutParams->outputFPS/10)))? Is there any side effect if I change to 1000/(layoutParams->outputFPS?

    Thanks.

  • We found that the BIOS clock was incrementing at 10% slower rate than realtime and had to compensate the timer period in swms. We later rootcaused issue to disabling of interrupt for more than 1 ms by HDVPSS driver and this issue was resolved. There is no longer need to compensate additional 10% .There will be no side effect.