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.

PAL setting in the External Video Decoder

Other Parts Discussed in Thread: TVP5158

HI. 

I'm using External Video Decoder, not using TVP5158.

when i set PAL mode, output fps setting is some strange.

i think that window FPS must be 25fps, and repeat FPS must be 0 fps. why FPS setting is NTSC based setting?

where can i check ? if you need full log , i will attach it. 

call below function,  after application starting

<code>

src_linux/mcfw_api/ti_vcap.c


Int32 Vcap_init_signal(VCAP_PARAMS_S * pContext, int isPal)
{
Int32 ret;
ret = Vcap_init(pContext);
gVcapModuleContext.isPalMode = isPal;
return ret;
}

</code>

it's my code not using video decoder.  

<code> 

Vsys_params_init(&pContext->vsys);
Vcap_params_init(&pContext->vcap);
pContext->vcap.enableConfigExtVideoDecoder = FALSE;
Venc_params_init(&pContext->venc);
Vdec_params_init(&pContext->vdec);
Vdis_params_init(&pContext->vdis);
pContext->vdis.enableConfigExtVideoEncoder = FALSE;
pContext->vdis.enableConfigExtThsFilter = FALSE;

</code>

  • What is the RDK version you are using ?

    The SwMs output fps is set in the SwMs layout params.

    Also what are the values you are setting for

        swMsPrm->enableProcessTieWithDisplay
        swMsPrm->enableOuputDup

    Further what is your display fps configured for ?

    Is it configured for 1080P60 or SD TV PAL ?

  • Hi Narayanan.

    at the my full log,

    first my swms output fps is setted 25 fps.

    [m3vpss] ***  [SWMS0] Mosaic Parameters ***

    [m3vpss] Output FPS: 25

    second my display is configured for 1080P60.

    and third "swMsLink.h"(DVRRDK 3.0.0.0)

    static inline void SwMsLink_CreateParams_init(...)

    {

    ..

    pPrm->enableOutDup = FALSE;

    pPrm->enableProcessTieWithDisplay = FALSE;

    pPrm->initOutRes = SYSTME_STD_INVALID;

    }

    full log is 

    6837.201210291815.pdf

  • as you see , The SwMs output fps is 25.

    i setted Output FPS 25. is there any check point?


  • You have to set output fps in SwMsLink_LayoutPrm.outputFPS in your using link APIs. From your log I see the SwMs window FPS still set to 30.

    If you are using Mcfw API,  set VDIS_MOSAIC_S.outputFPS before invoking Vdis_setMosaicParams();

    Additionally I see encode link dropping frames. Looks like the application is not freeing buffers from ipcBitsInLink in time.

  • HI Narayanan.

    i referenced "demo_swms.c" and setted FPS to 25, when input signal is PAL. 

    but windows FPS is not changed. 

    when the RDK first released, i referenced swMsGenerateLayouts function , and check NTSC or PAL. 

    How can i do that windows FPS to 25. 

    Thank you.

    if(g_hwspec.videoSignal == NTSC){ 
    vdMosaicParam->outputFPS = 29; 
    }else if(g_hwspec.videoSignal == PAL ) { 
    vdMosaicParam->outputFPS = 25; 
    }else{
    printf("UNKNOWN Signal\n");
    ASSERT(0);
    }

    it's my swms code

    <code>

    Void MultiCh_swMsGenerateLayouts(VDIS_DEV devId, Uint32 startChId, Uint32 maxChns, UInt32 layoutId, VDIS_MOSAIC_S * vdMosaicParam, U32 chFlag, U32 nDispRes)
    {
    UInt32 outWidth, outHeight, row, col, winId, widthAlign, heightAlign, i;
    UInt32 rowMax, colMax;
    int forceLowCostScaling = FALSE;
    int nRes;

    switch(nDispRes){
    case DC_MODE_1080P_60: nRes = VSYS_STD_1080P_60; break;
    case DC_MODE_720P_60: nRes = VSYS_STD_720P_60; break;
    case DC_MODE_SXGA_60: nRes = VSYS_STD_SXGA_60; break;
    case DC_MODE_XGA_60: nRes = VSYS_STD_XGA_60; break;
    default: ASSERT(0); break;
    }

    MultiCh_swMsGetOutSize(nRes, &outWidth, &outHeight);
    printf("[%s]outWidth:%d, outHeight:%d\n", __func__, outWidth, outHeight);
    widthAlign = 8;
    heightAlign = 1;

    if(devId >= VDIS_DEV_MAX)
    devId = VDIS_DEV_HDMI;

    if(g_hwspec.videoSignal == NTSC){
    vdMosaicParam->outputFPS = 29;
    }else if(g_hwspec.videoSignal == PAL ) {
    vdMosaicParam->outputFPS = 25;
    }else{
    printf("UNKNOWN Signal\n");
    ASSERT(0);
    }

    vdMosaicParam->onlyCh2WinMapChanged = FALSE;

    ...

    </code>

  • Looks like you have set

    swMsPrm->enableProcessTieWithDisplay = TRUE in your usecase file.

    Pls check this parameter setting before SwMsLink is created.

    Add Vps_prints in SwMsLink_drv.c to confirm this flag is really disabled.

     

  • i checked usecase. 

     enableProcessTieWithDisplay setted TRUE in my use case(  VSYS_USECASE_MULTICHN_PROGRESSIVE_VCAP_VDIS_VENC_VDEC)

    and i checked mcfw_demo and udworks sample , all of that windows FPS is setted 30 FPS in the PAL signal. 

    The  usecase  VSYS_USECASE_MULTICHN_PROGRESSIVE_VCAP_VDIS_VENC_VDEC   alaways setted that enableProcessTieWithDisplay is TRUE.

    why i check window FPS is that i seeing  moving object interval is diffrent ( like stop and go) in the PAL signal.

    i think  repeated frame affect live display.  

    do you think enableProcessTieWithDisplay is helpful? 

    what do you think about that 1920x1080 50, 1280x720 50, 1280X1024 50, 1024X768 50 is helpful? 

    <code>

    dvr_rdk/mcfw/src_linux/mcfw_api/usecases/ti816x/multich_progressive_vcap_venc_vdec_vdis.c

    if(i == 0)
    {
    vdDevId = VDIS_DEV_HDMI;
    swMsPrm[i].enableOuputDup = TRUE;
    swMsPrm[i].enableProcessTieWithDisplay = TRUE;
    }

    </code> 

    currently i'm rebuilding all DVRRDK , changing enableProcessTieWithDisplay = FALSE and enableOuputDup = FALSE;

    Thanks.

    CHO

  • If capture is PAL mode configuring display for 1920x1080 50, 1280x720 50, 1280X1024 50, 1024X768 50 and setting

    swMsPrm[i].enableOuputDup = TRUE;

    swMsPrm[i].enableProcessTieWithDisplay = TRUE;

    will be good for display smoothness.

  • HI Narayanan. 

    Thanks for your answer.

    i changed 1080P50 ,  it's good display speed smoothness but we can't use this resolution because of 1080P50 display quality is poor.(and fb is not displayed in RGB)

    therefore i changed parameters in swMsPrm.

    swMsPrm[i].enableOuputDup = FALSE;

    swMsPrm[i].enableProcessTieWithDisplay = FALSE;

    when enableOuputDup and enableProcessTieWithDisplay setted FALSE,  vps_Printf result   window FPS value is 27 FPS (not 25 FPS) and 2FPS repeated .

    i think PAL customers use 1080P60 or XGA60 in the PAL zone. (XGA 50 and SXGA 50 does not exist).

    i want to 25FPS setting and smooth display(not anymore stop and go) without repeated FPS and externel interface that change value of "swMsPrm[i].enableProcessTieWithDisplay".

    any advice will be appreciated. 

    Thanks. CHO.

  • The following option may help with smooth PAL display on 1080P display:

    DeiPrm set :

    Set DEI preview output to inputFps = 5000 outputFps = 3000

            DeiLink_ChFpsParams params;

            params.chId = chId;        

            params.inputFrameRate = 5000;

            params.streamId = DEI_LINK_OUT_QUE_DEI_SC;        

            params.outputFrameRate = 3000;             

            status = System_linkControl(gVcapModuleContext.deiId[0], DEI_LINK_CMD_SET_FRAME_RATE, &params, sizeof(params), TRUE);  

       With this you can also enable:

            swMsPrm[0].enableOuputDup = TRUE;

            swMsPrm[0].enableProcessTieWithDisplay = TRUE;

    Do you have two displays or single display ? What is the display fps of both the displays. Does the preview channel go to both display or only one display ?

     

  • we have two displays HDMI0 and VGA simultaneously,  and sd 1channel display.

    not using HDMI1 . 

  • Are HDMI and VGA tied venc or do they have independent display.If they are tied you use only one SwMs instance correct ?

    By SD 1channel display you mean there is no Swms and capture channel is directly connected to SD display ?

  • HI.

    1.Are HDMI and VGA tied venc or do they have independent display?

    Yes HDMI and VGA tied venc.

    we used below code. 

    <code>

    pContext->vdis.tiedDevicesMask = VDIS_VENC_HDCOMP | VDIS_VENC_HDMI;

    if( pContext->vdis.tiedDevicesMask == (VDIS_VENC_HDCOMP | VDIS_VENC_DVO2)){
        /* Since HDCOMP and DVO2 are tied together they must have same resolution */
        pContext->vdis.deviceParams[VDIS_DEV_DVO2].resolution = pContext->vdis.deviceParams[VDIS_DEV_HDCOMP].resolution;
    }else if(pContext->vdis.tiedDevicesMask == (VDIS_VENC_HDCOMP | VDIS_VENC_HDMI)){
        pContext->vdis.deviceParams[VDIS_DEV_HDMI].resolution = pContext->vdis.deviceParams[VDIS_DEV_HDCOMP].resolution;
    }

    </code>

    2. If they are tied you use only one SwMs instance correct ?

     sorry. we use HMCOMP use also. but HDCOMP always 1 channel full screen division. because first developing i don't know how to disable HDCOMP , thus just set 1 division screen. (HW is not connected).

    3. By SD 1channel display you mean there is no Swms and capture channel is directly connected to SD display?

    SD means this function. 

    "Vdis_switchSDTVChId(VDIS_DEV_SD, nStartChannelId)"


  • Ok thanks for the info.Pls check if settings I mentioned in my previous post help improve the smoothness.

    We can work  on disabling HDCOMP if you dont need it separately.

  • Thank you Nanaryanan.

    i addded my code in the usecase func of MultiCh_createProgressiveVcapVencVdecVdis(src_linux/mcfw_api/usecases/ti816x/multich_progressive_vcap_venc_vdec_vdis.c)

    but i can't confirm this code is worked or not ? is it right that set_DEI_VIP0_SC_DEI_SC_outputFPS func is right implemented?

    i have not confidence that  chid loop is 4 or 16 because  i just refenenced another usecase. i don't know chid means.

    and still windows fps is 30. how can i check it worked or not? 

    i have a still stop and go live screen. 

    my impl is wrong? 

    Pls.

    thanks . CHO

    <code>

    static void set_DEI_VIP0_SC_DEI_SC_outputFPS(UInt32 inputFPS, UInt32 outputFPS)
    {
    UInt32 deiId, chId;
    DeiLink_ChFpsParams deiFrameRate;

    deiId = gVcapModuleContext.deiId[0];

    for (chId = 0; chId < 4; chId++)
    {
    deiFrameRate.chId = chId;
    deiFrameRate.streamId = DEI_LINK_OUT_QUE_DEI_SC;
    deiFrameRate.inputFrameRate = inputFPS;
    deiFrameRate.outputFrameRate = outputFPS;

    System_linkControl(
    deiId,
    DEI_LINK_CMD_SET_FRAME_RATE,
    &deiFrameRate,
    sizeof(deiFrameRate),
    TRUE);
    }
    }

    Void MultiCh_createProgressiveVcapVencVdecVdis()
    {

    ...

    // kisung cho
    set_DEI_VIP0_SC_DEI_SC_outputFPS(5000, 3000);

    }

    </code>

  • Can you share the log of Vsys_printDetailed statistics .Pls invoke atleast two times with 1 min interval . From the stats we should be able to determine if the settings are taking effect

  • Hi. 

    i checked detail , then i knew that "ti_cap.c" is set fraterate , thus i printed the result of input frame rate and output frame rate.

    the code and result is belows.

     

    <code> ti_cap.c

    1169 Int32 Vcap_setFrameRate(VCAP_CHN vcChnId, VCAP_STRM vStrmId, Int32 inputFrameRate, Int32 outputFrameRate)

    ...

    1270 if(gVcapModuleContext.deiId[deiId]!=SYSTEM_LINK_ID_INVALID)
    1271 {
    1272 // kisung cho
    1273 if(deiId == DEI_LINK_OUT_QUE_DEI_SC){
    1274 printf("DEI_LINK_CMD_SET_FRAME_RATE vcChnId:%d, vStrmId:%d, deiId:%d input:%d, output:%d\n", vcChnId, vStrmId, deiId, params.inputFrameRate, params.outputFrameRate);
    1275 }
    1276 // kisung cho end
    1277 status = System_linkControl(gVcapModuleContext.deiId[deiId], DEI_LINK_CMD_SET_FRAME_RATE,
    1278 &params, sizeof(params), TRUE);
    1279 #if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)

    ...

    </code>

    result log ( we have 8 channels)

    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:0, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:1, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:2, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:3, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:4, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:5, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:6, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:7, vStrmId:0, deiId:0 input:5000, output:3000

    attached file is full log

    6232.201211011735.pdf

    my env screen 

  • Hi. 

    i checked detail , then i knew that "ti_cap.c" is set fraterate , thus i printed the result of input frame rate and output frame rate.

    the code and result is belows.

     

    <code> ti_cap.c

    1169 Int32 Vcap_setFrameRate(VCAP_CHN vcChnId, VCAP_STRM vStrmId, Int32 inputFrameRate, Int32 outputFrameRate)

    ...

    1270 if(gVcapModuleContext.deiId[deiId]!=SYSTEM_LINK_ID_INVALID)
    1271 {
    1272 // kisung cho
    1273 if(deiId == DEI_LINK_OUT_QUE_DEI_SC){
    1274 printf("DEI_LINK_CMD_SET_FRAME_RATE vcChnId:%d, vStrmId:%d, deiId:%d input:%d, output:%d\n", vcChnId, vStrmId, deiId, params.inputFrameRate, params.outputFrameRate);
    1275 }
    1276 // kisung cho end
    1277 status = System_linkControl(gVcapModuleContext.deiId[deiId], DEI_LINK_CMD_SET_FRAME_RATE,
    1278 &params, sizeof(params), TRUE);
    1279 #if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)

    ...

    </code>

    result log ( we have 8 channels)

    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:0, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:1, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:2, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:3, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:4, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:5, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:6, vStrmId:0, deiId:0 input:5000, output:3000
    DEI_LINK_CMD_SET_FRAME_RATE vcChnId:7, vStrmId:0, deiId:0 input:5000, output:3000

    attached file is full log

    6232.201211011735.pdf

    my env screen