diff options
| author | dec05eba <dec05eba@protonmail.com> | 2026-07-14 21:56:33 +0200 |
|---|---|---|
| committer | dec05eba <dec05eba@protonmail.com> | 2026-07-14 21:56:33 +0200 |
| commit | 1416725a6b627467d80a13aab6a4f376ff6f0619 (patch) | |
| tree | a91af5f52887c3cc74c9d8cb9d24f2c2cf2283d6 /include | |
| parent | bcd9f4c69103d766e3dcd8ffa10b5880ea5110bf (diff) | |
kms capture: fix hdr capture (tested on kde plasma)
Diffstat (limited to 'include')
| -rw-r--r-- | include/color_conversion.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/color_conversion.h b/include/color_conversion.h index 251fe17..4c64509 100644 --- a/include/color_conversion.h +++ b/include/color_conversion.h @@ -41,8 +41,8 @@ typedef struct { int hdr_sdr_white_pq; int hdr_sdr_white_scale; int gamma_lut_enabled; - int night_light_transfer; - int night_light_matrix; + int color_matrix_transfer; + int color_matrix; } gsr_color_graphics_uniforms; typedef struct { @@ -75,8 +75,8 @@ typedef struct { float hdr_sdr_white_scale; unsigned int gamma_lut_texture_id; bool gamma_lut_apply; - int night_light_transfer; - float night_light_matrix[9]; + int color_matrix_transfer; + float color_matrix[9]; bool hdr_shaders_loaded; bool hdr_shaders_load_failed; } gsr_color_conversion; @@ -89,9 +89,9 @@ void gsr_color_conversion_clear(gsr_color_conversion *self); void gsr_color_conversion_set_hdr_to_sdr_tone_mapping(gsr_color_conversion *self, bool enable, float hdr_peak_luminance, float sdr_white_luminance); void gsr_color_conversion_set_gamma_lut(gsr_color_conversion *self, const float *rgb_values, int num_entries); void gsr_color_conversion_enable_gamma_lut(gsr_color_conversion *self, bool enable); -/* |inverse_matrix| is a row major 3x3 matrix that is applied to linear rgb values in the draw functions, for RGB/BGR sources. NULL to disable. +/* |linear_rgb_matrix| is a row major 3x3 matrix that is applied to linear rgb values in the draw functions, for RGB/BGR sources. NULL to disable. |pq_color_transfer| chooses the transfer characteristics used to decode/encode the source image around the matrix multiply (pq or gamma 2.2) */ -void gsr_color_conversion_set_night_light_matrix(gsr_color_conversion *self, const float *inverse_matrix, bool pq_color_transfer); +void gsr_color_conversion_set_color_matrix(gsr_color_conversion *self, const float *linear_rgb_matrix, bool pq_color_transfer); void gsr_color_conversion_read_destination_texture(gsr_color_conversion *self, int destination_texture_index, int x, int y, int width, int height, unsigned int color_format, unsigned int data_format, void *pixels); gsr_rotation gsr_monitor_rotation_to_rotation(gsr_monitor_rotation monitor_rotation); |
