[vlc-commits] d3d11va: use the external pool texture size even for the internal pool
Steve Lhomme
git at videolan.org
Thu Oct 12 23:26:59 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Oct 12 15:53:34 2017 +0200| [532ca7722383ff2cde69d7b7cc4c4e8f21aa404b] | committer: Jean-Baptiste Kempf
d3d11va: use the external pool texture size even for the internal pool
When it's available, so that pre-computed dimensions still match as if the
pictures were coming from the external pool.
Fixes #18578
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=532ca7722383ff2cde69d7b7cc4c4e8f21aa404b
---
modules/codec/avcodec/d3d11va.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index be9b649ddd..f95174e5bc 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -385,6 +385,11 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
va->sys->totalTextureSlices = dstDesc.ArraySize;
}
}
+ if (!va->sys->textureWidth || !va->sys->textureHeight)
+ {
+ va->sys->textureWidth = fmt->video.i_width;
+ va->sys->textureHeight = fmt->video.i_height;
+ }
#if VLC_WINSTORE_APP
err = directx_va_Open(va, &sys->dx_sys, false);
@@ -861,8 +866,8 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
{
D3D11_TEXTURE2D_DESC texDesc;
ZeroMemory(&texDesc, sizeof(texDesc));
- texDesc.Width = fmt->i_width;
- texDesc.Height = fmt->i_height;
+ texDesc.Width = sys->textureWidth;
+ texDesc.Height = sys->textureHeight;
texDesc.MipLevels = 1;
texDesc.Format = sys->render;
texDesc.SampleDesc.Count = 1;
More information about the vlc-commits
mailing list