[FFmpeg-devel] [PATCH] avcodec: Instruct users to align buffers to 32-byte.

Michael Niedermayer michaelni at gmx.at
Sun Aug 10 12:10:36 CEST 2014


On Sun, Aug 10, 2014 at 04:17:09AM +0100, Kieran Kunhya wrote:
> The Opus decoder in particular uses optimised float_dsp functions that expect 32-byte alignment
> ---
>  libavcodec/avcodec.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 93aad35..5cbc175 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -1880,7 +1880,7 @@ typedef struct AVCodecContext {
>       * avcodec_default_get_buffer() instead of providing buffers allocated by
>       * some other means.
>       *
> -     * AVFrame.data[] should be 32- or 16-byte-aligned unless the CPU doesn't
> +     * AVFrame.data[] should be 32-byte-aligned unless the CPU doesn't
>       * need it. avcodec_default_get_buffer() aligns the output buffer properly,
>       * but if get_buffer() is overridden then alignment considerations should
>       * be taken into account.

either something like this, or the affected dsp functions could be
given support to handle unaligned parameters

Iam fine with either, its mostly a question what the people prefer.
supporting <32byte aligned might require some changes though


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140810/49f171f3/attachment.asc>


More information about the ffmpeg-devel mailing list