[FFmpeg-cvslog] r26232 - in trunk/libavcodec: ac3enc.c ac3enc_fixed.c ac3enc_fixed.h ac3enc_float.c ac3enc_float.h

Justin Ruggles justin.ruggles
Wed Jan 5 21:48:09 CET 2011


On 01/05/2011 03:35 PM, jbr wrote:

> Author: jbr
> Date: Wed Jan  5 21:35:36 2011
> New Revision: 26232
> 
> Log:
> Convert floating-point MDCT coefficients to 24-bit fixed-point all at once
> instead of doing it separately in 2 different functions.
> This makes float AC-3 encoding approx. 3-7% faster overall.
> Also, the coefficient conversion can now be easily SIMD-optimized.
> 
> Modified:
>    trunk/libavcodec/ac3enc.c
>    trunk/libavcodec/ac3enc_fixed.c
>    trunk/libavcodec/ac3enc_fixed.h
>    trunk/libavcodec/ac3enc_float.c
>    trunk/libavcodec/ac3enc_float.h


Here are benchmarks for functions which were affected by this change.

                        Previous       New
                        --------     ------
extract_exponents()      1112118     589027 = 60% faster
quantize_mantissas()      545667     439391 = 19% faster
scale_coefficients()         n/a     156767
                        --------    -------
               total:    1657785    1185185 = 28% faster

Also, I have implemented scale_coefficients() for 3dnow, sse, and sse2.
 The best one on my system was the sse version at 50257 dezicycles (vs.
156767 for the C version).  I'll send that patch to ffmpeg-devel for review.

-Justin



More information about the ffmpeg-cvslog mailing list