[m3video] ENC : IVAHDID : 0 Number of Req Objs exceeded limit: 1
[m3video] ENC : IVAHDID : 0 Batch creation … DONE !!!
[m3video] ENC : IVAHDID : 0 Number of Req Objs in Batch : 1
[m3video] ENC : IVAHDID : 0 Channels included in Batch:
[m3video] ENC : IVAHDID : 0 0
[m3video] ENC : IVAHDID : 0 Submitting Batch
[m3video] ENC : IVAHDID : 0 Entering EncLink_SubmitBatch.
[m3video] IVAHDID : 0 Leaving Enclink_h264EncodeFrameBatch with error code : 0
[m3video] ENC : IVAHDID : 0 Leaving EncLink_SubmitBatch with status 0
[m3video] ENC : IVAHDID : 0 An element with width greater than 1280 encountere!
[m3video] ENC : IVAHDID : 0 Batch creation … DONE !!!
[m3video] ENC : IVAHDID : 0 Number of Req Objs in Batch : 1
[m3video] ENC : IVAHDID : 0 Channels included in Batch:
[m3video] ENC : IVAHDID : 0 1
[m3video] ENC : IVAHDID : 0 Submitting Batch
[m3video] ENC : IVAHDID : 0 Entering EncLink_SubmitBatch.
[m3video] IVAHDID : 0 Entering Enclink_h264EncodeFrameBatch
[m3video] [ENC] H264 Encoder is called for process !!!!!!!!!
卡在这里,就是error = ((IVIDENC2_Handle)handle)->fxns->process这个函数,不出来。
上面的打印就是我不太懂的。
Chris Meng:
Xin Jin,
问题是必现么?请问你的系统现在稳定么? 如果降低DDR的频率该问题会有改善么?
jin xin:
回复 Chris Meng:
每次都是这样,现象是一样的,我怀疑是数据引起的,所以我打算做个实验,使用NULLSRC->DUP->IPC OUT(VPSSM3)->IPC IN(VIDEOM3)->H264ENC(VIDEOM3)-> IPC BITS OUT(VIDEOM3)-> IPC BITS OUT(VIDEOM3),代码如下:
NullSrcPrm.inputInfo.numCh = 1; NullSrcPrm.inputInfo.chInfo[0].width = 1920; NullSrcPrm.inputInfo.chInfo[0].height = 1080; NullSrcPrm.inputInfo.chInfo[0].pitch[0] = 1920; NullSrcPrm.inputInfo.chInfo[0].pitch[1] = 1920; NullSrcPrm.inputInfo.chInfo[0].pitch[2] = 0; NullSrcPrm.inputInfo.chInfo[0].dataFormat = SYSTEM_DF_YUV420SP_UV; NullSrcPrm.inputInfo.chInfo[0].scanFormat = 1;//FVID2_SF_PROGRESSIVE NullSrcPrm.outQueParams.nextLink = dupId; NullSrcPrm.tilerEnable =FALSE;
/* Dup Link params */ dupPrm.inQueParams.prevLinkId = NullSrcId; dupPrm.inQueParams.prevLinkQueId = 0; dupPrm.numOutQue = 1; dupPrm.outQueParams[0].nextLink = mergeId[CAM_STREAM_MERGE_IDX]; dupPrm.notifyNextLink = TRUE;
/* Merge Link params */ mergePrm[CAM_STREAM_MERGE_IDX].numInQue = 1; mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[0].prevLinkId = dupId; mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[0].prevLinkQueId = 0; mergePrm[CAM_STREAM_MERGE_IDX].outQueParams.nextLink =ipcOutVpssId;// gVsysModuleContext.swOsdId; mergePrm[CAM_STREAM_MERGE_IDX].notifyNextLink = TRUE;
/* SWOSD Link Params */ swosdPrm.inQueParams.prevLinkId = mergeId[CAM_STREAM_MERGE_IDX]; swosdPrm.inQueParams.prevLinkQueId = 0;// swosdPrm.outQueParams.nextLink = ipcOutVpssId;
/* IPC Out VPSS link params */ ipcOutVpssPrm.inQueParams.prevLinkId = mergeId[CAM_STREAM_MERGE_IDX];//gVsysModuleContext.swOsdId; ipcOutVpssPrm.inQueParams.prevLinkQueId = 0; ipcOutVpssPrm.numOutQue = 1; ipcOutVpssPrm.outQueParams[0].nextLink = ipcInVideoId; ipcOutVpssPrm.notifyNextLink = TRUE; ipcOutVpssPrm.notifyPrevLink = TRUE; ipcOutVpssPrm.noNotifyMode = FALSE;
/* IPC In VIDEO params */ 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;
/* Video Encoder Link params */ MULTICH_INIT_STRUCT(EncLink_CreateParams, encPrm); { EncLink_ChCreateParams *pLinkChPrm; EncLink_ChDynamicParams *pLinkDynPrm; VENC_CHN_DYNAMIC_PARAM_S *pDynPrm; VENC_CHN_PARAMS_S *pChPrm;
for (i = 0; i < VENC_PRIMARY_CHANNELS; i++)///VENC_PRIMARY_CHANNELS=2 { pLinkChPrm = &encPrm.chCreateParams[i]; pLinkDynPrm = &pLinkChPrm->defaultDynamicParams;
pChPrm = &gVencModuleContext.vencConfig.encChannelParams[i]; pDynPrm = &pChPrm->dynamicParam;
switch(gUI_mcfw_config.demoCfg.codec_combo) { case 0: pLinkChPrm->format = IVIDEO_H264HP; break; //"SINGLE_H264" case 1: pLinkChPrm->format = IVIDEO_MPEG4SP; break; //"SINGLE_MPEG4" case 2: pLinkChPrm->format = IVIDEO_MJPEG; break; //"SINGLE_JPEG" case 3: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_MJPEG; break; //"H264_JPEG" case 4: pLinkChPrm->format = (i==0)? IVIDEO_MPEG4SP:IVIDEO_MJPEG; break; //"MPEG4_JPEG" case 5: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_H264HP; break; //"DUAL_H264" case 6: pLinkChPrm->format = (i==0)? IVIDEO_MPEG4SP:IVIDEO_MPEG4SP; break; //"DUAL_MPEG4" case 7: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_MPEG4SP; break; //"H264_MPEG4" case 8: pLinkChPrm->format = (i==0)? IVIDEO_H264HP:IVIDEO_H264HP; break; //"TRIPLE_H264" case 9: pLinkChPrm->format = (i==0)? IVIDEO_MPEG4SP:IVIDEO_MPEG4SP; break; //"TRIPLE_MPEG4" default: pLinkChPrm->format = IVIDEO_H264HP; } pLinkChPrm->profile = gVencModuleContext.vencConfig.h264Profile[i]; pLinkChPrm->dataLayout = IVIDEO_PROGRESSIVE; pLinkChPrm->fieldMergeEncodeEnable = FALSE; pLinkChPrm->enableAnalyticinfo = pChPrm->enableAnalyticinfo; pLinkChPrm->maxBitRate = pChPrm->maxBitRate; pLinkChPrm->encodingPreset = pChPrm->encodingPreset; pLinkChPrm->rateControlPreset = IVIDEO_USER_DEFINED; //pChPrm->rcType; pLinkChPrm->enableHighSpeed = FALSE; pLinkChPrm->enableWaterMarking = pChPrm->enableWaterMarking; pLinkChPrm->StreamPreset = gUI_mcfw_config.StreamPreset[i];
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;
if ((gUI_mcfw_config.demoCfg.resolution_combo == RES_10MP_D1) && (i == 0)) { encPrm.numBufPerCh[i] = 2; } else if ((gUI_mcfw_config.demoCfg.resolution_combo == RES_8MP_D1) && (i == 0)) { encPrm.numBufPerCh[i] = 3; } else { encPrm.numBufPerCh[i] = 4; } gVencModuleContext.encFormat[i] = pLinkChPrm->format; } }
/* Video Encoder Framerate */#ifdef IMGS_OMNIVISION_OV10630 encPrm.chCreateParams[0].defaultDynamicParams.inputFrameRate = 30; // ENC_LINK_DEFAULT_ALGPARAMS_INPUTFRAMERATE;#elif defined IMGS_MICRON_MT9M034 encPrm.chCreateParams[0].defaultDynamicParams.inputFrameRate = 30; // ENC_LINK_DEFAULT_ALGPARAMS_INPUTFRAMERATE;#else encPrm.chCreateParams[0].defaultDynamicParams.inputFrameRate = 30; // ENC_LINK_DEFAULT_ALGPARAMS_INPUTFRAMERATE;#endif encPrm.chCreateParams[1].defaultDynamicParams.inputFrameRate = 30; // ENC_LINK_DEFAULT_ALGPARAMS_INPUTFRAMERATE;
encPrm.vsEnable = gUI_mcfw_config.vsEnable;
if(gUI_mcfw_config.vaUseCase == TRUE) { encPrm.isVaUseCase = 1; } else { encPrm.isVaUseCase = 0; }
/////////////////////////////JPEG/////////////////////////////////////////////// for (i = VENC_PRIMARY_CHANNELS; i < (VENC_CHN_MAX – 1); i++)///i=VENC_PRIMARY_CHANNELS,就是把最后一路用雨JPEG压缩 { encPrm.chCreateParams[i].format = IVIDEO_MJPEG; encPrm.chCreateParams[i].profile = 0; encPrm.chCreateParams[i].dataLayout = IVIDEO_PROGRESSIVE; encPrm.chCreateParams[i].fieldMergeEncodeEnable = FALSE; encPrm.chCreateParams[i].defaultDynamicParams.intraFrameInterval = 0; encPrm.chCreateParams[i].encodingPreset = 0; encPrm.chCreateParams[i].enableAnalyticinfo = 0; encPrm.chCreateParams[i].enableWaterMarking = 0; encPrm.chCreateParams[i].defaultDynamicParams.inputFrameRate = 30; encPrm.chCreateParams[i].rateControlPreset = 0; encPrm.chCreateParams[i].defaultDynamicParams.targetBitRate = 100 * 1000; encPrm.chCreateParams[i].defaultDynamicParams.interFrameInterval = 0; encPrm.chCreateParams[i].defaultDynamicParams.mvAccuracy = 0; }
encPrm.inQueParams.prevLinkId = ipcInVideoId; encPrm.inQueParams.prevLinkQueId = 0; encPrm.outQueParams.nextLink = gVencModuleContext.ipcBitsOutRTOSId;
/* null Link Params */ hdNullPrm.numInQue = 1; hdNullPrm.inQueParams[0].prevLinkId = gVencModuleContext.encId; hdNullPrm.inQueParams[0].prevLinkQueId = 0;
/* IPC Bits Out VIDEO Link params */ 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);
/* IPC Bits In HOST Link params */ ipcBitsInHostPrm0.baseCreateParams.inQueParams.prevLinkId = gVencModuleContext.ipcBitsOutRTOSId; ipcBitsInHostPrm0.baseCreateParams.inQueParams.prevLinkQueId = 0; MultiCh_ipcBitsInitCreateParams_BitsInHLOS(&ipcBitsInHostPrm0);
/* Links Creation */
System_linkCreate(NullSrcId, &NullSrcPrm,sizeof(NullSrcPrm)); /* Camera Link */// System_linkCreate(gVcamModuleContext.cameraId, &cameraPrm,sizeof(cameraPrm));// System_linkControl(gVcamModuleContext.cameraId,CAMERA_LINK_CMD_DETECT_VIDEO, NULL, 0, TRUE);
gIsGlbceInitDone = 0;
/* Dup Link */ System_linkCreate(dupId, &dupPrm, sizeof(dupPrm));
/* Merge Link */ System_linkCreate(mergeId[CAM_STREAM_MERGE_IDX],&mergePrm[CAM_STREAM_MERGE_IDX],sizeof(mergePrm[CAM_STREAM_MERGE_IDX]));
/* SWOSD Link */// System_linkCreate(gVsysModuleContext.swOsdId, &swosdPrm, sizeof(swosdPrm));
/* IPC Links */ System_linkCreate(ipcOutVpssId, &ipcOutVpssPrm, sizeof(ipcOutVpssPrm)); System_linkCreate(ipcInVideoId, &ipcInVideoPrm, sizeof(ipcInVideoPrm));
/* Video Encoder Link */ System_linkCreate(gVencModuleContext.encId, &encPrm, sizeof(encPrm));// System_linkCreate(hdNullId, &hdNullPrm, sizeof(hdNullPrm)); /* VSTAB link */ System_linkCreate(vstabId, &vstabPrm, sizeof(vstabPrm));
/* IPC Bits Links */ System_linkCreate(gVencModuleContext.ipcBitsOutRTOSId, &ipcBitsOutVideoPrm, sizeof(ipcBitsOutVideoPrm)); System_linkCreate(gVencModuleContext.ipcBitsInHLOSId, &ipcBitsInHostPrm0, sizeof(ipcBitsInHostPrm0)); OSA_printf("USECASE SETUP DONE\n");
但是会一直打印[m3video] 188: SYSTEM: Attaching to [VPSS-M3]。。,不知道为什么
Chris Meng:
回复 Chris Meng:
Xin Jin,
如果怀疑是数据的问题,可以手动篡改一下编码输入的buffer数据。
数据问题让编码器挂起的概率一般来说是比较小的。