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.

scalar link doesn't work in DM8127

Hi,

   I am developing my code on DM8127. The RDK is IPNC_RDK3.5.

  The usecase is the following:

   Host IPC bit out -> video IPC bit in -> dec link-> video frame out -> vpss frame in-> scalar link-> vpss frame out->video frame in->H264 enc-> video ipc bit out->host ipc bit in

    SclrLink_CreateParams                       sclrPrm;
    CHAINS_INIT_STRUCT(SclrLink_CreateParams, sclrPrm);
    sclrPrm.enableLineSkipSc = FALSE;
    sclrPrm.inputFrameRate   = 25;
    sclrPrm.outputFrameRate  = 25;
    sclrPrm.inQueParams.prevLinkId    = SYSTEM_VPSS_LINK_ID_IPC_IN_M3_0;
    sclrPrm.inQueParams.prevLinkQueId = 0;
    sclrPrm.outQueParams.nextLink     = nextLinkId;

    sclrPrm.scaleMode = DEI_SCALE_MODE_RATIO;
    sclrPrm.outScaleFactor.ratio.heightRatio.numerator   = 1;
    sclrPrm.outScaleFactor.ratio.heightRatio.denominator = 1;
    sclrPrm.outScaleFactor.ratio.widthRatio.numerator    = 1;
    sclrPrm.outScaleFactor.ratio.widthRatio.denominator  = 1;
    sclrPrm.tilerEnable = FALSE; // force tiler disable;
    //sclrPrm.numBufsPerCh = 1;
    sclrPrm.outDataFormat = VF_YUV420SP_UV;  
 sclrPrm.pathId = SCLR_LINK_SEC0_SC3;
   
    System_linkCreate(SYSTEM_LINK_ID_SCLR_INST_0, &sclrPrm, sizeof(sclrPrm));

The syslink chain can be created successfully, but the program will stuck at scalar link. The error message is the following:

[m3vpss ]  19586: Assertion @ Line: 1031 in links_m3vpss/sclr/sclrLink_drv.c: status == FVID2_SOK : failed !!!

If I set the scalar pathId as SCLR_LINK_SC5, then the output format can't be specified. I will add nsf link to convert the output format to 420_SP. The error message is the same when the program runs.

Thanks!

  • Since I can't use scalar link, now I use DEI link to scale down the video instead in the usecase of last post. The links chain works but the output stream has some problem. The top and left of the video is not correct as shown above. I want to know the reason and which parameter should be modified?

    If I remove DEI and nsf link, i.e., the ouput of decode link is connected to encode link directly, the video becomes correct. 

    the create parameters of DEI link and nsf link are the following:

    DeiLink_CreateParams_Init(&deiPrm);
        deiPrm.inQueParams.prevLinkId =  SYSTEM_VPSS_LINK_ID_IPC_IN_M3_0;
        deiPrm.inQueParams.prevLinkQueId = 0;
        deiPrm.outQueParams[0].nextLink  = SYSTEM_LINK_ID_INVALID;//SYSTEM_LINK_ID_NSF_1;
        deiPrm.outQueParams[1].nextLink  = SYSTEM_LINK_ID_NSF_1; //SYSTEM_LINK_ID_VPSS_ALG_1;
        deiPrm.outQueParams[2].nextLink  = SYSTEM_LINK_ID_INVALID;
        deiPrm.enableOut[DEI_LINK_OUT_QUE_DEI_SC]   = FALSE;
        deiPrm.enableOut[DEI_LINK_OUT_QUE_VIP_SC]   = TRUE;
        deiPrm.enableOut[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT]   = FALSE;
        deiPrm.tilerEnable = FALSE;
        deiPrm.comprEnable = FALSE;
        //deiPrm.setVipScYuv422Format = FALSE;
        deiPrm.numBufsPerCh[0] = 2;
        deiPrm.numBufsPerCh[1] = 2;
        deiPrm.numBufsPerCh[2] = 2;
        deiPrm.enableDeiForceBypass = TRUE;
        deiPrm.setVipScYuv422Format = TRUE;    //output is 420sp
        deiPrm.enableLineSkipSc = FALSE;
        deiPrm.inputFrameRate[1] = 25;
        deiPrm.outputFrameRate[1] = 25;
        deiPrm.outScaleFactor[1][0].scaleMode = DEI_SCALE_MODE_RATIO;//DEI_SCALE_MODE_ABSOLUTE;
        //deiPrm.outScaleFactor[1][0].absoluteResolution.outWidth = 704;
        //deiPrm.outScaleFactor[1][0].absoluteResolution.outHeight= 576;
        deiPrm.outScaleFactor[1][0].ratio.widthRatio.numerator = 1;
        deiPrm.outScaleFactor[1][0].ratio.widthRatio.denominator= 1;
        deiPrm.outScaleFactor[1][0].ratio.heightRatio.numerator = 1;
        deiPrm.outScaleFactor[1][0].ratio.heightRatio.denominator= 1;
        System_linkCreate(SYSTEM_LINK_ID_DEI_1, &deiPrm, sizeof(deiPrm));

    //-----------------<NSF Link>--------------------
        NsfLink_CreateParams        nsfPrm;
        // NSF Link parameter.
        NsfLink_CreateParams_Init(&nsfPrm);
        nsfPrm.bypassNsf                =  NSF_LINK_BYPASS_SNF_TNF;
        nsfPrm.tilerEnable              = FALSE;
        //nsfPrm.numBufsPerCh             = 0;
        nsfPrm.inQueParams.prevLinkId   = SYSTEM_LINK_ID_DEI_1;
        nsfPrm.inQueParams.prevLinkQueId = 1;
        nsfPrm.numOutQue                = 1;
        nsfPrm.outQueParams[0].nextLink =  nextLinkId;
        System_linkCreate(SYSTEM_LINK_ID_NSF_1, &nsfPrm, sizeof(nsfPrm));

  • Dongming,

    dongming lou said:
    The RDK is IPNC_RDK3.5

    Check with your local TI FAE regarding IPNC RDK.

    BR
    Pavel

  • Hi,

    In IPNC RDK, it uses scalar link to resize the imaget for FD.

    Would you pls flow how IPNC RDK use sc link?

     sclrPrm.scaleMode                          = DEI_SCALE_MODE_ABSOLUTE;

  • Hi, Chris

    here is the usecase:

    Host IPC bit out -> video IPC bit in -> dec link-> video frame out -> vpss frame in-> scalar link-> nsf link->vpss frame out->video frame in->H264 enc-> video ipc bit out->host ipc bit in