diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-12-03 19:17:39 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-12-03 19:17:39 +0000 |
commit | f38e450746ca52c7965146ebdbcdd4cc30ad1fd9 (patch) | |
tree | 0473d3dfd69f930f3baaf12564256343bf132bf6 /libavcodec/tiffenc.c | |
parent | b10fa1bb8b9d4074b1d4dd7364ca236a574c9951 (diff) | |
download | ffmpeg-f38e450746ca52c7965146ebdbcdd4cc30ad1fd9.tar.gz |
use lzw compression in gif encoder
Originally committed as revision 20723 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/tiffenc.c')
-rw-r--r-- | libavcodec/tiffenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index 7af39142c9..1d6b5b01f7 100644 --- a/libavcodec/tiffenc.c +++ b/libavcodec/tiffenc.c @@ -32,6 +32,7 @@ #include "tiff.h" #include "rle.h" #include "lzw.h" +#include "put_bits.h" #define TIFF_MAX_ENTRY 32 @@ -352,7 +353,8 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf, for (i = 0; i < s->height; i++) { if (strip_sizes[i / s->rps] == 0) { if(s->compr == TIFF_LZW){ - ff_lzw_encode_init(s->lzws, ptr, s->buf_size - (*s->buf - s->buf_start), 12); + ff_lzw_encode_init(s->lzws, ptr, s->buf_size - (*s->buf - s->buf_start), + 12, FF_LZW_TIFF, put_bits); } strip_offsets[i / s->rps] = ptr - buf; } @@ -372,7 +374,7 @@ static int encode_frame(AVCodecContext * avctx, unsigned char *buf, ptr += n; if(s->compr == TIFF_LZW && (i==s->height-1 || i%s->rps == s->rps-1)){ int ret; - ret = ff_lzw_encode_flush(s->lzws); + ret = ff_lzw_encode_flush(s->lzws, flush_put_bits); strip_sizes[(i / s->rps )] += ret ; ptr += ret; } |