STRUCT MALI_C55_AE_1024BIN_HIST(9)
π NAME
okay so bestie, this is the manual page for struct mali_c55_ae_1024bin_hist β the Auto Exposure 1024-bin histogram statistics struct. and yes we're doing this in the Kernel API Manual, welcome to the group chat π«Ά
β¨ SYNOPSIS
here's the whole entire struct, no notes, she's small but she's doing a lot:
struct mali_c55_ae_1024bin_hist {
__u16 bins[1024];
};
πΈ MEMBERS
binsβ a 1024 element array of 16-bit pixel counts. that's it. that's the member. 1024 of them. lowkey iconic π
π¦ DESCRIPTION
so the 1024-bin histogram module? she collects image-global but zone-weighted intensity distributions of pixels into fixed-width bins. very demure, very mindful. π
the modules can be configured into different "plane modes", and those affect what actually ends up in the collected statistics:
- plane mode 0 β pixel intensities are taken regardless of colour plane, all crammed into a single 1024-bin histogram with a bin width of 4. one big happy histogram β¨
- plane mode 1 β four 256-bin histograms with a bin width of 16 are collected, one for each CFA colour plane. four little guys, each doing their own thing π
- plane modes 4, 5, 6 and 7 β two 512-bin histograms with a bin width of 8 are collected. in each mode, one of the colour planes goes into the first histogram and all the others get combined into the second. duo energy, fr fr π«Ά
the histograms are stored consecutively in the bins array. no gaps, no drama.
π₯ the exponent/mantissa situation (iykyk)
the 16-bit pixel counts are stored as a 4-bit exponent in the most significant bits followed by a 12-bit mantissa. not me having to read this twice π
conversion to a usable format can be done according to the following pseudo-code:
if (e == 0) {
bin = m * 2;
} else {
bin = (m + 4096) * 2^e
}
where:
eis the exponent value in range0..15mis the mantissa value in range0..4095
π§ the three masking methods
the pixels used in calculating the statistics can be masked using three methods, and yes there are exactly three, bestie, don't come for me:
- Pixels can be skipped in X and Y directions independently.
- Minimum/Maximum intensities can be configured
- Zones can be differentially weighted, including 0 weighted to mask them
β where does the data even come from
the data for this histogram can be collected from different tap points in the ISP depending on configuration:
- after the white balance or digital gain blocks
- or immediately after the input crossbar
that's the whole vibe check on tap points π
π SEE ALSO
Kernel file ./include/uapi/linux/media/arm/mali-c55-config.h and honestly the whole friend group:
struct mali_c55_ae_5bin_hist(9)struct mali_c55_awb_average_ratios(9)struct mali_c55_af_statistics(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)
and that's the page!! π this little number lives at ./include/uapi/linux/media/arm, stamped October 2026, and she ate. periodt. π
β¨
π¦ 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