A8送入yuv420sp的1080P的数据到VideoM3 进行jpeg编码后,然后在传到A8,发现图像有问题,图像是绿的,将jpeg从工具在转换到yuv420sp,用yuv工具看,发现Y分量是正确的,UV分量有问题;哪位高手帮忙看下;
link的流程如下:
A8--->IpcFramesOutLink-->videoM3(jpeg编码)->A8
建IpcFramesOutLink的代码如下,link建好后,调用IpcFramesOutLink_putFullVideoFrames 将yuv420sp的数据送入到IpcFramesOutLink:
A8SysLinkInfo.numCh = 1;
A8SysLinkInfo.chInfo[0].bufType = SYSTEM_BUF_TYPE_VIDFRAME;//0;
A8SysLinkInfo.chInfo[0].codingformat = 0;
A8SysLinkInfo.chInfo[0].dataFormat = SYSTEM_DF_YUV420SP_UV;
A8SysLinkInfo.chInfo[0].memType = SYSTEM_MT_NON
tiLEDMEM;//0;
A8SysLinkInfo.chInfo[0].startX = 0;
A8SysLinkInfo.chInfo[0].startY = 0;
A8SysLinkInfo.chInfo[0].width = g_ImageWidth; //1920
A8SysLinkInfo.chInfo[0].height = g_ImageHeight; //1080
A8SysLinkInfo.chInfo[0].scanFormat = SYSTEM_SF_PROGRESSIVE;//1;
A8SysLinkInfo.chInfo[0].pitch[0] = g_ImageWidth;
A8SysLinkInfo.chInfo[0].pitch[1] = g_ImageWidth;
A8SysLinkInfo.chInfo[0].pitch[2] = 0;
//link1
create_host_frameout_link(ipcFramesOutHostId, ipcFramesInVideoId, A8SysLinkInfo);
create_host_frameout_link函数如下:
void create_host_frameout_link(UInt32 ipcFramesOutHostId, UInt32 nextLinkId,System_LinkQueInfo queInfo)
[
IpcFramesOutLinkHLOS_CreateParams ipcFramesOutHostPrm;
MULTICH_INIT_STRUCT(IpcFramesOutLinkHLOS_CreateParams ,ipcFramesOutHostPrm);
ipcFramesOutHostPrm.baseCreateParams.noNotifyMode = FALSE;
ipcFramesOutHostPrm.baseCreateParams.notifyNextLink = TRUE;
ipcFramesOutHostPrm.baseCreateParams.notifyPrevLink = FALSE;
ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkId = SYSTEM_LINK_ID_INVALID;
ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcFramesOutHostPrm.baseCreateParams.outQueParams[0].nextLink = nextLinkId;
ipcFramesOutHostPrm.baseCreateParams.numOutQue=1;
ipcFramesOutHostPrm.baseCreateParams.notifyProcessLink=FALSE;
ipcFramesOutHostPrm.cbFxn = rdk_frames_out_cbfxn;
ipcFramesOutHostPrm.cbCtx = NULL;
gVdisModuleContext.ipcFramesOutHostId = ipcFramesOutHostId;
ipcFramesOutHostPrm.inQueInfo = queInfo ;
System_linkCreate(ipcFramesOutHostId, &ipcFramesOutHostPrm, sizeof(ipcFramesOutHostPrm));
]