cmm: don't use display primaries as target_primaries in SDR mode
This commit is contained in:
parent
1189827b8b
commit
2b7b3b5310
1 changed files with 18 additions and 7 deletions
|
|
@ -379,16 +379,27 @@ impl WlOutputGlobal {
|
||||||
max_cll = Some(F64(l.max));
|
max_cll = Some(F64(l.max));
|
||||||
max_fall = Some(F64(l.max_fall));
|
max_fall = Some(F64(l.max_fall));
|
||||||
}
|
}
|
||||||
let primaries = match self.bcs.get() {
|
let named_primaries;
|
||||||
BackendColorSpace::Default => NamedPrimaries::Srgb,
|
let primaries;
|
||||||
BackendColorSpace::Bt2020 => NamedPrimaries::Bt2020,
|
let target_primaries;
|
||||||
};
|
match self.bcs.get() {
|
||||||
|
BackendColorSpace::Default => {
|
||||||
|
named_primaries = NamedPrimaries::Srgb;
|
||||||
|
primaries = named_primaries.primaries();
|
||||||
|
target_primaries = primaries;
|
||||||
|
}
|
||||||
|
BackendColorSpace::Bt2020 => {
|
||||||
|
named_primaries = NamedPrimaries::Bt2020;
|
||||||
|
primaries = named_primaries.primaries();
|
||||||
|
target_primaries = self.primaries;
|
||||||
|
}
|
||||||
|
}
|
||||||
let cd = self.state.color_manager.get_description(
|
let cd = self.state.color_manager.get_description(
|
||||||
Some(primaries),
|
Some(named_primaries),
|
||||||
primaries.primaries(),
|
primaries,
|
||||||
luminance,
|
luminance,
|
||||||
tf,
|
tf,
|
||||||
self.primaries,
|
target_primaries,
|
||||||
target_luminance,
|
target_luminance,
|
||||||
max_cll,
|
max_cll,
|
||||||
max_fall,
|
max_fall,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue