[vlc-devel] [PATCH 6/6] d3d11va: detect when the texture alignment is not correct

Rémi Denis-Courmont remi at remlab.net
Wed Dec 13 17:19:08 CET 2017


Le 13 décembre 2017 18:17:23 GMT+02:00, Steve Lhomme <robux4 at videolabs.io> a écrit :
>---
> modules/codec/avcodec/d3d11va.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/modules/codec/avcodec/d3d11va.c
>b/modules/codec/avcodec/d3d11va.c
>index 0fb16efb8e..dde9c22cc8 100644
>--- a/modules/codec/avcodec/d3d11va.c
>+++ b/modules/codec/avcodec/d3d11va.c
>@@ -686,6 +686,9 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va,
>int codec_id,
>         sys->textureHeight = fmt->i_height;
>     }
> 
>+    assert(sys->textureWidth  >= fmt->i_width);
>+    assert(sys->textureHeight >= fmt->i_height);
>+
>if ((sys->textureWidth != fmt->i_width || sys->textureHeight !=
>fmt->i_height) &&
>         !CanUseDecoderPadding(sys))
>     {
>-- 
>2.14.2
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

This looks dubious. Bigger-than does not guarantee alignment on any specific multiple.
-- 
Remi Denis-Courmont


More information about the vlc-devel mailing list