[FFmpeg-devel] [PATCH 1/2] Add some dsputil functions useful for AAC decoder

Alex Converse alex.converse
Mon Sep 21 23:01:31 CEST 2009


On Mon, Sep 21, 2009 at 4:40 PM, Mans Rullgard <mans at mansr.com> wrote:
>
> ---
> ?libavcodec/dsputil.c | ? 83 ++++++++++++++++++++++++++++++++++++++++++++++++++
> ?libavcodec/dsputil.h | ? 50 ++++++++++++++++++++++++++++++
> ?2 files changed, 133 insertions(+), 0 deletions(-)
>
> diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
> index 773d47f..f32ba50 100644
> --- a/libavcodec/dsputil.c
> +++ b/libavcodec/dsputil.c
[...]
> +static void butterflies_float_c(float *v1, float *v2, int len)
> +{
> + ? ?int i;
> + ? ?for (i = 0; i < len; i++) {
> + ? ? ? ?float t = v1[i] - v2[i];
> + ? ? ? ?v1[i] += v2[i];
> + ? ? ? ?v2[i] = t;
> + ? ?}
> +}
[...]
> + ? ?/**
> + ? ? * Calculate the sum and difference of two vectors of floats.
> + ? ? * @param v1 ?first input vector, sum output, 16-byte aligned
> + ? ? * @param v2 ?second input vector, difference output, 16-byte aligned
> + ? ? * @param len length of vectors, multiple of 4
> + ? ? */
> + ? ?void (*butterflies_float)(float *v1, float *v2, int len);
>

I'd really like to see the "restrict" qualifier on this one. It makes
no sense to call it with the same vector for both inputs.



More information about the ffmpeg-devel mailing list