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

Steve Lhomme robux4 at gmail.com
Wed Dec 13 17:37:28 CET 2017


On Wed, Dec 13, 2017 at 5:19 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> 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.

Indeed, it doesn't test the "alignment" rather that the decoder has
enough room to decode which apparently it doesn't check on its own.
And since we don't have a way to tell if alignments are matching that
should do for now. It's mostly for debugging.

> --
> Remi Denis-Courmont
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list