[vlc-devel] [PATCH] dxva2: fix decoder surface copying alignment
Steve Lhomme
robux4 at videolabs.io
Tue Mar 28 17:14:59 CEST 2017
Otherwise BBB 480p fails to play properly.
---
modules/codec/avcodec/dxva2.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index f2ff49777e..8d76054cee 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -261,6 +261,11 @@ static int Extract(vlc_va_t *va, picture_t *picture, uint8_t *data)
visibleSource.top = 0;
visibleSource.right = picture->format.i_visible_width;
visibleSource.bottom = picture->format.i_visible_height;
+ if (va->sys->render == VLC_CODEC_NV12 || va->sys->render == VLC_CODEC_P010)
+ {
+ visibleSource.right = (picture->format.i_visible_width + 0x01) & ~0x01;
+ visibleSource.bottom = (picture->format.i_visible_height + 0x01) & ~0x01;
+ }
hr = IDirect3DDevice9_StretchRect( (IDirect3DDevice9*) dx_sys->d3ddev, d3d, &visibleSource, output, &visibleSource, D3DTEXF_NONE);
if (FAILED(hr)) {
msg_Err(va, "Failed to copy the hw surface to the decoder surface (hr=0x%0lx)", hr );
--
2.11.1
More information about the vlc-devel
mailing list