Browse Source

flashsvenc: fix image sizes below 192x192

Fixes half of Ticket1105

Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 13 years ago
parent
commit
40d8c89cb6
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/flashsv2enc.c

+ 5
- 0
libavcodec/flashsv2enc.c View File

@@ -205,6 +205,11 @@ static av_cold int flashsv2_encode_init(AVCodecContext * avctx)
s->block_width = (s->image_width / 12) & ~15; s->block_width = (s->image_width / 12) & ~15;
s->block_height = (s->image_height / 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->rows = (s->image_height + s->block_height - 1) / s->block_height;
s->cols = (s->image_width + s->block_width - 1) / s->block_width; s->cols = (s->image_width + s->block_width - 1) / s->block_width;




Loading…
Cancel
Save