static int read_block_types(AVCodecContext *avctx, GetBitContext *gb, Bundle *b)
{
+ BinkContext * const c = avctx->priv_data;
int t, v;
int last = 0;
const uint8_t *dec_end;
CHECK_READ_VAL(gb, b, t);
+ if (c->version == 'k') {
+ t ^= 0xBBu;
+ if (t == 0) {
+ b->cur_dec = NULL;
+ return 0;
+ }
+ }
dec_end = b->cur_dec + t;
if (dec_end > b->data_end) {
av_log(avctx, AV_LOG_ERROR, "Too many block type values\n");
int bw = is_chroma ? (c->avctx->width + 15) >> 4 : (c->avctx->width + 7) >> 3;
int bh = is_chroma ? (c->avctx->height + 15) >> 4 : (c->avctx->height + 7) >> 3;
int width = c->avctx->width >> is_chroma;
+ int height = c->avctx->height >> is_chroma;
+
+ if (c->version == 'k' && get_bits1(gb)) {
+ int fill = get_bits(gb, 8);
+
+ dst = frame->data[plane_idx];
+
+ for (i = 0; i < height; i++)
+ memset(dst + i * stride, fill, width);
+ goto end;
+ }
init_lengths(c, FFMAX(width, 8), bw);
for (i = 0; i < BINK_NB_SRC; i++)
}
}
}
+
+end:
if (get_bits_count(gb) & 0x1F) //next plane data starts at 32-bit boundary
skip_bits_long(gb, 32 - (get_bits_count(gb) & 0x1F));
return ret;
avctx->pix_fmt = c->has_alpha ? AV_PIX_FMT_YUVA420P : AV_PIX_FMT_YUV420P;
+ avctx->color_range = c->version == 'k' ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
ff_blockdsp_init(&c->bdsp, avctx);
ff_hpeldsp_init(&c->hdsp, avctx->flags);