lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.

They are used in lavf.
pull/2/head
Anton Khirnov 13 years ago
parent 6f89efeaa7
commit 9f51c682ee
  1. 2
      libavcodec/aacenc.c
  2. 2
      libavcodec/asv1.c
  3. 4
      libavcodec/bitstream.c
  4. 2
      libavcodec/cljr.c
  5. 2
      libavcodec/flvenc.c
  6. 2
      libavcodec/h261enc.c
  7. 2
      libavcodec/ituh263enc.c
  8. 2
      libavcodec/jpeglsenc.c
  9. 2
      libavcodec/mpeg12enc.c
  10. 2
      libavcodec/mpeg4audio.c
  11. 4
      libavcodec/mpeg4videoenc.c
  12. 10
      libavcodec/mpegvideo_enc.c
  13. 2
      libavcodec/msmpeg4.c
  14. 8
      libavcodec/put_bits.h
  15. 2
      libavcodec/rv10enc.c
  16. 4
      libavcodec/svq1enc.c
  17. 2
      libavcodec/vcr1.c
  18. 4
      libavcodec/wmaenc.c
  19. 4
      libavcodec/wmaprodec.c
  20. 4
      libavcodec/wmavoice.c
  21. 4
      libavcodec/xsubenc.c
  22. 6
      libavformat/latmenc.c

@ -482,7 +482,7 @@ static void put_bitstream_info(AVCodecContext *avctx, AACEncContext *s,
put_bits(&s->pb, 8, namelen - 16);
put_bits(&s->pb, 4, 0); //extension type - filler
padbits = 8 - (put_bits_count(&s->pb) & 7);
align_put_bits(&s->pb);
avpriv_align_put_bits(&s->pb);
for (i = 0; i < namelen - 2; i++)
put_bits(&s->pb, 8, name[i]);
put_bits(&s->pb, 12 - padbits, 0);

@ -497,7 +497,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
}
emms_c();
align_put_bits(&a->pb);
avpriv_align_put_bits(&a->pb);
while(put_bits_count(&a->pb)&31)
put_bits(&a->pb, 8, 0);

@ -41,7 +41,7 @@ const uint8_t ff_log2_run[41]={
24,
};
void align_put_bits(PutBitContext *s)
void avpriv_align_put_bits(PutBitContext *s)
{
put_bits(s,s->bit_left & 7,0);
}
@ -56,7 +56,7 @@ void ff_put_string(PutBitContext *pb, const char *string, int terminate_string)
put_bits(pb, 8, 0);
}
void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
{
int words= length>>4;
int bits= length&15;

@ -105,7 +105,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
emms_c();
align_put_bits(&a->pb);
avpriv_align_put_bits(&a->pb);
while(get_bit_count(&a->pb)&31)
put_bits(&a->pb, 8, 0);

@ -25,7 +25,7 @@ void ff_flv_encode_picture_header(MpegEncContext * s, int picture_number)
{
int format;
align_put_bits(&s->pb);
avpriv_align_put_bits(&s->pb);
put_bits(&s->pb, 17, 1);
put_bits(&s->pb, 5, (s->h263_flv-1)); /* 0: h263 escape codes 1: 11-bit escape codes */

@ -53,7 +53,7 @@ void ff_h261_encode_picture_header(MpegEncContext * s, int picture_number){
H261Context * h = (H261Context *) s;
int format, temp_ref;
align_put_bits(&s->pb);
avpriv_align_put_bits(&s->pb);
/* Update the pointer to last GOB */
s->ptr_lastgob = put_bits_ptr(&s->pb);

@ -126,7 +126,7 @@ void h263_encode_picture_header(MpegEncContext * s, int picture_number)
coded_frame_rate= 1800000;
coded_frame_rate_base= (1000+best_clock_code)*best_divisor;
align_put_bits(&s->pb);
avpriv_align_put_bits(&s->pb);
/* Update the pointer to last GOB */
s->ptr_lastgob = put_bits_ptr(&s->pb);

@ -357,7 +357,7 @@ static int encode_picture_ls(AVCodecContext *avctx, unsigned char *buf, int buf_
put_bits(&pb, 8, v);
}
}
align_put_bits(&pb);
avpriv_align_put_bits(&pb);
av_free(buf2);
/* End of image */

@ -192,7 +192,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
static void put_header(MpegEncContext *s, int header)
{
align_put_bits(&s->pb);
avpriv_align_put_bits(&s->pb);
put_bits(&s->pb, 16, header>>16);
put_sbits(&s->pb, 16, header);
}

@ -173,7 +173,7 @@ int avpriv_copy_pce_data(PutBitContext *pb, GetBitContext *gb)
copy_bits(pb, gb, 16);
if (bits)
copy_bits(pb, gb, bits);
align_put_bits(pb);
avpriv_align_put_bits(pb);
align_get_bits(gb);
comment_size = copy_bits(pb, gb, 8);
for (; comment_size > 0; comment_size--)

@ -1258,8 +1258,8 @@ void ff_mpeg4_merge_partitions(MpegEncContext *s)
flush_put_bits(&s->tex_pb);
set_put_bits_buffer_size(&s->pb, s->pb2.buf_end - s->pb.buf);
ff_copy_bits(&s->pb, s->pb2.buf , pb2_len);
ff_copy_bits(&s->pb, s->tex_pb.buf, tex_pb_len);
avpriv_copy_bits(&s->pb, s->pb2.buf , pb2_len);
avpriv_copy_bits(&s->pb, s->tex_pb.buf, tex_pb_len);
s->last_bits= put_bits_count(&s->pb);
}

@ -2044,7 +2044,7 @@ static void write_slice_end(MpegEncContext *s){
ff_mjpeg_encode_stuffing(&s->pb);
}
align_put_bits(&s->pb);
avpriv_align_put_bits(&s->pb);
flush_put_bits(&s->pb);
if((s->flags&CODEC_FLAG_PASS1) && !s->partitioned_frame)
@ -2480,18 +2480,18 @@ static int encode_thread(AVCodecContext *c, void *arg){
pb_bits_count= put_bits_count(&s->pb);
flush_put_bits(&s->pb);
ff_copy_bits(&backup_s.pb, bit_buf[next_block^1], pb_bits_count);
avpriv_copy_bits(&backup_s.pb, bit_buf[next_block^1], pb_bits_count);
s->pb= backup_s.pb;
if(s->data_partitioning){
pb2_bits_count= put_bits_count(&s->pb2);
flush_put_bits(&s->pb2);
ff_copy_bits(&backup_s.pb2, bit_buf2[next_block^1], pb2_bits_count);
avpriv_copy_bits(&backup_s.pb2, bit_buf2[next_block^1], pb2_bits_count);
s->pb2= backup_s.pb2;
tex_pb_bits_count= put_bits_count(&s->tex_pb);
flush_put_bits(&s->tex_pb);
ff_copy_bits(&backup_s.tex_pb, bit_buf_tex[next_block^1], tex_pb_bits_count);
avpriv_copy_bits(&backup_s.tex_pb, bit_buf_tex[next_block^1], tex_pb_bits_count);
s->tex_pb= backup_s.tex_pb;
}
s->last_bits= put_bits_count(&s->pb);
@ -2714,7 +2714,7 @@ static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src)
assert(put_bits_count(&src->pb) % 8 ==0);
assert(put_bits_count(&dst->pb) % 8 ==0);
ff_copy_bits(&dst->pb, src->pb.buf, put_bits_count(&src->pb));
avpriv_copy_bits(&dst->pb, src->pb.buf, put_bits_count(&src->pb));
flush_put_bits(&dst->pb);
}

@ -351,7 +351,7 @@ void msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number)
{
find_best_tables(s);
align_put_bits(&s->pb);
avpriv_align_put_bits(&s->pb);
put_bits(&s->pb, 2, s->pict_type - 1);
put_bits(&s->pb, 5, s->qscale);

@ -97,14 +97,14 @@ static inline void flush_put_bits(PutBitContext *s)
}
#ifdef BITSTREAM_WRITER_LE
#define align_put_bits align_put_bits_unsupported_here
#define avpriv_align_put_bits align_put_bits_unsupported_here
#define ff_put_string ff_put_string_unsupported_here
#define ff_copy_bits ff_copy_bits_unsupported_here
#define avpriv_copy_bits avpriv_copy_bits_unsupported_here
#else
/**
* Pad the bitstream with zeros up to the next byte boundary.
*/
void align_put_bits(PutBitContext *s);
void avpriv_align_put_bits(PutBitContext *s);
/**
* Put the string string in the bitstream.
@ -118,7 +118,7 @@ void ff_put_string(PutBitContext *pb, const char *string, int terminate_string);
*
* @param length the number of bits of src to copy
*/
void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
#endif
/**

@ -32,7 +32,7 @@ void rv10_encode_picture_header(MpegEncContext *s, int picture_number)
{
int full_frame= 0;
align_put_bits(&s->pb);
avpriv_align_put_bits(&s->pb);
put_bits(&s->pb, 1, 1); /* marker */

@ -461,7 +461,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane, unsigned char *src_plane
s->rd_total += score[best];
for(i=5; i>=0; i--){
ff_copy_bits(&s->pb, reorder_buffer[best][i], count[best][i]);
avpriv_copy_bits(&s->pb, reorder_buffer[best][i], count[best][i]);
}
if(best==0){
s->dsp.put_pixels_tab[0][0](decoded, temp, stride, 16);
@ -540,7 +540,7 @@ static int svq1_encode_frame(AVCodecContext *avctx, unsigned char *buf,
return -1;
}
// align_put_bits(&s->pb);
// avpriv_align_put_bits(&s->pb);
while(put_bits_count(&s->pb) & 31)
put_bits(&s->pb, 1, 0);

@ -132,7 +132,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
emms_c();
align_put_bits(&a->pb);
avpriv_align_put_bits(&a->pb);
while(get_bit_count(&a->pb)&31)
put_bits(&a->pb, 8, 0);

@ -311,7 +311,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
put_bits(&s->pb, s->coef_vlcs[tindex]->huffbits[1], s->coef_vlcs[tindex]->huffcodes[1]);
}
if (s->version == 1 && s->nb_channels >= 2) {
align_put_bits(&s->pb);
avpriv_align_put_bits(&s->pb);
}
}
return 0;
@ -327,7 +327,7 @@ static int encode_frame(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
return INT_MAX;
}
align_put_bits(&s->pb);
avpriv_align_put_bits(&s->pb);
return put_bits_count(&s->pb)/8 - s->block_align;
}

@ -1446,14 +1446,14 @@ static void save_bits(WMAProDecodeCtx *s, GetBitContext* gb, int len,
s->num_saved_bits += len;
if (!append) {
ff_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3),
avpriv_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3),
s->num_saved_bits);
} else {
int align = 8 - (get_bits_count(gb) & 7);
align = FFMIN(align, len);
put_bits(&s->pb, align, get_bits(gb, align));
len -= align;
ff_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), len);
avpriv_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), len);
}
skip_bits_long(gb, len);

@ -1872,7 +1872,7 @@ static int parse_packet_header(WMAVoiceContext *s)
* @param size size of the source data, in bytes
* @param gb bit I/O context specifying the current position in the source.
* data. This function might use this to align the bit position to
* a whole-byte boundary before calling #ff_copy_bits() on aligned
* a whole-byte boundary before calling #avpriv_copy_bits() on aligned
* source data
* @param nbits the amount of bits to copy from source to target
*
@ -1893,7 +1893,7 @@ static void copy_bits(PutBitContext *pb,
rmn_bits &= 7; rmn_bytes >>= 3;
if ((rmn_bits = FFMIN(rmn_bits, nbits)) > 0)
put_bits(pb, rmn_bits, get_bits(gb, rmn_bits));
ff_copy_bits(pb, data + size - rmn_bytes,
avpriv_copy_bits(pb, data + size - rmn_bytes,
FFMIN(nbits - rmn_bits, rmn_bytes << 3));
}

@ -90,7 +90,7 @@ static int xsub_encode_rle(PutBitContext *pb, const uint8_t *bitmap,
if (color != PADDING_COLOR && (PADDING + (w&1)))
put_xsub_rle(pb, PADDING + (w&1), PADDING_COLOR);
align_put_bits(pb);
avpriv_align_put_bits(pb);
bitmap += linesize;
}
@ -194,7 +194,7 @@ static int xsub_encode(AVCodecContext *avctx, unsigned char *buf,
// Enforce total height to be be multiple of 2
if (h->rects[0]->h & 1) {
put_xsub_rle(&pb, h->rects[0]->w, PADDING_COLOR);
align_put_bits(&pb);
avpriv_align_put_bits(&pb);
}
flush_put_bits(&pb);

@ -106,9 +106,9 @@ static int latm_write_frame_header(AVFormatContext *s, PutBitContext *bs)
/* AudioSpecificConfig */
if (ctx->object_type == AOT_ALS) {
header_size = avctx->extradata_size-(ctx->off + 7) >> 3;
ff_copy_bits(bs, &avctx->extradata[ctx->off], header_size);
avpriv_copy_bits(bs, &avctx->extradata[ctx->off], header_size);
} else {
ff_copy_bits(bs, avctx->extradata, ctx->off + 3);
avpriv_copy_bits(bs, avctx->extradata, ctx->off + 3);
if (!ctx->channel_conf) {
avpriv_copy_pce_data(bs, &gb);
@ -161,7 +161,7 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt)
for (i = 0; i < pkt->size; i++)
put_bits(&bs, 8, pkt->data[i]);
align_put_bits(&bs);
avpriv_align_put_bits(&bs);
flush_put_bits(&bs);
len = put_bits_count(&bs) >> 3;

Loading…
Cancel
Save