diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-12-05 23:12:03 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-12-05 23:12:03 +0000 |
commit | a8380f44cfa69c204856568f5d24851fbdb1d884 (patch) | |
tree | 8d926b7bbbceb88758aaf2843052e862c6783ced | |
parent | 2be9f03abb2be775f4882fb87fb735bd7b5a3930 (diff) | |
download | ffmpeg-a8380f44cfa69c204856568f5d24851fbdb1d884.tar.gz |
removing unused var & converting 64->32bit
Originally committed as revision 2567 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/common.c | 7 | ||||
-rw-r--r-- | libavcodec/common.h | 3 | ||||
-rw-r--r-- | libavcodec/dv.c | 2 | ||||
-rw-r--r-- | libavformat/gif.c | 1 |
4 files changed, 5 insertions, 8 deletions
diff --git a/libavcodec/common.c b/libavcodec/common.c index 96889813e3..ed59ea1d82 100644 --- a/libavcodec/common.c +++ b/libavcodec/common.c @@ -48,7 +48,6 @@ void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size) { s->buf = buffer; s->buf_end = s->buf + buffer_size; - s->data_out_size = 0; #ifdef ALT_BITSTREAM_WRITER s->index=0; ((uint32_t*)(s->buf))[0]=0; @@ -63,12 +62,12 @@ void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size) #ifdef CONFIG_ENCODERS /* return the number of bits output */ -int64_t get_bit_count(PutBitContext *s) +int get_bit_count(PutBitContext *s) { #ifdef ALT_BITSTREAM_WRITER - return s->data_out_size * 8 + s->index; + return s->index; #else - return (s->buf_ptr - s->buf + s->data_out_size) * 8 + 32 - (int64_t)s->bit_left; + return (s->buf_ptr - s->buf) * 8 + 32 - s->bit_left; #endif } diff --git a/libavcodec/common.h b/libavcodec/common.h index f41edee4e6..385372f792 100644 --- a/libavcodec/common.h +++ b/libavcodec/common.h @@ -274,12 +274,11 @@ typedef struct PutBitContext { int bit_left; uint8_t *buf, *buf_ptr, *buf_end; #endif - int64_t data_out_size; /* in bytes */ } PutBitContext; void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size); -int64_t get_bit_count(PutBitContext *s); /* XXX: change function name */ +int get_bit_count(PutBitContext *s); /* XXX: change function name */ void align_put_bits(PutBitContext *s); void flush_put_bits(PutBitContext *s); void put_string(PutBitContext * pbc, char *s); diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 2754dca7d1..48216603a0 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -645,7 +645,7 @@ typedef struct EncBlockInfo { static always_inline int dv_bits_left(PutBitContext* s) { return (s->buf_end - s->buf) * 8 - - ((s->buf_ptr - s->buf + s->data_out_size) * 8 + 32 - (int64_t)s->bit_left); + ((s->buf_ptr - s->buf) * 8 + 32 - (int64_t)s->bit_left); } static always_inline void dv_encode_ac(EncBlockInfo* bi, PutBitContext* pb_pool, diff --git a/libavformat/gif.c b/libavformat/gif.c index e64bd51b15..7867913da2 100644 --- a/libavformat/gif.c +++ b/libavformat/gif.c @@ -274,7 +274,6 @@ static int gif_image_write_image(ByteIOContext *pb, if(pbBufPtr(&p) - p.buf > 0) { put_byte(pb, pbBufPtr(&p) - p.buf); /* byte count of the packet */ put_buffer(pb, p.buf, pbBufPtr(&p) - p.buf); /* the actual buffer */ - p.data_out_size += pbBufPtr(&p) - p.buf; p.buf_ptr = p.buf; /* dequeue the bytes off the bitstream */ } if(left<=GIF_CHUNKS) { |