Browse Source

Merge some cases for reading raw data with different bit depths in BMP

Originally committed as revision 18202 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Kostya Shishkov 16 years ago
parent
commit
6b78a77a35
1 changed files with 2 additions and 14 deletions
  1. +2
    -14
      libavcodec/bmp.c

+ 2
- 14
libavcodec/bmp.c View File

@@ -244,6 +244,8 @@ static int bmp_decode_frame(AVCodecContext *avctx,
}else{
switch(depth){
case 1:
case 8:
case 24:
for(i = 0; i < avctx->height; i++){
memcpy(ptr, buf, n);
buf += n;
@@ -261,20 +263,6 @@ static int bmp_decode_frame(AVCodecContext *avctx,
ptr += linesize;
}
break;
case 8:
for(i = 0; i < avctx->height; i++){
memcpy(ptr, buf, avctx->width);
buf += n;
ptr += linesize;
}
break;
case 24:
for(i = 0; i < avctx->height; i++){
memcpy(ptr, buf, avctx->width*(depth>>3));
buf += n;
ptr += linesize;
}
break;
case 16:
for(i = 0; i < avctx->height; i++){
const uint16_t *src = (const uint16_t *) buf;


Loading…
Cancel
Save