[vlc-devel] [PATCH] core: avcodec requires 32-bytes memory alignment in many cases

Steve Lhomme robux4 at gmail.com
Wed Dec 13 09:40:18 CET 2017


I think you sent the reply to the wrong thread Rémi.

> If the plane alignment is the same as the scan line alignment, there is no plane alignment requirement as such.
>
> SIMD code cares about scan lines not only whole planes.

Is it possible to have scan lines aligned correctly but not the planes
? No. So we should *at least* get the planes right. Which we don't
right now. On some OS it may lucky enough that allocations are 32
bytes aligned but that's not the case on Windows if you don't request
it explicitly.


On Wed, Dec 13, 2017 at 9:22 AM, Steve Lhomme <robux4 at gmail.com> wrote:
> On Tue, Mar 31, 2015 at 11:25 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
>> I doubt that libavcodec has alignment requirement for the whole picture.
>
> It does. And when SIMD is enabled (so pretty much always) the
> alignment for all planes must be 32.
>
> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/utils.c;h=873f39f9bda4f6473035c7e096fbf04331858e73;hb=HEAD#l419
> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/internal.h;h=30cb9a0de1df41fc4eed4f3cf2084343cdf04227;hb=HEAD#l90
>
>> Usually, alignment constraints are on the scan line or possibly on the
>> plane.
>>
>> --
>> Rémi 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