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

Alex Converse alex.converse
Sat Sep 19 02:45:33 CEST 2009


On Fri, Sep 18, 2009 at 6:11 PM, Mans Rullgard <mans at mansr.com> wrote:
>
> This patch adds a few dsputil functions that can be used in the AAC
> decoder.
>
> With trivial NEON versions of these functions, the AAC decoder gets
> ~1.6x faster on Cortex-A8, and better NEON code will push that even
> further.
>
> I will readily admit that some of the names in this patch are rubbish,
> so please suggest something better. ?Other enhancements are obviously
> welcome too.
>
> ---
> ?libavcodec/dsputil.c | ? 83 ++++++++++++++++++++++++++++++++++++++++++++++++++
> ?libavcodec/dsputil.h | ? ?8 +++++
> ?2 files changed, 91 insertions(+), 0 deletions(-)
>
> diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
> index e1f2eda..f889487 100644
> --- a/libavcodec/dsputil.c
> +++ b/libavcodec/dsputil.c
> @@ -4087,6 +4087,79 @@ void ff_vector_fmul_window_c(float *dst, const float *src0, const float *src1, c
> ? ? }
> ?}
>
> +static void vector_fmul_scalar_c(float *dst, const float *src, float mul,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? int len)
> +{
> + ? ?int i;
> + ? ?for (i = 0; i < len; i++)
> + ? ? ? ?dst[i] = src[i] * mul;
> +}
> +
> +static void vector_fmul_scalar_vp_2_c(float *dst, const float *src,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const float **vp, float mul, int len)
> +{
> + ? ?int i;
> + ? ?for (i = 0; i < len; i += 2, vp++) {
> + ? ? ? ?dst[i ?] = src[i ?] * vp[0][0] * mul;
> + ? ? ? ?dst[i+1] = src[i+1] * vp[0][1] * mul;
> + ? ?}
> +}

Why "const float **vp" and not just "const float *vp"?



More information about the ffmpeg-devel mailing list