|
|
|
@@ -260,6 +260,7 @@ static int setup_partitions(VP8Context *s, const uint8_t *buf, int buf_size) |
|
|
|
{ |
|
|
|
const uint8_t *sizes = buf; |
|
|
|
int i; |
|
|
|
int ret; |
|
|
|
|
|
|
|
s->num_coeff_partitions = 1 << vp8_rac_get_uint(&s->c, 2); |
|
|
|
|
|
|
|
@@ -273,13 +274,13 @@ static int setup_partitions(VP8Context *s, const uint8_t *buf, int buf_size) |
|
|
|
if (buf_size - size < 0) |
|
|
|
return -1; |
|
|
|
|
|
|
|
ff_vp56_init_range_decoder(&s->coeff_partition[i], buf, size); |
|
|
|
ret = ff_vp56_init_range_decoder(&s->coeff_partition[i], buf, size); |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
buf += size; |
|
|
|
buf_size -= size; |
|
|
|
} |
|
|
|
ff_vp56_init_range_decoder(&s->coeff_partition[i], buf, buf_size); |
|
|
|
|
|
|
|
return 0; |
|
|
|
return ff_vp56_init_range_decoder(&s->coeff_partition[i], buf, buf_size); |
|
|
|
} |
|
|
|
|
|
|
|
static void vp7_get_quants(VP8Context *s) |
|
|
|
@@ -517,7 +518,9 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si |
|
|
|
|
|
|
|
memcpy(s->put_pixels_tab, s->vp8dsp.put_vp8_epel_pixels_tab, sizeof(s->put_pixels_tab)); |
|
|
|
|
|
|
|
ff_vp56_init_range_decoder(c, buf, part1_size); |
|
|
|
ret = ff_vp56_init_range_decoder(c, buf, part1_size); |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
buf += part1_size; |
|
|
|
buf_size -= part1_size; |
|
|
|
|
|
|
|
@@ -569,7 +572,9 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si |
|
|
|
s->lf_delta.enabled = 0; |
|
|
|
|
|
|
|
s->num_coeff_partitions = 1; |
|
|
|
ff_vp56_init_range_decoder(&s->coeff_partition[0], buf, buf_size); |
|
|
|
ret = ff_vp56_init_range_decoder(&s->coeff_partition[0], buf, buf_size); |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
|
|
|
|
if (!s->macroblocks_base || /* first frame */ |
|
|
|
width != s->avctx->width || height != s->avctx->height || |
|
|
|
@@ -698,7 +703,9 @@ static int vp8_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si |
|
|
|
memset(&s->lf_delta, 0, sizeof(s->lf_delta)); |
|
|
|
} |
|
|
|
|
|
|
|
ff_vp56_init_range_decoder(c, buf, header_size); |
|
|
|
ret = ff_vp56_init_range_decoder(c, buf, header_size); |
|
|
|
if (ret < 0) |
|
|
|
return ret; |
|
|
|
buf += header_size; |
|
|
|
buf_size -= header_size; |
|
|
|
|
|
|
|
|