diff options
author | wm4 <wm4@nowhere> | 2014-10-26 02:36:15 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-26 02:36:15 +0200 |
commit | 3b34f0078da0a946d68f964b214412de261ebdc2 (patch) | |
tree | 2cff3d072e4b8acb3d1b08371fbaab59db6697ae /video/out | |
parent | bb80204de24ca5a42fa62673661619627b5dd8e3 (diff) | |
download | mpv-3b34f0078da0a946d68f964b214412de261ebdc2.tar.bz2 mpv-3b34f0078da0a946d68f964b214412de261ebdc2.tar.xz |
vo_direct3d: support nv12/nv21 directly
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/vo_direct3d.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c index c942c964f5..4b81026e35 100644 --- a/video/out/vo_direct3d.c +++ b/video/out/vo_direct3d.c @@ -201,6 +201,8 @@ static const struct fmt_entry fmt_table[] = { {IMGFMT_420P, MAKEFOURCC('I','4','2','0')}, {IMGFMT_420P, MAKEFOURCC('I','Y','U','V')}, {IMGFMT_410P, MAKEFOURCC('Y','V','U','9')}, + {IMGFMT_NV12, MAKEFOURCC('N','V','1','2')}, + {IMGFMT_NV21, MAKEFOURCC('N','V','2','1')}, // packed YUV {IMGFMT_YUYV, D3DFMT_YUY2}, {IMGFMT_UYVY, D3DFMT_UYVY}, @@ -1379,6 +1381,12 @@ static bool get_video_buffer(d3d_priv *priv, struct mp_image *out) out->planes[0] = base; out->stride[0] = stride; + if (out->num_planes == 2) { + // NV12, NV21 + out->planes[1] = base + stride * out->h; + out->stride[1] = stride; + } + if (out->num_planes == 3) { bool swap = priv->movie_src_fmt == MAKEFOURCC('Y','V','1','2'); |