@@ -50,6 +50,10 @@ void avpriv_align_put_bits(PutBitContext *s)
{
align_put_bits(s);
}
+void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
+{
+ ff_copy_bits(pb, src, length);
+}
#endif
void ff_put_string(PutBitContext *pb, const char *string, int terminate_string)
@@ -62,7 +66,7 @@ void ff_put_string(PutBitContext *pb, const char *string, int terminate_string)
put_bits(pb, 8, 0);
}
-void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
+void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
{
int words = length >> 4;
int bits = length & 15;
@@ -1354,8 +1354,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);
- avpriv_copy_bits(&s->pb, s->pb2.buf, pb2_len);
- avpriv_copy_bits(&s->pb, s->tex_pb.buf, tex_pb_len);
+ ff_copy_bits(&s->pb, s->pb2.buf, pb2_len);
+ ff_copy_bits(&s->pb, s->tex_pb.buf, tex_pb_len);
s->last_bits = put_bits_count(&s->pb);
}
@@ -3351,18 +3351,18 @@ FF_ENABLE_DEPRECATION_WARNINGS
pb_bits_count= put_bits_count(&s->pb);
flush_put_bits(&s->pb);
- avpriv_copy_bits(&backup_s.pb, bit_buf[next_block^1], pb_bits_count);
+ ff_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);
- avpriv_copy_bits(&backup_s.pb2, bit_buf2[next_block^1], pb2_bits_count);
+ ff_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);
- avpriv_copy_bits(&backup_s.tex_pb, bit_buf_tex[next_block^1], tex_pb_bits_count);
+ ff_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);
@@ -3589,7 +3589,7 @@ static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src)
av_assert1(put_bits_count(&src->pb) % 8 ==0);
av_assert1(put_bits_count(&dst->pb) % 8 ==0);
- avpriv_copy_bits(&dst->pb, src->pb.buf, put_bits_count(&src->pb));
+ ff_copy_bits(&dst->pb, src->pb.buf, put_bits_count(&src->pb));
flush_put_bits(&dst->pb);
}
@@ -149,11 +149,12 @@ static inline void flush_put_bits_le(PutBitContext *s)
#if FF_API_AVPRIV_PUT_BITS
void avpriv_align_put_bits(PutBitContext *s);
+void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
#endif
#ifdef BITSTREAM_WRITER_LE
#define ff_put_string ff_put_string_unsupported_here
-#define avpriv_copy_bits avpriv_copy_bits_unsupported_here
+#define ff_copy_bits ff_copy_bits_unsupported_here
#else
/**
@@ -169,7 +170,7 @@ void ff_put_string(PutBitContext *pb, const char *string,
*
* @param length the number of bits of src to copy
*/
-void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
+void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
#endif
static inline void put_bits_no_assert(PutBitContext *s, int n, BitBuf value)
@@ -472,7 +472,7 @@ static int svq1_encode_plane(SVQ1EncContext *s, int plane,
if (best != 2)
for (i = 5; i >= 0; i--)
- avpriv_copy_bits(&s->pb, reorder_buffer[best][i],
+ ff_copy_bits(&s->pb, reorder_buffer[best][i],
count[best][i]);
if (best == 0)
s->hdsp.put_pixels_tab[0][0](decoded, temp, stride, 16);
@@ -1160,14 +1160,14 @@ static void save_bits(WmallDecodeCtx *s, GetBitContext* gb, int len,
s->num_saved_bits += len;
if (!append) {
- avpriv_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3),
+ ff_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;
- avpriv_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), len);
+ ff_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), len);
}
skip_bits_long(gb, len);
@@ -1579,14 +1579,14 @@ static void save_bits(WMAProDecodeCtx *s, GetBitContext* gb, int len,
s->num_saved_bits += len;
if (!append) {
- avpriv_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3),
+ ff_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;
- avpriv_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), len);
+ ff_copy_bits(&s->pb, gb->buffer + (get_bits_count(gb) >> 3), len);
}
skip_bits_long(gb, len);
@@ -1865,7 +1865,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 #avpriv_copy_bits() on aligned
+ * a whole-byte boundary before calling #ff_copy_bits() on aligned
* source data
* @param nbits the amount of bits to copy from source to target
*
@@ -1886,7 +1886,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));
- avpriv_copy_bits(pb, data + size - rmn_bytes,
+ ff_copy_bits(pb, data + size - rmn_bytes,
FFMIN(nbits - rmn_bits, rmn_bytes << 3));
}