9 #if (defined(__ICCARM__) || defined(__CC_ARM) || (defined(__GNUC__) && (defined(ARM) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)))) 12 #define letoh32(x) (x) 13 #define betoh32(x) (uint32_t)__REV(x) 16 #define __STATIC_INLINE static inline 19 #define letoh32(x) (x) 20 #define betoh32(x) swap32(x) 30 return (value >> 8) | (value << 8);
41 unsigned long hi =
swap16(value >> 16);
42 unsigned long lo =
swap16(value & 0xffff);
44 return (lo << 16) | hi;
52 #ifndef ICODE_ATTR_FLAC 53 #define ICODE_ATTR_FLAC ICODE_ATTR 56 #ifndef IBSS_ATTR_FLAC_DECODED0 57 #define IBSS_ATTR_FLAC_DECODED0 IBSS_ATTR 64 #define ALT_BITSTREAM_READER_BE 66 #define NEG_SSR32(a,s) (((int32_t)(a))>>(32-(s))) 67 #define NEG_USR32(a,s) (((uint32_t)(a))>>(32-(s))) 77 #define VLC_TYPE int16_t 100 return ((
struct Unaligned *)v)->i;
157 # define MIN_CACHE_BITS 25 159 # define OPEN_READER(name, gb)\ 160 int name##_index= (gb)->index;\ 161 int name##_cache= 0;\ 163 # define CLOSE_READER(name, gb)\ 164 (gb)->index= name##_index;\ 166 # define UPDATE_CACHE(name, gb)\ 167 name##_cache= unaligned32_be( ((const uint8_t *)(gb)->buffer)+(name##_index>>3) ) << (name##_index&0x07);\ 169 # define SKIP_CACHE(name, gb, num)\ 170 name##_cache <<= (num); 174 # define SKIP_COUNTER(name, gb, num)\ 175 name##_index += (num);\ 177 # define SKIP_BITS(name, gb, num)\ 179 SKIP_CACHE(name, gb, num)\ 180 SKIP_COUNTER(name, gb, num)\ 183 # define LAST_SKIP_BITS(name, gb, num) SKIP_COUNTER(name, gb, num) 184 # define LAST_SKIP_CACHE(name, gb, num) ; 186 # define SHOW_UBITS(name, gb, num)\ 187 NEG_USR32(name##_cache, num) 189 # define SHOW_SBITS(name, gb, num)\ 190 NEG_SSR32(name##_cache, num) 192 # define GET_CACHE(name, gb)\ 193 ((uint32_t)name##_cache) 245 int index = s->
index;
246 uint8_t result = s->
buffer[index >> 3];
247 result <<= (index & 0x07);
263 int buffer_size= (bit_size+7)>>3;
264 if(buffer_size < 0 || bit_size < 0) {
265 buffer_size = bit_size = 0;
static unsigned int show_bits(GetBitContext *s, int n)
Definition: bitstreamf.h:220
static int get_sbits(GetBitContext *s, int n)
Definition: bitstreamf.h:200
static int unaligned32_le(const void *v)
Definition: bitstreamf.h:153
void align_get_bits(GetBitContext *s)
Definition: bitstreamf.c:60
struct RL_VLC_ELEM RL_VLC_ELEM
#define LAST_SKIP_BITS(name, gb, num)
Definition: bitstreamf.h:183
static unsigned int get_bits(GetBitContext *s, int n)
Definition: bitstreamf.h:210
static void skip_bits(GetBitContext *s, int n)
Definition: bitstreamf.h:229
static uint32_t unaligned32(const void *v)
Definition: bitstreamf.h:92
#define SHOW_SBITS(name, gb, num)
Definition: bitstreamf.h:189
#define VLC_TYPE
Definition: bitstreamf.h:77
#define SHOW_UBITS(name, gb, num)
Definition: bitstreamf.h:186
int16_t(* table)[2]
code, bits
Definition: bitstreamf.h:81
static unsigned int get_bits1(GetBitContext *s)
Definition: bitstreamf.h:244
int bits
Definition: bitstreamf.h:80
static unsigned int show_bits1(GetBitContext *s)
Definition: bitstreamf.h:254
Definition: bitstreamf.h:71
Definition: bitstreamf.h:85
static void skip_bits1(GetBitContext *s)
Definition: bitstreamf.h:258
#define betoh32(x)
Definition: bitstreamf.h:20
const uint8_t * buffer_end
Definition: bitstreamf.h:72
struct GetBitContext GetBitContext
int16_t level
Definition: bitstreamf.h:86
int8_t len
Definition: bitstreamf.h:87
int table_size
Definition: bitstreamf.h:82
static volatile char tmp[32]
Definition: flash_manage_outside_port.c:144
static unsigned short swap16(unsigned short value)
Definition: bitstreamf.h:24
int table_allocated
Definition: bitstreamf.h:82
#define OPEN_READER(name, gb)
Definition: bitstreamf.h:159
const uint8_t * buffer
Definition: bitstreamf.h:72
#define letoh32(x)
Definition: bitstreamf.h:19
Definition: bitstreamf.h:79
#define __STATIC_INLINE
Definition: bitstreamf.h:16
static unsigned long swap32(unsigned long value)
Definition: bitstreamf.h:33
#define UPDATE_CACHE(name, gb)
Definition: bitstreamf.h:166
int size_in_bits
Definition: bitstreamf.h:74
uint8_t run
Definition: bitstreamf.h:88
static int unaligned32_be(const void *v)
Definition: bitstreamf.h:149
int index
Definition: bitstreamf.h:73
static int get_bits_count(GetBitContext *s)
Definition: bitstreamf.h:196
#define CLOSE_READER(name, gb)
Definition: bitstreamf.h:163
static void init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Definition: bitstreamf.h:262