Mercurial > libavcodec.hg
changeset 1522:79dddc5cd990 libavcodec
removed the obsolete and unused parameters of init_put_bits
author | alex |
---|---|
date | Sun, 12 Oct 2003 21:25:00 +0000 |
parents | c232b6753012 |
children | 925bcd748f4b |
files | ac3enc.c asv1.c cabac.c common.c common.h dv.c ffv1.c h263.c h264.c huffyuv.c mjpeg.c mpegaudio.c mpegvideo.c |
diffstat | 13 files changed, 22 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/ac3enc.c Sun Oct 12 19:18:37 2003 +0000 +++ b/ac3enc.c Sun Oct 12 21:25:00 2003 +0000 @@ -904,7 +904,7 @@ /* output the AC3 frame header */ static void output_frame_header(AC3EncodeContext *s, unsigned char *frame) { - init_put_bits(&s->pb, frame, AC3_MAX_CODED_FRAME_SIZE, NULL, NULL); + init_put_bits(&s->pb, frame, AC3_MAX_CODED_FRAME_SIZE); put_bits(&s->pb, 16, 0x0b77); /* frame header */ put_bits(&s->pb, 16, 0); /* crc1: will be filled later */
--- a/asv1.c Sun Oct 12 19:18:37 2003 +0000 +++ b/asv1.c Sun Oct 12 21:25:00 2003 +0000 @@ -488,7 +488,7 @@ int size; int mb_x, mb_y; - init_put_bits(&a->pb, buf, buf_size, NULL, NULL); + init_put_bits(&a->pb, buf, buf_size); *p = *pict; p->pict_type= I_TYPE;
--- a/cabac.c Sun Oct 12 19:18:37 2003 +0000 +++ b/cabac.c Sun Oct 12 21:25:00 2003 +0000 @@ -74,7 +74,7 @@ * @param buf_size size of buf in bits */ void ff_init_cabac_encoder(CABACContext *c, uint8_t *buf, int buf_size){ - init_put_bits(&c->pb, buf, buf_size, NULL, NULL); + init_put_bits(&c->pb, buf, buf_size); c->low= 0; c->range= 0x1FE;
--- a/common.c Sun Oct 12 19:18:37 2003 +0000 +++ b/common.c Sun Oct 12 21:25:00 2003 +0000 @@ -44,18 +44,11 @@ 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 }; -void init_put_bits(PutBitContext *s, - uint8_t *buffer, int buffer_size, - void *opaque, - void (*write_data)(void *, uint8_t *, int)) +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; - if(write_data!=NULL) - { - fprintf(stderr, "write Data callback is not supported\n"); - } #ifdef ALT_BITSTREAM_WRITER s->index=0; ((uint32_t*)(s->buf))[0]=0;
--- a/common.h Sun Oct 12 19:18:37 2003 +0000 +++ b/common.h Sun Oct 12 21:25:00 2003 +0000 @@ -261,10 +261,7 @@ int64_t data_out_size; /* in bytes */ } PutBitContext; -void init_put_bits(PutBitContext *s, - uint8_t *buffer, int buffer_size, - void *opaque, - void (*write_data)(void *, uint8_t *, int)); +void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size); int64_t get_bit_count(PutBitContext *s); /* XXX: change function name */ void align_put_bits(PutBitContext *s);
--- a/dv.c Sun Oct 12 19:18:37 2003 +0000 +++ b/dv.c Sun Oct 12 21:25:00 2003 +0000 @@ -344,13 +344,13 @@ buf_ptr = buf_ptr1; block1 = &s->block[0][0]; mb1 = mb_data; - init_put_bits(&vs_pb, vs_bit_buffer, 5 * 80, NULL, NULL); + init_put_bits(&vs_pb, vs_bit_buffer, 5 * 80); vs_bit_count = 0; for(mb_index = 0; mb_index < 5; mb_index++) { /* skip header */ quant = buf_ptr[3] & 0x0f; buf_ptr += 4; - init_put_bits(&pb, mb_bit_buffer, 80, NULL, NULL); + init_put_bits(&pb, mb_bit_buffer, 80); mb_bit_count = 0; mb = mb1; block = block1; @@ -758,13 +758,13 @@ uint8_t* p = dif + i*80 + 4; for (j=0; j<6; j++) { enc_blk->qno = QNO; - init_put_bits(&enc_blk->pb, p, block_sizes[j]/8, NULL, NULL); + init_put_bits(&enc_blk->pb, p, block_sizes[j]/8); enc_blk++; p += block_sizes[j]/8; } } - init_put_bits(&extra_vs, extra_vs_data, sizeof(extra_vs_data), NULL, NULL); + init_put_bits(&extra_vs, extra_vs_data, sizeof(extra_vs_data)); free_vs_bits = 0; enc_blk = &enc_blks[0]; for (i=0; i<5; i++) { @@ -772,7 +772,7 @@ EncBlockInfo* enc_blk2 = enc_blk; int free_mb_bits = 0; - init_put_bits(&extra_mb, extra_mb_data, sizeof(extra_mb_data), NULL, NULL); + init_put_bits(&extra_mb, extra_mb_data, sizeof(extra_mb_data)); dif[i*80 + 3] = enc_blk->qno; for (j=0; j<6; j++) {
--- a/ffv1.c Sun Oct 12 19:18:37 2003 +0000 +++ b/ffv1.c Sun Oct 12 21:25:00 2003 +0000 @@ -599,7 +599,7 @@ if(!f->ac){ used_count += put_cabac_terminate(c, 1); //printf("pos=%d\n", used_count); - init_put_bits(&f->pb, buf + used_count, buf_size - used_count, NULL, NULL); + init_put_bits(&f->pb, buf + used_count, buf_size - used_count); } if(1){
--- a/h263.c Sun Oct 12 19:18:37 2003 +0000 +++ b/h263.c Sun Oct 12 21:25:00 2003 +0000 @@ -1709,7 +1709,7 @@ if(s->flags & CODEC_FLAG_GLOBAL_HEADER){ s->avctx->extradata= av_malloc(1024); - init_put_bits(&s->pb, s->avctx->extradata, 1024, NULL, NULL); + init_put_bits(&s->pb, s->avctx->extradata, 1024); mpeg4_encode_visual_object_header(s); mpeg4_encode_vol_header(s, 0, 0); @@ -2612,8 +2612,8 @@ void ff_mpeg4_init_partitions(MpegEncContext *s) { - init_put_bits(&s->tex_pb, s->tex_pb_buffer, PB_BUFFER_SIZE, NULL, NULL); - init_put_bits(&s->pb2 , s->pb2_buffer , PB_BUFFER_SIZE, NULL, NULL); + init_put_bits(&s->tex_pb, s->tex_pb_buffer, PB_BUFFER_SIZE); + init_put_bits(&s->pb2 , s->pb2_buffer , PB_BUFFER_SIZE); } void ff_mpeg4_merge_partitions(MpegEncContext *s)
--- a/h264.c Sun Oct 12 19:18:37 2003 +0000 +++ b/h264.c Sun Oct 12 21:25:00 2003 +0000 @@ -4231,7 +4231,7 @@ dsputil_init(&dsp, &avctx); - init_put_bits(&pb, temp, SIZE, NULL, NULL); + init_put_bits(&pb, temp, SIZE); printf("testing unsigned exp golomb\n"); for(i=0; i<COUNT; i++){ START_TIMER
--- a/huffyuv.c Sun Oct 12 19:18:37 2003 +0000 +++ b/huffyuv.c Sun Oct 12 21:25:00 2003 +0000 @@ -958,7 +958,7 @@ AVFrame * const p= &s->picture; int i, size; - init_put_bits(&s->pb, buf, buf_size, NULL, NULL); + init_put_bits(&s->pb, buf, buf_size); *p = *pict; p->pict_type= FF_I_TYPE;
--- a/mjpeg.c Sun Oct 12 19:18:37 2003 +0000 +++ b/mjpeg.c Sun Oct 12 21:25:00 2003 +0000 @@ -661,7 +661,7 @@ AVFrame * const p= (AVFrame*)&s->current_picture; const int predictor= avctx->prediction_method+1; - init_put_bits(&s->pb, buf, buf_size, NULL, NULL); + init_put_bits(&s->pb, buf, buf_size); *p = *pict; p->pict_type= FF_I_TYPE;
--- a/mpegaudio.c Sun Oct 12 19:18:37 2003 +0000 +++ b/mpegaudio.c Sun Oct 12 21:25:00 2003 +0000 @@ -765,7 +765,7 @@ } compute_bit_allocation(s, smr, bit_alloc, &padding); - init_put_bits(&s->pb, frame, MPA_MAX_CODED_FRAME_SIZE, NULL, NULL); + init_put_bits(&s->pb, frame, MPA_MAX_CODED_FRAME_SIZE); encode_frame(s, bit_alloc, padding);
--- a/mpegvideo.c Sun Oct 12 19:18:37 2003 +0000 +++ b/mpegvideo.c Sun Oct 12 21:25:00 2003 +0000 @@ -1601,7 +1601,7 @@ return -1; } - init_put_bits(&s->pb, buf, buf_size, NULL, NULL); + init_put_bits(&s->pb, buf, buf_size); s->picture_in_gop_number++; @@ -3326,9 +3326,9 @@ PutBitContext pb[2], pb2[2], tex_pb[2]; for(i=0; i<2; i++){ - init_put_bits(&pb [i], bit_buf [i], 3000, NULL, NULL); - init_put_bits(&pb2 [i], bit_buf2 [i], 3000, NULL, NULL); - init_put_bits(&tex_pb[i], bit_buf_tex[i], 3000, NULL, NULL); + init_put_bits(&pb [i], bit_buf [i], 3000); + init_put_bits(&pb2 [i], bit_buf2 [i], 3000); + init_put_bits(&tex_pb[i], bit_buf_tex[i], 3000); } s->picture_number = picture_number;