STRUCT MALI_C55_AF_STATISTICS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct mali_c55_af_statistics(9) β€” the Kernel API Manual glow-up ✨

okay so bestie, you're reading the page for struct mali_c55_af_statistics(9) from the Kernel API Manual, and honestly? it's giving autofocus main character energy πŸŽ€ buckle up.


🌸 NAME 🌸

struct mali_c55_af_statistics β€” the Auto Focus edge and intensity statistics struct. literally the receipts your camera's autofocus is obsessing over πŸ’–


✨ SYNOPSIS ✨

struct mali_c55_af_statistics {
    __u16 intensity_stats;
    __u16 edge_stats;
 };

two little __u16 fields. short king energy, no cap πŸ‘‘


🫢 Members 🫢

  • intensity_stats β€” the packed mantissa and exponent value for pixel intensity. yes bestie, both squished into one field πŸ’«
  • edge_stats β€” the packed mantissa and exponent values for edge intensity. same deal, different vibe πŸ¦‹

🌈 Description 🌈

so here's the tea β˜• β€” the ISP collects the squared sum of pixel intensities for each zone within a configurable Region of Interest on the frame. that's the intensity side of things.

and then, additionally, the exact same data gets collected after being passed through a bandpass filter which removes high and low frequency components. those ones? those are referred to as the edge statistics. iconic behavior, truly πŸ”₯

the intensity and edge statistics for a zone can be used to calculate the contrast information for a zone, like so:

C = E2 / I2

Where I2 is the intensity statistic for a zone and E2 is the edge statistic for that zone. and the whole point? Optimum focus is reached when C is at its maximum. periodt. that's the goal, that's the dream ✨

now, the intensity and edge statistics are stored packed into a non-standard 16 bit floating point format β€” not me being extra, that's just the format πŸ’… β€” where the 7 most significant bits represent the exponent and the 9 least significant bits the mantissa. slay, but you can't just read it raw. this format can be unpacked with the following pseudocode:

if (e == 0) {
        x = m;
} else {
        x = 2^e-1 * (m + 2^9)
}

where e is the exponent value in range 0..127 m is the mantissa value in range 0..511 🧚 so yeah, remember your bit ranges or you're gonna have a bad time 😭


πŸŽ€ SEE ALSO πŸŽ€

go touch some more docs, bestie β€” the source of truth lives in the kernel file ./include/uapi/linux/media/arm/mali-c55-config.h and these absolute legends:

  • struct mali_c55_ae_1024bin_hist(9)
  • struct mali_c55_ae_5bin_hist(9)
  • struct mali_c55_awb_average_ratios(9)
  • struct mali_c55_stats_buffer(9)
  • enum mali_c55_param_block_type(9)
  • struct mali_c55_params_sensor_off_preshading(9)
  • enum mali_c55_aexp_hist_tap_points(9)
  • enum mali_c55_aexp_skip_x(9)
  • enum mali_c55_aexp_skip_y(9)
  • enum mali_c55_aexp_row_column_offset(9)
  • enum mali_c55_aexp_hist_plane_mode(9)
  • struct mali_c55_params_aexp_hist(9)
  • struct mali_c55_params_aexp_weights(9)
  • struct mali_c55_params_digital_gain(9)
  • enum mali_c55_awb_stats_mode(9)
  • struct mali_c55_params_awb_gains(9)
  • enum mali_c55_params_awb_tap_points(9)
  • struct mali_c55_params_awb_config(9)
  • struct mali_c55_params_mesh_shading_config(9)
  • struct mali_c55_params_mesh_shading_selection(9)
  • struct mali_c55_params_ccm(9)
  • struct mali_c55_params_gamma(9)
  • MALI_C55_PARAMS_MAX_SIZE(9)
ngl that's a whole friend group and you're gonna want to know all of them πŸ’€πŸ’–

aaaand that's the whole page, bestie 🫢 sign-off time: this one came from ./include/uapi/linux/media/arm, dated October 2026, and it's filed under struct mali...f_statistics(9) β€” go forth and get that focus crisp πŸ”₯πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from