render: introduce bt.1886 transfer function

This commit is contained in:
llyyr 2025-10-04 14:48:42 +05:30
parent d8fb7adcf0
commit 6e1c8748ff
10 changed files with 52 additions and 0 deletions

View file

@ -41,6 +41,7 @@ static bool get_tf_preference(enum wlr_color_transfer_function tf) {
return 0;
case WLR_COLOR_TRANSFER_FUNCTION_ST2084_PQ:
return 1;
case WLR_COLOR_TRANSFER_FUNCTION_BT1886:
case WLR_COLOR_TRANSFER_FUNCTION_SRGB:
case WLR_COLOR_TRANSFER_FUNCTION_EXT_LINEAR:
return -1;

View file

@ -995,6 +995,8 @@ wlr_color_manager_v1_transfer_function_to_wlr(enum wp_color_manager_v1_transfer_
return WLR_COLOR_TRANSFER_FUNCTION_EXT_LINEAR;
case WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_GAMMA22:
return WLR_COLOR_TRANSFER_FUNCTION_GAMMA22;
case WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_BT1886:
return WLR_COLOR_TRANSFER_FUNCTION_BT1886;
default:
abort();
}
@ -1011,6 +1013,8 @@ wlr_color_manager_v1_transfer_function_from_wlr(enum wlr_color_transfer_function
return WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_EXT_LINEAR;
case WLR_COLOR_TRANSFER_FUNCTION_GAMMA22:
return WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_GAMMA22;
case WLR_COLOR_TRANSFER_FUNCTION_BT1886:
return WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_BT1886;
}
abort();
}