YUYV&YV12&mtk6763
stImgInOut.stImgInfo.enImageType = UV_IMAGE_TYPE_YV12;
stImgInOut.stImgInfo.as32Pitch[0] = pStreamImgBuf->getImgWidthStride(0);
stImgInOut.stImgInfo.as32Pitch[1] = pStreamImgBuf->getImgWidthStride(1);
stImgInOut.stImgInfo.as32Pitch[2] = pStreamImgBuf->getImgWidthStride(2);
stImgInOut.stImgInfo.pau8Plane[0] = (uvUInt8*)pStreamImgBuf->getVirAddr();
stImgInOut.stImgInfo.pau8Plane[1] = stImgInOut.stImgInfo.pau8Plane[0] + stImgInOut.stImgInfo.as32Pitch[0] * stImgInOut.stImgInfo.s32Height;
stImgInOut.stImgInfo.pau8Plane[2] = stImgInOut.stImgInfo.pau8Plane[1] + ((stImgInOut.stImgInfo.as32Pitch[1] * stImgInOut.stImgInfo.s32Height)>>1);
stImgInOut.stImgInfo.enImageType = UV_IMAGE_TYPE_YUYV;
stImgInOut.stImgInfo.as32Pitch[0] = pStreamImgBuf->getImgWidthStride(0) << 1;
stImgInOut.stImgInfo.pau8Plane[0] = (uvUInt8*)pStreamImgBuf->getVirAddr();
DUMP:
char file_name[128] = {'\0'};
memset(file_name,'\0',sizeof(file_name));
sprintf(file_name,"sdcard/uvfbpre/fbpre_befor_%dx%d.yuv",pStreamImgBuf->getImgWidth(),pStreamImgBuf->getImgHeight());
FILE *fp = fopen(file_name, "wb");
if (NULL != fp)
{
if(stImgInOut.stImgInfo.enImageType == UV_IMAGE_TYPE_YUYV)
{
fwrite(stImgInOut.stImgInfo.pau8Plane[0], 1,pStreamImgBuf->getBufSize(), fp);
}
else if(stImgInOut.stImgInfo.enImageType == UV_IMAGE_TYPE_YV12)
{
// fwrite(stImgInOut.stImgInfo.pau8Plane[0], 1,pStreamImgBuf->getImgWidthStride(0)*pStreamImgBuf->getImgHeight(), fp);
// fwrite(stImgInOut.stImgInfo.pau8Plane[1], 1,(pStreamImgBuf->getImgWidthStride(1)*pStreamImgBuf->getImgHeight())>>1, fp);
// fwrite(stImgInOut.stImgInfo.pau8Plane[2], 1,(pStreamImgBuf->getImgWidthStride(2)*pStreamImgBuf->getImgHeight())>>1, fp);
//上面这种方式针对YV12三个平面不连续的dump方式
fwrite(stImgInOut.stImgInfo.pau8Plane[0], 1,pStreamImgBuf->getBufSize(), fp);
}