FastLED 3.9.15
Loading...
Searching...
No Matches

◆ readBits()

fl::u32 fl::anonymous_namespace{h264.cpp.hpp}::BitReader::readBits ( fl::u8 n)
inline

Definition at line 23 of file h264.cpp.hpp.

23 {
24 fl::u32 val = 0;
25 for (fl::u8 i = 0; i < n; i++) {
26 if (bytePos >= data.size()) return val;
27 val = (val << 1) | ((data[bytePos] >> (7 - bitPos)) & 1);
28 bitPos++;
29 if (bitPos == 8) {
30 bitPos = 0;
31 bytePos++;
32 }
33 }
34 return val;
35 }
unsigned char u8
Definition s16x16x4.h:132

References bitPos, bytePos, and data.

Referenced by readUE().

+ Here is the caller graph for this function: