MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / decode_run_2bit

Function decode_run_2bit

libavcodec/dvdsubdec.c:45–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45static int decode_run_2bit(GetBitContext *gb, int *color)
46{
47 unsigned int v, t;
48
49 v = 0;
50 for (t = 1; v < t && t <= 0x40; t <<= 2)
51 v = (v << 4) | get_bits(gb, 4);
52 *color = v & 3;
53 if (v < 4) { /* Code for fill rest of line */
54 return INT_MAX;
55 }
56 return v >> 2;
57}
58
59static int decode_run_8bit(GetBitContext *gb, int *color)
60{

Callers 1

decode_rleFunction · 0.85

Calls 1

get_bitsFunction · 0.85

Tested by

no test coverage detected