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,
134 #if CONFIG_H264_DXVA2_HWACCEL
137 #if CONFIG_H264_VAAPI_HWACCEL
140 #if CONFIG_H264_VDA_HWACCEL
157 for (i = 0; i < 3; i++) {
158 uint32_t tmp = *state << 8;
159 *state = tmp + *(p++);
160 if (tmp == 0x100 || p == end)
165 if (p[-1] > 1 ) p += 3;
166 else if (p[-2] ) p += 2;
167 else if (p[-3]|(p[-1]-1)) p++;
174 p =
FFMIN(p, end) - 4;
295 if (r < 0 || !pic->f.type || !pic->
f.
data[0]) {
305 "get_buffer() failed (stride changed)\n");
312 "get_buffer() failed (uv stride mismatch)\n");
320 "get_buffer() failed to allocate context scratch buffers.\n");
345 assert(pic->
f.
data[0]);
349 assert(!pic->
f.
data[0]);
361 mb_array_size *
sizeof(int16_t), fail)
363 mb_array_size *
sizeof(int16_t), fail)
365 mb_array_size *
sizeof(int8_t ), fail)
369 mb_array_size *
sizeof(
uint8_t) + 2, fail)
374 (big_mb_num + s->
mb_stride) *
sizeof(uint32_t),
379 for (i = 0; i < 2; i++) {
381 2 * (b4_array_size + 4) *
sizeof(int16_t),
385 4 * mb_array_size *
sizeof(
uint8_t), fail)
390 for (i = 0; i < 2; i++) {
392 2 * (b8_array_size + 4) *
sizeof(int16_t),
396 4 * mb_array_size *
sizeof(
uint8_t), fail)
402 64 * mb_array_size *
sizeof(
DCTELEM) * 6, fail)
440 for (i = 0; i < 2; i++) {
447 for (i = 0; i < 4; i++) {
459 int yc_size = y_size + 2 * c_size;
476 2 * 64 *
sizeof(
int), fail)
482 for (i = 0; i < 12; i++) {
489 yc_size *
sizeof(int16_t) * 16, fail);
522 #define COPY(a) bak->a = src->a
523 COPY(edge_emu_buffer);
528 COPY(obmc_scratchpad);
535 COPY(me.map_generation);
556 for (i = 0; i < 12; i++) {
562 "scratch buffers.\n");
576 if (dst == src || !
s1->context_initialized)
613 (
char *) &
s1->last_picture_ptr - (
char *) &
s1->last_picture);
629 (
char *) &
s1->shape - (
char *) &
s1->time_increment_bits);
639 if (
s1->bitstream_buffer) {
640 if (
s1->bitstream_buffer_size +
644 s1->allocated_bitstream_buffer_size);
647 s1->bitstream_buffer_size);
657 "scratch buffers.\n");
662 "be allocated due to unknown size.\n");
668 (
char *) &
s1->rtp_mode - (
char *) &
s1->progressive_sequence);
670 if (!
s1->first_field) {
672 if (
s1->current_picture_ptr)
728 int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y;
753 yc_size = y_size + 2 * c_size;
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);
773 mv_table_size * 2 *
sizeof(int16_t), fail);
775 mv_table_size * 2 *
sizeof(int16_t), fail);
777 mv_table_size * 2 *
sizeof(int16_t), fail);
789 sizeof(uint16_t), fail);
795 mb_array_size *
sizeof(
float), fail);
797 mb_array_size *
sizeof(
float), fail);
802 mb_array_size *
sizeof(
uint8_t), fail);
804 mb_array_size *
sizeof(
uint8_t), fail);
809 for (i = 0; i < 2; i++) {
811 for (j = 0; j < 2; j++) {
812 for (k = 0; k < 2; k++) {
815 mv_table_size * 2 *
sizeof(int16_t),
821 mb_array_size * 2 *
sizeof(
uint8_t), fail);
823 mv_table_size * 2 *
sizeof(int16_t), fail);
828 mb_array_size * 2 *
sizeof(
uint8_t), fail);
838 mb_array_size *
sizeof(
uint8_t), fail);
840 mb_array_size *
sizeof(
uint8_t), fail);
847 yc_size *
sizeof(int16_t), fail);
851 for (i = 0; i < yc_size; i++)
899 "decoding to AV_PIX_FMT_NONE is not supported.\n");
910 " reducing to %d\n", nb_slices, max_slices);
911 nb_slices = max_slices;
940 (
MAX_RUN + 1) * 2 *
sizeof(
int), fail);
945 64 * 32 *
sizeof(
int), fail);
947 64 * 32 *
sizeof(
int), fail);
949 64 * 32 * 2 *
sizeof(uint16_t), fail);
951 64 * 32 * 2 *
sizeof(uint16_t), fail);
959 2 * 64 *
sizeof(uint16_t), fail);
983 for (i = 1; i < nb_slices; i++) {
988 for (i = 0; i < nb_slices; i++) {
992 (s->
mb_height * (i) + nb_slices / 2) / nb_slices;
994 (s->
mb_height * (i + 1) + nb_slices / 2) / nb_slices;
1033 for (i = 0; i < 2; i++) {
1034 for (j = 0; j < 2; j++) {
1035 for (k = 0; k < 2; k++) {
1063 for (i = 0; i < 3; i++)
1111 if (nb_slices > 1) {
1112 for (i = 1; i < nb_slices; i++) {
1117 for (i = 0; i < nb_slices; i++) {
1121 (s->
mb_height * (i) + nb_slices / 2) / nb_slices;
1123 (s->
mb_height * (i + 1) + nb_slices / 2) / nb_slices;
1196 int last,
run,
level, start, end, i;
1203 for (last = 0; last < 2; last++) {
1212 memset(max_level, 0,
MAX_RUN + 1);
1214 memset(index_run, rl->
n,
MAX_RUN + 1);
1215 for (i = start; i < end; i++) {
1218 if (index_run[run] == rl->
n)
1220 if (level > max_level[run])
1222 if (run > max_run[level])
1226 rl->
max_level[last] = static_store[last];
1239 memcpy(rl->
index_run[last], index_run, MAX_RUN + 1);
1247 for (q = 0; q < 32; q++) {
1249 int qadd = (q - 1) | 1;
1263 }
else if (len < 0) {
1267 if (code == rl->
n) {
1273 if (code >= rl->
last) run += 192;
1335 if (ret >= 0 && ret < s->picture_range_end) {
1349 for (intra = 0; intra < 2; intra++) {
1351 for (i = 0; i < 64; i++) {
1357 for (i = 0; i < 64; i++) {
1395 "releasing zombie picture\n");
1458 av_dlog(s->
avctx,
"L%p N%p C%p L%p N%p C%p type:%d drop:%d\n",
1472 "warning: first frame is no keyframe\n");
1475 "allocate dummy last picture for field based first keyframe\n");
1535 "Non-reference picture received and no reference available\n");
1541 for (i = 0; i < 4; i++) {
1627 assert(i < MAX_PICTURE_COUNT);
1664 sx = av_clip(sx, 0, w - 1);
1665 sy = av_clip(sy, 0, h - 1);
1666 ex = av_clip(ex, 0, w - 1);
1667 ey = av_clip(ey, 0, h - 1);
1669 buf[sy * stride + sx] +=
color;
1678 f = ((ey - sy) << 16) / ex;
1679 for (x = 0; x <= ex; x++) {
1681 fr = (x * f) & 0xFFFF;
1682 buf[y * stride + x] += (color * (0x10000 - fr)) >> 16;
1683 buf[(y + 1) * stride + x] += (color * fr ) >> 16;
1693 f = ((ex - sx) << 16) / ey;
1696 for (y = 0; y = ey; y++) {
1698 fr = (y * f) & 0xFFFF;
1699 buf[y * stride + x] += (color * (0x10000 - fr)) >> 16;
1700 buf[y * stride + x + 1] += (color * fr ) >> 16;
1717 sx = av_clip(sx, -100, w + 100);
1718 sy = av_clip(sy, -100, h + 100);
1719 ex = av_clip(ex, -100, w + 100);
1720 ey = av_clip(ey, -100, h + 100);
1725 if (dx * dx + dy * dy > 3 * 3) {
1728 int length =
ff_sqrt((rx * rx + ry * ry) << 8);
1734 draw_line(buf, sx, sy, sx + rx, sy + ry, w, h, stride, color);
1735 draw_line(buf, sx, sy, sx - ry, sy + rx, w, h, stride, color);
1737 draw_line(buf, sx, sy, ex, ey, w, h, stride, color);
1773 for (x = 0; x < s->
mb_width; x++) {
1801 else if (
IS_GMC(mb_type))
1843 int h_chroma_shift, v_chroma_shift, block_height;
1847 const int mv_stride = (s->
mb_width << mv_sample_log2) +
1852 &h_chroma_shift, &v_chroma_shift);
1853 for (i = 0; i < 3; i++) {
1855 (i == 0) ? pict->
linesize[i] * height:
1856 pict->
linesize[i] * height >> v_chroma_shift);
1860 ptr = pict->
data[0];
1861 block_height = 16 >> v_chroma_shift;
1863 for (mb_y = 0; mb_y < s->
mb_height; mb_y++) {
1865 for (mb_x = 0; mb_x < s->
mb_width; mb_x++) {
1866 const int mb_index = mb_x + mb_y * s->
mb_stride;
1869 for (type = 0; type < 3; type++) {
1896 for (i = 0; i < 4; i++) {
1897 int sx = mb_x * 16 + 4 + 8 * (i & 1);
1898 int sy = mb_y * 16 + 4 + 8 * (i >> 1);
1899 int xy = (mb_x * 2 + (i & 1) +
1900 (mb_y * 2 + (i >> 1)) * mv_stride) << (mv_sample_log2 - 1);
1901 int mx = (pict->
motion_val[direction][xy][0] >> shift) + sx;
1902 int my = (pict->
motion_val[direction][xy][1] >> shift) + sy;
1908 for (i = 0; i < 2; i++) {
1909 int sx = mb_x * 16 + 8;
1910 int sy = mb_y * 16 + 4 + 8 * i;
1911 int xy = (mb_x * 2 + (mb_y * 2 + i) * mv_stride) << (mv_sample_log2 - 1);
1912 int mx = (pict->
motion_val[direction][xy][0] >> shift);
1913 int my = (pict->
motion_val[direction][xy][1] >> shift);
1918 draw_arrow(ptr, sx, sy, mx + sx, my + sy, width,
1923 for (i = 0; i < 2; i++) {
1924 int sx = mb_x * 16 + 4 + 8 * i;
1925 int sy = mb_y * 16 + 8;
1926 int xy = (mb_x * 2 + i + mb_y * 2 * mv_stride) << (mv_sample_log2 - 1);
1927 int mx = pict->
motion_val[direction][xy][0] >> shift;
1928 int my = pict->
motion_val[direction][xy][1] >> shift;
1933 draw_arrow(ptr, sx, sy, mx + sx, my + sy, width,
1937 int sx = mb_x * 16 + 8;
1938 int sy = mb_y * 16 + 8;
1939 int xy = (mb_x + mb_y * mv_stride) << mv_sample_log2;
1940 int mx = pict->
motion_val[direction][xy][0] >> shift + sx;
1941 int my = pict->
motion_val[direction][xy][1] >> shift + sy;
1947 uint64_t c = (pict->
qscale_table[mb_index] * 128 / 31) *
1948 0x0101010101010101ULL;
1950 for (y = 0; y < block_height; y++) {
1951 *(uint64_t *)(pict->
data[1] + 8 * mb_x +
1952 (block_height * mb_y + y) *
1954 *(uint64_t *)(pict->
data[2] + 8 * mb_x +
1955 (block_height * mb_y + y) *
1961 int mb_type = pict->
mb_type[mb_index];
1964 #define COLOR(theta, r) \
1965 u = (int)(128 + r * cos(theta * 3.141592 / 180)); \
1966 v = (int)(128 + r * sin(theta * 3.141592 / 180));
1983 }
else if (
IS_GMC(mb_type)) {
1985 }
else if (
IS_SKIP(mb_type)) {
1996 u *= 0x0101010101010101ULL;
1997 v *= 0x0101010101010101ULL;
1998 for (y = 0; y < block_height; y++) {
1999 *(uint64_t *)(pict->
data[1] + 8 * mb_x +
2000 (block_height * mb_y + y) * pict->
linesize[1]) = u;
2001 *(uint64_t *)(pict->
data[2] + 8 * mb_x +
2002 (block_height * mb_y + y) * pict->
linesize[2]) = v;
2007 *(uint64_t *)(pict->
data[0] + 16 * mb_x + 0 +
2008 (16 * mb_y + 8) * pict->
linesize[0]) ^= 0x8080808080808080ULL;
2009 *(uint64_t *)(pict->
data[0] + 16 * mb_x + 8 +
2010 (16 * mb_y + 8) * pict->
linesize[0]) ^= 0x8080808080808080ULL;
2013 for (y = 0; y < 16; y++)
2014 pict->
data[0][16 * mb_x + 8 + (16 * mb_y + y) *
2017 if (
IS_8X8(mb_type) && mv_sample_log2 >= 2) {
2018 int dm = 1 << (mv_sample_log2 - 2);
2019 for (i = 0; i < 4; i++) {
2020 int sx = mb_x * 16 + 8 * (i & 1);
2021 int sy = mb_y * 16 + 8 * (i >> 1);
2022 int xy = (mb_x * 2 + (i & 1) +
2023 (mb_y * 2 + (i >> 1)) * mv_stride) << (mv_sample_log2 - 1);
2026 if (mv[0] != mv[dm] ||
2027 mv[dm * mv_stride] != mv[dm * (mv_stride + 1)])
2028 for (y = 0; y < 8; y++)
2029 pict->
data[0][sx + 4 + (sy + y) * pict->
linesize[0]] ^= 0x80;
2030 if (mv[0] != mv[dm * mv_stride] || mv[dm] != mv[dm * (mv_stride + 1)])
2031 *(uint64_t *)(pict->
data[0] + sx + (sy + 4) *
2032 pict->
linesize[0]) ^= 0x8080808080808080ULL;
2052 int my_max = INT_MIN, my_min = INT_MAX, qpel_shift = !s->
quarter_sample;
2053 int my,
off, i, mvs;
2072 for (i = 0; i < mvs; i++) {
2073 my = s->
mv[dir][i][1]<<qpel_shift;
2074 my_max =
FFMAX(my_max, my);
2075 my_min =
FFMIN(my_min, my);
2078 off = (
FFMAX(-my_min, my_max) + 63) >> 6;
2125 memset(s->
ac_val[0][xy ], 0, 32 *
sizeof(int16_t));
2126 memset(s->
ac_val[0][xy + wrap], 0, 32 *
sizeof(int16_t));
2139 memset(s->
ac_val[1][xy], 0, 16 *
sizeof(int16_t));
2140 memset(s->
ac_val[2][xy], 0, 16 *
sizeof(int16_t));
2171 for(j=0; j<64; j++){
2196 uint8_t *dest_y, *dest_cb, *dest_cr;
2197 int dct_linesize, dct_offset;
2203 const int block_size = 8;
2222 dct_offset = s->
interlaced_dct ? linesize : linesize * block_size;
2226 dest_cb= s->
dest[1];
2227 dest_cr= s->
dest[2];
2298 add_dct(s, block[0], 0, dest_y , dct_linesize);
2299 add_dct(s, block[1], 1, dest_y + block_size, dct_linesize);
2300 add_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize);
2301 add_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize);
2305 add_dct(s, block[4], 4, dest_cb, uvlinesize);
2306 add_dct(s, block[5], 5, dest_cr, uvlinesize);
2312 add_dct(s, block[4], 4, dest_cb, dct_linesize);
2313 add_dct(s, block[5], 5, dest_cr, dct_linesize);
2314 add_dct(s, block[6], 6, dest_cb+dct_offset, dct_linesize);
2315 add_dct(s, block[7], 7, dest_cr+dct_offset, dct_linesize);
2317 add_dct(s, block[8], 8, dest_cb+8, dct_linesize);
2318 add_dct(s, block[9], 9, dest_cr+8, dct_linesize);
2319 add_dct(s, block[10], 10, dest_cb+8+dct_offset, dct_linesize);
2320 add_dct(s, block[11], 11, dest_cr+8+dct_offset, dct_linesize);
2332 put_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->
qscale);
2333 put_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->
qscale);
2334 put_dct(s, block[3], 3, dest_y + dct_offset + block_size, dct_linesize, s->
qscale);
2351 s->
dsp.
idct_put(dest_y + block_size, dct_linesize, block[1]);
2352 s->
dsp.
idct_put(dest_y + dct_offset , dct_linesize, block[2]);
2353 s->
dsp.
idct_put(dest_y + dct_offset + block_size, dct_linesize, block[3]);
2366 s->
dsp.
idct_put(dest_cb + dct_offset, dct_linesize, block[6]);
2367 s->
dsp.
idct_put(dest_cr + dct_offset, dct_linesize, block[7]);
2369 s->
dsp.
idct_put(dest_cb + 8, dct_linesize, block[8]);
2370 s->
dsp.
idct_put(dest_cr + 8, dct_linesize, block[9]);
2371 s->
dsp.
idct_put(dest_cb + 8 + dct_offset, dct_linesize, block[10]);
2372 s->
dsp.
idct_put(dest_cr + 8 + dct_offset, dct_linesize, block[11]);
2413 int sides = 0, edge_h;
2469 const int mb_size= 4;
2486 s->
dest[0] += s->
mb_y * linesize << mb_size;
2490 s->
dest[0] += (s->
mb_y>>1) * linesize << mb_size;
2528 int i,
level, nCoeffs;
2529 const uint16_t *quant_matrix;
2539 for(i=1;i<=nCoeffs;i++) {
2545 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2546 level = (level - 1) | 1;
2549 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2550 level = (level - 1) | 1;
2560 int i,
level, nCoeffs;
2561 const uint16_t *quant_matrix;
2566 for(i=0; i<=nCoeffs; i++) {
2572 level = (((level << 1) + 1) * qscale *
2573 ((int) (quant_matrix[j]))) >> 4;
2574 level = (level - 1) | 1;
2577 level = (((level << 1) + 1) * qscale *
2578 ((int) (quant_matrix[j]))) >> 4;
2579 level = (level - 1) | 1;
2589 int i,
level, nCoeffs;
2590 const uint16_t *quant_matrix;
2600 for(i=1;i<=nCoeffs;i++) {
2606 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2609 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2619 int i,
level, nCoeffs;
2620 const uint16_t *quant_matrix;
2631 for(i=1;i<=nCoeffs;i++) {
2637 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2640 level = (int)(level * qscale * quant_matrix[j]) >> 3;
2652 int i,
level, nCoeffs;
2653 const uint16_t *quant_matrix;
2660 for(i=0; i<=nCoeffs; i++) {
2666 level = (((level << 1) + 1) * qscale *
2667 ((int) (quant_matrix[j]))) >> 4;
2670 level = (((level << 1) + 1) * qscale *
2671 ((int) (quant_matrix[j]))) >> 4;
2683 int i,
level, qmul, qadd;
2695 qadd = (qscale - 1) | 1;
2704 for(i=1; i<=nCoeffs; i++) {
2708 level = level * qmul - qadd;
2710 level = level * qmul + qadd;
2720 int i,
level, qmul, qadd;
2725 qadd = (qscale - 1) | 1;
2730 for(i=0; i<=nCoeffs; i++) {
2734 level = level * qmul - qadd;
2736 level = level * qmul + qadd;
2750 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.
#define CONFIG_WMV2_DECODER
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 CONFIG_WMV2_ENCODER
#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)
#define CONFIG_MPEG_XVMC_DECODER
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)