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.

dm8168 RDKRDK_03.50 encode 出错问题

Other Parts Discussed in Thread: TVP7002

RDK是基于DM8168的EVM板卡和EVM自带的IO卡上运行的。

目前

capture(7002 1080P) --> display[0]   ...OK

capture(7002 1080P) --> dup[0] --> display[0]   ...OK

capture(7002 1080P) --> dup[0] --> nsf[0] --> encode   ...failed

错误信息: 

encLink_common.c:  pPrm-> inQueParams.preLinkQueId < pObj->inTskInfo.numQue : failed !!!

请问这个问题是什么原因?

  • encode的代码几乎没有更改。

    demo_vcap_venc_vdis.c

    gDemo_info.maxVcapChannels = 1;
    gDemo_info.maxVdisChannels = 1;
    gDemo_info.maxVencChannels = 1;
    gDemo_info.maxVdecChannels = 0;

    vcapParams.numChn = 1;
    vcapParams.numDevices = 1;
    vencParams.numPrimaryChn = 1;
    vencParams.numSecondaryChn = 1;
    vdisParams.numChannels = 1;

    UInt32 chId;

    VENC_CHN_DYNAMIC_PARAM_S params = { 0 };
    chId = 0;

    memset(&params, 0, sizeof(params));

    Venc_setInputFrameRate(chId, 60);

    params.frameRate = 60;
    Venc_setDynamicParam(chId, 0, &params, VENC_FRAMERATE);

    multichhd_vcap_venc_vdis.c

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

    ipcOutVpssPrm.inQueParams.prevLinkQueId = 0;
    ipcOutVpssPrm.outQueParams[0].nextLink = gMultiChHd_VcapVencVdisObj.ipcInVideoId;
    ipcOutVpssPrm.notifyNextLink = TRUE;//FALSE;
    ipcOutVpssPrm.notifyPrevLink = TRUE;
    ipcOutVpssPrm.noNotifyMode = FALSE;

    ipcInVideoPrm.inQueParams.prevLinkId = gMultiChHd_VcapVencVdisObj.ipcOutVpssId;
    ipcInVideoPrm.inQueParams.prevLinkQueId = 0;
    ipcInVideoPrm.outQueParams[0].nextLink = gVencModuleContext.encId;
    ipcInVideoPrm.notifyNextLink = TRUE;
    ipcInVideoPrm.notifyPrevLink = FALSE;
    ipcInVideoPrm.noNotifyMode = TRUE;

    ipcBitsOutVideoPrm.baseCreateParams.inQueParams.prevLinkId = gVencModuleContext.encId;
    ipcBitsOutVideoPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
    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.outQueParams[0].nextLink = SYSTEM_LINK_ID_INVALID;
    MultiCh_ipcBitsInitCreateParams_BitsInHLOS(&ipcBitsInHostPrm[0]);

    EncLink_CreateParams_Init(&encPrm);
    encPrm.numBufPerCh[0] = 6; //D1
    /* available buffers per channel with CIF and MJPEG encoder support is less*/
    {
    EncLink_ChCreateParams *pLinkChPrm;
    EncLink_ChDynamicParams *pLinkDynPrm;
    VENC_CHN_DYNAMIC_PARAM_S *pDynPrm;
    VENC_CHN_PARAMS_S *pChPrm;

    /* Primary Stream Params - D1 */
    //for (i=0; i<gVencModuleContext.vencConfig.numPrimaryChn; i++)
    for (i=0; i<1; 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 = IVIDEO_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;
    }
    encPrm.inQueParams.prevLinkId = gMultiChHd_VcapVencVdisObj.ipcInVideoId;
    encPrm.inQueParams.prevLinkQueId= 0;
    encPrm.outQueParams.nextLink = gVencModuleContext.ipcBitsOutRTOSId;
    }

  • tony,你好!

    我的硬件环境和你的一样,也想使用tvp7002,请问你的tvp7002是如何加入到demo中的?

  • 你好,你在capture的时候需要

    pCaptureInstPrm->videoDecoderId     = SYSTEM_DEVICE_VID_DEC_TVP7002_DRV;

    这个地址需要配置一下

  • 谢谢!我试试看