summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-09-28 15:42:09 +0000
committerThom Johansen <thomj@rockbox.org>2007-09-28 15:42:09 +0000
commit59d6b08d9cee7476a2c2200c229d81e6156a06ba (patch)
treed7d0049116ab0214ebd6f4b1987177ce6745bd54 /apps
parent1ef5dadec5342dc126a1f7745cd48030cb05eaa8 (diff)
downloadrockbox-59d6b08d9cee7476a2c2200c229d81e6156a06ba.tar.gz
rockbox-59d6b08d9cee7476a2c2200c229d81e6156a06ba.zip
Make AC3 codec use Rockbox' native bitswap routines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14886 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/liba52/bitstream.h25
1 files changed, 1 insertions, 24 deletions
diff --git a/apps/codecs/liba52/bitstream.h b/apps/codecs/liba52/bitstream.h
index f559fbf833..88f8fc4660 100644
--- a/apps/codecs/liba52/bitstream.h
+++ b/apps/codecs/liba52/bitstream.h
@@ -21,30 +21,7 @@
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23 23
24/* (stolen from the kernel) */ 24#define swab32(x) (betoh32(x))
25#ifdef WORDS_BIGENDIAN
26
27# define swab32(x) (x)
28
29#else
30
31# if 0 && defined (__i386__)
32
33# define swab32(x) __i386_swab32(x)
34 static inline const uint32_t __i386_swab32(uint32_t x)
35 {
36 __asm__("bswap %0" : "=r" (x) : "0" (x));
37 return x;
38 }
39
40# else
41
42# define swab32(x)\
43((((uint8_t*)&x)[0] << 24) | (((uint8_t*)&x)[1] << 16) | \
44 (((uint8_t*)&x)[2] << 8) | (((uint8_t*)&x)[3]))
45
46# endif
47#endif
48 25
49void a52_bitstream_set_ptr (a52_state_t * state, uint8_t * buf); 26void a52_bitstream_set_ptr (a52_state_t * state, uint8_t * buf);
50uint32_t a52_bitstream_get_bh (a52_state_t * state, uint32_t num_bits); 27uint32_t a52_bitstream_get_bh (a52_state_t * state, uint32_t num_bits);