comparison vp8.c @ 12365:7c54834209f6 libavcodec

VP5/6/8: eliminate CABAC dependency Create a custom table for VP5/6/8's renorm to avoid depending on H.264's. Saves one instruction in the arithmetic decoder as well.
author darkshikari
date Wed, 04 Aug 2010 23:04:05 +0000
parents 4dc177e736f6
children 4787027b74b1
comparison
equal deleted inserted replaced
12364:2e96cab6ecde 12365:7c54834209f6
303 for (i = 0; i < s->num_coeff_partitions-1; i++) { 303 for (i = 0; i < s->num_coeff_partitions-1; i++) {
304 int size = AV_RL24(sizes + 3*i); 304 int size = AV_RL24(sizes + 3*i);
305 if (buf_size - size < 0) 305 if (buf_size - size < 0)
306 return -1; 306 return -1;
307 307
308 vp56_init_range_decoder(&s->coeff_partition[i], buf, size); 308 ff_vp56_init_range_decoder(&s->coeff_partition[i], buf, size);
309 buf += size; 309 buf += size;
310 buf_size -= size; 310 buf_size -= size;
311 } 311 }
312 vp56_init_range_decoder(&s->coeff_partition[i], buf, buf_size); 312 ff_vp56_init_range_decoder(&s->coeff_partition[i], buf, buf_size);
313 313
314 return 0; 314 return 0;
315 } 315 }
316 316
317 static void get_quants(VP8Context *s) 317 static void get_quants(VP8Context *s)
443 width != s->avctx->width || height != s->avctx->height) { 443 width != s->avctx->width || height != s->avctx->height) {
444 if ((ret = update_dimensions(s, width, height) < 0)) 444 if ((ret = update_dimensions(s, width, height) < 0))
445 return ret; 445 return ret;
446 } 446 }
447 447
448 vp56_init_range_decoder(c, buf, header_size); 448 ff_vp56_init_range_decoder(c, buf, header_size);
449 buf += header_size; 449 buf += header_size;
450 buf_size -= header_size; 450 buf_size -= header_size;
451 451
452 if (s->keyframe) { 452 if (s->keyframe) {
453 if (vp8_rac_get(c)) 453 if (vp8_rac_get(c))