+static void copy_bits(PutBitContext *pb, const uint8_t *src, int length)
+{
+ int words = length >> 4;
+ int bits = length & 15;
+ int i;
+ for (i = 0; i < words; i++)
+ put_bits(pb, 16, AV_RB16(src + 2 * i));
+ if (bits)
+ put_bits(pb, bits, AV_RB16(src + 2 * words) >> (16 - bits));
+}
+