summaryrefslogtreecommitdiffstats
path: root/video/img_format.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-09 22:47:33 +0100
committerwm4 <wm4@nowhere>2015-03-09 22:47:33 +0100
commitcfa44f4e9077d712be5c1c3cf9a4d7bbe79e605e (patch)
tree549d8be04ac7a9c69a7b7838dddf25d5627e3a82 /video/img_format.c
parentb9307b71753f205baaac99f8e803774c7efdebeb (diff)
downloadmpv-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/img_format.c')
-rw-r--r--video/img_format.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/img_format.c b/video/img_format.c
index f717ff9c1e..5451dd9ad1 100644
--- a/video/img_format.c
+++ b/video/img_format.c
@@ -249,6 +249,9 @@ struct mp_imgfmt_desc mp_imgfmt_get_desc(int mpfmt)
desc.plane_bits = 8; // usually restricted to 8 bit; may change
}
+ if (desc.chroma_xs || desc.chroma_ys)
+ desc.flags |= MP_IMGFLAG_SUBSAMPLED;
+
return desc;
}