[flac-dev] flac decoder output buffer alignment

Martijn van Beurden mvanb1 at gmail.com
Sun Mar 16 18:48:28 UTC 2025


Hi,

Please explain why you need aligned buffers.

Kind regards, Martijn van Beurden

Op zo 16 mrt 2025 om 01:36 schreef Stefan Oltmanns <stefan-oltmanns at gmx.net>:
>
> Hello,
>
> I want to process the output from libflac with SSE/AVX. Unfortunately it
> seems that libflac always allocates the output buffer itself and there
> is no way to provide a buffer by the application.
>  From my understanding of the code flac is using it's own functions in
> share/alloc.h for allocations, and those use plain malloc. I assume the
> only way to force aligned output buffers is to modify the alloc.h and
> then link libflac statically and not use a system provided version?
>
> I'm also open for any other flac decoding library (written in C or with
> C header) that has the following features:
>
> -Support seeking (with fast seeking using seektables if available)
> -Support Ogg FLAC
> -Fast decoding
> -Should be able to handle *very long* flac files (like 2^40 samples).
> libavcodec/ffmpeg fails at this, as some internal counter overflows
>
> Best regards
> Stefan
> _______________________________________________
> flac-dev mailing list
> flac-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/flac-dev


More information about the flac-dev mailing list