]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
rpza resolution fix, courtesy of Todd Kirby (doubleshot at pacbell.net)
authormelanson <melanson@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 26 May 2004 02:42:41 +0000 (02:42 +0000)
committermelanson <melanson@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 26 May 2004 02:42:41 +0000 (02:42 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3159 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/rpza.c

index 1c429f6244a06ee3230796f8b341f31e28a6ff49..2be26346a22693e76eb2bdb243b4adc182586e65 100644 (file)
@@ -106,7 +106,7 @@ static void rpza_decode_stream(RpzaContext *s)
     chunk_size = s->size;
 
     /* Number of 4x4 blocks in frame. */
-    total_blocks = (s->avctx->width * s->avctx->height) / (4 * 4);
+    total_blocks = ((s->avctx->width + 3) / 4) * ((s->avctx->height + 3) / 4);
 
     /* Process chunk data */
     while (stream_ptr < chunk_size) {