STRUCT FIMC_FMT(9)
π struct fimc_fmt(9)
okay bestie, welcome to the Kernel API Manual β¨ β this is the page for struct fimc_fmt(9), aka the color format data structure. it's giving "small struct, big responsibilities" and honestly? we love her for it. π
πΈ NAME πΈ
struct fimc_fmt β the color format data structure. that's it, that's the vibe. she holds the format tea and she holds it well. π
β¨ SYNOPSIS β¨
okay so here's the whole struct laid out, no cap, copy it verbatim bestie:
struct fimc_fmt {
u32 mbus_code;
u32 fourcc;
u32 color;
u16 memplanes;
u16 colplanes;
u8 colorspace;
u8 depth[FIMC_MAX_PLANES];
u16 mdataplanes;
u16 flags;
#define FMT_FLAGS_CAM (1 << 0);
#define FMT_FLAGS_M2M_IN (1 << 1);
#define FMT_FLAGS_M2M_OUT (1 << 2);
#define FMT_FLAGS_M2M (1 << 1 | 1 << 2);
#define FMT_HAS_ALPHA (1 << 3);
#define FMT_FLAGS_COMPRESSED (1 << 4);
#define FMT_FLAGS_WRITEBACK (1 << 5);
#define FMT_FLAGS_RAW_BAYER (1 << 6);
#define FMT_FLAGS_YUV (1 << 7);
};
those #defines live inside the struct body, and yes that's iconic of them π«Ά. lowkey all those bit flags are doing the most, and we stan.
π¦ Members π¦
let's do a little meet-and-greet with every single member, because nobody gets left out on my watch π:
mbus_codeβ the media bus pixel code. if it doesn't apply? it's-1. simple as that, bestie.fourccβ the fourcc code for this format. if it's not applicable, it's0. no fourcc, no problem. πcolorβ the driver's own private color format id. very "my format, my rules" energy π.memplanesβ number of physically non-contiguous data planes. like, the planes are not sitting next to each other, they're off doing their own thing π.colplanesβ number of physically contiguous data planes. these ones ARE next to each other. squad goals. π«Άcolorspaceβ the v4l2 colorspace, written asV4L2_COLORSPACE_*. pick your palette, honey π.depthβ per-plane driver's private "number of bits per pixel". note thedepth[FIMC_MAX_PLANES]situation β one depth per plane, because obviously β¨.mdataplanesβ a bitmask marking the meta data plane(s), expressed as(1 << plane_no). bit shifting is her love language π .flagsβ the flags that say which operation mode this format applies to. see all thoseFMT_FLAGS_*and friends up in the synopsis? yeah. that's her. π₯
π SEE ALSO π
- Kernel file
./include/media/drv-intf/exynos-fimc.hand the page forstruct fimc_source_info(9)β go read those too, bestie, they're part of the lore ππ
a gentle reminder that this page is literally just the struct definition and its members β nothing extra, nothing hidden. what you see is what you get, fr fr. π§
and that's the whole page! πΈ sourced from ./include/media/drv-intf, dated October 2026 β mwah, go forth and format your pixels, queen ππ
β¨
π¦ 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