NV21M is a two-memory-plane semiplanar pixel format for eight-bit YCbCr with 4:2:0 chroma subsampling. Like NV21, its colour-difference plane stores Cr before Cb in each pair. Unlike ordinary contiguous NV21, the two image memory planes can have independent allocations.[ref]
Planar YUV formats in the Linux Kernel documentation. Semi-Planar table and NV12/NV21/NV12M/NV21M subsection
For an original example, stipulate an accepted width-four, height-four layout whose luma plane begins at 1000 with an eight-byte framebuffer stride, while its Cr/Cb plane begins at 5000 with a four-byte stride. Luma position is at . The corresponding subsampled cell has Cr at and Cb at 5007. This ordering is the reverse of NV12M.
The active sample count is bytes. The declared allocation sizes are bytes because luma rows have padding. Neither 40 nor 24 is an offset that can replace the explicitly supplied second-plane base.
A layout conversion to NV12M can exchange the two bytes in each active colour-difference pair while respecting each plane's stride. It does not require changing luma values or reducing the colour sample count. By contrast, choosing a different YCbCr matrix would be a colour conversion.
The distinction between a multi-planar format and the V4L2 multi-planar API matters here: the interface can carry formats with different memory organizations, while the format identifies which organization the supplied descriptors represent.[ref]
Single- and multi-planar APIs in the Linux Kernel documentation. §1.26.1, API versus format
New to topics? Read the docs here!