diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/d3d.c | 4 | ||||
-rw-r--r-- | video/decode/hw_d3d11va.c | 12 | ||||
-rw-r--r-- | video/filter/vf_d3d11vpp.c | 10 | ||||
-rw-r--r-- | video/out/opengl/hwdec_d3d11egl.c | 4 | ||||
-rw-r--r-- | video/out/opengl/hwdec_d3d11eglrgb.c | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/video/decode/d3d.c b/video/decode/d3d.c index d2c2c9745b..abe8034b60 100644 --- a/video/decode/d3d.c +++ b/video/decode/d3d.c @@ -301,8 +301,8 @@ struct mp_image *d3d11_download_image(struct mp_hwdec_ctx *ctx, if (mpi->imgfmt != IMGFMT_D3D11VA && mpi->imgfmt != IMGFMT_D3D11NV12) return NULL; - ID3D11Texture2D *texture = (void *)mpi->planes[1]; - int subindex = (intptr_t)mpi->planes[2]; + ID3D11Texture2D *texture = (void *)mpi->planes[0]; + int subindex = (intptr_t)mpi->planes[1]; if (!texture) return NULL; diff --git a/video/decode/hw_d3d11va.c b/video/decode/hw_d3d11va.c index 1eab4b5e0b..bb59034ab0 100644 --- a/video/decode/hw_d3d11va.c +++ b/video/decode/hw_d3d11va.c @@ -87,9 +87,9 @@ static struct mp_image *d3d11va_new_ref(ID3D11VideoDecoderOutputView *view, mp_image_setfmt(mpi, IMGFMT_D3D11VA); mp_image_set_size(mpi, w, h); - mpi->planes[0] = NULL; - mpi->planes[1] = (void *)surface->texture; - mpi->planes[2] = (void *)(intptr_t)surface_desc.Texture2D.ArraySlice; + mpi->planes[0] = (void *)surface->texture; + mpi->planes[1] = (void *)(intptr_t)surface_desc.Texture2D.ArraySlice; + mpi->planes[2] = NULL; mpi->planes[3] = (void *)surface->surface; return mpi; @@ -115,8 +115,8 @@ static struct mp_image *d3d11va_retrieve_image(struct lavc_ctx *s, if (img->imgfmt != IMGFMT_D3D11VA) return img; - ID3D11Texture2D *texture = (void *)img->planes[1]; - int subindex = (intptr_t)img->planes[2]; + ID3D11Texture2D *texture = (void *)img->planes[0]; + int subindex = (intptr_t)img->planes[1]; if (!texture) { MP_ERR(p, "Failed to get Direct3D texture and surface from mp_image\n"); @@ -178,7 +178,7 @@ static const struct d3d_decoded_format d3d11_formats[] = { static struct mp_image *d3d11va_update_image_attribs(struct lavc_ctx *s, struct mp_image *img) { - ID3D11Texture2D *texture = (void *)img->planes[1]; + ID3D11Texture2D *texture = (void *)img->planes[0]; if (!texture) return img; 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); diff --git a/video/out/opengl/hwdec_d3d11egl.c b/video/out/opengl/hwdec_d3d11egl.c index 1e0af02793..f2607f62f0 100644 --- a/video/out/opengl/hwdec_d3d11egl.c +++ b/video/out/opengl/hwdec_d3d11egl.c @@ -279,8 +279,8 @@ static int map_frame(struct gl_hwdec *hw, struct mp_image *hw_image, if (!p->gl_textures[0]) return -1; - ID3D11Texture2D *d3d_tex = (void *)hw_image->planes[1]; - int d3d_subindex = (intptr_t)hw_image->planes[2]; + ID3D11Texture2D *d3d_tex = (void *)hw_image->planes[0]; + int d3d_subindex = (intptr_t)hw_image->planes[1]; if (!d3d_tex) return -1; diff --git a/video/out/opengl/hwdec_d3d11eglrgb.c b/video/out/opengl/hwdec_d3d11eglrgb.c index 31e63eb8da..cb49496c5f 100644 --- a/video/out/opengl/hwdec_d3d11eglrgb.c +++ b/video/out/opengl/hwdec_d3d11eglrgb.c @@ -203,7 +203,7 @@ static int map_frame(struct gl_hwdec *hw, struct mp_image *hw_image, if (!p->gl_texture) return -1; - ID3D11Texture2D *d3d_tex = (void *)hw_image->planes[1]; + ID3D11Texture2D *d3d_tex = (void *)hw_image->planes[0]; if (!d3d_tex) return -1; |