hi,all,
My env: dm8168 and dvr rdk 4.0 my chains:
I wate to use ipcFrame link to get yuv420 data,then ,save this data to a file(test.yuv).
my issue:
(1) The test.yuv file can not be played.but display is right.
(2) when change some links,use the ipcframeLink after swLink (out data format is yuv422 ) ,so my chains:DEC-SW-IPCFRAME-DIS .the test.yuv file is OK.
My main code:
while (FALSE == ipcFramesCtrl.thrObj.exitFramesInOutThread)
{
status = Vcap_getFullVideoFrames(&bufList,0);
OSA_assert(0 == status);
if (bufList.numFrames)
{
for(frameId=0;frameId<bufList.numFrames;frameId++)
{
pBuf = &bufList.frames[frameId];
//frameSize = (pBuf->frameWidth * pBuf->frameHeight) << 1; //for yuv422
frameSize = (pBuf->frameWidth * pBuf->frameHeight) *1.5; //yuv420
UInt32 pMemVirtAddr;
pMemVirtAddr = 0;
VcapVenc_mMap((UInt32)(pBuf->phyAddr[0][0]), frameSize, &pMemVirtAddr);
fwrite((Ptr) pMemVirtAddr,1,frameSize,YUV_Fp);
VcapVenc_unmapMem();
}
}
status = Vdis_putFullVideoFrames(&bufList);
OSA_assert(0 == status);
}
my question:
To get yuv422 data is right , How to get the correct yuv420 data?
Need your help,thank you.