diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-03 17:59:59 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-03 17:59:59 +0000 |
commit | 29b2a049de5c6a81c99ef3a2fb9b0e5fce57b86d (patch) | |
tree | f7f1bdeafdd793e50b0a4f8733df91eb991fbadd | |
parent | 40e3b09678d2b9a8aee578072b9e7ef62c985b98 (diff) | |
download | rockbox-29b2a049de5c6a81c99ef3a2fb9b0e5fce57b86d.tar.gz rockbox-29b2a049de5c6a81c99ef3a2fb9b0e5fce57b86d.zip |
faad: move inline function in header
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27683 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/codecs/libfaad/bits.c | 21 | ||||
-rw-r--r-- | apps/codecs/libfaad/bits.h | 22 |
2 files changed, 21 insertions, 22 deletions
diff --git a/apps/codecs/libfaad/bits.c b/apps/codecs/libfaad/bits.c index 8c70a86204..781eb4feaa 100644 --- a/apps/codecs/libfaad/bits.c +++ b/apps/codecs/libfaad/bits.c | |||
@@ -110,27 +110,6 @@ uint8_t faad_byte_align(bitfile *ld) | |||
110 | return 0; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
113 | void faad_flushbits_ex(bitfile *ld, uint32_t bits) | ||
114 | { | ||
115 | uint32_t tmp; | ||
116 | |||
117 | ld->bufa = ld->bufb; | ||
118 | if (ld->no_more_reading == 0) | ||
119 | { | ||
120 | tmp = getdword(ld->tail); | ||
121 | ld->tail++; | ||
122 | } else { | ||
123 | tmp = 0; | ||
124 | } | ||
125 | ld->bufb = tmp; | ||
126 | ld->bits_left += (32 - bits); | ||
127 | ld->bytes_used += 4; | ||
128 | if (ld->bytes_used == ld->buffer_size) | ||
129 | ld->no_more_reading = 1; | ||
130 | if (ld->bytes_used > ld->buffer_size) | ||
131 | ld->error = 1; | ||
132 | } | ||
133 | |||
134 | /* rewind to beginning */ | 113 | /* rewind to beginning */ |
135 | void faad_rewindbits(bitfile *ld) | 114 | void faad_rewindbits(bitfile *ld) |
136 | { | 115 | { |
diff --git a/apps/codecs/libfaad/bits.h b/apps/codecs/libfaad/bits.h index 0cdc2e6899..c5540a07d0 100644 --- a/apps/codecs/libfaad/bits.h +++ b/apps/codecs/libfaad/bits.h | |||
@@ -77,7 +77,6 @@ void faad_initbits_rev(bitfile *ld, void *buffer, | |||
77 | uint32_t bits_in_buffer); | 77 | uint32_t bits_in_buffer); |
78 | uint8_t faad_byte_align(bitfile *ld); | 78 | uint8_t faad_byte_align(bitfile *ld); |
79 | uint32_t faad_get_processed_bits(bitfile *ld); | 79 | uint32_t faad_get_processed_bits(bitfile *ld); |
80 | INLINE void faad_flushbits_ex(bitfile *ld, uint32_t bits); | ||
81 | void faad_rewindbits(bitfile *ld); | 80 | void faad_rewindbits(bitfile *ld); |
82 | uint8_t *faad_getbitbuffer(bitfile *ld, uint32_t bits | 81 | uint8_t *faad_getbitbuffer(bitfile *ld, uint32_t bits |
83 | DEBUGDEC); | 82 | DEBUGDEC); |
@@ -95,6 +94,27 @@ static INLINE uint32_t getdword(void *mem) | |||
95 | #endif | 94 | #endif |
96 | } | 95 | } |
97 | 96 | ||
97 | static INLINE void faad_flushbits_ex(bitfile *ld, uint32_t bits) | ||
98 | { | ||
99 | uint32_t tmp; | ||
100 | |||
101 | ld->bufa = ld->bufb; | ||
102 | if (ld->no_more_reading == 0) | ||
103 | { | ||
104 | tmp = getdword(ld->tail); | ||
105 | ld->tail++; | ||
106 | } else { | ||
107 | tmp = 0; | ||
108 | } | ||
109 | ld->bufb = tmp; | ||
110 | ld->bits_left += (32 - bits); | ||
111 | ld->bytes_used += 4; | ||
112 | if (ld->bytes_used == ld->buffer_size) | ||
113 | ld->no_more_reading = 1; | ||
114 | if (ld->bytes_used > ld->buffer_size) | ||
115 | ld->error = 1; | ||
116 | } | ||
117 | |||
98 | static INLINE uint32_t faad_showbits(bitfile *ld, uint32_t bits) | 118 | static INLINE uint32_t faad_showbits(bitfile *ld, uint32_t bits) |
99 | { | 119 | { |
100 | if (bits <= ld->bits_left) | 120 | if (bits <= ld->bits_left) |