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

Rémi Denis-Courmont remi at remlab.net
Mon Nov 12 11:58:15 CET 2018


I would expect that SIMD code cares about the scan line alignment, or at least the plane alignment. Adjusting the buffer alignment is necessary but *not* sufficient for that purpose.

Le 12 novembre 2018 09:51:20 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>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 | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/src/misc/picture.c b/src/misc/picture.c
>index b373ebd21f..388d4ab8d5 100644
>--- a/src/misc/picture.c
>+++ b/src/misc/picture.c
>@@ -73,16 +73,16 @@ static void picture_Destroy(picture_t *pic)
> 
> VLC_WEAK void *picture_Allocate(int *restrict fdp, size_t size)
> {
>-    assert((size % 16) == 0);
>+    assert((size % 32) == 0);
>     *fdp = -1;
>-    return aligned_alloc(16, size);
>+    return aligned_alloc(32, size);
> }
> 
> VLC_WEAK void picture_Deallocate(int fd, void *base, size_t size)
> {
>     assert(fd == -1);
>     aligned_free(base);
>-    assert((size % 16) == 0);
>+    assert((size % 32) == 0);
> }
> 
>/*****************************************************************************
>-- 
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20181112/53d24366/attachment.html>


More information about the vlc-devel mailing list