From a87c61854ef614b258ca7d4d0b40db017884e63e Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Thu, 15 Jul 2010 16:19:17 +0000 Subject: Sync codeclib bitstream code with upstream ffmpeg code. Build ffmpeg_bitstream.c as a part of the codec lib. Use this codeclib implementation in libffmpegFLAC. Implement adapted version of the unaligned longword reading optimization for coldfire from the libwma version of this code. Speeds up cook decoding by 2-3% on h300 and flac by 25% on h300, also speeds up flac decoding by 2% on c200 (decoding speed of cook on c200 is unchanged). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27430 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libffmpegFLAC/shndec.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'apps/codecs/libffmpegFLAC/shndec.c') diff --git a/apps/codecs/libffmpegFLAC/shndec.c b/apps/codecs/libffmpegFLAC/shndec.c index fb11f77bfa..b107b356d7 100644 --- a/apps/codecs/libffmpegFLAC/shndec.c +++ b/apps/codecs/libffmpegFLAC/shndec.c @@ -54,22 +54,11 @@ #define VERBATIM_BYTE_SIZE 8 #define CANONICAL_HEADER_SIZE 44 -#define FFMAX(a,b) ((a) > (b) ? (a) : (b)) -#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) #define MKTAG(a,b,c,d) (a | (b << 8) | (c << 16) | (d << 24)) #define get_le16(gb) bswap_16(get_bits_long(gb, 16)) #define get_le32(gb) bswap_32(get_bits_long(gb, 32)) -static uint32_t bswap_32(uint32_t x){ - x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF); - return (x>>16) | (x<<16); -} - -static uint16_t bswap_16(uint16_t x){ - return (x>>8) | (x<<8); -} - /* converts fourcc string to int */ static int ff_get_fourcc(const char *s){ //assert( strlen(s)==4 ); -- cgit v1.2.3