summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-01 23:13:39 +0200
committerwm4 <wm4@nowhere>2013-05-04 01:31:46 +0200
commit767cbb77ed62023002374185810ea0c1fd9d41b8 (patch)
tree14f3220f45db92c09fefd504a12a8b1695bcdc92
parent35568f84f3170085eccddd82845c5cffc6f7ec7c (diff)
downloadmpv-767cbb77ed62023002374185810ea0c1fd9d41b8.tar.bz2
mpv-767cbb77ed62023002374185810ea0c1fd9d41b8.tar.xz
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.
-rw-r--r--video/out/gl_video.c5
1 files changed, 3 insertions, 2 deletions
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;