[vlc-devel] [PATCH] directx_va: add an extra buffer when decoding MPEG-2
Steve Lhomme
robux4 at videolabs.io
Thu Oct 12 11:59:33 CEST 2017
DXVA2 with deinterlacing seems to be using one of these buffers when it shouldn't
Fixes #18731
---
modules/codec/avcodec/directx_va.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index 1f51e4c227..031582f7b7 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -291,7 +291,7 @@ int directx_va_Setup(vlc_va_t *va, directx_sys_t *dx_sys, const AVCodecContext *
}
int surface_alignment = 16;
- unsigned surface_count = 2;
+ unsigned surface_count = 2; //2;
switch ( avctx->codec_id )
{
@@ -299,7 +299,7 @@ int directx_va_Setup(vlc_va_t *va, directx_sys_t *dx_sys, const AVCodecContext *
/* decoding MPEG-2 requires additional alignment on some Intel GPUs,
but it causes issues for H.264 on certain AMD GPUs..... */
surface_alignment = 32;
- surface_count += 2;
+ surface_count += 2+1;
break;
case AV_CODEC_ID_HEVC:
/* the HEVC DXVA2 spec asks for 128 pixel aligned surfaces to ensure
--
2.14.2
More information about the vlc-devel
mailing list