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.

DEI Link in DVR-RDK3.50

Other Parts Discussed in Thread: TVP5151

Hi,

I am using dvrrdk3.50.00.05 for DM8168. I want to use DEI in my application. As per written in LinkAPIUserGuide, DEI gives three scaled output.

1. DEI-SC YUV422

2. VIP-SC (0) - YUV420/422

3. VIP-SC (1) - YUV420/422

But here in my case i want to use only one output which is VIP-SC (0) - YUV420/422. So i have disable rest of the two outputs.

deiPrm[0].enableOut[DEI_LINK_OUT_QUE_DEI_SC] = FALSE;
deiPrm[0].enableOut[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT] = FALSE;

I have also connected these output to NullLink_CreateParams parameters.

But I am getting following error,

[m3vpss ]  100686: Assertion @ Line: 966 in links_m3vpss/dei/deiLink_drv.c: pObj->fvidHandle != NULL : failed !!!

Any idea about above error ? Am I doing anything wrong ?

Seeking quick response.

Thanks in advance,

Shabbir Limdiwala

  • Pls share your usecase data flow.ie. How links are connected and what are their data formats. Are you capturing in 420SP format ? If so DEI_VIP_SC cannot be used as the resource is already used in capture path. You will have to use DEI_SC and NSF instead of VIP_SC. Also if you disable a output queue in DEI do not connect any link like NullLink as next link

  • Hi Badri,

    Yes I am capturing in 420SP format. If it so then my data flow is as below

    Capture (VIN0) (420SP) --> DEI ( DEI_SC OUT) --> NSF --> Encode --> Dump to memory

    I have disable rest of the output of DEI. Though I am getting the same error.([m3vpss ]  28468: Assertion @ Line: 966 in links_m3vpss/dei/deiLink_drv.c: pObj->fvidHandle != NULL : failed !!!)

    I have followed as per your comment. Still it is giving same error.

    Thanks,

    Shabbir Limdiwala

     

  • Pls attach your usecase code where you connect the components.Also are you using PG1.1 in which case greater than 960 width is not possible to output in 422I format. You can confirm if this is the problem by setting DEI output width to less than 960

  • I checked the output width limitation with Brijesh and there is _no_ restriction on PG1.1  DEI_SC output width being less than 960. Only input width has this restriction for PG1.1 .So the issue is due to resource conflict. It looks like disabling of output queues is not done correctly in the usecase file causing DEI to open dual out driver. Pls check your usecase or share the usecase file for analysis.

  • Hi Badri,

    Yes. I am aware of the scalar limitation for both YUV422I and YUV420SP formats.

    My above error has been solved. This error is because of deiId. I was using two instance of DEI. One is SYSTEM_LINK_ID_DEI_HQ_0 and other is SYSTEM_LINK_ID_DEI_HQ_1. in this case i was getting above error. But when i replaced SYSTEM_LINK_ID_DEI_HQ_1 with SYSTEM_LINK_ID_DEI_0 then my application was working fine. 

    I am confused. Is there any relation between SYSTEM_LINK_ID_DEI_0 and SYSTEM_LINK_ID_DEI_1 if we use it simultaneously ?

    Thanks,

    Shabbir Limdiwala

  • SYSTEM_LINK_ID_DEI_HQ & SYSTEM_LINK_ID_DEI are two different h/w resources.

    SYSTEM_LINK_ID_DEI_HQ_0 & SYSTEM_LINK_ID_DEI_HQ_1 are two _instances_ of the DEI HQ h/w resource

    SYSTEM_LINK_ID_DEI_0 & SYSTEM_LINK_ID_DEI_1 are two _instances_ of the DEI h/w resource

    Multiple instances can be opened as long as the total number of channels processed does not exceed a predefined limit. e.g: 8 ch of DEI

     

     

  • Hi Badri,

    But here when  i am using SYSTEM_LINK_ID_DEI_HQ_0 and SYSTEM_LINK_ID_DEI_HQ_1 then i am getting "[m3vpss ]  28468: Assertion @ Line: 966 in links_m3vpss/dei/deiLink_drv.c: pObj->fvidHandle != NULL : failed !!!" error.

    And when i am using SYSTEM_LINK_ID_DEI_HQ_0 and SYSTEM_LINK_ID_DEI_0 then it's working fine.

    Any idea ?

    Thanks,

    Shabbir Limdiwala

  • Hi Shabbir,

    Could you please share your DEI create time parameters when you DEI_HQ_0/1? Please note that since there two are two instances of the same hardware instance, except the resolution, create time parameters should be same. I guess

    Regards,

    Brijesh Jadav

  • Hi Brijesh,

    Here are the parameters,

    gVcapModuleContext.deiId[0]     = SYSTEM_LINK_ID_DEI_HQ_0;
    DeiLink_CreateParams_Init(&deiPrm[0]);
    deiPrm[0].inQueParams.prevLinkId  = gVcapModuleContext.captureId;
    deiPrm[0].inQueParams.prevLinkQueId = 0;

    deiPrm[0].outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].scaleMode = DEI_SCALE_MODE_ABSOLUTE;
    deiPrm[0].outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].absoluteResolution.outWidth   = 1280;
    deiPrm[0].outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].absoluteResolution.outHeight  = 720;

    deiPrm[0].setVipScYuv422Format =   FALSE;
    deiPrm[0].enableDeiForceBypass =   TRUE;
    deiPrm[0].enableForceInterlacedInput   =   FALSE;
    deiPrm[0].outputFrameRate[DEI_LINK_OUT_QUE_DEI_SC] = 60;

    deiPrm[0].enableOut[DEI_LINK_OUT_QUE_VIP_SC] = FALSE;
    deiPrm[0].enableOut[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT] = FALSE;
    deiPrm[0].enableOut[DEI_LINK_OUT_QUE_DEI_SC] = TRUE;
    deiPrm[0].outQueParams[DEI_LINK_OUT_QUE_DEI_SC].nextLink = gVcapModuleContext.nsfId[2];


    gVcapModuleContext.deiId[1]     = SYSTEM_LINK_ID_DEI_HQ_1;
    DeiLink_CreateParams_Init(&deiPrm[1]);
    deiPrm[1].inQueParams.prevLinkId  = dupId;
    deiPrm[1].inQueParams.prevLinkQueId = 1;

    deiPrm[1].outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].scaleMode = DEI_SCALE_MODE_ABSOLUTE;
    deiPrm[1].outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].absoluteResolution.outWidth   = 960;
    deiPrm[1].outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].absoluteResolution.outHeight  = 720;

    deiPrm[1].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC][0].scaleMode = DEI_SCALE_MODE_ABSOLUTE;
    deiPrm[1].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC][0].absoluteResolution.outWidth   = 960;
    deiPrm[1].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC][0].absoluteResolution.outHeight  = 720;

    deiPrm[1].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT][0].scaleMode = DEI_SCALE_MODE_ABSOLUTE;
    deiPrm[1].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT][0].absoluteResolution.outWidth   = 384;
    deiPrm[1].outScaleFactor[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT][0].absoluteResolution.outHeight  = 288;

    deiPrm[1].setVipScYuv422Format =   FALSE;
    deiPrm[1].enableDeiForceBypass =   TRUE;
    deiPrm[1].enableForceInterlacedInput   =   FALSE;
    deiPrm[1].outputFrameRate[DEI_LINK_OUT_QUE_DEI_SC] = 60;
    deiPrm[1].outputFrameRate[DEI_LINK_OUT_QUE_VIP_SC] = 60;
    deiPrm[1].outputFrameRate[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT] = 60;

    deiPrm[1].enableOut[DEI_LINK_OUT_QUE_DEI_SC] = TRUE;
    deiPrm[1].outQueParams[DEI_LINK_OUT_QUE_DEI_SC].nextLink = gVcapModuleContext.nsfId[1];

    deiPrm[1].enableOut[DEI_LINK_OUT_QUE_VIP_SC] = TRUE;
    deiPrm[1].outQueParams[DEI_LINK_OUT_QUE_VIP_SC].nextLink = mergeId;

    deiPrm[1].enableOut[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT] = TRUE;
    deiPrm[1].outQueParams[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT].nextLink = mergeId;

    Thanks,

    Shabbir Limdiwala

  • The same h/w resource DEI_HQ cannot be opened in both dual out (deiPrm[1]) and single out (deiPrm[0]). This is why the driver create fails. You have to open both DEI for dual out mode and if you don't require output from one dei you can set blankOut = TRUE in create params for that instance

  • Hi Badri,

    Oh this is the problem. Now it's working. Thanks for the help badri.

    Thanks,

    Shabbir Limdiwala

  • Hello, Badri.

    We try to reproduce the case above. We have exactly the same use schema as in this thread. Our video decoder is TVP5151, which we control externally.

    Below is the resulting video we receive:

    The use case file look like this:

    /*
    TVP5151 (YUV422P)
    |
    Capture (YUV420SP)
    |
    DEI (DEI-SC)
    |
    NSF
    (YUV420SP)
    |
    IPCM3OUT(VPSS)
    |
    IPCM3IN(VID)----ENC-----IPCBITS_RTOSOUT(VID)
    |
    IPCBITS_HLOSIN(HOST)
    |
    ----------------------
    |
    FILE-(H264)
    */

    #include "mcfw/src_linux/mcfw_api/usecases/multich_common.h"
    #include "mcfw/src_linux/mcfw_api/usecases/multich_ipcbits.h"

    #define TILER_ENABLE FALSE

    /* =============================================================================
    * Use case code
    * =============================================================================
    */
    static SystemVideo_Ivahd2ChMap_Tbl systemVid_encDecIvaChMapTbl =
    {
    .isPopulated = 1,
    .ivaMap[0] =
    {
    .EncNumCh = 16,
    .EncChList = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 , 14, 15},
    .DecNumCh = 16,
    .DecChList = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 , 14, 15},
    },

    };

    #define NUM_MERGE_LINK 2
    #define D1_CIF_MERGE_LINK_IDX 0
    #define LIVE_DECODE_MERGE_LINK_IDX 1

    #define NUM_DUP_LINK 2
    #define D1_DUP_LINK_IDX 0
    #define LIVE_DECODE_DUP_LINK_IDX 1

    #if defined(TI_814X_BUILD) || defined(DDR_MEM_256M)
    #define NUM_CAPTURE_BUFFERS 8
    #define NUM_NSF_BUFFERS 4
    #define NUM_ENCODE_D1_BUFFERS 4
    #define NUM_ENCODE_CIF_BUFFERS 4
    #define NUM_DECODE_BUFFERS 4
    #define NUM_SWMS_MAX_BUFFERS 8
    #define BIT_BUF_LENGTH_LIMIT_FACTOR_SD 4
    #else
    #define NUM_CAPTURE_BUFFERS 8
    #define NUM_NSF_BUFFERS 6
    #define NUM_ENCODE_D1_BUFFERS 6
    #define NUM_ENCODE_CIF_BUFFERS 6
    #define NUM_DECODE_BUFFERS 6
    #define NUM_SWMS_MAX_BUFFERS 8
    #define BIT_BUF_LENGTH_LIMIT_FACTOR_SD 6
    #endif

    #define MAX_BUFFERING_QUEUE_LEN_PER_CH (50)

    #define NUM_CAPTURE_DEVICES 1

    /* This usecase assumes CIF <secondary out>, MJPEG are enabled */
    Void MultiCh_createProgressive4D1VcapVencVdecVdis()
    {
    CaptureLink_CreateParams capturePrm;
    NsfLink_CreateParams nsfPrm;
    DeiLink_CreateParams deiPrm;
    DisplayLink_CreateParams displayPrm[VDIS_DEV_MAX];
    IpcLink_CreateParams ipcOutVpssPrm;
    IpcLink_CreateParams ipcInVpssPrm;
    IpcLink_CreateParams ipcOutVideoPrm;
    IpcLink_CreateParams ipcInVideoPrm;
    EncLink_CreateParams encPrm;
    DecLink_CreateParams decPrm;
    IpcBitsOutLinkHLOS_CreateParams ipcBitsOutHostPrm;
    IpcBitsOutLinkRTOS_CreateParams ipcBitsOutVideoPrm;
    IpcBitsInLinkHLOS_CreateParams ipcBitsInHostPrm[2];

    IpcBitsInLinkRTOS_CreateParams ipcBitsInVideoPrm;
    CaptureLink_VipInstParams *pCaptureInstPrm;
    CaptureLink_OutParams *pCaptureOutPrm;

    System_LinkInfo bitsProducerLinkInfo;
    UInt32 ipcOutVpssId, ipcInVpssId;
    UInt32 ipcOutVideoId, ipcInVideoId;

    IpcBitsOutLinkRTOS_CreateParams ipcBitsOutDspPrm;

    UInt32 vipInstId;
    UInt32 i;

    MULTICH_INIT_STRUCT(IpcLink_CreateParams,ipcOutVpssPrm);
    MULTICH_INIT_STRUCT(IpcLink_CreateParams,ipcInVpssPrm);
    MULTICH_INIT_STRUCT(IpcLink_CreateParams,ipcOutVideoPrm);
    MULTICH_INIT_STRUCT(IpcLink_CreateParams,ipcInVideoPrm);
    MULTICH_INIT_STRUCT(IpcBitsOutLinkHLOS_CreateParams,ipcBitsOutHostPrm);
    MULTICH_INIT_STRUCT(IpcBitsOutLinkRTOS_CreateParams,ipcBitsOutVideoPrm);
    MULTICH_INIT_STRUCT(IpcBitsOutLinkRTOS_CreateParams,ipcBitsOutDspPrm);
    MULTICH_INIT_STRUCT(IpcBitsInLinkHLOS_CreateParams,ipcBitsInHostPrm[0]);
    MULTICH_INIT_STRUCT(IpcBitsInLinkHLOS_CreateParams,ipcBitsInHostPrm[1]);
    MULTICH_INIT_STRUCT(IpcBitsInLinkRTOS_CreateParams,ipcBitsInVideoPrm);
    MULTICH_INIT_STRUCT(DecLink_CreateParams, decPrm);
    MULTICH_INIT_STRUCT(EncLink_CreateParams, encPrm);

    for (i = 0; i < VDIS_DEV_MAX;i++)
    {
    MULTICH_INIT_STRUCT(DisplayLink_CreateParams, displayPrm[i]);
    }

    MULTICH_INIT_STRUCT(NsfLink_CreateParams, nsfPrm);
    MULTICH_INIT_STRUCT(DeiLink_CreateParams, deiPrm);

    MultiCh_detectBoard();

    System_linkControl(
    SYSTEM_LINK_ID_M3VPSS,
    SYSTEM_M3VPSS_CMD_RESET_VIDEO_DEVICES,
    NULL,
    0,
    TRUE
    );

    System_linkControl(
    SYSTEM_LINK_ID_M3VIDEO,
    SYSTEM_COMMON_CMD_SET_CH2IVAHD_MAP_TBL,
    &systemVid_encDecIvaChMapTbl,
    sizeof(SystemVideo_Ivahd2ChMap_Tbl),
    TRUE
    );

    vipInstId = 0;

    gVcapModuleContext.captureId = SYSTEM_LINK_ID_CAPTURE;
    gVcapModuleContext.nsfId[0] = SYSTEM_LINK_ID_NSF_0;
    gVcapModuleContext.deiId[0] = SYSTEM_LINK_ID_DEI_0;
    gVencModuleContext.encId = SYSTEM_LINK_ID_VENC_0;
    gVdecModuleContext.decId = SYSTEM_LINK_ID_VDEC_0;
    gVdisModuleContext.displayId[0] = SYSTEM_LINK_ID_DISPLAY_0;

    ipcOutVpssId = SYSTEM_VPSS_LINK_ID_IPC_OUT_M3_0;
    ipcInVideoId = SYSTEM_VIDEO_LINK_ID_IPC_IN_M3_0;
    ipcOutVideoId = SYSTEM_VIDEO_LINK_ID_IPC_OUT_M3_0;
    ipcInVpssId = SYSTEM_VPSS_LINK_ID_IPC_IN_M3_0;

    gVencModuleContext.ipcBitsOutRTOSId = SYSTEM_VIDEO_LINK_ID_IPC_BITS_OUT_0;
    gVencModuleContext.ipcBitsInHLOSId = SYSTEM_HOST_LINK_ID_IPC_BITS_IN_0;
    gVdecModuleContext.ipcBitsOutHLOSId = SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0;
    gVdecModuleContext.ipcBitsInRTOSId = SYSTEM_VIDEO_LINK_ID_IPC_BITS_IN_0;

    CaptureLink_CreateParams_Init(&capturePrm);
    capturePrm.outQueParams[0].nextLink = gVcapModuleContext.deiId[0];
    capturePrm.isPalMode = FALSE;
    capturePrm.numVipInst = 1;
    capturePrm.tilerEnable = FALSE;
    capturePrm.numBufsPerCh = NUM_CAPTURE_BUFFERS;
    capturePrm.maxBlindAreasPerCh = 4;

    pCaptureInstPrm = &capturePrm.vipInst[0];
    /*--------------------------------------------------------------------------------------*/
    pCaptureInstPrm->vipInstId = (SYSTEM_CAPTURE_INST_VIP1_PORTA + vipInstId) % SYSTEM_CAPTURE_INST_MAX;
    /*--------------------------------------------------------------------------------------*/

    pCaptureInstPrm->videoCaptureMode = DEVICE_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_EMBEDDED_SYNC;
    pCaptureInstPrm->videoIfMode = DEVICE_CAPT_VIDEO_IF_MODE_8BIT;
    pCaptureInstPrm->inScanFormat = SYSTEM_SF_INTERLACED;
    pCaptureInstPrm->videoDecoderId = 0;
    pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;
    pCaptureInstPrm->standard = SYSTEM_STD_NTSC;

    pCaptureInstPrm->numOutput = 1;
    pCaptureOutPrm = &pCaptureInstPrm->outParams[0];
    pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV420SP_UV;
    pCaptureOutPrm->scEnable = FALSE;
    pCaptureOutPrm->scOutWidth = 0;
    pCaptureOutPrm->scOutHeight = 0;
    pCaptureOutPrm->outQueId = 0;

    deiPrm.inQueParams.prevLinkId = gVcapModuleContext.captureId;
    deiPrm.inQueParams.prevLinkQueId = 0;

    deiPrm.outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].scaleMode = DEI_SCALE_MODE_ABSOLUTE;
    deiPrm.outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].absoluteResolution.outWidth = 720;
    deiPrm.outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].absoluteResolution.outHeight = 240;

    deiPrm.setVipScYuv422Format = FALSE;
    deiPrm.enableDeiForceBypass = FALSE;
    deiPrm.enableForceInterlacedInput = TRUE;
    deiPrm.outputFrameRate[DEI_LINK_OUT_QUE_DEI_SC] = 60;

    deiPrm.enableOut[DEI_LINK_OUT_QUE_DEI_SC] = TRUE;
    deiPrm.enableOut[DEI_LINK_OUT_QUE_VIP_SC] = FALSE;
    deiPrm.enableOut[DEI_LINK_OUT_QUE_VIP_SC_SECONDARY_OUT] = FALSE;

    deiPrm.outQueParams[DEI_LINK_OUT_QUE_DEI_SC].nextLink = gVcapModuleContext.nsfId[0];

    deiPrm.comprEnable = FALSE;

    nsfPrm.bypassNsf = TRUE;
    nsfPrm.tilerEnable = TILER_ENABLE;
    nsfPrm.inQueParams.prevLinkId = gVcapModuleContext.deiId[0];
    nsfPrm.inQueParams.prevLinkQueId = DEI_LINK_OUT_QUE_DEI_SC;
    nsfPrm.numOutQue = 1;
    nsfPrm.outQueParams[0].nextLink = ipcOutVpssId;
    nsfPrm.numBufsPerCh = NUM_NSF_BUFFERS;
    nsfPrm.inputFrameRate = 30;
    nsfPrm.outputFrameRate = 30;

    ipcOutVpssPrm.inQueParams.prevLinkId = gVcapModuleContext.nsfId[0];
    ipcOutVpssPrm.inQueParams.prevLinkQueId = 0;


    ipcOutVpssPrm.numOutQue = 1;
    ipcOutVpssPrm.outQueParams[0].nextLink = ipcInVideoId;
    ipcOutVpssPrm.notifyNextLink = TRUE;
    ipcOutVpssPrm.notifyPrevLink = TRUE;
    ipcOutVpssPrm.noNotifyMode = FALSE;

    ipcInVideoPrm.inQueParams.prevLinkId = ipcOutVpssId;
    ipcInVideoPrm.inQueParams.prevLinkQueId = 0;

    ipcInVideoPrm.numOutQue = 1;
    ipcInVideoPrm.outQueParams[0].nextLink = gVencModuleContext.encId;
    ipcInVideoPrm.notifyNextLink = TRUE;
    ipcInVideoPrm.notifyPrevLink = TRUE;
    ipcInVideoPrm.noNotifyMode = FALSE;


    {
    EncLink_ChCreateParams *pLinkChPrm;
    EncLink_ChDynamicParams *pLinkDynPrm;
    VENC_CHN_DYNAMIC_PARAM_S *pDynPrm;
    VENC_CHN_PARAMS_S *pChPrm;

    EncLink_CreateParams_Init(&encPrm);

    encPrm.numBufPerCh[0] = NUM_ENCODE_D1_BUFFERS;
    encPrm.numBufPerCh[1] = NUM_ENCODE_CIF_BUFFERS;

    /* Primary Stream Params - D1 */
    for (i=0; i<gVencModuleContext.vencConfig.numPrimaryChn; i++)
    {
    pLinkChPrm = &encPrm.chCreateParams[i];
    pLinkDynPrm = &pLinkChPrm->defaultDynamicParams;

    pChPrm = &gVencModuleContext.vencConfig.encChannelParams[i];
    pDynPrm = &pChPrm->dynamicParam;

    pLinkChPrm->format = IVIDEO_H264HP;
    pLinkChPrm->profile = gVencModuleContext.vencConfig.h264Profile[i];
    pLinkChPrm->dataLayout = VCODEC_FIELD_SEPARATED;
    pLinkChPrm->fieldMergeEncodeEnable = FALSE;
    pLinkChPrm->enableAnalyticinfo = pChPrm->enableAnalyticinfo;
    pLinkChPrm->enableWaterMarking = pChPrm->enableWaterMarking;
    pLinkChPrm->maxBitRate = pChPrm->maxBitRate;
    pLinkChPrm->encodingPreset = pChPrm->encodingPreset;
    pLinkChPrm->rateControlPreset = pChPrm->rcType;
    pLinkChPrm->enableSVCExtensionFlag = pChPrm->enableSVCExtensionFlag;
    pLinkChPrm->numTemporalLayer = pChPrm->numTemporalLayer;

    pLinkDynPrm->intraFrameInterval = pDynPrm->intraFrameInterval;
    pLinkDynPrm->targetBitRate = pDynPrm->targetBitRate;
    pLinkDynPrm->interFrameInterval = 1;
    pLinkDynPrm->mvAccuracy = IVIDENC2_MOTIONVECTOR_QUARTERPEL;
    pLinkDynPrm->inputFrameRate = pDynPrm->inputFrameRate;
    pLinkDynPrm->rcAlg = pDynPrm->rcAlg;
    pLinkDynPrm->qpMin = pDynPrm->qpMin;
    pLinkDynPrm->qpMax = pDynPrm->qpMax;
    pLinkDynPrm->qpInit = pDynPrm->qpInit;
    pLinkDynPrm->vbrDuration = pDynPrm->vbrDuration;
    pLinkDynPrm->vbrSensitivity = pDynPrm->vbrSensitivity;
    }

    /* MJPEG Params */
    for (i=gVencModuleContext.vencConfig.numPrimaryChn + gVencModuleContext.vencConfig.numSecondaryChn;
    i<(VENC_CHN_MAX); i++)
    {
    pLinkChPrm = &encPrm.chCreateParams[i];
    pLinkDynPrm = &pLinkChPrm->defaultDynamicParams;

    pChPrm = &gVencModuleContext.vencConfig.encChannelParams[i];
    pDynPrm = &pChPrm->dynamicParam;

    pLinkChPrm->format = IVIDEO_MJPEG;
    pLinkChPrm->profile = 0;
    pLinkChPrm->dataLayout = VCODEC_FIELD_SEPARATED;
    pLinkChPrm->fieldMergeEncodeEnable = FALSE;
    pLinkChPrm->enableAnalyticinfo = 0;
    pLinkChPrm->enableWaterMarking = 0;
    pLinkChPrm->maxBitRate = 0;
    pLinkChPrm->encodingPreset = 0;
    pLinkChPrm->rateControlPreset = 0;
    pLinkChPrm->enableSVCExtensionFlag = 0;
    pLinkChPrm->numTemporalLayer = 0;

    pLinkDynPrm->intraFrameInterval = 0;
    pLinkDynPrm->targetBitRate = 100*1000;
    pLinkDynPrm->interFrameInterval = 0;
    pLinkDynPrm->mvAccuracy = 0;
    pLinkDynPrm->inputFrameRate = pDynPrm->inputFrameRate;
    pLinkDynPrm->qpMin = 0;
    pLinkDynPrm->qpMax = 0;
    pLinkDynPrm->qpInit = -1;
    pLinkDynPrm->vbrDuration = 0;
    pLinkDynPrm->vbrSensitivity = 0;
    }


    encPrm.inQueParams.prevLinkId = ipcInVideoId;
    encPrm.inQueParams.prevLinkQueId = 0;

    encPrm.outQueParams.nextLink = gVencModuleContext.ipcBitsOutRTOSId;
    }

    ipcBitsOutVideoPrm.baseCreateParams.inQueParams.prevLinkId = gVencModuleContext.encId;
    ipcBitsOutVideoPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcBitsOutVideoPrm.baseCreateParams.numOutQue = 1;
    ipcBitsOutVideoPrm.baseCreateParams.outQueParams[0].nextLink = gVencModuleContext.ipcBitsInHLOSId;
    MultiCh_ipcBitsInitCreateParams_BitsOutRTOS(&ipcBitsOutVideoPrm, TRUE);

    ipcBitsInHostPrm[0].baseCreateParams.inQueParams.prevLinkId = gVencModuleContext.ipcBitsOutRTOSId;
    ipcBitsInHostPrm[0].baseCreateParams.inQueParams.prevLinkQueId = 0;
    ipcBitsInHostPrm[0].baseCreateParams.numOutQue = 1;
    MultiCh_ipcBitsInitCreateParams_BitsInHLOS(&ipcBitsInHostPrm[0]);

    System_linkCreate (gVcapModuleContext.captureId, &capturePrm, sizeof(capturePrm));
    System_linkCreate(gVcapModuleContext.deiId[0], &deiPrm, sizeof(deiPrm));
    System_linkCreate(gVcapModuleContext.nsfId[0] , &nsfPrm, sizeof(nsfPrm));

    System_linkCreate(ipcOutVpssId , &ipcOutVpssPrm , sizeof(ipcOutVpssPrm) );
    System_linkCreate(ipcInVideoId , &ipcInVideoPrm , sizeof(ipcInVideoPrm) );

    System_linkCreate(gVencModuleContext.encId, &encPrm, sizeof(encPrm));

    System_linkCreate(gVencModuleContext.ipcBitsOutRTOSId, &ipcBitsOutVideoPrm, sizeof(ipcBitsOutVideoPrm));
    System_linkCreate(gVencModuleContext.ipcBitsInHLOSId, &ipcBitsInHostPrm[0], sizeof(ipcBitsInHostPrm[0]));
    System_linkGetInfo(gVencModuleContext.ipcBitsInHLOSId,&bitsProducerLinkInfo);
    OSA_assert(bitsProducerLinkInfo.numQue == 1);

    printf ("\n\n========bitsProducerLinkInfo============\n");
    printf ("numQ %d, numCh %d\n",
    bitsProducerLinkInfo.numQue,
    bitsProducerLinkInfo.queInfo[0].numCh);
    {
    int i;
    for (i=0; i<bitsProducerLinkInfo.queInfo[0].numCh; i++)
    {
    printf ("Ch [%d] Width %d, Height %d\n",
    i,
    bitsProducerLinkInfo.queInfo[0].chInfo[i].width,
    bitsProducerLinkInfo.queInfo[0].chInfo[i].height
    );
    }
    }
    printf ("\n====================\n\n");

    if (bitsProducerLinkInfo.queInfo[0].numCh > gVencModuleContext.vencConfig.numPrimaryChn)
    bitsProducerLinkInfo.queInfo[0].numCh = gVencModuleContext.vencConfig.numPrimaryChn;

    printf ("Reducing bitsProducerLinkInfo.numCh to %d\n", bitsProducerLinkInfo.queInfo[0].numCh);
    }

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

    We shall be very very thankful to you for any hint why we have this situation.

    Best Regards

  • Hello,

    For DVR RDK support contact your local FAE.

    BR
    Margarita
  • Margarita, please, can you be so kind to explain why some people can get help here, while others should ask their FAE?
  • Hello,

    As you could see this is a very old topic Feb 2013.

    You could check these READ ME FIRST topics:

    e2e.ti.com/.../426680
    e2e.ti.com/.../224844


    BR
    Margarita

  • Hello, Shabir.

    May be you will be so kind to share your usecase file?

    It will help us a lot, as we have the same usecase as you had.

    Many many thanks ahead.

    Leon

  • Hello Leon,

    Could you tell me what SOC and software version you are using?

    Support for DVR-RDK is limited now, as pointed by Margarita.

    Meanwhile, could you please try modifying the usecase by setting the following-

    pCaptureInstPrm->standard = SYSTEM_STD_D1

    and

    deiPrm.outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].absoluteResolution.outWidth = 720;
    deiPrm.outScaleFactor[DEI_LINK_OUT_QUE_DEI_SC][0].absoluteResolution.outHeight = 480

     

    Thanks,

    Prashant.;