[vlc-commits] directx_va: add an extra buffer when decoding MPEG-2

Steve Lhomme git at videolan.org
Thu Oct 12 23:29:16 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Oct 12 12:00:59 2017 +0200| [6eabd69cde982a3aef89e63894ba2b6f68f8220a] | committer: Jean-Baptiste Kempf

directx_va: add an extra buffer when decoding MPEG-2

DXVA2 with deinterlacing seems to be using one of these buffers when it shouldn't

Fixes #18731

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6eabd69cde982a3aef89e63894ba2b6f68f8220a
---

 modules/codec/avcodec/directx_va.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index 1f51e4c227..e35c6856e2 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -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; /* 1 for extra buffer for deinterlacing */
         break;
     case AV_CODEC_ID_HEVC:
         /* the HEVC DXVA2 spec asks for 128 pixel aligned surfaces to ensure



More information about the vlc-commits mailing list