aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2003-10-12 21:25:00 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2003-10-12 21:25:00 +0000
commited7debda140ca5d1d8a7203abf92acb9f8eb112c (patch)
tree9c25183603e0d2793c81f0d1631a336190c38a4a
parentd6896c49ccd3f02500d0397b63b4dda5d9e24ea9 (diff)
downloadffmpeg-ed7debda140ca5d1d8a7203abf92acb9f8eb112c.tar.gz
removed the obsolete and unused parameters of init_put_bits
Originally committed as revision 2366 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/ac3enc.c2
-rw-r--r--libavcodec/asv1.c2
-rw-r--r--libavcodec/cabac.c2
-rw-r--r--libavcodec/common.c9
-rw-r--r--libavcodec/common.h5
-rw-r--r--libavcodec/dv.c10
-rw-r--r--libavcodec/ffv1.c2
-rw-r--r--libavcodec/h263.c6
-rw-r--r--libavcodec/h264.c2
-rw-r--r--libavcodec/huffyuv.c2
-rw-r--r--libavcodec/mjpeg.c2
-rw-r--r--libavcodec/mpegaudio.c2
-rw-r--r--libavcodec/mpegvideo.c8
13 files changed, 22 insertions, 32 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 4093fb75d8..0bcd684f66 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -904,7 +904,7 @@ static int AC3_encode_init(AVCodecContext *avctx)
/* 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 */
diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c
index 87db7f3a44..2e6f785fb0 100644
--- a/libavcodec/asv1.c
+++ b/libavcodec/asv1.c
@@ -488,7 +488,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
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;
diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c
index 3e50dc82a0..27e63045b7 100644
--- a/libavcodec/cabac.c
+++ b/libavcodec/cabac.c
@@ -74,7 +74,7 @@ const uint8_t ff_h264_lps_state[64]= {
* @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;
diff --git a/libavcodec/common.c b/libavcodec/common.c
index 6f1892a0a3..58d625f099 100644
--- a/libavcodec/common.c
+++ b/libavcodec/common.c
@@ -44,18 +44,11 @@ const uint8_t ff_log2_tab[256]={
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;
diff --git a/libavcodec/common.h b/libavcodec/common.h
index 5cd4231774..d9df514263 100644
--- a/libavcodec/common.h
+++ b/libavcodec/common.h
@@ -261,10 +261,7 @@ typedef struct PutBitContext {
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);
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index f33a7582e2..a9501886b8 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -344,13 +344,13 @@ static inline void dv_decode_video_segment(DVVideoDecodeContext *s,
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 @@ encode_vs:
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 @@ encode_vs:
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++) {
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index c8520a4efa..a5c8300163 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -599,7 +599,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
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){
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index 58ce351585..ce07321126 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -1709,7 +1709,7 @@ void h263_encode_init(MpegEncContext *s)
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 @@ static inline void memsetw(short *tab, int val, int n)
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)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 96bba6266a..8bf9970368 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4231,7 +4231,7 @@ int main(){
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
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 7970cd34c5..5236d38c51 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -958,7 +958,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
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;
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c
index e8f27ca0c6..85d5b0fc7b 100644
--- a/libavcodec/mjpeg.c
+++ b/libavcodec/mjpeg.c
@@ -661,7 +661,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, unsigned char *buf, in
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;
diff --git a/libavcodec/mpegaudio.c b/libavcodec/mpegaudio.c
index f5b9223049..a6fe951c0c 100644
--- a/libavcodec/mpegaudio.c
+++ b/libavcodec/mpegaudio.c
@@ -765,7 +765,7 @@ static int MPA_encode_frame(AVCodecContext *avctx,
}
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);
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 7a159c9181..b22d289da9 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1601,7 +1601,7 @@ int MPV_encode_picture(AVCodecContext *avctx,
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 @@ static void encode_picture(MpegEncContext *s, int picture_number)
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;