summaryrefslogtreecommitdiffstats
path: root/video/img_format.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-14 11:19:04 +0100
committerwm4 <wm4@nowhere>2012-11-14 11:50:02 +0100
commite5f7976000af0fb8da5fd0c3a01cfd44e6e64516 (patch)
treed0745e2f279e2f7e9702d89cbf6e0e6bf58de3f5 /video/img_format.c
parenta86ec729868e9bd5777f5800527e5cd9bf79fe85 (diff)
downloadmpv-e5f7976000af0fb8da5fd0c3a01cfd44e6e64516.tar.bz2
mpv-e5f7976000af0fb8da5fd0c3a01cfd44e6e64516.tar.xz
video: add IMGFMT_Y16/PIX_FMT_GRAY16
This pixel format is sometimes used with yuv4mpeg. vo_direct3d used its own IMGFMT_Y16 internally for some reason. vo_opengl, vo_opengl_old, and vo_direct3d should be able to display this pixel format natively.
Diffstat (limited to 'video/img_format.c')
-rw-r--r--video/img_format.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/img_format.c b/video/img_format.c
index 8038e82324..42df721435 100644
--- a/video/img_format.c
+++ b/video/img_format.c
@@ -103,6 +103,12 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift,
xs = 31;
ys = 31;
break;
+ case IMGFMT_Y16BE:
+ case IMGFMT_Y16LE:
+ bits = 16;
+ xs = 31;
+ ys = 31;
+ break;
default:
err = 1;
break;
@@ -164,6 +170,9 @@ struct mp_imgfmt_entry mp_imgfmt_list[] = {
{"hm12", IMGFMT_HM12},
{"y800", IMGFMT_Y800},
{"y8", IMGFMT_Y8},
+ {"y16ne", IMGFMT_Y16},
+ {"y16le", IMGFMT_Y16LE},
+ {"y16be", IMGFMT_Y16BE},
{"nv12", IMGFMT_NV12},
{"nv21", IMGFMT_NV21},
{"bgr24", IMGFMT_BGR24},