MCPcopy Create free account
hub / github.com/FastLED/FastLED / readUE

Method readUE

src/fl/codec/h264.cpp.hpp:38–47  ·  view source on GitHub ↗

Read unsigned Exp-Golomb coded value (ue(v))

Source from the content-addressed store, hash-verified

36
37 // Read unsigned Exp-Golomb coded value (ue(v))
38 fl::u32 readUE() {
39 int leadingZeros = 0;
40 while (hasBits(1) && readBits(1) == 0) {
41 leadingZeros++;
42 if (leadingZeros > 32) return 0; // prevent infinite loop
43 }
44 if (leadingZeros == 0) return 0;
45 fl::u32 suffix = readBits(leadingZeros);
46 return (1u << leadingZeros) - 1 + suffix;
47 }
48
49 // Read signed Exp-Golomb coded value (se(v))
50 fl::i32 readSE() {

Callers 1

parseSPSMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected