[FFmpeg-devel] [PATCH] Further optimization of base64 decode using AV_WB32.

Michael Niedermayer michaelni at gmx.at
Sat Jan 21 17:54:57 CET 2012


On Sat, Jan 21, 2012 at 05:52:27PM +0100, Reimar Döffinger wrote:
> This is somewhat questionable.
> The biggest issue is that av_bswap32 is not replaced
> with our asm version on gcc 4.5 or newer.
> This causes gcc to generate horrible code that is slower
> than the unoptimized variant.
> Old:                                  248852 decicycles
> New with gcc's attempt at av_bswap32: 256576 decicycles
> New with our bswap32:                 200260 decicycles
[...]
> diff --git a/libavutil/x86/bswap.h b/libavutil/x86/bswap.h
> index 52ffb4d..aa39d97 100644
> --- a/libavutil/x86/bswap.h
> +++ b/libavutil/x86/bswap.h
> @@ -37,7 +37,7 @@ static av_always_inline av_const unsigned av_bswap16(unsigned x)
>  }
>  #endif /* !AV_GCC_VERSION_AT_LEAST(4,1) */
>  
> -#if !AV_GCC_VERSION_AT_LEAST(4,5)
> +#if 1 || !AV_GCC_VERSION_AT_LEAST(4,5)

IMHO if gcc 4.5 gets it wrong than the at_least version should be
increased with a comment


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120121/811fbb07/attachment.asc>


More information about the ffmpeg-devel mailing list