STRUCT V4L2_PIX_FORMAT_MPLANE(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐ŸŒธ struct v4l2_pix_format_mplane(9) ๐ŸŒธ

okay so bestie, we're in the Kernel API Manual today and this is literally the page for struct v4l2_pix_format_mplane โ€” the multiplanar format definition. she's giving pixel-format royalty, no cap ๐Ÿ’…


โœจ NAME โœจ

struct v4l2_pix_format_mplane โ€” multiplanar format definition ๐ŸŽ€


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

struct v4l2_pix_format_mplane {
    __u32 width;
    __u32 height;
    __u32 pixelformat;
    __u32 field;
    __u32 colorspace;
    struct v4l2_plane_pix_format    plane_fmt[VIDEO_MAX_PLANES];
    __u8 num_planes;
    __u8 flags;
    union {
      __u8 ycbcr_enc;
      __u8 hsv_enc;
    };
    __u8 quantization;
    __u8 xfer_func;
    __u8 reserved[7];
 };

like, look at her. so organized. so structured. main character energy fr fr โœจ


๐Ÿ’– Members ๐Ÿ’–

  • width โ€” image width in pixels ๐Ÿ“
  • height โ€” image height in pixels ๐Ÿ“
  • pixelformat โ€” little endian four character code (fourcc) ๐Ÿ”ค โ€” yes bestie, fourcc, four characters, it's exactly what it sounds like
  • field โ€” enum v4l2_field; the field order (this one's for interlaced video, iykyk) ๐ŸŽž๏ธ
  • colorspace โ€” enum v4l2_colorspace; supplemental to pixelformat ๐ŸŒˆ โ€” think of it as the supporting actress, not the lead
  • plane_fmt โ€” per-plane information ๐Ÿ—‚๏ธ โ€” every plane gets her own little moment
  • num_planes โ€” number of planes for this format ๐Ÿ”ข
  • flags โ€” format flags (V4L2_PIX_FMT_FLAG_*) ๐Ÿšฉ
  • {unnamed_union} โ€” anonymous ๐Ÿ‘ป โ€” she has no name and she doesn't need one
  • ycbcr_enc โ€” enum v4l2_ycbcr_encoding, Y'CbCr encoding ๐ŸŽจ
  • hsv_enc โ€” enum v4l2_hsv_encoding, HSV encoding ๐ŸŽจ โ€” same union energy as ycbcr_enc, pick your fighter
  • quantization โ€” enum v4l2_quantization, colorspace quantization ๐Ÿงฎ
  • xfer_func โ€” enum v4l2_xfer_func, colorspace transfer function ๐ŸŒ€
  • reserved โ€” drivers and applications must zero this array โš ๏ธ โ€” not "should", not "maybe", must. zero her out, bestie, that's the whole vibe check ๐Ÿ™ˆ

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

Kernel file ./include/uapi/linux/videodev2.h

  • struct v4l2_capability(9)
  • struct v4l2_plane(9)
  • struct v4l2_buffer(9)
  • v4l2_timeval_to_ns(9)
  • struct v4l2_exportbuffer(9)
  • struct v4l2_selection(9)
  • struct v4l2_plane_pix_format(9)
  • struct v4l2_sdr_format(9)
  • struct v4l2_meta_format(9)
  • struct v4l2_format(9)
  • struct v4l2_event_motion_det(9)
  • struct v4l2_create_buffers(9)
  • struct v4l2_remove_buffers(9)

like, that's the whole friend group right there. go say hi ๐Ÿซถ


ngl the one thing to actually remember: reserved has to be zeroed by both drivers and applications. that's not a suggestion, that's the rule ๐Ÿ’€

โญ that's the page!! brought to you by ./include/uapi/linux, dated October 2026, and yes the footer still says struct v4l2...ormat_mplane(9) because the kernel is dramatic and truncates her name for the header. slay, honestly ๐Ÿ‘‘๐Ÿ’œ

๐Ÿ“ฆ where this page comes from