]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
removed the obsolete and unused parameters of init_put_bits
authoralex <alex@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 12 Oct 2003 21:25:00 +0000 (21:25 +0000)
committeralex <alex@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 12 Oct 2003 21:25:00 +0000 (21:25 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@2366 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

13 files changed:
libavcodec/ac3enc.c
libavcodec/asv1.c
libavcodec/cabac.c
libavcodec/common.c
libavcodec/common.h
libavcodec/dv.c
libavcodec/ffv1.c
libavcodec/h263.c
libavcodec/h264.c
libavcodec/huffyuv.c
libavcodec/mjpeg.c
libavcodec/mpegaudio.c
libavcodec/mpegvideo.c

index 4093fb75d85ced6778ff98987e94acb4091b5f0a..0bcd684f66677f233223b8ef7061272b85611a16 100644 (file)
@@ -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 */
index 87db7f3a441166925b5990d5e760e47974751e84..2e6f785fb064b53e13995dc75071b5e2cd44265a 100644 (file)
@@ -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;
index 3e50dc82a0fe966f89e768603c9bb1b1f165824a..27e63045b75f747c0d8459674d8f575d30235f65 100644 (file)
@@ -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;
index 6f1892a0a382e4f57fb62c4b57672f321229d8ee..58d625f0991ded5e17c2127d57dac56db69baa48 100644 (file)
@@ -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;
index 5cd4231774837043d7ae210f1174bf754d3f8ae3..d9df51426347537e76456a61a8d57de6ec74b49d 100644 (file)
@@ -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);
index f33a7582e2ba2f3d46472fc808ff565beb2cecad..a9501886b80ce5c812ebafb46ee8a85d47220e07 100644 (file)
@@ -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++) {
index c8520a4efa23c45dbb52c831423ace8b1025ee6d..a5c83001635a5fe406afad05168687bedb5bf5cf 100644 (file)
@@ -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){
index 58ce35158524ae1d3e120e61a619b81ef38c9475..ce073211267f5226e98b49d5475f5ebbf01c6a81 100644 (file)
@@ -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)
index 96bba6266a706d00c7161ac922ba7b5768f1bb29..8bf9970368efe6467e1c63c4be8e806f2c4f642e 100644 (file)
@@ -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
index 7970cd34c5e89e38b345647a6f953ac03515a435..5236d38c516cbda1a25d8ea309d86ae7e13beee1 100644 (file)
@@ -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;
index e8f27ca0c6725772a8571f5020e8450b56137603..85d5b0fc7b263328af562476f390086a892f5fcb 100644 (file)
@@ -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;
index f5b92230494cab0557dfc286e5e556687e0b27e0..a6fe951c0ca4595db2a1ce82e0b30b18c8e88840 100644 (file)
@@ -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);
     
index 7a159c9181983ef3d441d6f3b4437142c24e875e..b22d289da9be46ce03c24dcc338dde5d8ab09061 100644 (file)
@@ -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;