diff options
author | wm4 <wm4@nowhere> | 2015-03-09 22:47:33 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-09 22:47:33 +0100 |
commit | cfa44f4e9077d712be5c1c3cf9a4d7bbe79e605e (patch) | |
tree | 549d8be04ac7a9c69a7b7838dddf25d5627e3a82 /video/out | |
parent | b9307b71753f205baaac99f8e803774c7efdebeb (diff) | |
download | mpv-cfa44f4e9077d712be5c1c3cf9a4d7bbe79e605e.tar.bz2 mpv-cfa44f4e9077d712be5c1c3cf9a4d7bbe79e605e.tar.xz |
vo_opengl: move minor helper to common code
The generic image format code should cary most of the "knowledge" about
image formats.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/gl_video.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 8654242bcb..5ddb6c5cad 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -880,15 +880,6 @@ static void shader_setup_scaler(char **shader, struct scaler *scaler, int pass) } } -// return false if RGB or 4:4:4 YUV -static bool input_is_subsampled(struct gl_video *p) -{ - for (int i = 0; i < p->plane_count; i++) - if (p->image_desc.xs[i] || p->image_desc.ys[i]) - return true; - return false; -} - static void compile_shaders(struct gl_video *p) { GL *gl = p->gl; @@ -1092,7 +1083,7 @@ static void compile_shaders(struct gl_video *p) if (p->plane_count > 1 && !trivial_scaling) use_indirect = true; - if (input_is_subsampled(p)) { + if (p->image_desc.flags & MP_IMGFLAG_SUBSAMPLED) { shader_setup_scaler(&header_conv, &p->scalers[1], -1); } else { // Force using the normal scaler on chroma. If the "indirect" stage is |