为什么从 Tango Support C-API 返回的图像步幅很奇怪?

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

有人发现类似的问题:奇怪的 image.stride 在 Tango 支持 C-API 中由 TangoSupport_getLatestImageBufferAndNewDataFlag 返回(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 );
}
....

输出为:

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 ...

指针和宽度看起来不错。但是步幅看起来很奇怪。

这是Tango端的问题,当前版本(T版)已经修复。