[FFmpeg-cvslog] tiffenc: fix bpp value for monow/monob formats

Stefano Sabatini git at videolan.org
Fri May 13 17:01:53 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Fri May 13 01:49:15 2011 +0200| [995013ebc847f9c7bdc5fd8dc1df53c9ad4a7066] | committer: Stefano Sabatini

tiffenc: fix bpp value for monow/monob formats

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=995013ebc847f9c7bdc5fd8dc1df53c9ad4a7066
---

 libavcodec/tiffenc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index dd55072..d0614f5 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -282,7 +282,7 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf,
         return -1;
     }
     if (!is_yuv)
-        s->bpp_tab_size = (s->bpp >> 3);
+        s->bpp_tab_size = ((s->bpp + 7) >> 3);
 
     if (s->compr == TIFF_DEFLATE || s->compr == TIFF_ADOBE_DEFLATE || s->compr == TIFF_LZW)
         //best choose for DEFLATE



More information about the ffmpeg-cvslog mailing list