MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_copy_bits

Function ff_copy_bits

libavcodec/bitstream.c:49–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
50{
51 int words = length >> 4;
52 int bits = length & 15;
53 int i;
54
55 if (length == 0)
56 return;
57
58 av_assert0(length <= put_bits_left(pb));
59
60 if (CONFIG_SMALL || words < 16 || put_bits_count(pb) & 7) {
61 for (i = 0; i < words; i++)
62 put_bits(pb, 16, AV_RB16(src + 2 * i));
63 } else {
64 for (i = 0; put_bits_count(pb) & 31; i++)
65 put_bits(pb, 8, src[i]);
66 flush_put_bits(pb);
67 memcpy(put_bits_ptr(pb), src + i, 2 * words - i);
68 skip_put_bytes(pb, 2 * words - i);
69 }
70
71 put_bits(pb, bits, AV_RB16(src + 2 * words) >> (16 - bits));
72}

Callers 10

FUNC(tile)Function · 0.85
ff_dovi_rpu_generateFunction · 0.85
save_bitsFunction · 0.85
save_bitsFunction · 0.85
svq1_encode_planeFunction · 0.85
ff_mjpeg_unescape_sosFunction · 0.85
encode_threadFunction · 0.85
copy_bitsFunction · 0.85

Calls 6

put_bits_leftFunction · 0.85
put_bits_countFunction · 0.85
flush_put_bitsFunction · 0.85
put_bits_ptrFunction · 0.85
skip_put_bytesFunction · 0.85
put_bitsFunction · 0.70

Tested by

no test coverage detected