summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2023-07-24 23:45:31 +0200
committersfan5 <sfan5@live.de>2023-07-26 11:26:36 +0200
commitbc96b23ef686d29efe95d54a4fd1836c177d7a61 (patch)
tree27dc4f6e92c4c1875f249c71ac61775e4e91a203 /video
parent90410cc17e18f5dd7b237b57bb23b466d32536ed (diff)
downloadmpv-bc96b23ef686d29efe95d54a4fd1836c177d7a61.tar.bz2
mpv-bc96b23ef686d29efe95d54a4fd1836c177d7a61.tar.xz
video_writer: fix gamma for YUV screenshots
reproduction steps: take any lossy WebP screenshot and check the colors (or JPEG without libjpeg support, or AVIF with tag-colorspace=no) fixes: 6d9e72cd89652aaf73fa5a8256c439221e86b94a
Diffstat (limited to 'video')
-rw-r--r--video/image_writer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/image_writer.c b/video/image_writer.c
index dff7ac58de..ba1afc4cc3 100644
--- a/video/image_writer.c
+++ b/video/image_writer.c
@@ -633,9 +633,9 @@ static struct mp_image *convert_image(struct mp_image *image, int destfmt,
mp_image_params_guess_csp(&p);
if (!image_writer_flexible_csp(opts)) {
- // Formats that don't support non-sRGB csps should be forced to sRGB
+ // If our format can't tag csps, set something sane
p.color.primaries = MP_CSP_PRIM_BT_709;
- p.color.gamma = MP_CSP_TRC_SRGB;
+ p.color.gamma = MP_CSP_TRC_AUTO;
p.color.light = MP_CSP_LIGHT_DISPLAY;
p.color.sig_peak = 0;
if (p.color.space != MP_CSP_RGB) {