STRUCT MALI_C55_PARAMS_GAMMA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct mali_c55_params_gamma(9) β€” the Kernel API Manual, but make it cute πŸŽ€

okay so bestie, welcome to the struct mali_c55_params_gamma(9) page πŸ’– this is the Kernel API Manual, and today we're learning about RGB Gamma correction. no cap, it's giving rainbow science ✨


🌈 NAME 🌈

struct mali_c55_params_gamma β€” RGB Gamma correction, periodt πŸ’…


✨ SYNOPSIS ✨

struct mali_c55_params_gamma {
    struct v4l2_isp_params_block_header header;
    __u16 gains[3];
    __u16 offs[3];
    __u32 lut[MALI_C55_NUM_GAMMA_LUT_ELEMENTS];
 };

🫢 Members 🫢

  • header β€” the Mali-C55 parameters block header, the little main-character intro every block needs πŸ‘‘
  • gains β€” gains for the red, green and blue channel, in unsigned Q4.8 format. three of them, one per channel, slay πŸ”₯
  • offs β€” offsets subtracted from the red, green and blue channels, in unsigned 12 bits format. yes, subtracted β€” we'll get to that πŸ’€
  • lut β€” the 129-node Gamma LUT, in unsigned 12 bits format πŸŽ€

πŸ’œ Description πŸ’œ

So gamma correction is literally how you program a standard gamma curve, like the famous sRGB one 🌸. It hands you gains and offsets so you can do contrast adjustments. iconic behaviour, honestly.

Gamma correction gets applied on both the FR and DS pipes separately, in the RGB colour domain, and here's the order of operations, bestie β€” don't shuffle them πŸ™ˆ:

  1. An offset is subtracted from each colour channel
  2. Each colour channel is multiplied by a gain
  3. The Gamma LUT is applied to each colour channel

The Gamma LUT has 129 entries, where each node is an unsigned 12 bit number ⭐. It's expected that LUT[0]=0 and LUT[128]=0xfff, with the other 127 values defining the Gamma correction curve. The three gain multipliers are expressed as 12-bits unsigned Q4.8 fixed-point numbers, and the three offsets are expressed as 12-bits unsigned integers. math girlies rise 🧚

and because one Gamma correction block is available on both the FR and DS pipes, your header.type field should be set to one of either MALI_C55_PARAM_BLOCK_GAMMA_FR or MALI_C55_PARAM_BLOCK_GAMMA_DS from :c:type:mali_c55_param_block_type`. pick one, don't leave it vibing on default πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/uapi/linux/media/arm/mali-c55-config.h, plus these absolute icons πŸ‘‘:

  • 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_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)
  • MALI_C55_PARAMS_MAX_SIZE(9)

and that's the whole page, bestie! πŸ’–βœ¨ brought to you from ./include/uapi/linux/media/arm, dated October 2026, and filed under struct mali_...params_gamma(9) β€” go forth and gamma-correct your little heart out πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from