[FFmpeg-cvslog] r18202 - trunk/libavcodec/bmp.c

kostya subversion
Fri Mar 27 17:31:49 CET 2009


Author: kostya
Date: Fri Mar 27 17:31:47 2009
New Revision: 18202

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

Modified:
   trunk/libavcodec/bmp.c

Modified: trunk/libavcodec/bmp.c
==============================================================================
--- trunk/libavcodec/bmp.c	Fri Mar 27 09:24:46 2009	(r18201)
+++ trunk/libavcodec/bmp.c	Fri Mar 27 17:31:47 2009	(r18202)
@@ -244,6 +244,8 @@ static int bmp_decode_frame(AVCodecConte
     }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(AVCodecConte
                 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;



More information about the ffmpeg-cvslog mailing list