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