26 #ifndef AVCODEC_PUT_BITS_H 27 #define AVCODEC_PUT_BITS_H 41 #define AV_WBBUF AV_WB64 42 #define AV_WLBUF AV_WL64 45 #define AV_WBBUF AV_WB32 46 #define AV_WLBUF AV_WL32 67 if (buffer_size < 0) {
100 s->
buf_end = buffer + buffer_size;
119 #ifndef BITSTREAM_WRITER_LE 125 #ifdef BITSTREAM_WRITER_LE 150 #if FF_API_AVPRIV_PUT_BITS 155 #ifdef BITSTREAM_WRITER_LE 156 #define ff_put_string ff_put_string_unsupported_here 157 #define ff_copy_bits ff_copy_bits_unsupported_here 166 int terminate_string);
185 #ifdef BITSTREAM_WRITER_LE 201 bit_buf = (bit_buf << n) | value;
283 #ifdef BITSTREAM_WRITER_LE 292 bit_buf = (uint64_t)value >> bit_left;
294 bit_buf = (uint64_t)bit_buf << bit_left;
315 av_assert2((n == 64) || (n < 64 && value < (UINT64_C(1) << n)));
322 uint32_t lo = value & 0xffffffff;
323 uint32_t hi = value >> 32;
324 #ifdef BITSTREAM_WRITER_LE 332 uint32_t lo = value & 0xffffffff;
333 uint32_t hi = value >> 32;
334 #ifdef BITSTREAM_WRITER_LE
static void av_unused put_bits32(PutBitContext *s, uint32_t value)
Write exactly 32 bits into a bitstream.
static void align_put_bits(PutBitContext *s)
Pad the bitstream with zeros up to the next byte boundary.
static void put_sbits(PutBitContext *pb, int n, int32_t value)
static void skip_put_bits(PutBitContext *s, int n)
Skip the given number of bits.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
GLsizei GLboolean const GLfloat * value
void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
Copy the content of src to the bitstream.
static void rebase_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Rebase the bit writer onto a reallocated buffer.
Libavcodec version macros.
static void put_bits64(PutBitContext *s, int n, uint64_t value)
Write up to 64 bits into a bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static uint8_t * put_bits_ptr(PutBitContext *s)
Return the pointer to the byte where the bitstream writer will put the next bit.
static int put_bits_left(PutBitContext *s)
void ff_put_string(PutBitContext *pb, const char *string, int terminate_string)
Put the string string in the bitstream.
simple assert() macros that are a bit more flexible than ISO C assert().
static int put_bits_count(PutBitContext *s)
static void flush_put_bits_le(PutBitContext *s)
static void put_bits_le(PutBitContext *s, int n, BitBuf value)
static void skip_put_bytes(PutBitContext *s, int n)
Skip the given number of bytes.
static const int BUF_BITS
static void set_put_bits_buffer_size(PutBitContext *s, int size)
Change the end of the buffer.
void avpriv_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
void avpriv_align_put_bits(PutBitContext *s)
static void put_bits(PutBitContext *s, int n, BitBuf value)
Write up to 31 bits into a bitstream.
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
static void put_bits_no_assert(PutBitContext *s, int n, BitBuf value)