I 'm refering to the sample code “tegra_multimedia_api\argus\samples\yuvJpeg” to get sersor image data
Image *image = iFrame->getImage();
IImage *iImage = interface_cast<IImage>(image);
IImage2D *iImage2D = interface_cast<IImage2D>(image);
for (uint32_t i = 0; i < <b>iImage->getBufferCount()</b>; i++)
{
const uint8_t *d = static_cast<const uint8_t*>(iImage->mapBuffer(i));
if (!d)
ORIGINATE_ERROR("\tFailed to map buffer\n");
Size2D<uint32_t> size = iImage2D->getSize(i);
CONSUMER_PRINT("\tIImage(2D): "
"buffer %u (%ux%u, %u stride), "
"%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
i, size.width(), size.height(), iImage2D->getStride(i),
d[0], d[1], d[2], d[3], d[4], d[5],
d[6], d[7], d[8], d[9], d[10], d[11]);
}
the debug message show there are two getBufferCount. the sensor output resolution is 1280X1024
the first buffer size is 1280X1024 and the second buffer size is 640X512 .
the first is Y data and the second is CbCr, is it right?
if no, Would you please explain the two buffer for me?
Thanks,
Martin