STRUCT IPU3_UAPI_CCM_MAT_CONFIG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ipu3_uapi_ccm_mat_config β€” Kernel API Manual ✨

okay so bestie, we're in the Kernel API Manual and today's main character is struct ipu3_uapi_ccm_mat_config(9). yes the header truncated it to struct ipu3...m_mat_config(9), that's just how it vibes. let's get into it πŸŽ€


🌸 NAME 🌸

struct ipu3_uapi_ccm_mat_config β€” the Color correction matrix. that's it. that's the whole name. iconic behavior honestly πŸ’…


✨ SYNOPSIS ✨

here's the struct in all its glory, no edits, no cap:

struct ipu3_uapi_ccm_mat_config {
    __s16 coeff_m11;
    __s16 coeff_m12;
    __s16 coeff_m13;
    __s16 coeff_o_r;
    __s16 coeff_m21;
    __s16 coeff_m22;
    __s16 coeff_m23;
    __s16 coeff_o_g;
    __s16 coeff_m31;
    __s16 coeff_m32;
    __s16 coeff_m33;
    __s16 coeff_o_b;
 };

twelve __s16 fields, all in a row, absolutely eating πŸ”₯


πŸ¦‹ Members πŸ¦‹

okay so these are the fields, and lowkey the ranges are wild β€” some of them lowkey don't fit in an __s16 at all, but that's what the manual says so we're saying it too. no notes, we don't argue with the docs πŸ’€

  • coeff_m11 β€” CCM 3x3 coefficient, range [-65536, 65535]
  • coeff_m12 β€” CCM 3x3 coefficient, range [-8192, 8191]
  • coeff_m13 β€” CCM 3x3 coefficient, range [-32768, 32767]
  • coeff_o_r β€” Bias 3x1 coefficient, range [-8191, 8181]
  • coeff_m21 β€” CCM 3x3 coefficient, range [-32767, 32767]
  • coeff_m22 β€” CCM 3x3 coefficient, range [-8192, 8191]
  • coeff_m23 β€” CCM 3x3 coefficient, range [-32768, 32767]
  • coeff_o_g β€” Bias 3x1 coefficient, range [-8191, 8181]
  • coeff_m31 β€” CCM 3x3 coefficient, range [-32768, 32767]
  • coeff_m32 β€” CCM 3x3 coefficient, range [-8192, 8191]
  • coeff_m33 β€” CCM 3x3 coefficient, range [-32768, 32767]
  • coeff_o_b β€” Bias 3x1 coefficient, range [-8191, 8181]

the way they're split into m-fields and o-fields is giving matrix + bias vector and we'll get to that 🧚


🌈 Description 🌈

so what does this thing actually do, you ask? it transforms sensor specific color space to standard sRGB by applying a 3x3 matrix and adding a bias vector O. that's the whole errand. ✨

and bestie, the transformation is basically a rotation and translation in the 3-dimensional color spaces. think of it like your colors going through a whole glow-up: rotate the RGB cube, then slide it over a bit, and boom β€” sRGB. main character energy πŸ’…

here are the defaults, verbatim, screenshotted straight from the docs:

9775,   -2671,  1087,   0 -1071,  8303,   815,    0 -23,    -7887,
16103,  0

yeah the formatting is a little chaotic, we're keeping it exactly as-is, don't come for me πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

grab a snack for this one, it's a long guest list πŸ“

the kernel file lives at ./drivers/staging/media/ipu3/include/uapi/intel-ipu3.h β€” that's the home base.

and now, in order, the whole squad:

struct ipu3_uapi_grid_config(9), struct ipu3_uapi_awb_set_item(9), struct ipu3_uapi_awb_raw_buffer(9), struct ipu3_uapi_awb_config_s(9), struct ipu3_uapi_awb_config(9), struct ipu3_uapi_ae_raw_buffer(9), struct ipu3_uapi_ae_raw_buffer_aligned(9), struct ipu3_uapi_ae_grid_config(9), struct ipu3_uapi_ae_weight_elem(9), struct ipu3_uapi_ae_ccm(9), struct ipu3_uapi_ae_config(9), struct ipu3_uapi_af_filter_config(9), struct ipu3_uapi_af_raw_buffer(9), struct ipu3_uapi_af_config_s(9), struct ipu3_uapi_awb_fr_raw_buffer(9), struct ipu3_uapi_awb_fr_config_s(9), struct ipu3_uapi_4a_config(9), struct ipu3_uapi_bubble_info(9), struct ipu3_uapi_ff_status(9), struct ipu3_uapi_stats_3a(9), struct ipu3_uapi_bnr_static_config_wb_gains_config(9), struct ipu3_uapi_bnr_static_config_wb_gains_thr_config(9), struct ipu3_uapi_bnr_static_config_thr_coeffs_config(9), struct ipu3_uapi_bnr_static_config_thr_ctrl_shd_config(9), struct ipu3_uapi_bnr_static_config_opt_center_config(9), struct ipu3_uapi_bnr_static_config_lut_config(9), struct ipu3_uapi_bnr_static_config_bp_ctrl_config(9), struct ipu3_uapi_bnr_static_config_dn_detect_ctrl_config(9), struct ipu3_uapi_bnr_static_config_opt_center_sqr_config(9), struct ipu3_uapi_bnr_static_config(9), struct ipu3_uapi_bnr_static_config_green_disparity(9), struct ipu3_uapi_dm_config(9), struct ipu3_uapi_gamma_corr_ctrl(9), struct ipu3_uapi_gamma_corr_lut(9), struct ipu3_uapi_gamma_config(9), struct ipu3_uapi_csc_mat_config(9), struct ipu3_uapi_cds_params(9), struct ipu3_uapi_shd_grid_config(9), struct ipu3_uapi_shd_general_config(9), struct ipu3_uapi_shd_black_level_config(9), struct ipu3_uapi_shd_config_static(9), struct ipu3_uapi_shd_lut(9), struct ipu3_uapi_shd_config(9), struct ipu3_uapi_iefd_cux2(9), struct ipu3_uapi_iefd_cux6_ed(9), struct ipu3_uapi_iefd_cux2_1(9), struct ipu3_uapi_iefd_cux4(9), struct ipu3_uapi_iefd_cux6_rad(9), struct ipu3_uapi_yuvp1_iefd_cfg_units(9), struct ipu3_uapi_yuvp1_iefd_config_s(9), struct ipu3_uapi_yuvp1_iefd_control(9), struct ipu3_uapi_sharp_cfg(9), struct ipu3_uapi_far_w(9), struct ipu3_uapi_unsharp_cfg(9), struct ipu3_uapi_yuvp1_iefd_shrp_cfg(9), struct ipu3_uapi_unsharp_coef0(9), struct ipu3_uapi_unsharp_coef1(9), struct ipu3_uapi_yuvp1_iefd_unshrp_cfg(9), struct ipu3_uapi_radial_reset_xy(9), struct ipu3_uapi_radial_reset_x2(9), struct ipu3_uapi_radial_reset_y2(9), struct ipu3_uapi_radial_cfg(9), struct ipu3_uapi_rad_far_w(9), struct ipu3_uapi_cu_cfg0(9), struct ipu3_uapi_cu_cfg1(9), struct ipu3_uapi_yuvp1_iefd_rad_cfg(9), struct ipu3_uapi_vss_lut_x(9), struct ipu3_uapi_vss_lut_y(9), struct ipu3_uapi_yuvp1_iefd_vssnlm_cfg(9), struct ipu3_uapi_yuvp1_iefd_config(9), struct ipu3_uapi_yuvp1_yds_config(9), struct ipu3_uapi_yuvp1_chnr_enable_config(9), struct ipu3_uapi_yuvp1_chnr_coring_config(9), struct ipu3_uapi_yuvp1_chnr_sense_gain_config(9), struct ipu3_uapi_yuvp1_chnr_iir_fir_config(9), struct ipu3_uapi_yuvp1_chnr_config(9), struct ipu3_uapi_yuvp1_y_ee_nr_lpf_config(9), struct ipu3_uapi_yuvp1_y_ee_nr_sense_config(9), struct ipu3_uapi_yuvp1_y_ee_nr_gain_config(9), struct ipu3_uapi_yuvp1_y_ee_nr_clip_config(9), struct ipu3_uapi_yuvp1_y_ee_nr_frng_config(9), struct ipu3_uapi_yuvp1_y_ee_nr_diag_config(9), struct ipu3_uapi_yuvp1_y_ee_nr_fc_coring_config(9), struct ipu3_uapi_yuvp1_y_ee_nr_config(9), struct ipu3_uapi_yuvp2_tcc_gen_control_static_config(9), struct ipu3_uapi_yuvp2_tcc_macc_elem_static_config(9), struct ipu3_uapi_yuvp2_tcc_macc_table_static_config(9), struct ipu3_uapi_yuvp2_tcc_inv_y_lut_static_config(9), struct ipu3_uapi_yuvp2_tcc_gain_pcwl_lut_static_config(9), struct ipu3_uapi_yuvp2_tcc_r_sqr_lut_static_config(9), struct ipu3_uapi_yuvp2_tcc_static_config(9), struct ipu3_uapi_anr_transform_config(9), struct ipu3_uapi_anr_stitch_pyramid(9), struct ipu3_uapi_anr_stitch_config(9), struct ipu3_uapi_anr_config(9), struct ipu3_uapi_acc_param(9), struct ipu3_uapi_isp_lin_vmem_params(9), struct ipu3_uapi_isp_tnr3_vmem_params(9), struct ipu3_uapi_isp_tnr3_params(9), struct ipu3_uapi_isp_xnr3_vmem_params(9), struct ipu3_uapi_xnr3_alpha_params(9), struct ipu3_uapi_xnr3_coring_params(9), struct ipu3_uapi_xnr3_blending_params(9), struct ipu3_uapi_isp_xnr3_params(9), struct ipu3_uapi_obgrid_param(9), struct ipu3_uapi_flags(9), struct ipu3_uapi_params(9)

like I said. long guest list. every single one of them showed up and we love that for us 🫢


that's the whole page bestie, go correct some colors πŸŒˆπŸ’–

cute lil sign-off: this one's from ./drivers/staging/media/ipu3/i..., dated October 2026, and the footer's still repping struct ipu3...m_mat_config(9). slay βœ¨πŸŽ€
πŸ“¦ where this page comes from