STRUCT V4L2_PLANE_PIX_FORMAT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct v4l2_plane_pix_format(9) β€” from the Kernel API Manual, bestie

okay so this is the page for struct v4l2_plane_pix_format(9), straight out of the Kernel API Manual, and it's genuinely one of the shorter reads you'll get in here β€” like, a little baby struct, but a main character little baby struct. it does one job and it does it slayfully: it's the additional, per-plane format definition. that's the whole vibe. πŸŽ€


✨ NAME ✨

struct v4l2_plane_pix_format β€” the extra, per-plane format definition. yes, additional. yes, per-plane. it's giving "each plane gets its own little outfit" πŸ¦‹


🌸 SYNOPSIS 🌸

here's the whole thing, copy it exactly, don't be weird about it:

struct v4l2_plane_pix_format {
    __u32 sizeimage;
    __u32 bytesperline;
    __u16 reserved[6];
 };

like, look at her. three fields. zero drama. iconic. ✨


πŸ’– Members πŸ’–

okay so the members, one by one, no skipping, we don't do that here:

  • sizeimage β€” the maximum size in bytes required for data, for which this plane will be used. so it's the ceiling, not the vibe-check average. max bytes, this plane, that's the assignment πŸ’…
  • bytesperline β€” the distance in bytes between the leftmost pixels in two adjacent lines. literally just how far apart the leftmost pixels of neighbouring lines sit, measured in bytes. that's it. that's the whole field 🫢
  • reserved β€” drivers and applications must zero this array. not "should", not "maybe", must. zero it. it's an array of 6, it's __u16, zero it, we're not doing uninitialised reserved bytes in this house 😭
ok real talk bestie β€” the reserved one is a rule, not a suggestion. both sides (driver and app) zero it. no cap.

πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, so you can go read the rest of the lore:

  • Kernel file ./include/uapi/linux/videodev2.h β€” the actual home turf of this struct, go say hi
  • 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_pix_format_mplane(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)

and that's the page!! 🧚 tiny struct, huge responsibility, zero notes. go zero that reserved array and live your truth. mwah πŸ’œ

okay bye ily, this page came from ./include/uapi/linux, dated October 2026, and it's the struct v4l2_...e_pix_format(9) page β€” you got the whole thing, see you in the next one bestie πŸŒˆβ­πŸ“

πŸ“¦ where this page comes from