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

Function decode_run_8bit

libavcodec/dvdsubdec.c:59–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59static int decode_run_8bit(GetBitContext *gb, int *color)
60{
61 int len;
62 int has_run = get_bits1(gb);
63 if (get_bits1(gb))
64 *color = get_bits(gb, 8);
65 else
66 *color = get_bits(gb, 2);
67 if (has_run) {
68 if (get_bits1(gb)) {
69 len = get_bits(gb, 7);
70 if (len == 0)
71 len = INT_MAX;
72 else
73 len += 9;
74 } else
75 len = get_bits(gb, 3) + 2;
76 } else
77 len = 1;
78 return len;
79}
80
81static int decode_rle(uint8_t *bitmap, int linesize, int w, int h,
82 const uint8_t *buf, int start, int buf_size, int is_8bit)

Callers 1

decode_rleFunction · 0.85

Calls 2

get_bits1Function · 0.85
get_bitsFunction · 0.85

Tested by

no test coverage detected