changeset 1481:0cfed95c7707 libavcodec

fixes levis.avi dunno if this is correct ...
author michaelni
date Thu, 25 Sep 2003 12:19:26 +0000
parents 8657d6800d15
children b372ecde32a8
files indeo3.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/indeo3.c	Wed Sep 24 19:45:57 2003 +0000
+++ b/indeo3.c	Thu Sep 25 12:19:26 2003 +0000
@@ -103,8 +103,8 @@
   int luma_width, luma_height, luma_pixels, chroma_width, chroma_height,
     chroma_pixels, bufsize, i;
 
-  luma_width = (s->width + 15) & -0x10;
-  luma_height = (s->height + 15) & -0x10;
+  luma_width   = (s->width  + 3) & (~3);
+  luma_height  = (s->height + 3) & (~3);
 
   s->iv_frame[0].y_w = s->iv_frame[0].y_h = 
     s->iv_frame[0].the_buf_size = 0;
@@ -112,8 +112,8 @@
     s->iv_frame[1].the_buf_size = 0;
   s->iv_frame[1].the_buf = NULL;
 
-  chroma_width = luma_width >> 2;
-  chroma_height = luma_height >> 2;
+  chroma_width  = ((luma_width >> 2) + 3) & (~3);
+  chroma_height = ((luma_height>> 2) + 3) & (~3);
   luma_pixels = luma_width * luma_height;
   chroma_pixels = chroma_width * chroma_height;