STRUCT VIMC_PIX_MAP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct vimc_pix_map(9)

okay so welcome to the Kernel API Manual bestie, we're doing struct docs today and honestly this one is a little cutie πŸŽ€


✨ NAME ✨

struct vimc_pix_map β€” literally the thing that maps a media bus code to a v4l2 pixel format πŸ¦‹


🌸 SYNOPSIS 🌸

struct vimc_pix_map {
    unsigned int code[VIMC_PIX_FMT_MAX_CODES];
    unsigned int bpp;
    u32 pixelformat;
    bool bayer;
 };

πŸ‘‘ Members πŸ‘‘

  • code β€” the media bus format code, and it's defined by the MEDIA_BUS_FMT_* macros πŸ’«
  • bpp β€” number of bytes each pixel occupies, yes that's the bytes-per-pixel count, no cap 🧚
  • pixelformat β€” the pixel format, defined by the V4L2_PIX_FMT_* macros πŸ”₯
  • bayer β€” true if this is a bayer format πŸ™ˆ

πŸ’– Description πŸ’–

So this struct is the matchmaker 🫢 it takes the MEDIA_BUS_FMT_* codes and matches them up with the corresponding V4L2_PIX_FMT_* fourcc pixelformat plus its bytes per pixel (bpp). it's giving matchmaker energy fr fr, iconic behavior πŸ’…


🌈 SEE ALSO 🌈

Kernel file ./drivers/media/test-drivers/vimc/vimc-common.h β€” go read it, iykyk ✨

vimc_colorimetry_clamp(9), struct vimc_ent_device(9), struct vimc_device(9), struct vimc_ent_type(9), struct vimc_ent_config(9), vimc_is_source(9), vimc_pix_map_by_index(9), vimc_mbus_code_by_index(9), vimc_pix_map_by_code(9), vimc_pix_map_by_pixelformat(9), vimc_ent_sd_register(9), vimc_vdev_link_validate(9) ⭐


and that's the whole page bestie, you ate that πŸ’€πŸ‘‘

mwah, this came straight out of ./drivers/media/test-drivers/vimc, dated October 2026 β€” slay, periodt πŸ“πŸ’œ

πŸ“¦ where this page comes from