Image memory plane 2026-11-05
An image memory plane is a separately described region of stored image data within a video frame or pixel buffer. It is a memory-organization concept, distinct from a component plane or a bit plane. One memory plane can contain several interleaved components, while one image can use several memory planes.[ref]
For example, NV12M uses one memory plane for luma and another for alternating Cb/Cr samples. It therefore has two memory planes but three colour components. NV21M uses the same plane count with the colour-difference pair order reversed. Their 4:2:0 chroma subsampling specifies sample counts; it does not turn the two components in the second plane into separate allocations.
Allocation capacity and video buffer payload also differ. A V4L2 plane descriptor records length, bytesused and a V4L2 plane data offset. In that API, bytesused includes the offset before the actual image data, so the image-data extent is
The allocation size is a separate limit.[ref]
For an original example, stipulate length = 4096, bytesused = 3072 and data_offset = 128, all in bytes. The image data begin128 bytes after the plane base and span2944 bytes, ending at base offset3072. They occupy neither the full4096-byte allocation nor all3072 bytes preceding that endpoint. The necessary bounds are
A consumer must combine these extents with the actual pixel format and framebuffer stride. A plane's capacity alone does not identify where a particular component or row begins.
V4L2 plane descriptor 2026-11-05
A V4L2 plane descriptor is a v4l2_plane structure describing one image memory plane in the V4L2 multi-planar API. The containing v4l2_buffer refers to an array of these descriptors. Each descriptor records storage capacity, occupied extent and the V4L2 plane data offset; its storage reference depends on the selected input-output method.[ref]
The two structures use length for different quantities. The container's length counts descriptor-array elements; a plane descriptor's length counts bytes. Neither is automatically the active image extent. For a stipulated two-plane NV12M buffer, suppose the plane capacities are 8192 and 4096 bytes, with occupied extents 7000 and 3500 bytes and zero data offsets. Then the container describes two planes, storage capacity totals 12288 bytes, and occupied data total 10500 bytes. These are three different measurements of the same buffer.
For capture, the device driver supplies the occupied extent and data offset; for output, the application supplies them. A consumer combines those values with the negotiated pixel format and framebuffer stride. Describing two planes does not imply two colour components: NV12M has a luma plane and another containing both colour-difference components.
A descriptor describes access to image storage; it does not itself contain an image-sized copy. Two equal descriptor counts can therefore describe different allocations, different component arrangements or different amounts of valid data. The video buffer payload and its layout must be interpreted separately.
Video device node 2026-11-05
A video device node is a device node through which an application accesses a supported video or metadata interface in Video4Linux. A conventional path is /dev/video0, but the name identifies a kernel interface rather than a persistent physical-camera identity. Device drivers register the interfaces, and applications open them to obtain file descriptors for the appropriate operations.[ref]
A single hardware peripheral can expose several interfaces. Conversely, a path numbered zero can refer to different hardware after discovery order changes. The kernel documentation identifies /dev/v4l/by-id/ and /dev/v4l/by-path/ links as alternatives for identifying devices independently of transient numbering.[ref]
For an original selection example, suppose cameras A and B are discovered in that order and receive paths /dev/video0 and /dev/video1. On another boot B is discovered first, reversing those assignments. A configuration containing only /dev/video0 then selects a different camera while remaining a valid path. Identifying the intended hardware and querying the opened interface's capabilities addresses two separate questions.
The returned file descriptor refers to an open instance; it is not the camera number. An application may receive descriptor 7 when opening /dev/video0, and another application may also have a descriptor 7 referring to another object in its own descriptor table. File descriptors are local process handles, while the device path belongs to the file system namespace.
Before interpreting data, query the interface with VIDIOC_QUERYCAP and negotiate its supported pixel format. A video device node alone does not imply support for NV12M, a chosen image size or the V4L2 multi-planar API. The resulting image memory planes and video buffer payload must follow the actual negotiated interface.