54 int outcnt = 0, maxcnt;
78 out = (uint16_t *) c->
cur.
data[0];
85 for (i = 0; i < 8; i++)
88 while (outcnt < maxcnt && buf_end - 2 >= buf) {
92 if (!(code & 0x8000)) {
99 if ((code & 0x6000) == 0x6000) {
101 int oidx = (code >> 10) & 7;
104 count = (code & 0x3FF) + 3;
106 if (offsets[oidx] < 0) {
107 if (buf_end - 3 < buf)
113 start = (outcnt + offsets[oidx]) % maxcnt;
115 if (maxcnt - start < count)
120 "Frame reference does not exist\n");
128 int offset = (code & 0x1FFF) + 1;
130 if (!(code & 0x6000)) {
132 }
else if ((code & 0x6000) == 0x2000) {
135 if (buf_end - 1 < buf)
144 inp_off = outcnt -
offset;
147 if (maxcnt - outcnt < count)
150 for (i = inp_off; i < count + inp_off; i++) {
151 out[outcnt++] = inp[i];