STRUCT MALI_C55_PARAMS_AEXP_HIST(9)
π struct mali_c55_params_aexp_hist β Kernel API Manual β¨
okay bestie, welcome to the struct mali_...ms_aexp_hist(9) page π«Ά this is the kernel API manual, and we're gonna get you fully caught up on the AEXP histogram config struct. no cap, it's lowkey a lot of bit-masking lore, but we got this π
π NAME π
struct mali_c55_params_aexp_hist β the configuration for AEXP metering hists, periodt π
π¦ SYNOPSIS π¦
struct mali_c55_params_aexp_hist {
struct v4l2_isp_params_block_header header;
__u8 skip_x;
__u8 offset_x;
__u8 skip_y;
__u8 offset_y;
__u8 scale_bottom;
__u8 scale_top;
__u8 plane_mode;
__u8 tap_point;
};
πΈ Members πΈ
headerβ the Mali-C55 parameters block header β¨skip_xβ horizontal decimation, iykyk. go seeenum mali_c55_aexp_skip_xoffset_xβ do we skip the first column or not? that's the whole question. seeenum mali_c55_aexp_row_column_offsetskip_yβ vertical decimation. seeenum mali_c55_aexp_skip_yoffset_yβ same vibe asoffset_xbut it's the first row this time. seeenum mali_c55_aexp_row_column_offsetscale_bottomβ scales the pixels in the bottom half of the intensity range:0=1x,1=2x,2=4x,4=8x,4=16xscale_topβ scales the pixels in the top half of the intensity range:0=1x,1=2x,2=4x,4=8x,4=16xplane_modeβ plane separation mode, iconic. seeenum mali_c55_aexp_hist_plane_modetap_pointβ the tap point for the histogram, taken fromenum mali_c55_aexp_hist_tap_points. β οΈ heads up: this parameter is unused for the post-Iridix Histogram
π Description π
So this struct is literally your remote control for the 1024-bin AEXP histograms ποΈ broadly speaking, these parameters let you mask particular regions of the image and pick between different kinds of histogram.
π§ the masking fields
The skip_x, offset_x, skip_y and offset_y fields let you ignore or mask pixels in the frame based on where they sit relative to the top left pixel. First up, the skip_y, offset_x and offset_y fields define which of the pixels inside each 2x2 region actually get counted in the statistics.
If skip_y == 0 then two pixels from each covered region get counted. And if both offset_x and offset_y are zero, then it's the two left-most pixels in each 2x2 pixel region that get counted. Setting offset_x = 1 discounts the top left pixel and counts the top right pixel instead. Setting offset_y = 1 discounts the bottom left pixel and counts the bottom right pixel. slay π
If skip_y != 0 then only a single pixel from each region covered by the pattern gets counted. In this case offset_x controls whether the counted pixel is in the left column (when offset_x == 0) or the right column (when offset_x == 1), and offset_y controls whether the counted pixel is in the top row (when offset_y == 0) or the bottom row (when offset_y == 1).
π how the pattern repeats
The skip_x and skip_y fields control how that 2x2 pixel region gets repeated across the image data. The first instance of the region is always in the top left of the image data, no exceptions. skip_x controls how many pixels get ignored in the x direction before the pixel masking region repeats, and skip_y controls how many pixels get ignored in the y direction before the pixel masking region repeats.
π the cautionary part (read this fr fr)
These fields are great for reducing the number of pixels counted for the statistics, but you gotta be careful and configure them correctly. Some combinations of values will result in colour components from the input data being ignored entirely π like, for example, in this configuration:
skip_x = 0 offset_x = 0 skip_y = 0 offset_y = 0
Only the R and Gb components of the RGGB data that was input would be collected. and similarly in this configuration:
skip_x = 0 offset_x = 0 skip_y = 1 offset_y = 1
Only the Gb component of the RGGB data that was input would be collected. To fix things so that all 4 colour components are included, you'd need to set the skip_x and skip_y fields in a way that results in all four colour components being collected, like this:
skip_x = 1 offset_x = 0 skip_y = 1 offset_y = 1
β the type field
header.type should be set to one of either MALI_C55_PARAM_BLOCK_AEXP_HIST or MALI_C55_PARAM_BLOCK_AEXP_IHIST, from :c:type:mali_c55_param_block_type``.
π SEE ALSO π
Kernel file ./include/uapi/linux/media/arm/mali-c55-config.h, plus the whole bestie squad:
struct mali_c55_ae_1024bin_hist(9)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_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)
okay that's the whole page bestie π go forth and mask your pixels responsibly, and don't come crying to me when your RGGB loses a colour component because you set skip_y wrong π
this lil missive came from ./include/uapi/linux/media/arm, dated October 2026 β mwah, bye! π
β¨
π¦ 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