diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-03-27 16:31:47 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-03-27 16:31:47 +0000 |
commit | 6b78a77a3555ae390531376b3ada6f91a95ba3e7 (patch) | |
tree | eb0d0bcb377f1a0ac1be9f1d8c75f1b12ad89449 /libavcodec | |
parent | 888facff224d687e4f7fc69851d6fb9bdf4cd1c9 (diff) | |
download | ffmpeg-6b78a77a3555ae390531376b3ada6f91a95ba3e7.tar.gz |
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
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/bmp.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c index 14c070da8f..5de1c46b13 100644 --- a/libavcodec/bmp.c +++ b/libavcodec/bmp.c @@ -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; |