diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-02-01 22:42:24 +0100 |
---|---|---|
committer | Leo Izen <leo.izen@gmail.com> | 2023-03-02 09:37:06 -0500 |
commit | 7ceadbb3c130b791eca1ab9a08fdc8d68d1dd72e (patch) | |
tree | 17cd792fb49288651d9a1842b5c81d655383ab72 /video | |
parent | 2101e77d1e7743dd16f3c37bd8cd4a00c0a0cf4c (diff) | |
download | mpv-7ceadbb3c130b791eca1ab9a08fdc8d68d1dd72e.tar.bz2 mpv-7ceadbb3c130b791eca1ab9a08fdc8d68d1dd72e.tar.xz |
zimg: set correct primaries for XYZ
Diffstat (limited to 'video')
-rw-r--r-- | video/zimg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/video/zimg.c b/video/zimg.c index 1cdf8d2945..ff379ed4d9 100644 --- a/video/zimg.c +++ b/video/zimg.c @@ -431,7 +431,10 @@ static bool setup_format(zimg_image_format *zfmt, struct mp_zimg_repack *r, zfmt->matrix_coefficients = mp_to_z_matrix(fmt.color.space); zfmt->transfer_characteristics = mp_to_z_trc(fmt.color.gamma); - zfmt->color_primaries = mp_to_z_prim(fmt.color.primaries); + // For MP_CSP_XYZ only valid primaries are defined in ST 428-1 + zfmt->color_primaries = fmt.color.space == MP_CSP_XYZ + ? ZIMG_PRIMARIES_ST428 + : mp_to_z_prim(fmt.color.primaries); zfmt->chroma_location = mp_to_z_chroma(fmt.chroma_location); if (ctx && ctx->opts.fast) { |