"Input dimensions too large, input must be max 4096x4096 !\n");
return -1;
}
+ if ((avctx->width < 16) || (avctx->height < 16)) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Input dimensions too small, input must be at least 16x16 !\n");
+ return -1;
+ }
if (av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0)
return -1;
s->block_width = (s->image_width / 12) & ~15;
s->block_height = (s->image_height / 12) & ~15;
+ if(!s->block_width)
+ s->block_width = 1;
+ if(!s->block_height)
+ s->block_height = 1;
+
s->rows = (s->image_height + s->block_height - 1) / s->block_height;
s->cols = (s->image_width + s->block_width - 1) / s->block_width;