[libcamera-devel] Regression in commit 86a47fdcd97350bd979a4d6b00124330a3b02441

David Plowman david.plowman at raspberrypi.com
Fri Sep 3 15:21:06 CEST 2021


Hi everyone

We're having a bit of a problem with this commit ("libcamera:
framebuffer: Add offset to FrameBuffer::Plane").

We use only single plane buffers in all our code and previously
FrameBuffers would advertise having only one plane
(frameBuffer.planes().size() would be 1), and the length would be the
full length of the plane (all of the Y and U and V pixels). We'd use
this information to mmap the buffer and give us a pointer. And in
fact, we'd quite often check that there's only one plane because (for
example) our codec driver doesn't support mplane formats.

Since this commit, everything is now showing up as 3 planes, and each
has a length field just for a part of the plane, so the first "plane"
would just be the Y, and so on.

Now, I can loop through all the planes with the same fd and add up all
the lengths, and then mmap my buffer as before, but I guess I'm
wondering why this has changed. After all, it's *not* a multi-plane
buffer and we want to know, only now it seems harder to tell the
difference.

Any thoughts?

Thanks!
David


More information about the libcamera-devel mailing list