TI中文支持网
TI专业的中文技术问题搜集分享网站

DM8148ipc channel创建失败

各位大侠,

我的link大致顺序是ipcBitOut->ipcBitsIn->VDec->ipcOutM3->ipcInM3->Swms->Display

link create没问题,但是在动态创建解码通道的时候,dec channel成功之后,ipc channel创建失败,不知道是什么原因

int decCreateChannel(uint32_t chn, uint32_t width, uint32_t height)
{
 YOSA_LOGGER_INFO(MODULE "DEC chn%d_create\n", chn);

 DecLink_addChannelInfo params;
 IpcBitsOutHLOSLink_createChBufParams ipcBufCreateParams;
 Int32 status = 0;

 if (chn >= MAX_DEC_CHANNEL_NUM)
 return OSA_EFAIL;

 memset(&params, 0, sizeof(DecLink_addChannelInfo));
 params.chId = chn;
 params.chInfo.width = width;
 params.chInfo.height = height;
 params.chInfo.scanFormat = 1;
 params.createPrm.targetMaxWidth = width;
 params.createPrm.targetMaxHeight = height;
 params.createPrm.defaultDynamicParams.targetFrameRate = 30; //Not used
 params.createPrm.defaultDynamicParams.targetBitRate = 4 * 1000 * 1000; //Not used;
 params.createPrm.displayDelay = 0; //Have been tested. The different number affect nothing.
 params.createPrm.numBufPerCh = 6;
 params.createPrm.processCallLevel = VDEC_FRAMELEVELPROCESSCALL;
 params.createPrm.dpbBufSizeInFrames = IH264VDEC_DPB_NUMFRAMES_AUTO;
 params.createPrm.algCreateStatus = DEC_LINK_ALG_CREATE_STATUS_CREATE;
 params.createPrm.decodeFrameType = 0;
 params.createPrm.fieldMergeDecodeEnable = FALSE;
 params.createPrm.tilerEnable = FALSE;
 params.createPrm.format = IVIDEO_H264HP;
 params.createPrm.profile = IH264VDEC_PROFILE_ANY;
 params.createPrm.decodeFrameType = VDEC_DECODE_IP_ONLY;

 status = System_linkControl(SYSTEM_LINK_ID_VDEC_0
, DEC_LINK_CMD_CREATE_CHANNEL,&params,sizeof(params), TRUE);

 if (status != 0)
 {
 YOSA_LOGGER_ERROR(MODULE "failed to create dec channel '%d, %d*%d'\n", chn, width, height);
 return OSA_EFAIL;
 }

 memset(&ipcBufCreateParams, 0, sizeof(ipcBufCreateParams));
 ipcBufCreateParams.chId = chn;
 ipcBufCreateParams.totalBitStreamBufferSize =
 (width * height * params.createPrm.numBufPerCh);
 ipcBufCreateParams.chMaxReqBufSize = width * height;
 ipcBufCreateParams.maxQueueDepth = MAX_BUFFERING_QUEUE_LEN_PER_CH;
 status = System_linkControl(
SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0
, IPCBITSOUT_LINK_CMD_CREATE_CH_BUFFER,
 &ipcBufCreateParams, sizeof(ipcBufCreateParams), TRUE);
 if (status != 0)
 {
 YOSA_LOGGER_ERROR(MODULE "failed to create ipc channel '%d, %d*%d'\n", chn, width, height);

 // delete dec chn
 DecLink_ChannelInfo decChnInfo;
 memset(&decChnInfo, 0, sizeof(DecLink_ChannelInfo));
 decChnInfo.chId = chn;
 status = System_linkControl(SYSTEM_LINK_ID_VDEC_0
,
 DEC_LINK_CMD_DELETE_CHANNEL, &decChnInfo, sizeof(decChnInfo), TRUE);
 return OSA_EFAIL;
 }

 return OSA_SOK;
}

就是在
status = System_linkControl(SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0
, IPCBITSOUT_LINK_CMD_CREATE_CH_BUFFER,
 &ipcBufCreateParams, sizeof(ipcBufCreateParams), TRUE);
返回了错误
Chris Meng:

你好,

你的chain和dvr rdk的decode only的例子是很类似的,你有参考过么?

赞(0)
未经允许不得转载:TI中文支持网 » DM8148ipc channel创建失败
分享到: 更多 (0)