| ... | ... |
@@ -482,7 +482,7 @@ static void put_bitstream_info(AVCodecContext *avctx, AACEncContext *s, |
| 482 | 482 |
put_bits(&s->pb, 8, namelen - 16); |
| 483 | 483 |
put_bits(&s->pb, 4, 0); //extension type - filler |
| 484 | 484 |
padbits = 8 - (put_bits_count(&s->pb) & 7); |
| 485 |
- align_put_bits(&s->pb); |
|
| 485 |
+ avpriv_align_put_bits(&s->pb); |
|
| 486 | 486 |
for (i = 0; i < namelen - 2; i++) |
| 487 | 487 |
put_bits(&s->pb, 8, name[i]); |
| 488 | 488 |
put_bits(&s->pb, 12 - padbits, 0); |
| ... | ... |
@@ -41,7 +41,7 @@ const uint8_t ff_log2_run[41]={
|
| 41 | 41 |
24, |
| 42 | 42 |
}; |
| 43 | 43 |
|
| 44 |
-void align_put_bits(PutBitContext *s) |
|
| 44 |
+void avpriv_align_put_bits(PutBitContext *s) |
|
| 45 | 45 |
{
|
| 46 | 46 |
put_bits(s,s->bit_left & 7,0); |
| 47 | 47 |
} |
| ... | ... |
@@ -56,7 +56,7 @@ void ff_put_string(PutBitContext *pb, const char *string, int terminate_string) |
| 56 | 56 |
put_bits(pb, 8, 0); |
| 57 | 57 |
} |
| 58 | 58 |
|
| 59 |
-void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length) |
|
| 59 |
+void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length) |
|
| 60 | 60 |
{
|
| 61 | 61 |
int words= length>>4; |
| 62 | 62 |
int bits= length&15; |
| ... | ... |
@@ -25,7 +25,7 @@ void ff_flv_encode_picture_header(MpegEncContext * s, int picture_number) |
| 25 | 25 |
{
|
| 26 | 26 |
int format; |
| 27 | 27 |
|
| 28 |
- align_put_bits(&s->pb); |
|
| 28 |
+ avpriv_align_put_bits(&s->pb); |
|
| 29 | 29 |
|
| 30 | 30 |
put_bits(&s->pb, 17, 1); |
| 31 | 31 |
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){
|
| 53 | 53 |
H261Context * h = (H261Context *) s; |
| 54 | 54 |
int format, temp_ref; |
| 55 | 55 |
|
| 56 |
- align_put_bits(&s->pb); |
|
| 56 |
+ avpriv_align_put_bits(&s->pb); |
|
| 57 | 57 |
|
| 58 | 58 |
/* Update the pointer to last GOB */ |
| 59 | 59 |
s->ptr_lastgob = put_bits_ptr(&s->pb); |
| ... | ... |
@@ -126,7 +126,7 @@ void h263_encode_picture_header(MpegEncContext * s, int picture_number) |
| 126 | 126 |
coded_frame_rate= 1800000; |
| 127 | 127 |
coded_frame_rate_base= (1000+best_clock_code)*best_divisor; |
| 128 | 128 |
|
| 129 |
- align_put_bits(&s->pb); |
|
| 129 |
+ avpriv_align_put_bits(&s->pb); |
|
| 130 | 130 |
|
| 131 | 131 |
/* Update the pointer to last GOB */ |
| 132 | 132 |
s->ptr_lastgob = put_bits_ptr(&s->pb); |
| ... | ... |
@@ -192,7 +192,7 @@ static av_cold int encode_init(AVCodecContext *avctx) |
| 192 | 192 |
|
| 193 | 193 |
static void put_header(MpegEncContext *s, int header) |
| 194 | 194 |
{
|
| 195 |
- align_put_bits(&s->pb); |
|
| 195 |
+ avpriv_align_put_bits(&s->pb); |
|
| 196 | 196 |
put_bits(&s->pb, 16, header>>16); |
| 197 | 197 |
put_sbits(&s->pb, 16, header); |
| 198 | 198 |
} |
| ... | ... |
@@ -173,7 +173,7 @@ int avpriv_copy_pce_data(PutBitContext *pb, GetBitContext *gb) |
| 173 | 173 |
copy_bits(pb, gb, 16); |
| 174 | 174 |
if (bits) |
| 175 | 175 |
copy_bits(pb, gb, bits); |
| 176 |
- align_put_bits(pb); |
|
| 176 |
+ avpriv_align_put_bits(pb); |
|
| 177 | 177 |
align_get_bits(gb); |
| 178 | 178 |
comment_size = copy_bits(pb, gb, 8); |
| 179 | 179 |
for (; comment_size > 0; comment_size--) |
| ... | ... |
@@ -1258,8 +1258,8 @@ void ff_mpeg4_merge_partitions(MpegEncContext *s) |
| 1258 | 1258 |
flush_put_bits(&s->tex_pb); |
| 1259 | 1259 |
|
| 1260 | 1260 |
set_put_bits_buffer_size(&s->pb, s->pb2.buf_end - s->pb.buf); |
| 1261 |
- ff_copy_bits(&s->pb, s->pb2.buf , pb2_len); |
|
| 1262 |
- ff_copy_bits(&s->pb, s->tex_pb.buf, tex_pb_len); |
|
| 1261 |
+ avpriv_copy_bits(&s->pb, s->pb2.buf , pb2_len); |
|
| 1262 |
+ avpriv_copy_bits(&s->pb, s->tex_pb.buf, tex_pb_len); |
|
| 1263 | 1263 |
s->last_bits= put_bits_count(&s->pb); |
| 1264 | 1264 |
} |
| 1265 | 1265 |
|
| ... | ... |
@@ -2044,7 +2044,7 @@ static void write_slice_end(MpegEncContext *s){
|
| 2044 | 2044 |
ff_mjpeg_encode_stuffing(&s->pb); |
| 2045 | 2045 |
} |
| 2046 | 2046 |
|
| 2047 |
- align_put_bits(&s->pb); |
|
| 2047 |
+ avpriv_align_put_bits(&s->pb); |
|
| 2048 | 2048 |
flush_put_bits(&s->pb); |
| 2049 | 2049 |
|
| 2050 | 2050 |
if((s->flags&CODEC_FLAG_PASS1) && !s->partitioned_frame) |
| ... | ... |
@@ -2480,18 +2480,18 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
| 2480 | 2480 |
|
| 2481 | 2481 |
pb_bits_count= put_bits_count(&s->pb); |
| 2482 | 2482 |
flush_put_bits(&s->pb); |
| 2483 |
- ff_copy_bits(&backup_s.pb, bit_buf[next_block^1], pb_bits_count); |
|
| 2483 |
+ avpriv_copy_bits(&backup_s.pb, bit_buf[next_block^1], pb_bits_count); |
|
| 2484 | 2484 |
s->pb= backup_s.pb; |
| 2485 | 2485 |
|
| 2486 | 2486 |
if(s->data_partitioning){
|
| 2487 | 2487 |
pb2_bits_count= put_bits_count(&s->pb2); |
| 2488 | 2488 |
flush_put_bits(&s->pb2); |
| 2489 |
- ff_copy_bits(&backup_s.pb2, bit_buf2[next_block^1], pb2_bits_count); |
|
| 2489 |
+ avpriv_copy_bits(&backup_s.pb2, bit_buf2[next_block^1], pb2_bits_count); |
|
| 2490 | 2490 |
s->pb2= backup_s.pb2; |
| 2491 | 2491 |
|
| 2492 | 2492 |
tex_pb_bits_count= put_bits_count(&s->tex_pb); |
| 2493 | 2493 |
flush_put_bits(&s->tex_pb); |
| 2494 |
- ff_copy_bits(&backup_s.tex_pb, bit_buf_tex[next_block^1], tex_pb_bits_count); |
|
| 2494 |
+ avpriv_copy_bits(&backup_s.tex_pb, bit_buf_tex[next_block^1], tex_pb_bits_count); |
|
| 2495 | 2495 |
s->tex_pb= backup_s.tex_pb; |
| 2496 | 2496 |
} |
| 2497 | 2497 |
s->last_bits= put_bits_count(&s->pb); |
| ... | ... |
@@ -2714,7 +2714,7 @@ static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src) |
| 2714 | 2714 |
|
| 2715 | 2715 |
assert(put_bits_count(&src->pb) % 8 ==0); |
| 2716 | 2716 |
assert(put_bits_count(&dst->pb) % 8 ==0); |
| 2717 |
- ff_copy_bits(&dst->pb, src->pb.buf, put_bits_count(&src->pb)); |
|
| 2717 |
+ avpriv_copy_bits(&dst->pb, src->pb.buf, put_bits_count(&src->pb)); |
|
| 2718 | 2718 |
flush_put_bits(&dst->pb); |
| 2719 | 2719 |
} |
| 2720 | 2720 |
|
| ... | ... |
@@ -351,7 +351,7 @@ void msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number) |
| 351 | 351 |
{
|
| 352 | 352 |
find_best_tables(s); |
| 353 | 353 |
|
| 354 |
- align_put_bits(&s->pb); |
|
| 354 |
+ avpriv_align_put_bits(&s->pb); |
|
| 355 | 355 |
put_bits(&s->pb, 2, s->pict_type - 1); |
| 356 | 356 |
|
| 357 | 357 |
put_bits(&s->pb, 5, s->qscale); |
| ... | ... |
@@ -97,14 +97,14 @@ static inline void flush_put_bits(PutBitContext *s) |
| 97 | 97 |
} |
| 98 | 98 |
|
| 99 | 99 |
#ifdef BITSTREAM_WRITER_LE |
| 100 |
-#define align_put_bits align_put_bits_unsupported_here |
|
| 100 |
+#define avpriv_align_put_bits align_put_bits_unsupported_here |
|
| 101 | 101 |
#define ff_put_string ff_put_string_unsupported_here |
| 102 |
-#define ff_copy_bits ff_copy_bits_unsupported_here |
|
| 102 |
+#define avpriv_copy_bits avpriv_copy_bits_unsupported_here |
|
| 103 | 103 |
#else |
| 104 | 104 |
/** |
| 105 | 105 |
* Pad the bitstream with zeros up to the next byte boundary. |
| 106 | 106 |
*/ |
| 107 |
-void align_put_bits(PutBitContext *s); |
|
| 107 |
+void avpriv_align_put_bits(PutBitContext *s); |
|
| 108 | 108 |
|
| 109 | 109 |
/** |
| 110 | 110 |
* Put the string string in the bitstream. |
| ... | ... |
@@ -118,7 +118,7 @@ void ff_put_string(PutBitContext *pb, const char *string, int terminate_string); |
| 118 | 118 |
* |
| 119 | 119 |
* @param length the number of bits of src to copy |
| 120 | 120 |
*/ |
| 121 |
-void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length); |
|
| 121 |
+void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length); |
|
| 122 | 122 |
#endif |
| 123 | 123 |
|
| 124 | 124 |
/** |
| ... | ... |
@@ -461,7 +461,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane, unsigned char *src_plane |
| 461 | 461 |
s->rd_total += score[best]; |
| 462 | 462 |
|
| 463 | 463 |
for(i=5; i>=0; i--){
|
| 464 |
- ff_copy_bits(&s->pb, reorder_buffer[best][i], count[best][i]); |
|
| 464 |
+ avpriv_copy_bits(&s->pb, reorder_buffer[best][i], count[best][i]); |
|
| 465 | 465 |
} |
| 466 | 466 |
if(best==0){
|
| 467 | 467 |
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, |
| 540 | 540 |
return -1; |
| 541 | 541 |
} |
| 542 | 542 |
|
| 543 |
-// align_put_bits(&s->pb); |
|
| 543 |
+// avpriv_align_put_bits(&s->pb); |
|
| 544 | 544 |
while(put_bits_count(&s->pb) & 31) |
| 545 | 545 |
put_bits(&s->pb, 1, 0); |
| 546 | 546 |
|
| ... | ... |
@@ -311,7 +311,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE], |
| 311 | 311 |
put_bits(&s->pb, s->coef_vlcs[tindex]->huffbits[1], s->coef_vlcs[tindex]->huffcodes[1]); |
| 312 | 312 |
} |
| 313 | 313 |
if (s->version == 1 && s->nb_channels >= 2) {
|
| 314 |
- align_put_bits(&s->pb); |
|
| 314 |
+ avpriv_align_put_bits(&s->pb); |
|
| 315 | 315 |
} |
| 316 | 316 |
} |
| 317 | 317 |
return 0; |
| ... | ... |
@@ -327,7 +327,7 @@ static int encode_frame(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE], |
| 327 | 327 |
return INT_MAX; |
| 328 | 328 |
} |
| 329 | 329 |
|
| 330 |
- align_put_bits(&s->pb); |
|
| 330 |
+ avpriv_align_put_bits(&s->pb); |
|
| 331 | 331 |
|
| 332 | 332 |
return put_bits_count(&s->pb)/8 - s->block_align; |
| 333 | 333 |
} |
| ... | ... |
@@ -1446,14 +1446,14 @@ static void save_bits(WMAProDecodeCtx *s, GetBitContext* gb, int len, |
| 1446 | 1446 |
|
| 1447 | 1447 |
s->num_saved_bits += len; |
| 1448 | 1448 |
if (!append) {
|
| 1449 |
- ff_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), |
|
| 1449 |
+ avpriv_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), |
|
| 1450 | 1450 |
s->num_saved_bits); |
| 1451 | 1451 |
} else {
|
| 1452 | 1452 |
int align = 8 - (get_bits_count(gb) & 7); |
| 1453 | 1453 |
align = FFMIN(align, len); |
| 1454 | 1454 |
put_bits(&s->pb, align, get_bits(gb, align)); |
| 1455 | 1455 |
len -= align; |
| 1456 |
- ff_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), len); |
|
| 1456 |
+ avpriv_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), len); |
|
| 1457 | 1457 |
} |
| 1458 | 1458 |
skip_bits_long(gb, len); |
| 1459 | 1459 |
|
| ... | ... |
@@ -1872,7 +1872,7 @@ static int parse_packet_header(WMAVoiceContext *s) |
| 1872 | 1872 |
* @param size size of the source data, in bytes |
| 1873 | 1873 |
* @param gb bit I/O context specifying the current position in the source. |
| 1874 | 1874 |
* data. This function might use this to align the bit position to |
| 1875 |
- * a whole-byte boundary before calling #ff_copy_bits() on aligned |
|
| 1875 |
+ * a whole-byte boundary before calling #avpriv_copy_bits() on aligned |
|
| 1876 | 1876 |
* source data |
| 1877 | 1877 |
* @param nbits the amount of bits to copy from source to target |
| 1878 | 1878 |
* |
| ... | ... |
@@ -1893,7 +1893,7 @@ static void copy_bits(PutBitContext *pb, |
| 1893 | 1893 |
rmn_bits &= 7; rmn_bytes >>= 3; |
| 1894 | 1894 |
if ((rmn_bits = FFMIN(rmn_bits, nbits)) > 0) |
| 1895 | 1895 |
put_bits(pb, rmn_bits, get_bits(gb, rmn_bits)); |
| 1896 |
- ff_copy_bits(pb, data + size - rmn_bytes, |
|
| 1896 |
+ avpriv_copy_bits(pb, data + size - rmn_bytes, |
|
| 1897 | 1897 |
FFMIN(nbits - rmn_bits, rmn_bytes << 3)); |
| 1898 | 1898 |
} |
| 1899 | 1899 |
|
| ... | ... |
@@ -90,7 +90,7 @@ static int xsub_encode_rle(PutBitContext *pb, const uint8_t *bitmap, |
| 90 | 90 |
if (color != PADDING_COLOR && (PADDING + (w&1))) |
| 91 | 91 |
put_xsub_rle(pb, PADDING + (w&1), PADDING_COLOR); |
| 92 | 92 |
|
| 93 |
- align_put_bits(pb); |
|
| 93 |
+ avpriv_align_put_bits(pb); |
|
| 94 | 94 |
|
| 95 | 95 |
bitmap += linesize; |
| 96 | 96 |
} |
| ... | ... |
@@ -194,7 +194,7 @@ static int xsub_encode(AVCodecContext *avctx, unsigned char *buf, |
| 194 | 194 |
// Enforce total height to be be multiple of 2 |
| 195 | 195 |
if (h->rects[0]->h & 1) {
|
| 196 | 196 |
put_xsub_rle(&pb, h->rects[0]->w, PADDING_COLOR); |
| 197 |
- align_put_bits(&pb); |
|
| 197 |
+ avpriv_align_put_bits(&pb); |
|
| 198 | 198 |
} |
| 199 | 199 |
|
| 200 | 200 |
flush_put_bits(&pb); |
| ... | ... |
@@ -106,9 +106,9 @@ static int latm_write_frame_header(AVFormatContext *s, PutBitContext *bs) |
| 106 | 106 |
/* AudioSpecificConfig */ |
| 107 | 107 |
if (ctx->object_type == AOT_ALS) {
|
| 108 | 108 |
header_size = avctx->extradata_size-(ctx->off + 7) >> 3; |
| 109 |
- ff_copy_bits(bs, &avctx->extradata[ctx->off], header_size); |
|
| 109 |
+ avpriv_copy_bits(bs, &avctx->extradata[ctx->off], header_size); |
|
| 110 | 110 |
} else {
|
| 111 |
- ff_copy_bits(bs, avctx->extradata, ctx->off + 3); |
|
| 111 |
+ avpriv_copy_bits(bs, avctx->extradata, ctx->off + 3); |
|
| 112 | 112 |
|
| 113 | 113 |
if (!ctx->channel_conf) {
|
| 114 | 114 |
avpriv_copy_pce_data(bs, &gb); |
| ... | ... |
@@ -161,7 +161,7 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt) |
| 161 | 161 |
for (i = 0; i < pkt->size; i++) |
| 162 | 162 |
put_bits(&bs, 8, pkt->data[i]); |
| 163 | 163 |
|
| 164 |
- align_put_bits(&bs); |
|
| 164 |
+ avpriv_align_put_bits(&bs); |
|
| 165 | 165 |
flush_put_bits(&bs); |
| 166 | 166 |
|
| 167 | 167 |
len = put_bits_count(&bs) >> 3; |