65 memcpy(s->
buf + 4, buf, len);
72 int len,
int sbits,
int ebits,
int m)
96 memcpy(s->
buf + 8, buf, len);
105 int len, sbits = 0, ebits = 0;
109 int mb_info_pos = 0, mb_info_count = mb_info_size / 12;
138 while (mb_info_pos < mb_info_count) {
139 uint32_t pos =
AV_RL32(&mb_info[12*mb_info_pos])/8;
140 if (pos >= buf - buf_base)
145 while (mb_info_pos + 1 < mb_info_count) {
146 uint32_t pos =
AV_RL32(&mb_info[12*(mb_info_pos + 1)])/8;
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];
153 uint32_t bit_pos =
AV_RL32(ptr);
154 uint32_t pos = (bit_pos + 7)/8;
155 if (pos <= end - buf_base) {
156 state.
quant = ptr[4];
159 state.
hmv1 = (int8_t) ptr[8];
160 state.
vmv1 = (int8_t) ptr[9];
161 state.
hmv2 = (int8_t) ptr[10];
162 state.
vmv2 = (int8_t) ptr[11];
163 ebits = 8 * pos - bit_pos;
164 len = pos - (buf - buf_base);
168 "Unable to split H263 packet, use -mb_info %d "
173 "use -mb_info %d or -ps 1.\n",
179 if (size > 2 && !buf[0] && !buf[1])
180 send_mode_a(s1, &info, buf, len, ebits, len == size);
182 send_mode_b(s1, &info, &packet_start_state, buf, len, sbits,