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

Steve Lhomme robux4 at gmail.com
Wed Dec 13 16:52:20 CET 2017


On Wed, Dec 13, 2017 at 10:58 AM, RĂ©mi Denis-Courmont <remi at remlab.net> wrote:
> What I originally meant is that the pitch alignment should ne defined as a pseudo-constant in a public header, not hard-coded in the core picture allocator.

It depends on the decoder and should be handled there. There's also
the pixel format alignment which hopefully is less restrictive than
the decoder. But if a decoder has (supposedly) no requirement we still
need to ensure all picture in the format meet the plane requirements.
For now we have hardcoded a value of 16 bytes because it works most of
the time but it seems that it's not enough anymore.

The log mentioned is specific to avcodec but IMO the same should apply
to all decoders.

> I am not sure if the unit should be samples, pixels or bytes though.

It depends where we would use that value. If it's just memory
allocation it should be bytes. If it's dimension alignment then
probably pixels. But that means we'd still need to process the plane
alignment before deciding the actual byte alignment we need. A lookup
for vlc_fourcc_GetChromaDescription() each time is probably too heavy.

32 bytes ought to be enough for everyone.

> --
> 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