[FFmpeg-cvslog] r21069 - trunk/libavcodec/alsdec.c

Måns Rullgård mans
Tue Jan 12 21:00:51 CET 2010


thilo.borgmann <subversion at mplayerhq.hu> writes:

> Author: thilo.borgmann
> Date: Thu Jan  7 23:23:28 2010
> New Revision: 21069
>
> Log:
> Optimize short-term prediction by reducing index arithmetic.
>
> Modified:
>    trunk/libavcodec/alsdec.c
>
> Modified: trunk/libavcodec/alsdec.c
> ==============================================================================
> --- trunk/libavcodec/alsdec.c	Thu Jan  7 20:25:03 2010	(r21068)
> +++ trunk/libavcodec/alsdec.c	Thu Jan  7 23:23:28 2010	(r21069)
> @@ -712,6 +712,8 @@ static int decode_var_block_data(ALSDecC
>      int32_t *quant_cof        = bd->quant_cof;
>      int32_t *lpc_cof          = bd->lpc_cof;
>      int32_t *raw_samples      = bd->raw_samples;
> +    int32_t *raw_samples_end  = bd->raw_samples + bd->block_length;
> +    int32_t lpc_cof_reversed[opt_order];

I didn't spot this sooner, but variable-length arrays should be
avoided.  They are not supported by all compilers we want to support,
and they are bad for performance everywhere.

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



More information about the ffmpeg-cvslog mailing list