This commit is contained in:
mstoeckl 2024-02-26 15:06:20 +01:00 committed by GitHub
commit 7fdfe15ee7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 3 deletions

View file

@ -262,6 +262,7 @@ enum render_bit_depth {
RENDER_BIT_DEPTH_DEFAULT, // the default is currently 8 RENDER_BIT_DEPTH_DEFAULT, // the default is currently 8
RENDER_BIT_DEPTH_8, RENDER_BIT_DEPTH_8,
RENDER_BIT_DEPTH_10, RENDER_BIT_DEPTH_10,
RENDER_BIT_DEPTH_16F,
}; };
/** /**

View file

@ -17,9 +17,12 @@ struct cmd_results *output_cmd_render_bit_depth(int argc, char **argv) {
} else if (strcmp(*argv, "10") == 0) { } else if (strcmp(*argv, "10") == 0) {
config->handler_context.output_config->render_bit_depth = config->handler_context.output_config->render_bit_depth =
RENDER_BIT_DEPTH_10; RENDER_BIT_DEPTH_10;
} else if (strcmp(*argv, "16f") == 0 || strcmp(*argv, "16F") == 0) {
config->handler_context.output_config->render_bit_depth =
RENDER_BIT_DEPTH_16F;
} else { } else {
return cmd_results_new(CMD_INVALID, return cmd_results_new(CMD_INVALID,
"Invalid bit depth. Must be a value in (8|10)."); "Invalid bit depth. Must be a value in (8|10|16f).");
} }
config->handler_context.leftovers.argc = argc - 1; config->handler_context.leftovers.argc = argc - 1;

View file

@ -381,6 +381,11 @@ static const uint32_t *bit_depth_preferences[] = {
DRM_FORMAT_XRGB8888, DRM_FORMAT_XRGB8888,
DRM_FORMAT_INVALID, DRM_FORMAT_INVALID,
}, },
[RENDER_BIT_DEPTH_16F] = (const uint32_t []){
DRM_FORMAT_XBGR16161616F,
DRM_FORMAT_XRGB8888,
DRM_FORMAT_INVALID,
},
}; };
static void queue_output_config(struct output_config *oc, static void queue_output_config(struct output_config *oc,

View file

@ -165,9 +165,10 @@ must be separated by one space. For example:
adaptive sync can improve latency, but can cause flickering on some adaptive sync can improve latency, but can cause flickering on some
hardware. hardware.
*output* <name> render_bit_depth 8|10 *output* <name> render_bit_depth 8|10|16f
Controls the color channel bit depth at which frames are rendered; the Controls the color channel bit depth at which frames are rendered; the
default is currently 8 bits per channel. default is currently 8 bits per channel. The "16f" option requests
color channels encoded in half-precision floating point format.
Setting higher values will not have an effect if hardware and software lack Setting higher values will not have an effect if hardware and software lack
support for such bit depths. Successfully increasing the render bit depth support for such bit depths. Successfully increasing the render bit depth