vlc | branch: master | Steve Lhomme <[email protected]> | Wed Jun 21 13:52:05 2017 +0200| [4e28f09f526310630e30239418bcd5e501621b57] | committer: Jean-Baptiste Kempf
dxva: use the surface width/height from input format in create_decoder_surfaces Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4e28f09f526310630e30239418bcd5e501621b57 --- modules/codec/avcodec/d3d11va.c | 6 +++--- modules/codec/avcodec/dxva2.c | 10 +++++----- modules/codec/avcodec/va_surface_internal.h | 2 -- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c index e4368a908e..1ffd4a97e6 100644 --- a/modules/codec/avcodec/d3d11va.c +++ b/modules/codec/avcodec/d3d11va.c @@ -860,8 +860,8 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id, { D3D11_TEXTURE2D_DESC texDesc; ZeroMemory(&texDesc, sizeof(texDesc)); - texDesc.Width = dx_sys->va_pool.surface_width; - texDesc.Height = dx_sys->va_pool.surface_height; + texDesc.Width = fmt->i_width; + texDesc.Height = fmt->i_height; texDesc.MipLevels = 1; texDesc.Format = sys->render; texDesc.SampleDesc.Count = 1; @@ -905,7 +905,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id, } } msg_Dbg(va, "ID3D11VideoDecoderOutputView succeed with %d surfaces (%dx%d)", - surface_count, dx_sys->va_pool.surface_width, dx_sys->va_pool.surface_height); + surface_count, fmt->i_width, fmt->i_height); D3D11_VIDEO_DECODER_DESC decoderDesc; ZeroMemory(&decoderDesc, sizeof(decoderDesc)); diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c index 523d847a15..a9e83f48b7 100644 --- a/modules/codec/avcodec/dxva2.c +++ b/modules/codec/avcodec/dxva2.c @@ -657,8 +657,8 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id, HRESULT hr; hr = IDirectXVideoDecoderService_CreateSurface(sys->d3ddec, - sys->va_pool.surface_width, - sys->va_pool.surface_height, + fmt->i_width, + fmt->i_width, surface_count - 1, p_sys->render, D3DPOOL_DEFAULT, @@ -671,12 +671,12 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id, return VLC_EGENERIC; } msg_Dbg(va, "IDirectXVideoAccelerationService_CreateSurface succeed with %d surfaces (%dx%d)", - surface_count, sys->va_pool.surface_width, sys->va_pool.surface_height); + surface_count, fmt->i_width, fmt->i_height); IDirect3DSurface9 *tstCrash; hr = IDirectXVideoDecoderService_CreateSurface(sys->d3ddec, - sys->va_pool.surface_width, - sys->va_pool.surface_height, + fmt->i_width, + fmt->i_width, 0, p_sys->render, D3DPOOL_DEFAULT, diff --git a/modules/codec/avcodec/va_surface_internal.h b/modules/codec/avcodec/va_surface_internal.h index d95505e505..9b8223f45e 100644 --- a/modules/codec/avcodec/va_surface_internal.h +++ b/modules/codec/avcodec/va_surface_internal.h @@ -36,8 +36,6 @@ typedef struct { int codec_id; - int width; - int height; /* */ unsigned surface_count; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
