mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-28 05:40:11 -04:00
render/color: add wlr_color_transfer_function_get_default_luminance()
This commit is contained in:
parent
50537e2e6f
commit
10b8880fc7
3 changed files with 33 additions and 0 deletions
|
|
@ -128,3 +128,23 @@ void wlr_color_primaries_to_xyz(const struct wlr_color_primaries *primaries, flo
|
|||
};
|
||||
memcpy(matrix, result, sizeof(result));
|
||||
}
|
||||
|
||||
void wlr_color_transfer_function_get_default_luminance(enum wlr_color_transfer_function tf,
|
||||
struct wlr_color_luminances *lum) {
|
||||
switch (tf) {
|
||||
case WLR_COLOR_TRANSFER_FUNCTION_ST2084_PQ:
|
||||
*lum = (struct wlr_color_luminances){
|
||||
.min = 0.005,
|
||||
.max = 10000,
|
||||
.reference = 203,
|
||||
};
|
||||
break;
|
||||
default:
|
||||
*lum = (struct wlr_color_luminances){
|
||||
.min = 0.2,
|
||||
.max = 80,
|
||||
.reference = 80,
|
||||
};
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue