comparison bmp.c @ 10335:3b0a2384ff9f libavcodec

Make BMP decoder produce flipped picture with RLE compression. This fixes issue 1415
author kostya
date Thu, 01 Oct 2009 05:46:17 +0000
parents af449680f6ee
children 8a4984c5cacc
comparison
equal deleted inserted replaced
10334:71cf44ecaa70 10335:3b0a2384ff9f
251 ((uint32_t*)p->data[1])[i] = bytestream_get_le32(&buf); 251 ((uint32_t*)p->data[1])[i] = bytestream_get_le32(&buf);
252 } 252 }
253 buf = buf0 + hsize; 253 buf = buf0 + hsize;
254 } 254 }
255 if(comp == BMP_RLE4 || comp == BMP_RLE8){ 255 if(comp == BMP_RLE4 || comp == BMP_RLE8){
256 if(height < 0){
257 p->data[0] += p->linesize[0] * (avctx->height - 1);
258 p->linesize[0] = -p->linesize[0];
259 }
256 ff_msrle_decode(avctx, (AVPicture*)p, depth, buf, dsize); 260 ff_msrle_decode(avctx, (AVPicture*)p, depth, buf, dsize);
261 if(height < 0){
262 p->data[0] += p->linesize[0] * (avctx->height - 1);
263 p->linesize[0] = -p->linesize[0];
264 }
257 }else{ 265 }else{
258 switch(depth){ 266 switch(depth){
259 case 1: 267 case 1:
260 case 8: 268 case 8:
261 case 24: 269 case 24: