STRUCT V4L2_SUBDEV_CROP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct v4l2_subdev_crop(9) πŸŽ€

okay bestie, welcome to the Kernel API Manual ✨ this one's a little struct called v4l2_subdev_crop and it's all about pad-level crop settings β€” yes, crop, like cropping a pic, but for video pads. let's get into it πŸ’…


🌸 NAME 🌸

struct v4l2_subdev_crop β€” pad-level crop settings πŸ¦‹


✨ SYNOPSIS ✨

struct v4l2_subdev_crop {
    __u32 which;
    __u32 pad;
    struct v4l2_rect rect;
    __u32 stream;
    __u32 reserved[7];
 };

like, that's the whole vibe. five members, one of them's an array of seven. cute πŸ’–


πŸ‘‘ Members πŸ‘‘

  • which β€” the format type, and it comes from enum v4l2_subdev_format_whence (iykyk 🌈)
  • pad β€” the pad number, exactly as reported by the media API πŸŽ€
  • rect β€” the pad crop rectangle boundaries β€” this is the actual "what part are we keeping" bit, main character energy fr πŸ”₯
  • stream β€” the stream number, defined in subdev routing 🧚
  • reserved β€” drivers and applications must zero this array. not "should", not "maybe", must. it's giving non-negotiable πŸ™ˆ

πŸ’€ Description πŸ’€

so here's the tea, and it's a little sad 😭 β€” the subdev crop API is an obsolete interface and may be removed in the future. it's been superseded by the selection API. and no new extensions to this structure will be accepted, periodt. so don't come up with fun new fields for it, it's not happening bestie 🫢

ngl this one's on its way out β€” if you're writing new code, the selection API is where it's at ✨

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./include/uapi/linux/v4l2-subdev.h and enum v4l2_subdev_format_whence(9)
  • struct v4l2_subdev_format(9)
  • struct v4l2_subdev_mbus_code_enum(9)
  • struct v4l2_subdev_frame_size_enum(9)
  • struct v4l2_subdev_frame_interval(9)
  • struct v4l2_subdev_frame_interval_enum(9)
  • struct v4l2_subdev_selection(9)
  • struct v4l2_subdev_capability(9)
  • struct v4l2_subdev_route(9)
  • struct v4l2_subdev_routing(9)
  • struct v4l2_subdev_client_capability(9)

and that's the whole page, bestie, you ate that πŸ’…βœ¨ ok so the little sign-off down here says this lives under ./include/uapi/linux and it's dated October 2026, brought to you as struct v4l2_subdev_crop(9) β€” go forth and crop responsibly πŸ“πŸ’œ

πŸ“¦ where this page comes from