s->cur_frame->pict_type = s->keyframe ? AV_PICTURE_TYPE_I
: AV_PICTURE_TYPE_P;
+ if (s->fullrange)
+ avctx->color_range = AVCOL_RANGE_JPEG;
+ else
+ avctx->color_range = AVCOL_RANGE_MPEG;
+
+ switch (s->colorspace) {
+ case 1: avctx->colorspace = AVCOL_SPC_BT470BG; break;
+ case 2: avctx->colorspace = AVCOL_SPC_BT709; break;
+ case 3: avctx->colorspace = AVCOL_SPC_SMPTE170M; break;
+ case 4: avctx->colorspace = AVCOL_SPC_SMPTE240M; break;
+ }
+
// main tile decode loop
memset(s->above_partition_ctx, 0, s->cols);
memset(s->above_skip_ctx, 0, s->cols);
const uint8_t *idx = data + size + 1 - idx_sz;
while (n_frames--) {
- int sz = AV_RL32(idx);
+ unsigned sz = AV_RL32(idx);
if (nbytes < 4)
sz &= (1 << (8 * nbytes)) - 1;
if (sz > size) {
av_log(avctx, AV_LOG_ERROR,
- "Superframe packet size too big: %d > %d\n",
+ "Superframe packet size too big: %u > %d\n",
sz, size);
return AVERROR_INVALIDDATA;
}