Mercurial > libavcodec.hg
comparison indeo3.c @ 1481:0cfed95c7707 libavcodec
fixes levis.avi
dunno if this is correct ...
author | michaelni |
---|---|
date | Thu, 25 Sep 2003 12:19:26 +0000 |
parents | 8b6e5cca1d37 |
children | 932d306bf1dc |
comparison
equal
deleted
inserted
replaced
1480:8657d6800d15 | 1481:0cfed95c7707 |
---|---|
101 static void iv_alloc_frames(Indeo3DecodeContext *s) | 101 static void iv_alloc_frames(Indeo3DecodeContext *s) |
102 { | 102 { |
103 int luma_width, luma_height, luma_pixels, chroma_width, chroma_height, | 103 int luma_width, luma_height, luma_pixels, chroma_width, chroma_height, |
104 chroma_pixels, bufsize, i; | 104 chroma_pixels, bufsize, i; |
105 | 105 |
106 luma_width = (s->width + 15) & -0x10; | 106 luma_width = (s->width + 3) & (~3); |
107 luma_height = (s->height + 15) & -0x10; | 107 luma_height = (s->height + 3) & (~3); |
108 | 108 |
109 s->iv_frame[0].y_w = s->iv_frame[0].y_h = | 109 s->iv_frame[0].y_w = s->iv_frame[0].y_h = |
110 s->iv_frame[0].the_buf_size = 0; | 110 s->iv_frame[0].the_buf_size = 0; |
111 s->iv_frame[1].y_w = s->iv_frame[1].y_h = | 111 s->iv_frame[1].y_w = s->iv_frame[1].y_h = |
112 s->iv_frame[1].the_buf_size = 0; | 112 s->iv_frame[1].the_buf_size = 0; |
113 s->iv_frame[1].the_buf = NULL; | 113 s->iv_frame[1].the_buf = NULL; |
114 | 114 |
115 chroma_width = luma_width >> 2; | 115 chroma_width = ((luma_width >> 2) + 3) & (~3); |
116 chroma_height = luma_height >> 2; | 116 chroma_height = ((luma_height>> 2) + 3) & (~3); |
117 luma_pixels = luma_width * luma_height; | 117 luma_pixels = luma_width * luma_height; |
118 chroma_pixels = chroma_width * chroma_height; | 118 chroma_pixels = chroma_width * chroma_height; |
119 | 119 |
120 bufsize = luma_pixels * 2 + luma_width * 3 + | 120 bufsize = luma_pixels * 2 + luma_width * 3 + |
121 (chroma_pixels + chroma_width) * 4; | 121 (chroma_pixels + chroma_width) * 4; |