int component, int dc_index,
uint16_t *quant_matrix, int Al)
{
- int val;
+ unsigned val;
s->bdsp.clear_block(block);
val = mjpeg_decode_dc(s, dc_index);
if (val == 0xfffff) {
uint16_t *quant_matrix,
int ss, int se, int Al, int *EOBRUN)
{
- int code, i, j, level, val, run;
+ int code, i, j, val, run;
+ unsigned level;
if (*EOBRUN) {
(*EOBRUN)--;
return -1;
}
+ if (reference) {
+ if (reference->width != s->picture_ptr->width ||
+ reference->height != s->picture_ptr->height ||
+ reference->format != s->picture_ptr->format) {
+ av_log(s->avctx, AV_LOG_ERROR, "Reference mismatching\n");
+ return AVERROR_INVALIDDATA;
+ }
+ }
+
av_assert0(s->picture_ptr->data[0]);
/* XXX: verify len field validity */
len = get_bits(&s->gb, 16);