From 767cbb77ed62023002374185810ea0c1fd9d41b8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 1 May 2013 23:13:39 +0200 Subject: gl_video: use GL_SRGB only if it's really RGB Use the proper RGB flag instead of !YUV. Currently, this doesn't change anything, because only RGB and YUV formats are supported. --- video/out/gl_video.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/out/gl_video.c b/video/out/gl_video.c index d7fd6774b6..43dbb843f1 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -165,7 +165,7 @@ struct gl_video { struct mp_imgfmt_desc image_desc; - bool is_yuv; + bool is_yuv, is_rgb; bool is_linear_rgb; // per pixel (full pixel when packed, each component when planar) @@ -1048,7 +1048,7 @@ static void init_video(struct gl_video *p) check_gl_features(p); - if (!p->is_yuv && (p->opts.srgb || p->use_lut_3d)) { + if (p->is_rgb && (p->opts.srgb || p->use_lut_3d)) { p->is_linear_rgb = true; p->image.planes[0].gl_internal_format = GL_SRGB; } @@ -1666,6 +1666,7 @@ static bool init_format(int fmt, struct gl_video *init) return false; init->is_yuv = desc.flags & MP_IMGFLAG_YUV; + init->is_rgb = desc.flags & MP_IMGFLAG_RGB; init->is_linear_rgb = false; init->plane_count = desc.num_planes; init->image_desc = desc; -- cgit v1.2.3