Mercurial > libavcodec.hg
comparison msrledec.c @ 10334:71cf44ecaa70 libavcodec
Make MS RLE decoder produce both bottom-up and top-down pictures
author | kostya |
---|---|
date | Thu, 01 Oct 2009 05:42:55 +0000 |
parents | e7032c44d4a7 |
children | 35d05a2f4361 |
comparison
equal
deleted
inserted
replaced
10333:c1c4435539e6 | 10334:71cf44ecaa70 |
---|---|
165 pos += p1; | 165 pos += p1; |
166 output = pic->data[0] + line * pic->linesize[0] + pos * (depth >> 3); | 166 output = pic->data[0] + line * pic->linesize[0] + pos * (depth >> 3); |
167 continue; | 167 continue; |
168 } | 168 } |
169 // Copy data | 169 // Copy data |
170 if (output + p2 * (depth >> 3) > output_end) { | 170 if ((pic->linesize[0] > 0 && output + p2 * (depth >> 3) > output_end) |
171 ||(pic->linesize[0] < 0 && output + p2 * (depth >> 3) < output_end)) { | |
171 src += p2 * (depth >> 3); | 172 src += p2 * (depth >> 3); |
172 continue; | 173 continue; |
173 } | 174 } |
174 if ((depth == 8) || (depth == 24)) { | 175 if ((depth == 8) || (depth == 24)) { |
175 for(i = 0; i < p2 * (depth >> 3); i++) { | 176 for(i = 0; i < p2 * (depth >> 3); i++) { |
209 break; | 210 break; |
210 case 32: pix32 = AV_RL32(src); | 211 case 32: pix32 = AV_RL32(src); |
211 src += 4; | 212 src += 4; |
212 break; | 213 break; |
213 } | 214 } |
214 if (output + p1 * (depth >> 3) > output_end) | 215 if ((pic->linesize[0] > 0 && output + p1 * (depth >> 3) > output_end) |
216 ||(pic->linesize[0] < 0 && output + p1 * (depth >> 3) < output_end)) | |
215 continue; | 217 continue; |
216 for(i = 0; i < p1; i++) { | 218 for(i = 0; i < p1; i++) { |
217 switch(depth){ | 219 switch(depth){ |
218 case 8: *output++ = pix[0]; | 220 case 8: *output++ = pix[0]; |
219 break; | 221 break; |