mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 03:30:19 +01:00
color: accept max_fall and max_cll even for tf different from PQ
The CM&HDR protocol extension spec relaxed the requirements for the max_fall and max_cll setters. Now we accept such values even when the transfer function is not PQ. This also fixes an issue in which we'd not accept target_luminance for transfer function different from PQ, which was not on the spec. INCONSISTENT_SET is not being used in any other errors, so remove that from enum weston_color_profile_param_builder_error. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
parent
1082ef328a
commit
9ae0a7ec05
3 changed files with 1 additions and 11 deletions
|
|
@ -361,7 +361,6 @@ enum weston_color_profile_param_builder_error {
|
|||
WESTON_COLOR_PROFILE_PARAM_BUILDER_ERROR_CIE_XY_OUT_OF_RANGE,
|
||||
WESTON_COLOR_PROFILE_PARAM_BUILDER_ERROR_INVALID_LUMINANCE,
|
||||
WESTON_COLOR_PROFILE_PARAM_BUILDER_ERROR_INCONSISTENT_LUMINANCES,
|
||||
WESTON_COLOR_PROFILE_PARAM_BUILDER_ERROR_INCONSISTENT_SET,
|
||||
WESTON_COLOR_PROFILE_PARAM_BUILDER_ERROR_INCOMPLETE_SET,
|
||||
WESTON_COLOR_PROFILE_PARAM_BUILDER_ERROR_ALREADY_SET,
|
||||
WESTON_COLOR_PROFILE_PARAM_BUILDER_ERROR_UNSUPPORTED,
|
||||
|
|
|
|||
|
|
@ -535,15 +535,6 @@ builder_validate_params_set(struct weston_color_profile_param_builder *builder)
|
|||
if (!(builder->group_mask & WESTON_COLOR_PROFILE_PARAMS_TF))
|
||||
store_error(builder, WESTON_COLOR_PROFILE_PARAM_BUILDER_ERROR_INCOMPLETE_SET,
|
||||
"transfer function not set");
|
||||
|
||||
/* If target luminance values were given, tf must be PQ. */
|
||||
if (builder->params.tf_info->tf != WESTON_TF_ST2084_PQ &&
|
||||
(builder->group_mask & WESTON_COLOR_PROFILE_PARAMS_TARGET_LUMINANCE ||
|
||||
builder->group_mask & WESTON_COLOR_PROFILE_PARAMS_MAXCLL ||
|
||||
builder->group_mask & WESTON_COLOR_PROFILE_PARAMS_MAXFALL))
|
||||
store_error(builder, WESTON_COLOR_PROFILE_PARAM_BUILDER_ERROR_INCONSISTENT_SET,
|
||||
"luminance values were given but transfer function " \
|
||||
"is not Rec. ITU-R BT.2100-2 (PQ)");
|
||||
}
|
||||
|
||||
static float
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ struct weston_color_profile_params {
|
|||
|
||||
/* Target luminance parameters cd/m²; negative when not set */
|
||||
float target_min_luminance, target_max_luminance;
|
||||
float maxCLL, maxFALL; /* only for PQ transfer function */
|
||||
float maxCLL, maxFALL;
|
||||
};
|
||||
|
||||
/** Type or formula for a curve */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue