summaryrefslogtreecommitdiffstats
path: root/video/filter
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-05-04 01:13:03 +0200
committerwm4 <wm4@nowhere>2017-05-04 01:13:03 +0200
commit1143f2877a70c8aa3f0b44e746360215e470dd56 (patch)
tree02715c99c0a26dc7bdec742bcab1b65424e4e5fd /video/filter
parent19bf3a72ff3fd36fbd2443f27e453d6e82b4dd2f (diff)
downloadmpv-1143f2877a70c8aa3f0b44e746360215e470dd56.tar.bz2
mpv-1143f2877a70c8aa3f0b44e746360215e470dd56.tar.xz
d3d11: change mp_image plane pointer semantics
Until now, the texture pointer was stored in plane 1, and the texture array index was in plane 2. Move this down to plane 0 and plane 1. This is to align it to the new WIP D3D11 decoding API in Libav, where we decided that there is no reason to avoid setting plane 0, and that it would be less weird to start at plane 0.
Diffstat (limited to 'video/filter')
-rw-r--r--video/filter/vf_d3d11vpp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/video/filter/vf_d3d11vpp.c b/video/filter/vf_d3d11vpp.c
index 9e02abeafe..92999be639 100644
--- a/video/filter/vf_d3d11vpp.c
+++ b/video/filter/vf_d3d11vpp.c
@@ -101,8 +101,8 @@ static struct mp_image *alloc_pool(void *pctx, int fmt, int w, int h)
mp_image_set_size(mpi, w, h);
mpi->params.hw_subfmt = p->out_params.hw_subfmt;
- mpi->planes[1] = (void *)texture;
- mpi->planes[2] = (void *)(intptr_t)0;
+ mpi->planes[0] = (void *)texture;
+ mpi->planes[1] = (void *)(intptr_t)0;
return mpi;
}
@@ -257,13 +257,13 @@ static int render(struct vf_instance *vf)
if (!out)
goto cleanup;
- ID3D11Texture2D *d3d_out_tex = (void *)out->planes[1];
+ ID3D11Texture2D *d3d_out_tex = (void *)out->planes[0];
in = mp_refqueue_get(p->queue, 0);
if (!in)
goto cleanup;
- ID3D11Texture2D *d3d_tex = (void *)in->planes[1];
- int d3d_subindex = (intptr_t)in->planes[2];
+ ID3D11Texture2D *d3d_tex = (void *)in->planes[0];
+ int d3d_subindex = (intptr_t)in->planes[1];
mp_image_copy_attributes(out, in);