V4L2 plane data offset

ID: v4l2-plane-data-offset

The V4L2 plane data offset is the byte distance from the beginning of an image memory plane to its image data. It is the data_offset member of a V4L2 plane descriptor. In this interface, bytesused includes that prefix, so the image-data extent is bytesused - data_offset.[ref]
Write for data_offset, for bytesused and for the plane's length, all in bytes. A consistent nonnegative extent satisfies
If is the mapped plane-base address, the image begins at and ends immediately before . This is an offset within a plane, distinct from the descriptor's mem_offset used when arranging a memory mapping.
For an original bounds example, stipulate , and . The image occupies 5888 bytes beginning at byte offset 256. Its last byte is at offset 6143. Taking a length of 6144 from the shifted starting address would instead read through offset 6399, including 256 bytes beyond the declared extent. Conversely, discarding the prefix twice would lose 256 valid bytes.
The offset does not specify framebuffer stride or component order. Once the correct image start is found, the negotiated pixel format still determines how rows and color components are read. A correct extent prevents a boundary mistake; it does not by itself establish that the samples represent the intended image.

New to topics? Read the docs here!