69 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
70 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
75 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
76 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
77 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
78 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
79 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
80 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
81 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
82 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
87 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
88 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
89 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
90 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
91 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
92 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
93 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
94 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
99 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
100 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
101 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
102 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
103 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
104 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
105 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
106 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
111 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
112 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
113 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
114 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
115 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
116 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
117 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
118 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
151 for (i = 0; i < 3; i++) {
152 uint32_t tmp = *state << 8;
153 *state = tmp + *(p++);
154 if (tmp == 0x100 || p == end)
159 if (p[-1] > 1 ) p += 3;
160 else if (p[-2] ) p += 2;
161 else if (p[-3]|(p[-1]-1)) p++;
168 p =
FFMIN(p, end) - 4;
289 if (r < 0 || !pic->f.type || !pic->
f.
data[0]) {
299 "get_buffer() failed (stride changed)\n");
306 "get_buffer() failed (uv stride mismatch)\n");
314 "get_buffer() failed to allocate context scratch buffers.\n");
339 assert(pic->
f.
data[0]);
343 assert(!pic->
f.
data[0]);
355 mb_array_size *
sizeof(int16_t), fail)
357 mb_array_size *
sizeof(int16_t), fail)
359 mb_array_size *
sizeof(int8_t ), fail)
363 mb_array_size *
sizeof(
uint8_t) + 2, fail)
368 (big_mb_num + s->
mb_stride) *
sizeof(uint32_t),
373 for (i = 0; i < 2; i++) {
375 2 * (b4_array_size + 4) *
sizeof(int16_t),
379 4 * mb_array_size *
sizeof(
uint8_t), fail)
384 for (i = 0; i < 2; i++) {
386 2 * (b8_array_size + 4) *
sizeof(int16_t),
390 4 * mb_array_size *
sizeof(
uint8_t), fail)
396 64 * mb_array_size *
sizeof(
DCTELEM) * 6, fail)
434 for (i = 0; i < 2; i++) {
441 for (i = 0; i < 4; i++) {
453 int yc_size = y_size + 2 * c_size;
470 2 * 64 *
sizeof(
int), fail)
476 for (i = 0; i < 12; i++) {
483 yc_size *
sizeof(int16_t) * 16, fail);
516 #define COPY(a) bak->a = src->a
517 COPY(edge_emu_buffer);
522 COPY(obmc_scratchpad);
529 COPY(me.map_generation);
550 for (i = 0; i < 12; i++) {
556 "scratch buffers.\n");
570 if (dst == src || !
s1->context_initialized)
607 (
char *) &
s1->last_picture_ptr - (
char *) &
s1->last_picture);
623 (
char *) &
s1->shape - (
char *) &
s1->time_increment_bits);
633 if (
s1->bitstream_buffer) {
634 if (
s1->bitstream_buffer_size +
638 s1->allocated_bitstream_buffer_size);
641 s1->bitstream_buffer_size);
651 "scratch buffers.\n");
656 "be allocated due to unknown size.\n");
662 (
char *) &
s1->rtp_mode - (
char *) &
s1->progressive_sequence);
664 if (!
s1->first_field) {
666 if (
s1->current_picture_ptr)
722 int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y;
747 yc_size = y_size + 2 * c_size;
761 mv_table_size * 2 *
sizeof(int16_t), fail);
763 mv_table_size * 2 *
sizeof(int16_t), fail);
765 mv_table_size * 2 *
sizeof(int16_t), fail);
767 mv_table_size * 2 *
sizeof(int16_t), fail);
769 mv_table_size * 2 *
sizeof(int16_t), fail);
771 mv_table_size * 2 *
sizeof(int16_t), fail);
783 sizeof(uint16_t), fail);
789 mb_array_size *
sizeof(
float), fail);
791 mb_array_size *
sizeof(
float), fail);
796 mb_array_size *
sizeof(
uint8_t), fail);
798 mb_array_size *
sizeof(
uint8_t), fail);
803 for (i = 0; i < 2; i++) {
805 for (j = 0; j < 2; j++) {
806 for (k = 0; k < 2; k++) {
809 mv_table_size * 2 *
sizeof(int16_t),
815 mb_array_size * 2 *
sizeof(
uint8_t), fail);
817 mv_table_size * 2 *
sizeof(int16_t), fail);
822 mb_array_size * 2 *
sizeof(
uint8_t), fail);
832 mb_array_size *
sizeof(
uint8_t), fail);
834 mb_array_size *
sizeof(
uint8_t), fail);
841 yc_size *
sizeof(int16_t), fail);
845 for (i = 0; i < yc_size; i++)
893 "decoding to AV_PIX_FMT_NONE is not supported.\n");
904 " reducing to %d\n", nb_slices, max_slices);
905 nb_slices = max_slices;
934 (
MAX_RUN + 1) * 2 *
sizeof(
int), fail);
939 64 * 32 *
sizeof(
int), fail);
941 64 * 32 *
sizeof(
int), fail);
943 64 * 32 * 2 *
sizeof(uint16_t), fail);
945 64 * 32 * 2 *
sizeof(uint16_t), fail);
953 2 * 64 *
sizeof(uint16_t), fail);
977 for (i = 1; i < nb_slices; i++) {
982 for (i = 0; i < nb_slices; i++) {
986 (s->
mb_height * (i) + nb_slices / 2) / nb_slices;
988 (s->
mb_height * (i + 1) + nb_slices / 2) / nb_slices;
1027 for (i = 0; i < 2; i++) {
1028 for (j = 0; j < 2; j++) {
1029 for (k = 0; k < 2; k++) {
1057 for (i = 0; i < 3; i++)
1105 if (nb_slices > 1) {
1106 for (i = 1; i < nb_slices; i++) {
1111 for (i = 0; i < nb_slices; i++) {
1115 (s->
mb_height * (i) + nb_slices / 2) / nb_slices;
1117 (s->
mb_height * (i + 1) + nb_slices / 2) / nb_slices;
1190 int last,
run,
level, start, end, i;
1197 for (last = 0; last < 2; last++) {
1206 memset(max_level, 0,
MAX_RUN + 1);
1208 memset(index_run, rl->
n,
MAX_RUN + 1);
1209 for (i = start; i < end; i++) {
1212 if (index_run[run] == rl->
n)
1214 if (level > max_level[run])
1216 if (run > max_run[level])
1220 rl->
max_level[last] = static_store[last];
1233 memcpy(rl->
index_run[last], index_run, MAX_RUN + 1);
1241 for (q = 0; q < 32; q++) {
1243 int qadd = (q - 1) | 1;
1257 }
else if (len < 0) {
1261 if (code == rl->
n) {
1267 if (code >= rl->
last) run += 192;
1329 if (ret >= 0 && ret < s->picture_range_end) {
1343 for (intra = 0; intra < 2; intra++) {
1345 for (i = 0; i < 64; i++) {
1351 for (i = 0; i < 64; i++) {
1389 "releasing zombie picture\n");
1452 av_dlog(s->
avctx,
"L%p N%p C%p L%p N%p C%p type:%d drop:%d\n",
1466 "warning: first frame is no keyframe\n");
1469 "allocate dummy last picture for field based first keyframe\n");
1523 for (i = 0; i < 4; i++) {
1609 assert(i < MAX_PICTURE_COUNT);
1646 sx = av_clip(sx, 0, w - 1);
1647 sy = av_clip(sy, 0, h - 1);
1648 ex = av_clip(ex, 0, w - 1);
1649 ey = av_clip(ey, 0, h - 1);
1651 buf[sy * stride + sx] +=
color;
1660 f = ((ey - sy) << 16) / ex;
1661 for (x = 0; x <= ex; x++) {
1663 fr = (x * f) & 0xFFFF;
1664 buf[y * stride + x] += (color * (0x10000 - fr)) >> 16;
1665 buf[(y + 1) * stride + x] += (color * fr ) >> 16;
1675 f = ((ex - sx) << 16) / ey;
1678 for (y = 0; y = ey; y++) {
1680 fr = (y * f) & 0xFFFF;
1681 buf[y * stride + x] += (color * (0x10000 - fr)) >> 16;
1682 buf[y * stride + x + 1] += (color * fr ) >> 16;
1699 sx = av_clip(sx, -100, w + 100);
1700 sy = av_clip(sy, -100, h + 100);
1701 ex = av_clip(ex, -100, w + 100);
1702 ey = av_clip(ey, -100, h + 100);
1707 if (dx * dx + dy * dy > 3 * 3) {
1710 int length =
ff_sqrt((rx * rx + ry * ry) << 8);
1716 draw_line(buf, sx, sy, sx + rx, sy + ry, w, h, stride, color);
1717 draw_line(buf, sx, sy, sx - ry, sy + rx, w, h, stride, color);
1719 draw_line(buf, sx, sy, ex, ey, w, h, stride, color);
1755 for (x = 0; x < s->
mb_width; x++) {
1783 else if (
IS_GMC(mb_type))
1825 int h_chroma_shift, v_chroma_shift, block_height;
1829 const int mv_stride = (s->
mb_width << mv_sample_log2) +
1834 &h_chroma_shift, &v_chroma_shift);
1835 for (i = 0; i < 3; i++) {
1837 (i == 0) ? pict->
linesize[i] * height:
1838 pict->
linesize[i] * height >> v_chroma_shift);
1842 ptr = pict->
data[0];
1843 block_height = 16 >> v_chroma_shift;
1845 for (mb_y = 0; mb_y < s->
mb_height; mb_y++) {
1847 for (mb_x = 0; mb_x < s->
mb_width; mb_x++) {
1848 const int mb_index = mb_x + mb_y * s->
mb_stride;
1851 for (type = 0; type < 3; type++) {
1878 for (i = 0; i < 4; i++) {
1879 int sx = mb_x * 16 + 4 + 8 * (i & 1);
1880 int sy = mb_y * 16 + 4 + 8 * (i >> 1);
1881 int xy = (mb_x * 2 + (i & 1) +
1882 (mb_y * 2 + (i >> 1)) * mv_stride) << (mv_sample_log2 - 1);
1883 int mx = (pict->
motion_val[direction][xy][0] >> shift) + sx;
1884 int my = (pict->
motion_val[direction][xy][1] >> shift) + sy;
1890 for (i = 0; i < 2; i++) {
1891 int sx = mb_x * 16 + 8;
1892 int sy = mb_y * 16 + 4 + 8 * i;
1893 int xy = (mb_x * 2 + (mb_y * 2 + i) * mv_stride) << (mv_sample_log2 - 1);
1894 int mx = (pict->
motion_val[direction][xy][0] >> shift);
1895 int my = (pict->
motion_val[direction][xy][1] >> shift);
1900 draw_arrow(ptr, sx, sy, mx + sx, my + sy, width,
1905 for (i = 0; i < 2; i++) {
1906 int sx = mb_x * 16 + 4 + 8 * i;
1907 int sy = mb_y * 16 + 8;
1908 int xy = (mb_x * 2 + i + mb_y * 2 * mv_stride) << (mv_sample_log2 - 1);
1909 int mx = pict->
motion_val[direction][xy][0] >> shift;
1910 int my = pict->
motion_val[direction][xy][1] >> shift;
1915 draw_arrow(ptr, sx, sy, mx + sx, my + sy, width,
1919 int sx = mb_x * 16 + 8;
1920 int sy = mb_y * 16 + 8;
1921 int xy = (mb_x + mb_y * mv_stride) << mv_sample_log2;
1922 int mx = pict->
motion_val[direction][xy][0] >> shift + sx;
1923 int my = pict->
motion_val[direction][xy][1] >> shift + sy;
1929 uint64_t c = (pict->
qscale_table[mb_index] * 128 / 31) *
1930 0x0101010101010101ULL;
1932 for (y = 0; y < block_height; y++) {
1933 *(uint64_t *)(pict->
data[1] + 8 * mb_x +
1934 (block_height * mb_y + y) *
1936 *(uint64_t *)(pict->
data[2] + 8 * mb_x +
1937 (block_height * mb_y + y) *
1943 int mb_type = pict->
mb_type[mb_index];
1946 #define COLOR(theta, r) \
1947 u = (int)(128 + r * cos(theta * 3.141592 / 180)); \
1948 v = (int)(128 + r * sin(theta * 3.141592 / 180));
1965 }
else if (
IS_GMC(mb_type)) {
1967 }
else if (
IS_SKIP(mb_type)) {
1978 u *= 0x0101010101010101ULL;
1979 v *= 0x0101010101010101ULL;
1980 for (y = 0; y < block_height; y++) {
1981 *(uint64_t *)(pict->
data[1] + 8 * mb_x +
1982 (block_height * mb_y + y) * pict->
linesize[1]) = u;
1983 *(uint64_t *)(pict->
data[2] + 8 * mb_x +
1984 (block_height * mb_y + y) * pict->
linesize[2]) = v;
1989 *(uint64_t *)(pict->
data[0] + 16 * mb_x + 0 +
1990 (16 * mb_y + 8) * pict->
linesize[0]) ^= 0x8080808080808080ULL;
1991 *(uint64_t *)(pict->
data[0] + 16 * mb_x + 8 +
1992 (16 * mb_y + 8) * pict->
linesize[0]) ^= 0x8080808080808080ULL;
1995 for (y = 0; y < 16; y++)
1996 pict->
data[0][16 * mb_x + 8 + (16 * mb_y + y) *
1999 if (
IS_8X8(mb_type) && mv_sample_log2 >= 2) {
2000 int dm = 1 << (mv_sample_log2 - 2);
2001 for (i = 0; i < 4; i++) {
2002 int sx = mb_x * 16 + 8 * (i & 1);
2003 int sy = mb_y * 16 + 8 * (i >> 1);
2004 int xy = (mb_x * 2 + (i & 1) +
2005 (mb_y * 2 + (i >> 1)) * mv_stride) << (mv_sample_log2 - 1);
2008 if (mv[0] != mv[dm] ||
2009 mv[dm * mv_stride] != mv[dm * (mv_stride + 1)])
2010 for (y = 0; y < 8; y++)
2011 pict->
data[0][sx + 4 + (sy + y) * pict->
linesize[0]] ^= 0x80;
2012 if (mv[0] != mv[dm * mv_stride] || mv[dm] != mv[dm * (mv_stride + 1)])
2013 *(uint64_t *)(pict->
data[0] + sx + (sy + 4) *
2014 pict->
linesize[0]) ^= 0x8080808080808080ULL;
2034 int my_max = INT_MIN, my_min = INT_MAX, qpel_shift = !s->
quarter_sample;
2035 int my,
off, i, mvs;
2054 for (i = 0; i < mvs; i++) {
2055 my = s->
mv[dir][i][1]<<qpel_shift;
2056 my_max =
FFMAX(my_max, my);
2057 my_min =
FFMIN(my_min, my);
2060 off = (
FFMAX(-my_min, my_max) + 63) >> 6;
2107 memset(s->
ac_val[0][xy ], 0, 32 *
sizeof(int16_t));
2108 memset(s->
ac_val[0][xy + wrap], 0, 32 *
sizeof(int16_t));
2121 memset(s->
ac_val[1][xy], 0, 16 *
sizeof(int16_t));
2122 memset(s->
ac_val[2][xy], 0, 16 *
sizeof(int16_t));
2153 for(j=0; j<64; j++){
2178 uint8_t *dest_y, *dest_cb, *dest_cr;
2179 int dct_linesize, dct_offset;
2185 const int block_size = 8;
2204 dct_offset = s->
interlaced_dct ? linesize : linesize * block_size;
2208 dest_cb= s->
dest[1];
2209 dest_cr= s->
dest[2];
2280 add_dct(s, block[0], 0, dest_y , dct_linesize);
2281 add_dct(s, block[1], 1, dest_y + block_size, dct_linesize);
2282 add_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize);
2283 add_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize);
2287 add_dct(s, block[4], 4, dest_cb, uvlinesize);
2288 add_dct(s, block[5], 5, dest_cr, uvlinesize);
2294 add_dct(s, block[4], 4, dest_cb, dct_linesize);
2295 add_dct(s, block[5], 5, dest_cr, dct_linesize);
2296 add_dct(s, block[6], 6, dest_cb+dct_offset, dct_linesize);
2297 add_dct(s, block[7], 7, dest_cr+dct_offset, dct_linesize);
2299 add_dct(s, block[8], 8, dest_cb+8, dct_linesize);
2300 add_dct(s, block[9], 9, dest_cr+8, dct_linesize);
2301 add_dct(s, block[10], 10, dest_cb+8+dct_offset, dct_linesize);
2302 add_dct(s, block[11], 11, dest_cr+8+dct_offset, dct_linesize);
2314 put_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->
qscale);
2315 put_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->
qscale);
2316 put_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->
qscale);
2333 s->
dsp.
idct_put(dest_y + block_size, dct_linesize, block[1]);
2334 s->
dsp.
idct_put(dest_y + dct_offset , dct_linesize, block[2]);
2335 s->
dsp.
idct_put(dest_y + dct_offset + block_size, dct_linesize, block[3]);
2348 s->
dsp.
idct_put(dest_cb + dct_offset, dct_linesize, block[6]);
2349 s->
dsp.
idct_put(dest_cr + dct_offset, dct_linesize, block[7]);
2351 s->
dsp.
idct_put(dest_cb + 8, dct_linesize, block[8]);
2352 s->
dsp.
idct_put(dest_cr + 8, dct_linesize, block[9]);
2353 s->
dsp.
idct_put(dest_cb + 8 + dct_offset, dct_linesize, block[10]);
2354 s->
dsp.
idct_put(dest_cr + 8 + dct_offset, dct_linesize, block[11]);
2395 int sides = 0, edge_h;
2451 const int mb_size= 4;
2468 s->
dest[0] += s->
mb_y * linesize << mb_size;
2472 s->
dest[0] += (s->
mb_y>>1) * linesize << mb_size;
2510 int i,
level, nCoeffs;
2511 const uint16_t *quant_matrix;
2521 for(i=1;i<=nCoeffs;i++) {
2527 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2528 level = (level - 1) | 1;
2531 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2532 level = (level - 1) | 1;
2542 int i,
level, nCoeffs;
2543 const uint16_t *quant_matrix;
2548 for(i=0; i<=nCoeffs; i++) {
2554 level = (((level << 1) + 1) * qscale *
2555 ((int) (quant_matrix[j]))) >> 4;
2556 level = (level - 1) | 1;
2559 level = (((level << 1) + 1) * qscale *
2560 ((int) (quant_matrix[j]))) >> 4;
2561 level = (level - 1) | 1;
2571 int i,
level, nCoeffs;
2572 const uint16_t *quant_matrix;
2582 for(i=1;i<=nCoeffs;i++) {
2588 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2591 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2601 int i,
level, nCoeffs;
2602 const uint16_t *quant_matrix;
2613 for(i=1;i<=nCoeffs;i++) {
2619 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2622 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2634 int i,
level, nCoeffs;
2635 const uint16_t *quant_matrix;
2642 for(i=0; i<=nCoeffs; i++) {
2648 level = (((level << 1) + 1) * qscale *
2649 ((int) (quant_matrix[j]))) >> 4;
2652 level = (((level << 1) + 1) * qscale *
2653 ((int) (quant_matrix[j]))) >> 4;
2665 int i,
level, qmul, qadd;
2677 qadd = (qscale - 1) | 1;
2686 for(i=1; i<=nCoeffs; i++) {
2690 level = level * qmul - qadd;
2692 level = level * qmul + qadd;
2702 int i,
level, qmul, qadd;
2707 qadd = (qscale - 1) | 1;
2712 for(i=0; i<=nCoeffs; i++) {
2716 level = level * qmul - qadd;
2718 level = level * qmul + qadd;
2732 else if (qscale > 31)
int bitstream_buffer_size
uint8_t * scratchpad
data area for the ME algo, so that the ME does not need to malloc/free
#define PICT_BOTTOM_FIELD
enum AVPixelFormat ff_hwaccel_pixfmt_list_420[]
int last
number of values for last = 0
const struct AVCodec * codec
int16_t(* b_bidir_back_mv_table_base)[2]
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
discard all frames except keyframes
void ff_init_block_index(MpegEncContext *s)
op_pixels_func put_pixels_tab[4][4]
Halfpel motion compensation with rounding (a+b+1)>>1.
unsigned int stream_codec_tag
fourcc from the AVI stream header (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + ...
av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx)
#define MAX_PICTURE_COUNT
ScanTable intra_v_scantable
#define CODEC_FLAG_BITEXACT
const uint8_t ff_zigzag_direct[64]
void ff_release_unused_pictures(MpegEncContext *s, int remove_current)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
int time_increment_bits
number of bits to represent the fractional part of time
This structure describes decoded (raw) audio or video data.
int qstride
QP store stride.
AVPanScan * pan_scan
Pan scan.
#define CODEC_FLAG_INTERLACED_ME
int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared)
Allocate a Picture.
int16_t(* p_mv_table)[2]
MV table (1MV per MB) p-frame encoding.
uint8_t * rd_scratchpad
scratchpad for rate distortion mb decision
static void dct_unquantize_mpeg2_intra_c(MpegEncContext *s, DCTELEM *block, int n, int qscale)
int start_mb_y
start mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y) ...
const uint8_t * y_dc_scale_table
qscale -> y_dc_scale table
uint8_t * mb_mean
Table for MB luminance.
int coded_width
Bitstream width / height, may be different from width/height.
av_cold int ff_dct_common_init(MpegEncContext *s)
void(* dct_unquantize_mpeg2_inter)(struct MpegEncContext *s, DCTELEM *block, int n, int qscale)
av_cold int ff_MPV_common_init(MpegEncContext *s)
init common structure for both encoder and decoder.
void ff_MPV_common_init_arm(MpegEncContext *s)
void ff_MPV_report_decode_progress(MpegEncContext *s)
uint8_t * coded_block_base
#define AV_NUM_DATA_POINTERS
AVFrame * coded_frame
the picture in the bitstream
int end_mb_y
end mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y) ...
uint16_t * mb_var
Table for MB variances.
static void free_frame_buffer(MpegEncContext *s, Picture *pic)
Release a frame buffer.
void ff_MPV_motion(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int dir, uint8_t **ref_picture, op_pixels_func(*pix_op)[4], qpel_mc_func(*qpix_op)[16])
int16_t(*[3] ac_val)[16]
used for for mpeg4 AC prediction, all 3 arrays must be continuous
void(* idct_add)(uint8_t *dest, int line_size, DCTELEM *block)
block -> idct -> add dest -> clip to unsigned 8 bit -> dest.
void * hwaccel_picture_private
hardware accelerator private data (Libav-allocated)
int v_edge_pos
horizontal / vertical position of the right/bottom edge (pixel replication)
int msmpeg4_version
0=not msmpeg4, 1=mp41, 2=mp42, 3=mp43/divx3 4=wmv1/7 5=wmv2/8
void(* draw_edges)(uint8_t *buf, int wrap, int width, int height, int w, int h, int sides)
static const uint8_t mpeg2_dc_scale_table3[128]
void ff_xvmc_field_end(MpegEncContext *s)
Complete frame/field rendering by passing any remaining blocks.
int needs_realloc
Picture needs to be reallocated (eg due to a frame size change)
uint8_t * bitstream_buffer
#define CODEC_CAP_HWACCEL_VDPAU
#define FF_DEBUG_VIS_MV_P_FOR
void(* dct_unquantize_h263_inter)(struct MpegEncContext *s, DCTELEM *block, int n, int qscale)
void ff_init_rl(RLTable *rl, uint8_t static_store[2][2 *MAX_RUN+MAX_LEVEL+3])
int16_t(*[2] motion_val_base)[2]
HW decoding through VA API, Picture.data[3] contains a vaapi_render_state struct which contains the b...
int field_picture
whether or not the picture was encoded in separate fields
void(* dct_unquantize_mpeg2_intra)(struct MpegEncContext *s, DCTELEM *block, int n, int qscale)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int16_t(*[2][2] p_field_mv_table)[2]
MV table (2MV per MB) interlaced p-frame encoding.
int picture_range_end
the part of picture that this context can allocate in
static void dct_unquantize_h263_inter_c(MpegEncContext *s, DCTELEM *block, int n, int qscale)
int16_t(* p_mv_table_base)[2]
uint32_t * score_map
map to store the scores
av_dlog(ac->avr,"%d samples - audio_convert: %s to %s (%s)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic?ac->func_descr_generic:ac->func_descr)
const int8_t * table_level
static void free_duplicate_context(MpegEncContext *s)
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
int mb_num
number of MBs of a picture
int ff_xvmc_field_start(MpegEncContext *s, AVCodecContext *avctx)
Find and store the surfaces that are used as reference frames.
static void free_picture(MpegEncContext *s, Picture *pic)
Deallocate a picture.
int h263_aic
Advanded INTRA Coding (AIC)
int16_t(* b_back_mv_table)[2]
MV table (1MV per MB) backward mode b-frame encoding.
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
int encoding
true if we are encoding (vs decoding)
void ff_MPV_common_init_bfin(MpegEncContext *s)
static void dct_unquantize_mpeg1_intra_c(MpegEncContext *s, DCTELEM *block, int n, int qscale)
int16_t(* b_back_mv_table_base)[2]
static void backup_duplicate_context(MpegEncContext *bak, MpegEncContext *src)
#define USES_LIST(a, list)
does this mb use listX, note does not work if subMBs
void ff_clean_intra_table_entries(MpegEncContext *s)
Clean dc, ac, coded_block for the current non-intra MB.
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
#define FF_BUFFER_TYPE_INTERNAL
uint8_t * visualization_buffer[3]
temporary buffer vor MV visualization
struct AVHWAccel * hwaccel
Hardware accelerator in use.
int picture_in_gop_number
0-> first pic in gop, ...
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer, reusing the given one if large enough.
int8_t * max_run[2]
encoding & decoding
void ff_MPV_common_init_altivec(MpegEncContext *s)
const uint8_t ff_alternate_vertical_scan[64]
#define FFSWAP(type, a, b)
int ff_MPV_common_frame_size_change(MpegEncContext *s)
DCTELEM(*[12] pblocks)[64]
Picture ** input_picture
next pictures on display order for encoding
enum OutputFormat out_format
output format
void(* qpel_mc_func)(uint8_t *dst, uint8_t *src, int stride)
uint16_t(* dct_offset)[64]
uint8_t * pred_dir_table
used to store pred_dir for partitioned decoding
qpel_mc_func(* qpel_put)[16]
static void dct_unquantize_h263_intra_c(MpegEncContext *s, DCTELEM *block, int n, int qscale)
uint8_t motion_subsample_log2
log2 of the size of the block which a single vector in motion_val represents: (4->16x16, 3->8x8, 2-> 4x4, 1-> 2x2)
int no_rounding
apply no rounding to motion compensation (MPEG4, msmpeg4, ...) for b-frames rounding mode is always 0...
Picture current_picture
copy of the current picture structure.
static int pic_is_unused(MpegEncContext *s, Picture *pic)
op_pixels_func avg_pixels_tab[4][4]
Halfpel motion compensation with rounding (a+b+1)>>1.
#define FF_DEBUG_DCT_COEFF
int16_t(* b_bidir_forw_mv_table)[2]
MV table (1MV per MB) bidir mode b-frame encoding.
void(* dct_unquantize_intra)(struct MpegEncContext *s, DCTELEM *block, int n, int qscale)
void(* dct_unquantize_inter)(struct MpegEncContext *s, DCTELEM *block, int n, int qscale)
int8_t * max_level[2]
encoding & decoding
uint16_t pp_time
time distance between the last 2 p,s,i frames
uint8_t idct_permutation[64]
idct input permutation.
uint8_t * b_scratchpad
scratchpad used for writing into write only buffers
int flags2
AVCodecContext.flags2.
int interlaced_frame
The content of the picture is interlaced.
int mb_height
number of MBs horizontally & vertically
enum AVPixelFormat ff_pixfmt_list_420[]
void ff_MPV_frame_end(MpegEncContext *s)
int codec_tag
internal codec_tag upper case converted from avctx codec_tag
char * stats_out
pass1 encoding statistics output buffer
void(* dct_unquantize_mpeg1_intra)(struct MpegEncContext *s, DCTELEM *block, int n, int qscale)
int16_t(*[2][2] p_field_mv_table_base)[2]
static int free_context_frame(MpegEncContext *s)
Frees and resets MpegEncContext fields depending on the resolution.
static void update_noise_reduction(MpegEncContext *s)
void ff_set_qscale(MpegEncContext *s, int qscale)
set qscale and update qscale dependent variables.
int(* q_inter_matrix)[64]
void ff_xvmc_decode_mb(MpegEncContext *s)
Synthesize the data needed by XvMC to render one macroblock of data.
uint8_t * error_status_table
table of the error status of each MB
int(* q_intra_matrix)[64]
precomputed matrix (combine qscale and DCT renorm)
int intra_only
if true, only intra pictures are generated
int16_t * dc_val[3]
used for mpeg4 DC prediction, all 3 arrays must be continuous
int h263_plus
h263 plus headers
int slice_context_count
number of used thread_contexts
int last_non_b_pict_type
used for mpeg4 gmc b-frames & ratecontrol
int stream_codec_tag
internal stream_codec_tag upper case converted from avctx stream_codec_tag
int last_dc[3]
last DC values for MPEG1
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
Multithreading support functions.
int mb_skipped
MUST BE SET only during DECODING.
int reference
is this picture used as reference The values for this are the same as the MpegEncContext.picture_structure variable, that is 1->top field, 2->bottom field, 3->frame/both fields.
static int find_unused_picture(MpegEncContext *s, int shared)
int partitioned_frame
is current frame partitioned
int is_copy
Whether the parent AVCodecContext is a copy of the context which had init() called on it...
#define FF_DEBUG_VIS_MV_B_FOR
short * dct_coeff
DCT coefficients.
const uint8_t ff_alternate_horizontal_scan[64]
void(* idct_put)(uint8_t *dest, int line_size, DCTELEM *block)
block -> idct -> clip to unsigned 8 bit -> dest.
int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor.
int unrestricted_mv
mv can point outside of the coded picture
int active_thread_type
Which multithreading methods are in use by the codec.
int last_lambda_for[5]
last lambda for a specific pict type
int capabilities
Codec capabilities.
uint8_t * edge_emu_buffer
temporary buffer for if MVs point to out-of-frame data
uint8_t * base[AV_NUM_DATA_POINTERS]
pointer to the first allocated byte of the picture.
#define REBASE_PICTURE(pic, new_ctx, old_ctx)
static enum AVDiscard skip_idct
void ff_videodsp_init(VideoDSPContext *ctx, int bpc)
int overread_index
the index into ParseContext.buffer of the overread bytes
void av_log(void *avcl, int level, const char *fmt,...)
int quarter_sample
1->qpel, 0->half pel ME/MC
uint16_t * mb_type
Table for candidate MB types for encoding.
static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color)
Draw a line from (ex, ey) -> (sx, sy).
int low_delay
no reordering needed / has no b-frames
op_pixels_func put_no_rnd_pixels_tab[4][4]
Halfpel motion compensation with no rounding (a+b)>>1.
#define CODEC_FLAG_EMU_EDGE
static void dct_unquantize_mpeg2_intra_bitexact(MpegEncContext *s, DCTELEM *block, int n, int qscale)
VLC vlc
decoding only deprecated FIXME remove
uint8_t *[2][2] b_field_select_table
int priv_data_size
Size of HW accelerator private data.
int picture_count
number of allocated pictures (MAX_PICTURE_COUNT * avctx->thread_count)
static const uint8_t ff_default_chroma_qscale_table[32]
void ff_mpeg_flush(AVCodecContext *avctx)
int coded_picture_number
used to set pic->coded_picture_number, should not be used for/by anything else
int n
number of entries of table_vlc minus 1
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of the image can be address...
void(* dct_unquantize_mpeg1_inter)(struct MpegEncContext *s, DCTELEM *block, int n, int qscale)
void(* draw_horiz_band)(struct AVCodecContext *s, const AVFrame *src, int offset[AV_NUM_DATA_POINTERS], int y, int type, int height)
If non NULL, 'draw_horiz_band' is called by the libavcodec decoder to draw a horizontal band...
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
int overread
the number of bytes which where irreversibly read from the next frame
uint16_t(* q_inter_matrix16)[2][64]
int next_p_frame_damaged
set if the next p frame is damaged, to avoid showing trashed b frames
int width
picture width / height.
uint8_t * mbskip_table
used to avoid copy if macroblock skipped (for black regions for example) and used for b-frame encodin...
int type
type of the buffer (to keep track of who has to deallocate data[*])
Picture * current_picture_ptr
pointer to the current picture
void ff_copy_picture(Picture *dst, Picture *src)
unsigned int allocated_bitstream_buffer_size
int16_t(* ac_val_base)[16]
uint16_t(* q_intra_matrix16)[2][64]
identical to the above but for MMX & these are not permutated, second 64 entries are bias ...
static av_always_inline void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], int is_mpeg12)
int16_t(*[2][2][2] b_field_mv_table_base)[2]
int quality
quality (between 1 (good) and FF_LAMBDA_MAX (bad))
#define SLICE_FLAG_CODED_ORDER
int(* ac_stats)[2][MAX_LEVEL+1][MAX_RUN+1][2]
[mb_intra][isChroma][level][run][last]
int16_t(* b_forw_mv_table_base)[2]
int block_last_index[12]
last non zero coefficient in block
int ff_mpv_frame_size_alloc(MpegEncContext *s, int linesize)
int mb_decision
macroblock decision mode
uint8_t * mbintra_table
used to avoid setting {ac, dc, cbp}-pred stuff to zero on inter MB decoding
#define FF_BUFFER_TYPE_COPY
#define DELAYED_PIC_REF
Value of Picture.reference when Picture is not a reference picture, but is held for delayed output...
int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
generic function for encode/decode called after coding/decoding the header and before a frame is code...
int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
RL_VLC_ELEM * rl_vlc[32]
decoding only
preferred ID for MPEG-1/2 video decoding
int thread_count
thread count is used to decide how many independent tasks should be passed to execute() ...
int block_index[6]
index to current MB in block based arrays with edges
int xvmc_acceleration
XVideo Motion Acceleration.
int * mb_index2xy
mb_index -> mb_x + mb_y*mb_stride
int first_field
is 1 for the first field of a field picture 0 otherwise
void(* op_pixels_func)(uint8_t *block, const uint8_t *pixels, int line_size, int h)
static const int8_t mv[256][2]
uint32_t * mb_type
macroblock type table mb_type_base + mb_width + 2
#define MV_TYPE_16X16
1 vector for the whole mb
uint16_t * mc_mb_var
Table for motion compensated MB variances.
int16_t(* b_bidir_forw_mv_table_base)[2]
const uint8_t *const ff_mpeg2_dc_scale_table[4]
int coded_picture_number
picture number in bitstream order
const uint8_t * avpriv_mpv_find_start_code(const uint8_t *restrict p, const uint8_t *end, uint32_t *restrict state)
uint16_t inter_matrix[64]
struct MpegEncContext * thread_context[MAX_THREADS]
void ff_thread_await_progress(AVFrame *f, int n, int field)
Wait for earlier decoding threads to finish reference pictures.
int8_t * qscale_table_base
static av_const unsigned int ff_sqrt(unsigned int a)
static void dct_unquantize_mpeg2_inter_c(MpegEncContext *s, DCTELEM *block, int n, int qscale)
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
main external API structure.
ScanTable intra_scantable
uint8_t * coded_block
used for coded block pattern prediction (msmpeg4v3, wmv1)
int height
picture size. must be a multiple of 16
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
const uint8_t ff_mpeg1_dc_scale_table[128]
int16_t(*[2] motion_val)[2]
motion vector table
#define MV_TYPE_16X8
2 vectors, one per 16x8 block
void avcodec_default_free_buffers(AVCodecContext *s)
void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic)
uint32_t state
contains the last few bytes in MSB order
Picture * picture
main picture buffer
int slice_flags
slice flags
void avcodec_get_frame_defaults(AVFrame *frame)
Set the fields of the given AVFrame to default values.
ScanTable intra_h_scantable
int16_t(*[2][2][2] b_field_mv_table)[2]
MV table (4MV per MB) interlaced b-frame encoding.
uint8_t * cbp_table
used to store cbp, ac_pred for partitioned decoding
void ff_draw_horiz_band(MpegEncContext *s, int y, int h)
unsigned int avpriv_toupper4(unsigned int x)
#define SLICE_FLAG_ALLOW_FIELD
uint8_t * index_run[2]
encoding only
#define ROUNDED_DIV(a, b)
#define FF_DEBUG_VIS_MV_B_BACK
int input_picture_number
used to set pic->display_picture_number, should not be used for/by anything else
#define FF_INPUT_BUFFER_PADDING_SIZE
void ff_MPV_common_init_x86(MpegEncContext *s)
int8_t * ref_index[2]
motion reference frame index the order in which these are stored can depend on the codec...
DSPContext dsp
pointers for accelerated dsp functions
int f_code
forward MV resolution
#define FF_BUFFER_TYPE_USER
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer. ...
int max_b_frames
max number of b-frames for encoding
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
DCTELEM(* block)[64]
points to one of the following blocks
int h263_pred
use mpeg4/h263 ac/dc predictions
int16_t(* b_bidir_back_mv_table)[2]
MV table (1MV per MB) bidir mode b-frame encoding.
static int init_context_frame(MpegEncContext *s)
Initialize and allocates MpegEncContext fields dependent on the resolution.
uint8_t *[2] p_field_select_table
int16_t(* b_direct_mv_table)[2]
MV table (1MV per MB) direct mode b-frame encoding.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
const uint8_t * c_dc_scale_table
qscale -> c_dc_scale table
static void add_dequant_dct(MpegEncContext *s, DCTELEM *block, int i, uint8_t *dest, int line_size, int qscale)
int8_t * qscale_table
QP table.
qpel_mc_func(* qpel_avg)[16]
int mv[2][4][2]
motion vectors for a macroblock first coordinate : 0 = forward 1 = backward second " : depend...
int16_t(* b_forw_mv_table)[2]
MV table (1MV per MB) forward mode b-frame encoding.
int b8_stride
2*mb_width+1 used for some 8x8 block arrays to allow simple addressing
int noise_reduction
noise reduction strength
struct MpegEncContext * owner2
pointer to the MpegEncContext that allocated this picture
Picture * next_picture_ptr
pointer to the next picture (for bidir pred)
struct AVCodecContext * avctx
static void draw_arrow(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color)
Draw an arrow from (ex, ey) -> (sx, sy).
hardware decoding through VDA
discard all non reference
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
void ff_init_vlc_rl(RLTable *rl)
common internal api header.
int mb_stride
mb_width+1 used for some arrays to allow simple addressing of left & top MBs without sig11 ...
void ff_MPV_common_defaults(MpegEncContext *s)
Set the given MpegEncContext to common defaults (same for encoding and decoding). ...
#define FF_ALLOC_OR_GOTO(ctx, p, size, label)
int b4_stride
4*mb_width+1 used for some 4x4 block arrays to allow simple addressing
#define AVERROR_INVALIDDATA
Picture last_picture
copy of the previous picture structure.
uint8_t * obmc_scratchpad
static int alloc_frame_buffer(MpegEncContext *s, Picture *pic)
Allocate a frame buffer.
Picture * last_picture_ptr
pointer to the previous picture.
const uint8_t * chroma_qscale_table
qscale -> chroma_qscale (h263)
static const uint8_t color[]
uint32_t * map
map to avoid duplicate evaluations
int ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src)
#define FF_DEBUG_VIS_MB_TYPE
int slices
Number of slices.
void ff_wmv2_add_mb(MpegEncContext *s, DCTELEM block[6][64], uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr)
void ff_MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64])
int top_field_first
If the content is interlaced, is top field displayed first.
void ff_MPV_common_end(MpegEncContext *s)
void ff_print_debug_info(MpegEncContext *s, AVFrame *pict)
Print debugging info for the given picture.
void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable)
struct AVCodecInternal * internal
Private context used for internal data.
int ff_MPV_lowest_referenced_row(MpegEncContext *s, int dir)
find the lowest MB row referenced in the MVs
ParseContext parse_context
VLC_TYPE(* table)[2]
code, bits
Picture next_picture
copy of the next picture structure.
int key_frame
1 -> keyframe, 0-> not
static const uint8_t mpeg2_dc_scale_table1[128]
int linesize
line size, in bytes, may be different from width
uint8_t * mbskip_table
mbskip_table[mb]>=1 if MB didn't change stride= mb_width = (width+15)>>4
Picture ** reordered_input_picture
pointer to the next pictures in codedorder for encoding
static const uint8_t mpeg2_dc_scale_table2[128]
int chroma_qscale
chroma QP
static void add_dct(MpegEncContext *s, DCTELEM *block, int i, uint8_t *dest, int line_size)
static int init_duplicate_context(MpegEncContext *s, MpegEncContext *base)
int flags
AVCodecContext.flags (HQ, MV4, ...)
uint16_t intra_matrix[64]
matrix transmitted in the bitstream
int workaround_bugs
workaround bugs in encoders which cannot be detected automatically
#define FF_BUFFER_TYPE_SHARED
ScanTable inter_scantable
if inter == intra then intra should be used to reduce tha cache usage
static void put_dct(MpegEncContext *s, DCTELEM *block, int i, uint8_t *dest, int line_size, int qscale)
int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic)
static void dct_unquantize_mpeg1_inter_c(MpegEncContext *s, DCTELEM *block, int n, int qscale)
void ff_thread_report_progress(AVFrame *f, int n, int field)
Notify later decoding threads when part of their reference picture is ready.
int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
Wrapper around get_buffer() for frame-multithreaded codecs.
int ff_find_unused_picture(MpegEncContext *s, int shared)
#define MV_TYPE_8X8
4 vectors (h263, mpeg4 4MV)
int16_t(* b_direct_mv_table_base)[2]
int b_code
backward MV resolution for B Frames (mpeg4)
uint8_t ** extended_data
pointers to the data planes/channels.
void(* dct_unquantize_h263_intra)(struct MpegEncContext *s, DCTELEM *block, int n, int qscale)
int uvlinesize
line size, for chroma in bytes, may be different from width
void ff_MPV_common_init_axp(MpegEncContext *s)
AVPixelFormat
Pixel format.
#define FF_MB_DECISION_RD
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f)
Wrapper around release_buffer() frame-for multithreaded codecs.
#define FF_ALLOCZ_OR_GOTO(ctx, p, size, label)
void ff_MPV_decode_defaults(MpegEncContext *s)
Set the given MpegEncContext to defaults for decoding.
if(!(ptr_align%ac->ptr_align)&&samples_align >=aligned_len)