hi,
appro dm8127 3.2 RDK!
I want to get YUV image in A8 and do some proces in the YUV image. Then send the YUV back to M3Vpss. so the flow is:
camera link--->Dup--->Merger LInk-->IpcFramesOutLinkRTOS-->IpcFramesInLinkHLOS--> IpcFramesOutLinkHLOS-->IpcFramesInLinkRTOS-->swosd-->ipcOutVpss-->ipcInVideo
however, the M3 program get an error in IpcFramesInLink_putEmptyFrames. the following is the log info
[m3vpss ] Command 1 recived from HOST A8
[m3vpss ] 5615: CAMERA: Fields = 2 (fps = 0), Total Resets = 0 (Avg 0 ms per reset)
[host] MCFW_IPCFRAMES: Callback function:App_ipcFramesInCbFxn
[host] MCFW_IPCFRAMES:Received first frame notify...
[host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:FullFrameList numFullFrames:2
[host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0 fid:0 frameWidth:1920 frameHeight:1080 timeStamp:5708 virtAddr[0][0]:(nil) phyAddr[0][0]:0xb841c500
[host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:1 fid:0 frameWidth:720 frameHeight:480 timeStamp:5708 virtAddr[0][0]:(nil) phyAddr[0][0]:0xb9beb500
[host] Vdis_getEmptyVideoFrames:status 0 Num:0
[host] MCFW_IPCFRAMES:App_ipcFramesSendRecvFxn:INFO: periodic print.. [m3video] Channel:0 inputframerate:30 targetfps:60
[m3vpss ] 5745: Assertion @ Line: 562 in links_common/ipcFramesIn/ipcFramesInLink_tsk.c: pListElem->frameBuf.phyAddr[0][0] == pFrameBuf->addr[0][0] : failed !!!
[host] MCFW_IPCBITS: Callback function:App_ipcBitsInCbFxn
[host] MCFW_IPCBITS:App_ipcBitsRecvStreamFxn:INFO: periodic print.. [m3video] Channel:1 inputframerate:15 targetfps:60
the following is the code:
/* Merge Link params */
#ifdef YUV_FRAMES_TO_A8
mergePrm[CAM_STREAM_MERGE_IDX].numInQue = 2;
#else
mergePrm[CAM_STREAM_MERGE_IDX].numInQue = 3;
#endif
mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[0].prevLinkId = dupId[MJPEG_DUP_LINK_IDX];
mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[0].prevLinkQueId = 0;
if(gUI_mcfw_config.glbceEnable)
mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkId = ispId;
else
{
#ifdef RAW_FRAMES_TO_A8
mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkId = ispId;
#else
mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkId = gVcamModuleContext.cameraId;
#endif
}
mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkQueId = 1;
#ifdef YUV_FRAMES_TO_A8
//none
#else
mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[2].prevLinkId = dupId[MJPEG_DUP_LINK_IDX];
mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[2].prevLinkQueId = 1;
#endif
// mergePrm[CAM_STREAM_MERGE_IDX].outQueParams.nextLink = gVsysModuleContext.swOsdId;
mergePrm[CAM_STREAM_MERGE_IDX].notifyNextLink = TRUE;
#ifdef YUV_FRAMES_TO_A8
mergePrm[CAM_STREAM_MERGE_IDX].outQueParams.nextLink = gVcamModuleContext.ipcFramesOutVpssToHostId;
/* Set ipcFramesOutVpss link info */
ipcFramesOutVpssToHostPrm.baseCreateParams.noNotifyMode = TRUE;
ipcFramesOutVpssToHostPrm.baseCreateParams.notifyNextLink = FALSE;
ipcFramesOutVpssToHostPrm.baseCreateParams.notifyPrevLink = TRUE;
ipcFramesOutVpssToHostPrm.baseCreateParams.inQueParams.prevLinkId = mergeId[CAM_STREAM_MERGE_IDX];
ipcFramesOutVpssToHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcFramesOutVpssToHostPrm.baseCreateParams.outQueParams[0].nextLink = gVcamModuleContext.ipcFramesInHostId;
ipcFramesOutVpssToHostPrm.baseCreateParams.processLink = SYSTEM_LINK_ID_INVALID; //johnlin add
ipcFramesInHostPrm.baseCreateParams.noNotifyMode = TRUE;
ipcFramesInHostPrm.baseCreateParams.notifyNextLink = FALSE;
ipcFramesInHostPrm.baseCreateParams.notifyPrevLink = FALSE;
ipcFramesInHostPrm.baseCreateParams.inQueParams.prevLinkId = gVcamModuleContext.ipcFramesOutVpssToHostId;
ipcFramesInHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcFramesInHostPrm.baseCreateParams.outQueParams[0].nextLink =SYSTEM_LINK_ID_INVALID;//gVsysModuleContext.swOsdId;//SYSTEM_LINK_ID_INVALID;
ipcFramesInHostPrm.exportOnlyPhyAddr = TRUE;
ipcFramesInHostPrm.cbCtx = &gVcamModuleContext;
ipcFramesInHostPrm.cbFxn = Vcam_ipcFramesInCbFxn;
ipcFramesOutHostPrm.baseCreateParams.noNotifyMode = TRUE;
ipcFramesOutHostPrm.baseCreateParams.notifyNextLink = FALSE;
ipcFramesOutHostPrm.baseCreateParams.notifyPrevLink = FALSE;
ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkId = SYSTEM_LINK_ID_INVALID;
ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcFramesOutHostPrm.baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.ipcFramesInVpssFromHostId;
ipcFramesInVpssFromHostPrm.baseCreateParams.noNotifyMode = TRUE;
ipcFramesInVpssFromHostPrm.baseCreateParams.notifyNextLink = TRUE;
ipcFramesInVpssFromHostPrm.baseCreateParams.notifyPrevLink = FALSE;
ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkId = gVdisModuleContext.ipcFramesOutHostId;
ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcFramesInVpssFromHostPrm.baseCreateParams.outQueParams[0].nextLink = gVsysModuleContext.swOsdId;
#else
mergePrm[CAM_STREAM_MERGE_IDX].outQueParams.nextLink = gVsysModuleContext.swOsdId;
#endif
/* SWOSD Link Params */
#ifdef YUV_FRAMES_TO_A8
swosdPrm.inQueParams.prevLinkId = gVcamModuleContext.ipcFramesInHostId;//gVdisModuleContext.ipcFramesInVpssFromHostId; //johnlin
#else
swosdPrm.inQueParams.prevLinkId = mergeId[CAM_STREAM_MERGE_IDX];
#endif
swosdPrm.inQueParams.prevLinkQueId = 0;
swosdPrm.outQueParams.nextLink = ipcOutVpssId;
swosdPrm.frameSync = 0; // frame sync is
// not required
swosdPrm.frameSycChId = 0; // not used
/* IPC Out VPSS link params */
ipcOutVpssPrm.inQueParams.prevLinkId = 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;
Ti_mcfw_ipncframes.c
static Void * App_ipcFramesSendRecvFxn(Void * prm)
{
App_IpcFramesCtrlThrObj *thrObj = ( App_IpcFramesCtrlThrObj *) prm;
static Int printStatsInterval = 0;
VIDEO_FRAMEBUF_LIST_S bufList;
Int status;
#ifdef CUSTOM_SD_DEMO
App_ipcFramesFileOpen();
#endif
OSA_printf("MCFW_IPCFRAMES:%s:Entered...",__func__);
OSA_semWait(&thrObj->framesInNotifySem,OSA_TIMEOUT_FOREVER);
OSA_printf("MCFW_IPCFRAMES:Received first frame notify...");
while (FALSE == thrObj->exitFramesInOutThread)
{
status = Vcam_getFullVideoFrames(&bufList,0);
OSA_assert(0 == status);
if (bufList.numFrames)
{
App_ipcFramesPrintFullFrameListInfo(&bufList,"FullFrameList");
#ifdef CUSTOM_SD_DEMO
App_ipcFrameFileWrite(&bufList);
#endif
status = Vdis_putFullVideoFrames(&bufList);
OSA_assert(0 == status);
}
status = Vdis_getEmptyVideoFrames(&bufList,0);
OSA_assert(0 == status);
OSA_printf("Vdis_getEmptyVideoFrames:status %d Num:%d \n",status,bufList.numFrames);
if (bufList.numFrames)
{
App_ipcFramesPrintFullFrameListInfo(&bufList,"EmptyFrameList");
status = Vcam_putEmptyVideoFrames(&bufList);
OSA_assert(0 == status);
}
#ifdef IPC_FRAMES_DEBUG
if ((printStatsInterval % MCFW_IPCFRAMES_INFO_PRINT_INTERVAL) == 0)
{
OSA_printf("MCFW_IPCFRAMES:%s:INFO: periodic print..",__func__);
}
#endif
printStatsInterval++;
OSA_waitMsecs(MCFW_IPCFRAMES_SENDRECVFXN_PERIOD_MS);
}
#ifdef CUSTOM_SD_DEMO
if(gApp_ipcFramesCtrl.fileFrameWriteEnable)
{
if(gApp_ipcFramesCtrl.fileFrameWriteState==FILE_WRITE_RUNNING)
{
fclose(gApp_ipcFramesCtrl.fp);
OSA_printf(" Closing file [%s] for CH%d\n", gApp_ipcFramesCtrl.fileFrameWriteName, gApp_ipcFramesCtrl.fileFrameWriteChn);
}
}
#endif
OSA_printf("MCFW_IPCFRAMES:%s:Leaving...",__func__);
return NULL;
}
What should I do? Is there something that I miss to config? Or the current config is wrong? It's very strange. The custom dm8127 board work fine in the lowpower mode. However if I change the flow to get the YUV data in A8, the M3 vpss stop work after get the following assert. Any suggestion would be grateful. Thanks