From 3ec93bcc41d9636f0acd195c60ca86e58f356637 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 17 Aug 2024 19:55:09 +0200 Subject: Add hevc_10bit and av1_10bit options for 10bit color range, increase video quality (qp) --- include/capture/kms.h | 1 + include/capture/nvfbc.h | 2 +- include/capture/portal.h | 2 +- include/capture/xcomposite.h | 1 + include/color_conversion.h | 5 +++++ include/encoder/video/cuda.h | 2 +- include/encoder/video/software.h | 2 +- include/encoder/video/vaapi.h | 2 +- 8 files changed, 12 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/capture/kms.h b/include/capture/kms.h index 278a391..f19e462 100644 --- a/include/capture/kms.h +++ b/include/capture/kms.h @@ -6,6 +6,7 @@ typedef struct { gsr_egl *egl; const char *display_to_capture; /* if this is "screen", then the first monitor is captured. A copy is made of this */ + gsr_color_depth color_depth; gsr_color_range color_range; bool hdr; bool record_cursor; diff --git a/include/capture/nvfbc.h b/include/capture/nvfbc.h index e24b712..9655921 100644 --- a/include/capture/nvfbc.h +++ b/include/capture/nvfbc.h @@ -12,7 +12,7 @@ typedef struct { vec2i size; bool direct_capture; bool overclock; - bool hdr; + gsr_color_depth color_depth; gsr_color_range color_range; bool record_cursor; bool use_software_video_encoder; diff --git a/include/capture/portal.h b/include/capture/portal.h index f80325d..2e2c6f2 100644 --- a/include/capture/portal.h +++ b/include/capture/portal.h @@ -5,8 +5,8 @@ typedef struct { gsr_egl *egl; + gsr_color_depth color_depth; gsr_color_range color_range; - bool hdr; bool record_cursor; bool restore_portal_session; /* If this is set to NULL then this defaults to $XDG_CONFIG_HOME/gpu-screen-recorder/restore_token ($XDG_CONFIG_HOME defaults to $HOME/.config) */ diff --git a/include/capture/xcomposite.h b/include/capture/xcomposite.h index 707421f..98b8766 100644 --- a/include/capture/xcomposite.h +++ b/include/capture/xcomposite.h @@ -12,6 +12,7 @@ typedef struct { gsr_color_range color_range; bool record_cursor; bool track_damage; + gsr_color_depth color_depth; } gsr_capture_xcomposite_params; gsr_capture* gsr_capture_xcomposite_create(const gsr_capture_xcomposite_params *params); diff --git a/include/color_conversion.h b/include/color_conversion.h index d05df6a..236bfbd 100644 --- a/include/color_conversion.h +++ b/include/color_conversion.h @@ -10,6 +10,11 @@ typedef enum { GSR_COLOR_RANGE_FULL } gsr_color_range; +typedef enum { + GSR_COLOR_DEPTH_8_BITS, + GSR_COLOR_DEPTH_10_BITS +} gsr_color_depth; + typedef enum { GSR_SOURCE_COLOR_RGB, GSR_SOURCE_COLOR_BGR diff --git a/include/encoder/video/cuda.h b/include/encoder/video/cuda.h index 802e72e..6d32e09 100644 --- a/include/encoder/video/cuda.h +++ b/include/encoder/video/cuda.h @@ -8,7 +8,7 @@ typedef struct gsr_egl gsr_egl; typedef struct { gsr_egl *egl; bool overclock; - bool hdr; + gsr_color_depth color_depth; } gsr_video_encoder_cuda_params; gsr_video_encoder* gsr_video_encoder_cuda_create(const gsr_video_encoder_cuda_params *params); diff --git a/include/encoder/video/software.h b/include/encoder/video/software.h index e39d5f8..fd2dc6b 100644 --- a/include/encoder/video/software.h +++ b/include/encoder/video/software.h @@ -7,7 +7,7 @@ typedef struct gsr_egl gsr_egl; typedef struct { gsr_egl *egl; - bool hdr; + gsr_color_depth color_depth; } gsr_video_encoder_software_params; gsr_video_encoder* gsr_video_encoder_software_create(const gsr_video_encoder_software_params *params); diff --git a/include/encoder/video/vaapi.h b/include/encoder/video/vaapi.h index 2981a01..b509f17 100644 --- a/include/encoder/video/vaapi.h +++ b/include/encoder/video/vaapi.h @@ -7,7 +7,7 @@ typedef struct gsr_egl gsr_egl; typedef struct { gsr_egl *egl; - bool hdr; + gsr_color_depth color_depth; } gsr_video_encoder_vaapi_params; gsr_video_encoder* gsr_video_encoder_vaapi_create(const gsr_video_encoder_vaapi_params *params); -- cgit v1.2.3