图形流程:

IPC Frames Out-----><Process Link>----->IPC Frames In DSP ----->AlgLink(SWOSD)


代码流程

IpcFramesInLinkRTOS_CreateParams ipcFramesInDspPrm;
IpcFramesOutLinkRTOS_CreateParams ipcFramesOutVpssPrm;
AlgLink_CreateParams osdPrm;

IpcFramesInLinkRTOS_CreateParams_Init(&ipcFramesInDspPrm);
IpcFramesOutLinkRTOS_CreateParams_Init(&ipcFramesOutVpssPrm);
AlgLink_CreateParams_Init(&osdPrm);

ipcFramesOutVpssId = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_0;
ipcFramesInDspId = SYSTEM_DSP_LINK_ID_IPC_FRAMES_IN_0;
osdId = SYSTEM_LINK_ID_ALG_0  ;

#if 1

//FramesOutvpss
ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkId =mergeId1;
ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcFramesOutVpssPrm.baseCreateParams.notifyPrevLink = TRUE;
ipcFramesOutVpssPrm.baseCreateParams.numOutQue = 1;
ipcFramesOutVpssPrm.baseCreateParams.outQueParams[0].nextLink = dupId1;//ipcOutVpssId;//displayId;
ipcFramesOutVpssPrm.baseCreateParams.notifyNextLink = TRUE;


//processLink
ipcFramesOutVpssPrm.baseCreateParams.processLink = ipcFramesInDspId;
ipcFramesOutVpssPrm.baseCreateParams.notifyProcessLink = TRUE;
ipcFramesOutVpssPrm.baseCreateParams.noNotifyMode = FALSE;


//prevLink->processLink->nextLink
ipcFramesInDspPrm.baseCreateParams.inQueParams.prevLinkId = ipcFramesOutVpssId;
ipcFramesInDspPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcFramesInDspPrm.baseCreateParams.numOutQue   = 1;
ipcFramesInDspPrm.baseCreateParams.outQueParams[0].nextLink = osdId;
ipcFramesInDspPrm.baseCreateParams.notifyPrevLink = FALSE;// TRUE;
ipcFramesInDspPrm.baseCreateParams.notifyNextLink = TRUE;
ipcFramesInDspPrm.baseCreateParams.noNotifyMode   = TRUE;//FALSE;


osdPrm.inQueParams.prevLinkId = ipcFramesInDspId;
osdPrm.inQueParams.prevLinkQueId = 0;


osdPrm.enableOSDAlg = TRUE;


for(chId = 0; chId < ALG_LINK_OSD_MAX_CH; chId++)
{
AlgLink_OsdChWinParams * chWinPrm = &osdPrm.osdChCreateParams[chId].chDefaultParams;


/* set osd window max width and height */
osdPrm.osdChCreateParams[chId].maxWidth  = 720;
osdPrm.osdChCreateParams[chId].maxHeight = 576;


chWinPrm->chId = chId;
chWinPrm->numWindows = 0;
}

for(i=0;i<8;i++){///改有多少窗口有osd显示

osdFormat[i]=SYSTEM_DF_YUV420SP_UV;

}               

Demo_osdInit(8,osdFormat);///
#endif

System_linkCreate(ipcFramesOutVpssId, &ipcFramesOutVpssPrm, sizeof(ipcFramesOutVpssPrm));
System_linkCreate(ipcFramesInDspId, &ipcFramesInDspPrm, sizeof(ipcFramesInDspPrm));
System_linkCreate(osdId , &osdPrm, sizeof(osdPrm));


System_linkStart(osdId);
System_linkStart(ipcFramesInDspId);
System_linkStart(ipcFramesOutVpssId);
有什么不对,下面可以给我留言!!!技术需要交流

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐