[FFmpeg-devel] [PATCH 2/2] aacdec: Convert some loop copies into memcpy()s.

Måns Rullgård mans
Fri Jan 28 12:38:19 CET 2011


Alex Converse <alex.converse at gmail.com> writes:

> ---
>  libavcodec/aacdec.c |    9 +++------
>  1 files changed, 3 insertions(+), 6 deletions(-)
>
>
> diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
> index 2d5fb54..2127099 100644
> --- a/libavcodec/aacdec.c
> +++ b/libavcodec/aacdec.c
> @@ -1723,8 +1723,7 @@ static void imdct_and_windowing(AACContext *ac, SingleChannelElement *sce)
>              (ics->window_sequence[0] == ONLY_LONG_SEQUENCE || ics->window_sequence[0] == LONG_START_SEQUENCE)) {
>          ac->dsp.vector_fmul_window(    out,               saved,            buf,         lwindow_prev, 0, 512);
>      } else {
> -        for (i = 0; i < 448; i++)
> -            out[i] = saved[i];
> +        memcpy(                        out,               saved,            448 * sizeof(float));

I'd prefer if you used sizeof(*out), just in case the type is ever
changed.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list