STRUCT C3_ISP_AE_ZONE_STATS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct c3_isp_ae_zone_stats(9) β€” like, the whole entire vibe πŸ’–

okay so bestie, buckle up, because we're diving into the kernel API manual for struct c3_isp_ae_zone_stats and honestly? it's giving "small struct, big energy." this is auto-exposure (AE) statistics for one single zone, and you're gonna understand it perfectly, no cap. πŸ¦‹


✨ NAME ✨

struct c3_isp_ae_zone_stats β€” literally just AE statistics of a zone. one zone. that's the whole job. iconic behavior, honestly. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

struct c3_isp_ae_zone_stats {
    __u16 hist0;
    __u16 hist1;
    __u16 hist3;
    __u16 hist4;
 };

bestie, look at that. four members. four. and yes, you clocked it β€” there's no hist2 in there, and that is NOT a typo, so don't come for me. we'll get to that. πŸ‘€


🌸 Members 🌸

  • hist0 β€” the global normalized pixel count for bin 0. that's it, that's the one. πŸ“
  • hist1 β€” the global normalized pixel count for bin 1. yes queen, next bin. ✨
  • hist3 β€” the global normalized pixel count for bin 3. skipping right past 2 like it owes her money. πŸ’€
  • hist4 β€” the global normalized pixel count for bin 4. last one, we made it. πŸŽ‰

πŸ’œ Description πŸ’œ

so, the tea: AE zone stats is aligned with 8 bytes. remember that, it matters for the vibes (and the memory layout). πŸ”₯

this is a 5-bin histogram, and here's the plot twist that makes it all make sense: the total sum is normalized to 0xffff. which means bin 2 isn't missing at all β€” it's just doing its own thing, living that math life:

hist2 = 0xffff - (hist0 + hist1 + hist3 + hist4)

so you never store it. you derive it. main character energy, honestly β€” the bin that doesn't even need to show up to be present. πŸ’… periodt.


🌈 SEE ALSO 🌈

go read the kernel file ./include/uapi/linux/media/amlogic/c3-isp-config.h first, it's the source of truth and it ate. then there's a whole squad of friends, and yes, you should meet all of them, no skipping: 🫢

  • struct c3_isp_awb_zone_stats(9)
  • struct c3_isp_awb_stats(9)
  • struct c3_isp_ae_stats(9)
  • struct c3_isp_af_zone_stats(9)
  • struct c3_isp_af_stats(9)
  • struct c3_isp_stats_info(9)
  • enum c3_isp_params_buffer_version(9)
  • enum c3_isp_params_block_type(9)
  • c3_isp_params_block_header(9)
  • struct c3_isp_params_awb_gains(9)
  • enum c3_isp_params_awb_tap_points(9)
  • struct c3_isp_params_awb_config(9)
  • enum c3_isp_params_ae_tap_points(9)
  • struct c3_isp_params_ae_config(9)
  • enum c3_isp_params_af_tap_points(9)
  • struct c3_isp_params_af_config(9)
  • struct c3_isp_params_pst_gamma(9)
  • struct c3_isp_params_ccm(9)
  • struct c3_isp_params_csc(9)
  • struct c3_isp_params_blc(9)
  • C3_ISP_PARAMS_MAX_SIZE(9)
  • struct c3_isp_params_cfg(9)

it's a whole friend group, iykyk. πŸ˜­πŸ’–


ngl, none of this is dangerous, it's just a stats struct living its truth. but the alignment and the 0xffff normalization are load-bearing, so don't go messing with those unless you want your histogram to have a bad day. πŸ™ˆ

and that's the page, bestie! this gem came out of ./include/uapi/linux/media/aml... and it's dated October 2026, section 9, all official and everything. you did amazing, mwah, slay, go forth and parse your zones. πŸ‘‘πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from