Search code examples
google-project-tango

Why the stride of image returned from Tango Support C-API is strange?


Anyone find similar issue: Strange image.stride returned by TangoSupport_getLatestImageBufferAndNewDataFlag in Tango Support C-API (Qianru July, 2016) ?

.....

TangoImageBuffer* b = nullptr;

TangoSupport_getLatestImageBufferAndNewDataFlag(image_buffer_manager, &b,   &new_image);

if(new_image)
{
    LOGE("b: %p: width %zu, stride %zu", b, b->width, b->stride );
}
....

The output is:

b: 0x4cdd3ca8: width 1280, stride 7471215
b: 0x4cdd3c78: width 1280, stride 0
b: 0x4cbbe500: width 1280, stride 6881398
b: 0x4cdd3ca8: width 1280, stride 7471215
.... repeat from the above line ...

Pointer, and width look fine. But the stride looks strange.


Solution

  • This is a problem on the Tango side, and it's fixed in the currently release (T release).