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

Benoit Fouet ml_benoitfouet
Tue Sep 23 10:44:29 CEST 2008


kostya wrote:
> Author: kostya
> Date: Tue Sep 23 10:32:18 2008
> New Revision: 15388
>
> Log:
> Calculate line size correctly for bit depths < 8
>
> Modified:
>    trunk/libavcodec/bmp.c
>
> Modified: trunk/libavcodec/bmp.c
> ==============================================================================
> --- trunk/libavcodec/bmp.c      (original)
> +++ trunk/libavcodec/bmp.c      Tue Sep 23 10:32:18 2008
> @@ -175,7 +175,7 @@ static int bmp_decode_frame(AVCodecConte
>      dsize = buf_size - hsize;
>
>      /* Line size in file multiple of 4 */
> -    n = (avctx->width * (depth / 8) + 3) & ~3;
> +    n = ((avctx->width * depth) / 8 + 3) & ~3;
>
>   
you could as well remove the parentheses

-- 
Benoit Fouet
Purple Labs S.A.
www.purplelabs.com





More information about the ffmpeg-cvslog mailing list