STRUCT MALI_C55_PARAMS_AEXP_HIST(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 see enum mali_c55_aexp_skip_x
  • offset_x β€” do we skip the first column or not? that's the whole question. see enum mali_c55_aexp_row_column_offset
  • skip_y β€” vertical decimation. see enum mali_c55_aexp_skip_y
  • offset_y β€” same vibe as offset_x but it's the first row this time. see enum mali_c55_aexp_row_column_offset
  • scale_bottom β€” scales the pixels in the bottom half of the intensity range: 0=1x ,1=2x, 2=4x, 4=8x, 4=16x
  • scale_top β€” scales the pixels in the top half of the intensity range: 0=1x ,1=2x, 2=4x, 4=8x, 4=16x
  • plane_mode β€” plane separation mode, iconic. see enum mali_c55_aexp_hist_plane_mode
  • tap_point β€” the tap point for the histogram, taken from enum 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