243 |
static uint32_t __inline |
static uint32_t __inline |
244 |
BitstreamPos(const Bitstream * const bs) |
BitstreamPos(const Bitstream * const bs) |
245 |
{ |
{ |
246 |
return 8 * ((uint32_t) bs->tail - (uint32_t) bs->start) + bs->pos; |
return 8 * ((ptr_t)bs->tail - (ptr_t)bs->start) + bs->pos; |
247 |
} |
} |
248 |
|
|
249 |
|
|
254 |
static uint32_t __inline |
static uint32_t __inline |
255 |
BitstreamLength(Bitstream * const bs) |
BitstreamLength(Bitstream * const bs) |
256 |
{ |
{ |
257 |
uint32_t len = (uint32_t) bs->tail - (uint32_t) bs->start; |
uint32_t len = (ptr_t) bs->tail - (ptr_t) bs->start; |
258 |
|
|
259 |
if (bs->pos) { |
if (bs->pos) { |
260 |
uint32_t b = bs->buf; |
uint32_t b = bs->buf; |