STRUCT V4L2_MBUS_FRAMEFMT(9)
π 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 fromenum v4l2_mbus_pixelcode. this is the iykyk field. π₯fieldβ the used interlacing type, fromenum v4l2_field. and heads up bestie: it's zero for metadata mbus codes. πcolorspaceβ the colorspace of the data, fromenum 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, fromenum v4l2_ycbcr_encoding. yep, zero for metadata mbus codes. πhsv_encβ the HSV encoding of the data, fromenum v4l2_hsv_encoding. also zero for metadata mbus codes. πΈ
quantizationβ the quantization of the data, fromenum v4l2_quantization. again: zero for metadata mbus codes. β¨xfer_funcβ the transfer function of the data, fromenum v4l2_xfer_func. and yes, zero for metadata mbus codes. π§flagsβ flags, aka theV4L2_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms