| 201 | lp2 = 4; |
| 202 | |
| 203 | static void iv_Decode_Chunk(Indeo3DecodeContext *s, |
| 204 | uint8_t *cur, uint8_t *ref, int width, int height, |
| 205 | const uint8_t *buf1, long cb_offset, const uint8_t *hdr, |
| 206 | const uint8_t *buf2, int min_width_160) |
| 207 | { |
| 208 | uint8_t bit_buf; |
| 209 | unsigned long bit_pos, lv, lv1, lv2; |
| 210 | long *width_tbl, width_tbl_arr[10]; |
| 211 | const signed char *ref_vectors; |
| 212 | uint8_t *cur_frm_pos, *ref_frm_pos, *cp, *cp2; |
| 213 | uint32_t *cur_lp, *ref_lp; |
| 214 | const uint32_t *correction_lp[2], *correctionloworder_lp[2], *correctionhighorder_lp[2]; |
| 215 | uint8_t *correction_type_sp[2]; |
| 216 | struct ustr strip_tbl[20], *strip; |
| 217 | int i, j, k, lp1, lp2, flag1, cmd, blks_width, blks_height, region_160_width, |
| 218 | rle_v1, rle_v2, rle_v3; |
| 219 | unsigned short res; |
| 220 | |
| 221 | bit_buf = 0; |
| 222 | ref_vectors = NULL; |
| 223 | |
| 224 | width_tbl = width_tbl_arr + 1; |
| 225 | i = (width < 0 ? width + 3 : width)/4; |
| 226 | for(j = -1; j < 8; j++) |
| 227 | width_tbl[j] = i * j; |
| 228 | |
| 229 | strip = strip_tbl; |
| 230 | |
| 231 | for(region_160_width = 0; region_160_width < (width - min_width_160); region_160_width += min_width_160); |
| 232 | |
| 233 | strip->ypos = strip->xpos = 0; |
| 234 | for(strip->width = min_width_160; width > strip->width; strip->width *= 2); |
| 235 | strip->height = height; |
| 236 | strip->split_direction = 0; |
| 237 | strip->split_flag = 0; |
| 238 | strip->usl7 = 0; |
| 239 | |
| 240 | bit_pos = 0; |
| 241 | |
| 242 | rle_v1 = rle_v2 = rle_v3 = 0; |
| 243 | |
| 244 | while(strip >= strip_tbl) { |
| 245 | if(bit_pos <= 0) { |
| 246 | bit_pos = 8; |
| 247 | bit_buf = *buf1++; |
| 248 | } |
| 249 | |
| 250 | bit_pos -= 2; |
| 251 | cmd = (bit_buf >> bit_pos) & 0x03; |
| 252 | |
| 253 | if(cmd == 0) { |
| 254 | strip++; |
| 255 | if(strip >= strip_tbl + FF_ARRAY_ELEMS(strip_tbl)) { |
| 256 | av_log(s->avctx, AV_LOG_WARNING, "out of range strip\n"); |
| 257 | break; |
| 258 | } |
| 259 | memcpy(strip, strip-1, sizeof(*strip)); |
| 260 | strip->split_flag = 1; |
no test coverage detected