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
1 changed files with 5 additions and 0 deletions

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)