STRUCT MALI_C55_PARAMS_GAMMA(9)
π 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 π:
- An offset is subtracted from each colour channel
- Each colour channel is multiplied by a gain
- 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, yourheader.typefield should be set to one of eitherMALI_C55_PARAM_BLOCK_GAMMA_FRorMALI_C55_PARAM_BLOCK_GAMMA_DSfrom: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
- 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