STRUCT V4L2_MBUS_FRAMEFMT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct v4l2_mbus_framefmt(9) β€” the Kernel API Manual glow-up

okay so bestie, this is a page straight out of the kernel's media-bus era, and it's literally the struct that says "here's what a frame looks like on the media bus." no cap, it's the blueprint. ✨


🌸 NAME 🌸

struct v4l2_mbus_framefmt β€” frame format on the media bus πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

like, here's the whole shape of it, exactly as it lives:

struct v4l2_mbus_framefmt {
    __u32 width;
    __u32 height;
    __u32 code;
    __u32 field;
    __u32 colorspace;
    union {
      __u16 ycbcr_enc;
      __u16 hsv_enc;
    };
    __u16 quantization;
    __u16 xfer_func;
    __u16 flags;
    __u16 reserved[10];
 };

πŸ’– Members πŸ’–

okay so these are the members, and each one is doing its own little main-character thing:

  • width β€” image width, fr fr. πŸ“
  • height β€” image height, the other half of the vibe check. πŸ“
  • code β€” the data format code, straight from enum v4l2_mbus_pixelcode. this is the iykyk field. πŸ”₯
  • field β€” the used interlacing type, from enum v4l2_field. and heads up bestie: it's zero for metadata mbus codes. πŸ‘‘
  • colorspace β€” the colorspace of the data, from enum v4l2_colorspace. also zero on metadata mbus codes. 🌈
  • {unnamed_union} β€” anonymous. she has no name but she's iconic. πŸ’…
    • ycbcr_enc β€” the YCbCr encoding of the data, from enum v4l2_ycbcr_encoding. yep, zero for metadata mbus codes. πŸ“
    • hsv_enc β€” the HSV encoding of the data, from enum v4l2_hsv_encoding. also zero for metadata mbus codes. 🌸
  • quantization β€” the quantization of the data, from enum v4l2_quantization. again: zero for metadata mbus codes. ✨
  • xfer_func β€” the transfer function of the data, from enum v4l2_xfer_func. and yes, zero for metadata mbus codes. 🧚
  • flags β€” flags, aka the V4L2_MBUS_FRAMEFMT_* crew. πŸŽ€
  • reserved β€” reserved bytes that can be later used. she's literally just sitting there holding space for future her. πŸ’œ
ok but the "zero for metadata mbus codes" thing comes up like five times and that is not a coincidence, bestie β€” that's just how this struct rolls for metadata codes. πŸ™ˆ

⭐ SEE ALSO ⭐

  • Kernel file ./include/uapi/linux/v4l2-mediabus.h β€” go read her, she ate. 🫢

and that's the whole page, periodt. πŸ’€ source is ./include/uapi/linux, dated October 2026, and the manual is literally called struct v4l2_mbus_framefmt(9) in case you forgot already. mwah πŸ’‹ πŸ¦‹

πŸ“¦ where this page comes from