Home | History | Annotate | Download | only in srce

Lines Matching refs:bs

41 PRIVATE void OI_BITSTREAM_ReadInit(OI_BITSTREAM* bs, const OI_BYTE* buffer) {
42 bs->value =
44 bs->ptr.r = buffer + 3;
45 bs->bitPtr = 8;
48 PRIVATE uint32_t OI_BITSTREAM_ReadUINT(OI_BITSTREAM* bs, OI_UINT bits) {
51 OI_BITSTREAM_READUINT(result, bits, bs->ptr.r, bs->value, bs->bitPtr);
56 PRIVATE uint8_t OI_BITSTREAM_ReadUINT4Aligned(OI_BITSTREAM* bs) {
59 OI_ASSERT(bs->bitPtr < 16);
60 OI_ASSERT(bs->bitPtr % 4 == 0);
62 if (bs->bitPtr == 8) {
63 result = bs->value << 8;
64 bs->bitPtr = 12;
66 result = bs->value << 12;
67 bs->value = (bs->value << 8) | *bs->ptr.r++;
68 bs->bitPtr = 8;
75 PRIVATE uint8_t OI_BITSTREAM_ReadUINT8Aligned(OI_BITSTREAM* bs) {
77 OI_ASSERT(bs->bitPtr == 8);
79 result = bs->value >> 16;
80 bs->value = (bs->value << 8) | *bs->ptr.r++;