This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

请教,mcfw的modifyFramePointer函数的意义是什么?

static Int32 modifyFramePointer(FVID2_Frame *pIpFrm, System_FrameInfo *pFInfo,
Bool addOffset)
{
Int32 offset[2], bytesPerPixel;
System_LinkChInfo *rtInfo;

rtInfo = &pFInfo->rtChInfo;

if(rtInfo->dataFormat == SYSTEM_DF_YUV422I_YUYV)
bytesPerPixel = 2;
else
bytesPerPixel = 1;

offset[0] = rtInfo->pitch[0] * rtInfo->startY +
rtInfo->startX * bytesPerPixel;
offset[1] = rtInfo->pitch[1] * rtInfo->startY / 2 +
rtInfo->startX * bytesPerPixel;

if(addOffset == FALSE)
{
offset[0] = -offset[0];
offset[1] = -offset[1];
}

pIpFrm->addr[0][0] = (Ptr) ((Int32)pIpFrm->addr[0][0] + offset[0]);
pIpFrm->addr[0][1] = (Ptr) ((Int32)pIpFrm->addr[0][1] + offset[1]);

return FVID2_SOK;
}