mirror of https://github.com/mpv-player/mpv
mp_image: strip all HDR peak information from SDR clips
By overriding it with 1.0 (aka SDR). This prevents blowing up on mistagged clips. Fixes #6111
This commit is contained in:
parent
a5b0d59084
commit
48c38f730d
|
@ -812,6 +812,12 @@ void mp_image_params_guess_csp(struct mp_image_params *params)
|
|||
}
|
||||
}
|
||||
|
||||
if (!mp_trc_is_hdr(params->color.gamma)) {
|
||||
// Some clips have leftover HDR metadata after conversion to SDR, so to
|
||||
// avoid blowing up the tone mapping code, strip/sanitize it
|
||||
params->color.sig_peak = 1.0;
|
||||
}
|
||||
|
||||
if (params->chroma_location == MP_CHROMA_AUTO) {
|
||||
if (params->color.levels == MP_CSP_LEVELS_TV)
|
||||
params->chroma_location = MP_CHROMA_LEFT;
|
||||
|
|
Loading…
Reference in New Issue