Go to the documentation of this file.
45 const uint8_t *buf,
int len,
int ebits,
int m)
65 memcpy(
s->buf + 4, buf,
len);
72 int len,
int sbits,
int ebits,
int m)
96 memcpy(
s->buf + 8, buf,
len);
102 const uint8_t *
mb_info,
int mb_info_size)
105 int len, sbits = 0, ebits = 0;
109 int mb_info_pos = 0, mb_info_count = mb_info_size / 12;
110 const uint8_t *buf_base = buf;
112 s->timestamp =
s->cur_timestamp;
136 if (
len ==
s->max_payload_size - 8) {
138 while (mb_info_pos < mb_info_count) {
140 if (
pos >= buf - buf_base)
145 while (mb_info_pos + 1 < mb_info_count) {
147 if (
pos >= end - buf_base)
151 if (mb_info_pos < mb_info_count) {
152 const uint8_t *ptr = &
mb_info[12*mb_info_pos];
154 uint32_t bit_pos =
AV_RL32(ptr);
156 uint32_t pos_next_mb_info = (bit_pos + 7)/8;
158 if (pos_next_mb_info <= end - buf_base) {
159 state.quant = ptr[4];
162 state.hmv1 = (int8_t) ptr[8];
163 state.vmv1 = (int8_t) ptr[9];
164 state.hmv2 = (int8_t) ptr[10];
165 state.vmv2 = (int8_t) ptr[11];
166 ebits = 8 * pos_next_mb_info - bit_pos;
167 len = pos_next_mb_info - (buf - buf_base);
172 "use -mb_info %d or -ps 1.\n",
173 s->max_payload_size - 8);
178 if (
size > 2 && !buf[0] && !buf[1])
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
static void send_mode_a(AVFormatContext *s1, const struct H263Info *info, const uint8_t *buf, int len, int ebits, int m)
void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static void skip_bits(GetBitContext *s, int n)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static void send_mode_b(AVFormatContext *s1, const struct H263Info *info, const struct H263State *state, const uint8_t *buf, int len, int sbits, int ebits, int m)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
void ff_rtp_send_h263_rfc2190(AVFormatContext *s1, const uint8_t *buf, int size, const uint8_t *mb_info, int mb_info_size)
const uint8_t * ff_h263_find_resync_marker_reverse(const uint8_t *restrict start, const uint8_t *restrict end)
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
void * priv_data
Format private data.