Mercurial > libavcodec.hg
comparison h263.c @ 1786:b7340afa261a libavcodec
get_bit_count -> put_bits_count
author | alex |
---|---|
date | Fri, 06 Feb 2004 15:27:31 +0000 |
parents | bb5b19529111 |
children | acda5fdfd6e7 |
comparison
equal
deleted
inserted
replaced
1785:14d918d0ef42 | 1786:b7340afa261a |
---|---|
1970 mpeg4_encode_visual_object_header(s); | 1970 mpeg4_encode_visual_object_header(s); |
1971 mpeg4_encode_vol_header(s, 0, 0); | 1971 mpeg4_encode_vol_header(s, 0, 0); |
1972 | 1972 |
1973 // ff_mpeg4_stuffing(&s->pb); ? | 1973 // ff_mpeg4_stuffing(&s->pb); ? |
1974 flush_put_bits(&s->pb); | 1974 flush_put_bits(&s->pb); |
1975 s->avctx->extradata_size= (get_bit_count(&s->pb)+7)>>3; | 1975 s->avctx->extradata_size= (put_bits_count(&s->pb)+7)>>3; |
1976 } | 1976 } |
1977 | 1977 |
1978 break; | 1978 break; |
1979 case CODEC_ID_H263P: | 1979 case CODEC_ID_H263P: |
1980 if(s->umvplus) | 1980 if(s->umvplus) |
2144 */ | 2144 */ |
2145 void ff_mpeg4_stuffing(PutBitContext * pbc) | 2145 void ff_mpeg4_stuffing(PutBitContext * pbc) |
2146 { | 2146 { |
2147 int length; | 2147 int length; |
2148 put_bits(pbc, 1, 0); | 2148 put_bits(pbc, 1, 0); |
2149 length= (-get_bit_count(pbc))&7; | 2149 length= (-put_bits_count(pbc))&7; |
2150 if(length) put_bits(pbc, length, (1<<length)-1); | 2150 if(length) put_bits(pbc, length, (1<<length)-1); |
2151 } | 2151 } |
2152 | 2152 |
2153 /* must be called before writing the header */ | 2153 /* must be called before writing the header */ |
2154 void ff_set_mpeg4_time(MpegEncContext * s, int picture_number){ | 2154 void ff_set_mpeg4_time(MpegEncContext * s, int picture_number){ |
2970 init_put_bits(&s->pb2 , s->pb2_buffer , PB_BUFFER_SIZE); | 2970 init_put_bits(&s->pb2 , s->pb2_buffer , PB_BUFFER_SIZE); |
2971 } | 2971 } |
2972 | 2972 |
2973 void ff_mpeg4_merge_partitions(MpegEncContext *s) | 2973 void ff_mpeg4_merge_partitions(MpegEncContext *s) |
2974 { | 2974 { |
2975 const int pb2_len = get_bit_count(&s->pb2 ); | 2975 const int pb2_len = put_bits_count(&s->pb2 ); |
2976 const int tex_pb_len= get_bit_count(&s->tex_pb); | 2976 const int tex_pb_len= put_bits_count(&s->tex_pb); |
2977 const int bits= get_bit_count(&s->pb); | 2977 const int bits= put_bits_count(&s->pb); |
2978 | 2978 |
2979 if(s->pict_type==I_TYPE){ | 2979 if(s->pict_type==I_TYPE){ |
2980 put_bits(&s->pb, 19, DC_MARKER); | 2980 put_bits(&s->pb, 19, DC_MARKER); |
2981 s->misc_bits+=19 + pb2_len + bits - s->last_bits; | 2981 s->misc_bits+=19 + pb2_len + bits - s->last_bits; |
2982 s->i_tex_bits+= tex_pb_len; | 2982 s->i_tex_bits+= tex_pb_len; |
2990 flush_put_bits(&s->pb2); | 2990 flush_put_bits(&s->pb2); |
2991 flush_put_bits(&s->tex_pb); | 2991 flush_put_bits(&s->tex_pb); |
2992 | 2992 |
2993 ff_copy_bits(&s->pb, s->pb2_buffer , pb2_len); | 2993 ff_copy_bits(&s->pb, s->pb2_buffer , pb2_len); |
2994 ff_copy_bits(&s->pb, s->tex_pb_buffer, tex_pb_len); | 2994 ff_copy_bits(&s->pb, s->tex_pb_buffer, tex_pb_len); |
2995 s->last_bits= get_bit_count(&s->pb); | 2995 s->last_bits= put_bits_count(&s->pb); |
2996 } | 2996 } |
2997 | 2997 |
2998 #endif //CONFIG_ENCODERS | 2998 #endif //CONFIG_ENCODERS |
2999 | 2999 |
3000 int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s){ | 3000 int ff_mpeg4_get_video_packet_prefix_length(MpegEncContext *s){ |