[vlc-devel] [PATCH 4/4] direct3d11: align I420 buffers on 64 bits so that direct rendering is used

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


Le 13 décembre 2017 09:59:50 GMT+02:00, Steve Lhomme <robux4 at gmail.com> a écrit :
>On Tue, Dec 12, 2017 at 2:54 PM, Rémi Denis-Courmont <remi at remlab.net>
>wrote:
>> Le 12 décembre 2017 15:13:44 GMT+02:00, Steve Lhomme
><robux4 at videolabs.io> a écrit :
>>>no more "avcodec warning: plane 0 not aligned: disabling direct
>>>rendering"
>>>---
>>> modules/video_output/win32/direct3d11.c | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>>diff --git a/modules/video_output/win32/direct3d11.c
>>>b/modules/video_output/win32/direct3d11.c
>>>index 1fd25bb85a..01cda4f4e1 100644
>>>--- a/modules/video_output/win32/direct3d11.c
>>>+++ b/modules/video_output/win32/direct3d11.c
>>>@@ -1993,6 +1993,12 @@ static int
>>>Direct3D11CreateFormatResources(vout_display_t *vd, const video_forma
>>>
>>>     sys->picQuad.i_width  = fmt->i_width;
>>>     sys->picQuad.i_height = fmt->i_height;
>>>+    if (!is_d3d11_opaque(fmt->i_chroma))
>>>+    {
>>>+        sys->picQuad.i_width  = (sys->picQuad.i_width  + 0x3F) &
>>>~0x3F;
>>>+        sys->picQuad.i_height = (sys->picQuad.i_height + 0x3F) &
>>>~0x3F;
>>>+    }
>>>+    else
>>>if ( sys->picQuadConfig->formatTexture != DXGI_FORMAT_R8G8B8A8_UNORM
>&&
>>>        sys->picQuadConfig->formatTexture != DXGI_FORMAT_B5G6R5_UNORM
>)
>>>     {
>>>--
>>>2.14.2
>>>
>>>_______________________________________________
>>>vlc-devel mailing list
>>>To unsubscribe or modify your subscription options:
>>>https://mailman.videolan.org/listinfo/vlc-devel
>>
>> Please define a pseudo constant or static inline function and use it
>where applicable.
>
>OK
>
>> I am pretty sure we already solved that problem in the heap allocator
>case.
>
>Did you mean this ?
>https://patches.videolan.org/patch/7971/
>
>I wonder if we should call avcodec_align_dimensions2() before
>vout_Request(). Right now it's done after to check everything is fine.
>Which is too late to fix at that point.
>
>> --
>> Remi Denis-Courmont
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

No I don't mean  that patch - for the exact reasons I gave when I rejected it.
-- 
Remi Denis-Courmont


More information about the vlc-devel mailing list