1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 00:02:13 +00:00

vf_format: set original params when converting format

Otherwise it will restore to a format before vf_format conversion when
restoring params. Only do this when the out format isn't dolbyvision.
This commit is contained in:
nanahi 2024-10-01 01:13:33 -04:00 committed by Kacper Michajłow
parent e35a559ce1
commit e2365bfece

View File

@ -84,6 +84,11 @@ static void set_params(struct vf_format_opts *p, struct mp_image_params *out,
out->light = MP_CSP_LIGHT_AUTO;
}
}
if (p->colormatrix != PL_COLOR_SYSTEM_DOLBYVISION && !p->dovi) {
out->primaries_orig = out->color.primaries;
out->transfer_orig = out->color.transfer;
out->sys_orig = out->repr.sys;
}
if (p->sig_peak)
out->color.hdr = (struct pl_hdr_metadata){ .max_luma = p->sig_peak * MP_REF_WHITE };
if (p->light)