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.
This commit is contained in:
wm4
2012-11-14 11:19:04 +01:00
parent a86ec72986
commit e5f7976000
5 changed files with 26 additions and 5 deletions

View File

@@ -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},