mp_image: call pl_color_space_infer in guess_csp
This will do a little bit more than only setting max_luma. Also will fallback to bt.709/bt.1886, but that's fine. We would do it anyway later. If params goes through guess_csp, they shouldn't have "unknown" fields anymore.
This commit is contained in:
1 parent
9dd598def8
commit
43824e793b
1 file changed
+1
-6
+1
-6
@@ -1042,12 +1042,7 @@ void mp_image_params_guess_csp(struct mp_image_params *params)
|
||||
|
||||
// If the signal peak is unknown, we're forced to pick the TRC's
|
||||
// nominal range as the signal peak to prevent clipping
|
||||
pl_color_space_nominal_luma_ex(pl_nominal_luma_params(
|
||||
.color = ¶ms->color,
|
||||
.metadata = PL_HDR_METADATA_HDR10,
|
||||
.scaling = PL_HDR_NITS,
|
||||
.out_max = ¶ms->color.hdr.max_luma,
|
||||
));
|
||||
pl_color_space_infer(¶ms->color);
|
||||
|
||||
if (!pl_color_space_is_hdr(¶ms->color)) {
|
||||
// Some clips have leftover HDR metadata after conversion to SDR, so to
|
||||
|
||||
Reference in new issue
Block a user