[vlc-devel] [PATCH] picture: align pictures on 32 bytes

Steve Lhomme robux4 at ycbcr.xyz
Mon Nov 12 08:47:30 CET 2018


In the aligned_alloc doc: "The |size| parameter must be an integral 
multiple of |alignment|. "

So I guess it's needed, although I don't see the point...

On 10/11/2018 10:21, Steve Lhomme wrote:
> I'm not sure. I don't even know if this assert is worth anything.
>
>> On 9 Nov 2018, at 18:32, Tristan Matthews <tmatth at videolan.org> wrote:
>>
>> Hi,
>>
>>> On Fri, Nov 9, 2018 at 11:58 AM Steve Lhomme <robux4 at ycbcr.xyz> wrote:
>>>
>>> Code relying on AVX-2 (like dav1d) cannot work without that. Even avcodec has a
>>> requirement of 64 (likely to get at least 32 on all planes). So it's probably
>>> time to upgrade.
>>> ---
>>> src/misc/picture.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/src/misc/picture.c b/src/misc/picture.c
>>> index b373ebd21f..799dab479e 100644
>>> --- a/src/misc/picture.c
>>> +++ b/src/misc/picture.c
>>> @@ -75,7 +75,7 @@ VLC_WEAK void *picture_Allocate(int *restrict fdp, size_t size)
>>> {
>>>      assert((size % 16) == 0);
>> Would it make sense to update the assertions?
>>
>> Best,
>> -t
>>
>>>      *fdp = -1;
>>> -    return aligned_alloc(16, size);
>>> +    return aligned_alloc(32, size);
>>> }
>>>
>>> VLC_WEAK void picture_Deallocate(int fd, void *base, size_t size)
>>> --
>>> 2.17.1
>>>
>>> _______________________________________________
>>> 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
> _______________________________________________
> 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