STRUCT MALI_C55_AF_STATISTICS(9)
π 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
- 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