[vlc-devel] [PATCH] d3d11va: use the external pool texture size even for the internal pool
Steve Lhomme
robux4 at videolabs.io
Thu Oct 12 15:53:34 CEST 2017
When it's available, so that pre-computed dimensions still match as if the
pictures were coming from the external pool.
Fixes #18578
---
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;
--
2.14.2
More information about the vlc-devel
mailing list