Commit e90ad4ee authored by kostya's avatar kostya

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

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18202 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ae4cfb0f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment