24 #include "libavutil/avassert.h"
36 { 16, 16 }, { 16, 8 }, { 8, 16 }, { 8, 8 }, { 8, 4 }, { 4, 8 },
37 { 4, 4 }, { 4, 2 }, { 2, 4 }, { 2, 2 }, { 2, 1 }, { 1, 2 }, { 1, 1 },
39 { 8, 8 }, { 8, 4 }, { 4, 8 }, { 4, 4 }, { 4, 2 }, { 2, 4 },
40 { 2, 2 }, { 2, 1 }, { 1, 2 }, { 1, 1 }, { 1, 1 }, { 1, 1 }, { 1, 1 },
48 0x0, 0x8, 0x0, 0x8, 0xc, 0x8, 0xc, 0xe, 0xc, 0xe, 0xf, 0xe, 0xf
51 0x0, 0x0, 0x8, 0x8, 0x8, 0xc, 0xc, 0xc, 0xe, 0xe, 0xe, 0xf, 0xf
57 int row = b->
row, col = b->
col, row7 = b->
row7;
58 enum TxfmMode max_tx = max_tx_for_bl_bp[b->
bs];
76 for (y = 0; y < h4; y++)
77 for (x = 0; x < w4; x++)
92 for (y = 0; y < h4; y++)
112 if (have_a && have_l) {
224 }
else if (b->
intra) {
253 static const uint8_t size_group[10] = {
254 3, 3, 3, 3, 2, 2, 2, 1, 1, 1
256 int sz = size_group[b->
bs];
269 static const uint8_t inter_mode_ctx_lut[14][14] = {
270 { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5 },
271 { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5 },
272 { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5 },
273 { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5 },
274 { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5 },
275 { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5 },
276 { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5 },
277 { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5 },
278 { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5 },
279 { 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5 },
280 { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 1, 3 },
281 { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 1, 3 },
282 { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 0, 3 },
283 { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 4 },
349 if (refl == refa && refa == s->
varcompref[1]) {
356 c = (refa == refl) ? 3 : 1;
373 c = (refl == refa) ? 4 : 2;
537 static const uint8_t off[10] = {
538 3, 0, 0, 1, 0, 0, 0, 0, 0, 0
665 for (n = 0; n < w4 * 2; n++) {
669 for (n = 0; n < h4 * 2; n++) {
685 for (y = 0; y < h4; y++) {
686 int x, o = (row + y) * s->
sb_cols * 8 + col;
689 for (x = 0; x < w4; x++) {
690 s->
mv[0][o + x].
ref[0] =
691 s->
mv[0][o + x].
ref[1] = -1;
693 }
else if (b->
comp) {
694 for (x = 0; x < w4; x++) {
701 for (x = 0; x < w4; x++) {
703 s->
mv[0][o + x].
ref[1] = -1;
712 enum TxfmMode tx,
unsigned (*cnt)[6][3],
713 unsigned (*eob)[6][2],
uint8_t(*p)[6][11],
714 int nnz,
const int16_t *scan,
715 const int16_t(*nb)[2],
716 const int16_t *band_counts,
const int16_t *qmul)
718 int i = 0, band = 0, band_left = band_counts[band];
726 eob[band][nnz][val]++;
734 band_left = band_counts[++band];
736 nnz = (1 + cache[nb[i][0]] + cache[nb[i][1]]) >> 1;
807 band_left = band_counts[++band];
809 coef[rc] = ((
vp8_rac_get(c) ? -val : val) * qmul[!!i]) / 2;
811 coef[rc] = (
vp8_rac_get(c) ? -val : val) * qmul[!!i];
812 nnz = (1 + cache[nb[i][0]] + cache[nb[i][1]]) >> 1;
814 }
while (++i < n_coeffs);
823 int row = b->
row, col = b->
col;
828 int end_x =
FFMIN(2 * (s->
cols - col), w4);
829 int end_y =
FFMIN(2 * (s->
rows - row), h4);
830 int n, pl, x, y, step1d = 1 << b->tx,
step = 1 << (b->tx * 2);
831 int uvstep1d = 1 << b->
uvtx, uvstep = 1 << (b->
uvtx * 2), ret;
840 static const int16_t band_counts[4][8] = {
841 { 1, 2, 3, 4, 3, 16 - 13, 0 },
842 { 1, 2, 3, 4, 11, 64 - 21, 0 },
843 { 1, 2, 3, 4, 11, 256 - 21, 0 },
844 { 1, 2, 3, 4, 11, 1024 - 21, 0 },
846 const int16_t *y_band_counts = band_counts[b->tx];
847 const int16_t *uv_band_counts = band_counts[b->
uvtx];
851 for (y = 0; y < end_y; y += step1d)
852 for (x = 1; x < step1d; x++)
854 for (x = 0; x < end_x; x += step1d)
855 for (y = 1; y < step1d; y++)
858 for (n = 0, y = 0; y < end_y; y += step1d) {
859 for (x = 0; x < end_x; x += step1d, n +=
step) {
863 int nnz = a[x] + l[y];
865 b->tx, c, e, p, nnz, yscans[txtp],
866 ynbs[txtp], y_band_counts,
877 for (y = 0; y < end_y; y += step1d)
878 memset(&l[y + 1], l[y],
FFMIN(end_y - y - 1, step1d - 1));
879 for (x = 0; x < end_x; x += step1d)
880 memset(&a[x + 1], a[x],
FFMIN(end_x - x - 1, step1d - 1));
890 for (pl = 0; pl < 2; pl++) {
894 for (y = 0; y < end_y; y += uvstep1d)
895 for (x = 1; x < uvstep1d; x++)
897 for (x = 0; x < end_x; x += uvstep1d)
898 for (y = 1; y < uvstep1d; y++)
901 for (n = 0, y = 0; y < end_y; y += uvstep1d) {
902 for (x = 0; x < end_x; x += uvstep1d, n += uvstep) {
903 int nnz = a[x] + l[y];
905 16 * uvstep, b->
uvtx, c, e, p,
907 uv_band_counts, qmul[1])) < 0)
913 s->
uveob[pl][n] = ret;
917 for (y = 0; y < end_y; y += uvstep1d)
918 memset(&l[y + 1], l[y],
FFMIN(end_y - y - 1, uvstep1d - 1));
919 for (x = 0; x < end_x; x += uvstep1d)
920 memset(&a[x + 1], a[x],
FFMIN(end_x - x - 1, uvstep1d - 1));
930 ptrdiff_t stride_edge,
932 ptrdiff_t stride_inner,
933 uint8_t *l,
int col,
int x,
int w,
937 int have_top = row > 0 || y > 0;
939 int have_right = x < w - 1;
940 static const uint8_t mode_conv[10][2 ][2 ] = {
962 static const struct {
970 [
DC_PRED] = { .needs_top = 1, .needs_left = 1 },
973 .needs_topleft = 1 },
975 .needs_topleft = 1 },
977 .needs_topleft = 1 },
981 .needs_topleft = 1 },
990 mode = mode_conv[mode][have_left][have_top];
991 if (edges[mode].needs_top) {
993 int n_px_need = 4 << tx, n_px_have = (((s->
cols - col) << !p) - x) * 4;
994 int n_px_need_tr = 0;
996 if (tx ==
TX_4X4 && edges[mode].needs_topright && have_right)
1003 top = !(row & 7) && !y ?
1005 y == 0 ? &dst_edge[-stride_edge] : &dst_inner[-stride_inner];
1007 topleft = !(row & 7) && !y ?
1009 y == 0 || x == 0 ? &dst_edge[-stride_edge] :
1010 &dst_inner[-stride_inner];
1014 (!edges[mode].needs_topleft || (have_left && top == topleft)) &&
1015 (tx !=
TX_4X4 || !edges[mode].needs_topright || have_right) &&
1016 n_px_need + n_px_need_tr <= n_px_have) {
1020 if (n_px_need <= n_px_have) {
1021 memcpy(*a, top, n_px_need);
1023 memcpy(*a, top, n_px_have);
1024 memset(&(*a)[n_px_have], (*a)[n_px_have - 1],
1025 n_px_need - n_px_have);
1028 memset(*a, 127, n_px_need);
1030 if (edges[mode].needs_topleft) {
1031 if (have_left && have_top)
1032 (*a)[-1] = topleft[-1];
1034 (*a)[-1] = have_top ? 129 : 127;
1036 if (tx ==
TX_4X4 && edges[mode].needs_topright) {
1037 if (have_top && have_right &&
1038 n_px_need + n_px_need_tr <= n_px_have) {
1039 memcpy(&(*a)[4], &top[4], 4);
1041 memset(&(*a)[4], (*a)[3], 4);
1046 if (edges[mode].needs_left) {
1049 int n_px_need = 4 << tx;
1050 int n_px_have = (((s->
rows - row) << !p) - y) * 4;
1051 uint8_t *dst = x == 0 ? dst_edge : dst_inner;
1052 ptrdiff_t
stride = x == 0 ? stride_edge : stride_inner;
1054 if (n_px_need <= n_px_have) {
1055 for (i = 0; i < n_px_need; i++)
1056 l[i] = dst[i * stride - 1];
1058 for (i = 0; i < n_px_have; i++)
1059 l[i] = dst[i * stride - 1];
1060 memset(&l[i], l[i - 1], n_px_need - n_px_have);
1063 memset(l, 129, 4 << tx);
1074 int row = b->
row, col = b->
col;
1075 int w4 =
bwh_tab[1][b->
bs][0] << 1, step1d = 1 << b->tx, n;
1076 int h4 =
bwh_tab[1][b->
bs][1] << 1, x, y,
step = 1 << (b->tx * 2);
1077 int end_x =
FFMIN(2 * (s->
cols - col), w4);
1078 int end_y =
FFMIN(2 * (s->
rows - row), h4);
1080 int uvstep1d = 1 << b->
uvtx, p;
1083 for (n = 0, y = 0; y < end_y; y += step1d) {
1084 uint8_t *ptr = dst, *ptr_r = dst_r;
1085 for (x = 0; x < end_x;
1086 x += step1d, ptr += 4 * step1d, ptr_r += 4 * step1d, n +=
step) {
1097 col, x, w4, row, y, b->tx, 0);
1101 s->
block + 16 * n, eob);
1112 step = 1 << (b->
uvtx * 2);
1113 for (p = 0; p < 2; p++) {
1114 dst = b->
dst[1 + p];
1116 for (n = 0, y = 0; y < end_y; y += uvstep1d) {
1117 uint8_t *ptr = dst, *ptr_r = dst_r;
1118 for (x = 0; x < end_x;
1119 x += uvstep1d, ptr += 4 * uvstep1d,
1120 ptr_r += 4 * uvstep1d, n +=
step) {
1130 col, x, w4, row, y, b->
uvtx, p + 1);
1144 uint8_t *dst, ptrdiff_t dst_stride,
1146 ptrdiff_t ref_stride,
1147 ptrdiff_t y, ptrdiff_t x,
1149 int bw,
int bh,
int w,
int h)
1151 int mx = mv->
x, my = mv->
y;
1155 ref += y * ref_stride + x;
1159 if (x < !!mx * 3 || y < !!my * 3 ||
1160 x + !!mx * 4 > w - bw || y + !!my * 4 > h - bh) {
1162 ref - !!my * 3 * ref_stride - !!mx * 3,
1165 bw + !!mx * 7, bh + !!my * 7,
1166 x - !!mx * 3, y - !!my * 3, w, h);
1170 mc[!!mx][!!my](dst, ref, dst_stride, ref_stride, bh, mx << 1, my << 1);
1175 ptrdiff_t dst_stride,
1177 ptrdiff_t src_stride_u,
1179 ptrdiff_t src_stride_v,
1180 ptrdiff_t y, ptrdiff_t x,
1182 int bw,
int bh,
int w,
int h)
1184 int mx = mv->
x, my = mv->
y;
1188 ref_u += y * src_stride_u + x;
1189 ref_v += y * src_stride_v + x;
1193 if (x < !!mx * 3 || y < !!my * 3 ||
1194 x + !!mx * 4 > w - bw || y + !!my * 4 > h - bh) {
1196 ref_u - !!my * 3 * src_stride_u - !!mx * 3,
1199 bw + !!mx * 7, bh + !!my * 7,
1200 x - !!mx * 3, y - !!my * 3, w, h);
1202 mc[!!mx][!!my](dst_u, ref_u, dst_stride, 80, bh, mx, my);
1205 ref_v - !!my * 3 * src_stride_v - !!mx * 3,
1208 bw + !!mx * 7, bh + !!my * 7,
1209 x - !!mx * 3, y - !!my * 3, w, h);
1211 mc[!!mx][!!my](dst_v, ref_v, dst_stride, 80, bh, mx, my);
1213 mc[!!mx][!!my](dst_u, ref_u, dst_stride, src_stride_u, bh, mx, my);
1214 mc[!!mx][!!my](dst_v, ref_v, dst_stride, src_stride_v, bh, mx, my);
1221 { 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4 },
1222 { 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4 },
1226 int row = b->
row, col = b->
col;
1240 row << 3, col << 3, &b->
mv[0][0], 8, 4, w, h);
1242 b->
dst[0] + 4 * ls_y, ls_y,
1244 (row << 3) + 4, col << 3, &b->
mv[2][0], 8, 4, w, h);
1249 row << 3, col << 3, &b->
mv[0][1], 8, 4, w, h);
1251 b->
dst[0] + 4 * ls_y, ls_y,
1253 (row << 3) + 4, col << 3, &b->
mv[2][1], 8, 4, w, h);
1258 row << 3, col << 3, &b->
mv[0][0], 4, 8, w, h);
1261 row << 3, (col << 3) + 4, &b->
mv[1][0], 4, 8, w, h);
1266 row << 3, col << 3, &b->
mv[0][1], 4, 8, w, h);
1269 row << 3, (col << 3) + 4, &b->
mv[1][1], 4, 8, w, h);
1278 row << 3, col << 3, &b->
mv[0][0], 4, 4, w, h);
1281 row << 3, (col << 3) + 4, &b->
mv[1][0], 4, 4, w, h);
1283 b->
dst[0] + 4 * ls_y, ls_y,
1285 (row << 3) + 4, col << 3, &b->
mv[2][0], 4, 4, w, h);
1287 b->
dst[0] + 4 * ls_y + 4, ls_y,
1289 (row << 3) + 4, (col << 3) + 4, &b->
mv[3][0], 4, 4, w, h);
1294 row << 3, col << 3, &b->
mv[0][1], 4, 4, w, h);
1297 row << 3, (col << 3) + 4, &b->
mv[1][1], 4, 4, w, h);
1299 b->
dst[0] + 4 * ls_y, ls_y,
1301 (row << 3) + 4, col << 3, &b->
mv[2][1], 4, 4, w, h);
1303 b->
dst[0] + 4 * ls_y + 4, ls_y,
1305 (row << 3) + 4, (col << 3) + 4, &b->
mv[3][1], 4, 4, w, h);
1309 int bwl = bwlog_tab[0][b->
bs];
1315 row << 3, col << 3, &b->
mv[0][0], bw, bh, w, h);
1320 row << 3, col << 3, &b->
mv[0][1], bw, bh, w, h);
1325 int bwl = bwlog_tab[1][b->
bs];
1333 b->
mv[2][0].
x + b->
mv[3][0].
x, 4);
1335 b->
mv[2][0].
y + b->
mv[3][0].
y, 4);
1341 b->
dst[1], b->
dst[2], ls_uv,
1344 row << 2, col << 2, &mvuv, bw, bh, w, h);
1349 b->
mv[2][1].
x + b->
mv[3][1].
x, 4);
1351 b->
mv[2][1].
y + b->
mv[3][1].
y, 4);
1356 b->
dst[1], b->
dst[2], ls_uv,
1359 row << 2, col << 2, &mvuv, bw, bh, w, h);
1366 int w4 =
bwh_tab[1][b->
bs][0] << 1, step1d = 1 << b->tx, n;
1367 int h4 =
bwh_tab[1][b->
bs][1] << 1, x, y,
step = 1 << (b->tx * 2);
1368 int end_x =
FFMIN(2 * (s->
cols - col), w4);
1369 int end_y =
FFMIN(2 * (s->
rows - row), h4);
1371 int uvstep1d = 1 << b->
uvtx, p;
1375 for (n = 0, y = 0; y < end_y; y += step1d) {
1377 for (x = 0; x < end_x; x += step1d, ptr += 4 * step1d, n +=
step) {
1382 s->
block + 16 * n, eob);
1392 step = 1 << (b->
uvtx * 2);
1393 for (p = 0; p < 2; p++) {
1394 dst = b->
dst[p + 1];
1395 for (n = 0, y = 0; y < end_y; y += uvstep1d) {
1397 for (x = 0; x < end_x; x += uvstep1d, ptr += 4 * uvstep1d, n +=
step) {
1412 int row_and_7,
int col_and_7,
1413 int w,
int h,
int col_end,
int row_end,
1426 if (tx ==
TX_4X4 && is_uv) {
1441 if (tx ==
TX_4X4 && !skip_inter) {
1442 int t = 1 << col_and_7, m_col = (t << w) - t, y;
1443 int m_col_odd = (t << (w - 1)) - t;
1447 int m_row_8 = m_col & 0x01, m_row_4 = m_col - m_row_8;
1449 for (y = row_and_7; y < h + row_and_7; y++) {
1450 int col_mask_id = 2 - !(y & 7);
1452 lflvl->
mask[is_uv][0][y][1] |= m_row_8;
1453 lflvl->
mask[is_uv][0][y][2] |= m_row_4;
1464 if ((col_end & 1) && (y & 1)) {
1465 lflvl->
mask[is_uv][1][y][col_mask_id] |= m_col_odd;
1467 lflvl->
mask[is_uv][1][y][col_mask_id] |= m_col;
1471 int m_row_8 = m_col & 0x11, m_row_4 = m_col - m_row_8;
1473 for (y = row_and_7; y < h + row_and_7; y++) {
1474 int col_mask_id = 2 - !(y & 3);
1476 lflvl->
mask[is_uv][0][y][1] |= m_row_8;
1477 lflvl->
mask[is_uv][0][y][2] |= m_row_4;
1478 lflvl->
mask[is_uv][1][y][col_mask_id] |= m_col;
1479 lflvl->
mask[is_uv][0][y][3] |= m_col;
1480 lflvl->
mask[is_uv][1][y][3] |= m_col;
1484 int y, t = 1 << col_and_7, m_col = (t << w) - t;
1487 int mask_id = (tx ==
TX_8X8);
1488 int l2 = tx + is_uv - 1, step1d = 1 << l2;
1489 static const unsigned masks[4] = { 0xff, 0x55, 0x11, 0x01 };
1490 int m_row = m_col & masks[l2];
1494 if (is_uv && tx >
TX_8X8 && (w ^ (w - 1)) == 1) {
1495 int m_row_16 = ((t << (w - 1)) - t) & masks[l2];
1496 int m_row_8 = m_row - m_row_16;
1498 for (y = row_and_7; y < h + row_and_7; y++) {
1499 lflvl->
mask[is_uv][0][y][0] |= m_row_16;
1500 lflvl->
mask[is_uv][0][y][1] |= m_row_8;
1503 for (y = row_and_7; y < h + row_and_7; y++)
1504 lflvl->
mask[is_uv][0][y][mask_id] |= m_row;
1507 if (is_uv && tx >
TX_8X8 && (h ^ (h - 1)) == 1) {
1508 for (y = row_and_7; y < h + row_and_7 - 1; y += step1d)
1509 lflvl->
mask[is_uv][1][y][0] |= m_col;
1510 if (y - row_and_7 == h - 1)
1511 lflvl->
mask[is_uv][1][y][1] |= m_col;
1513 for (y = row_and_7; y < h + row_and_7; y += step1d)
1514 lflvl->
mask[is_uv][1][y][mask_id] |= m_col;
1516 }
else if (tx !=
TX_4X4) {
1519 mask_id = (tx ==
TX_8X8) || (is_uv && h == 1);
1520 lflvl->
mask[is_uv][1][row_and_7][mask_id] |= m_col;
1521 mask_id = (tx ==
TX_8X8) || (is_uv && w == 1);
1522 for (y = row_and_7; y < h + row_and_7; y++)
1523 lflvl->
mask[is_uv][0][y][mask_id] |= t;
1525 int t8 = t & 0x01, t4 = t - t8;
1527 for (y = row_and_7; y < h + row_and_7; y++) {
1528 lflvl->
mask[is_uv][0][y][2] |= t4;
1529 lflvl->
mask[is_uv][0][y][1] |= t8;
1531 lflvl->
mask[is_uv][1][row_and_7][2 - !(row_and_7 & 7)] |= m_col;
1533 int t8 = t & 0x11, t4 = t - t8;
1535 for (y = row_and_7; y < h + row_and_7; y++) {
1536 lflvl->
mask[is_uv][0][y][2] |= t4;
1537 lflvl->
mask[is_uv][0][y][1] |= t8;
1539 lflvl->
mask[is_uv][1][row_and_7][2 - !(row_and_7 & 3)] |= m_col;
1545 VP9Filter *lflvl, ptrdiff_t yoff, ptrdiff_t uvoff,
1559 s->
min_mv.
x = -(128 + col * 64);
1560 s->
min_mv.
y = -(128 + row * 64);
1566 b->
uvtx = b->tx - (w4 * 2 == (1 << b->tx) || h4 * 2 == (1 << b->tx));
1576 for (pl = 0; pl < 2; pl++) {
1586 (row + h4) > s->
rows;
1588 (row + h4) > s->
rows;
1616 for (n = 0; o < w; n++) {
1634 for (n = 1; o < w; n++) {
1660 for (y = 0; y < h4; y++)
1661 memset(&lflvl->
level[((row & 7) + y) * 8 + (col & 7)], lvl, w4);
1662 mask_edges(lflvl, 0, row & 7, col & 7, x_end, y_end, 0, 0, b->tx, skip_inter);
1663 mask_edges(lflvl, 1, row & 7, col & 7, x_end, y_end,
1666 b->
uvtx, skip_inter);
1673 limit >>= (sharp + 3) >> 2;
1674 limit =
FFMIN(limit, 9 - sharp);
1676 limit =
FFMAX(limit, 1);
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static void decode_mode(VP9Context *s, VP9Block *const b)
This structure describes decoded (raw) audio or video data.
uint8_t left_segpred_ctx[8]
VP5 and VP6 compatible video decoder (common features)
static av_always_inline int check_intra_mode(VP9Context *s, int mode, uint8_t **a, uint8_t *dst_edge, ptrdiff_t stride_edge, uint8_t *dst_inner, ptrdiff_t stride_inner, uint8_t *l, int col, int x, int w, int row, int y, enum TxfmMode tx, int p)
uint8_t * above_y_nnz_ctx
static av_always_inline int vp8_rac_get_tree(VP56RangeCoder *c, const int8_t(*tree)[2], const uint8_t *probs)
uint8_t left_uv_nnz_ctx[2][8]
void(* intra_pred[N_TXFM_SIZES][N_INTRA_PRED_MODES])(uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
uint8_t * above_partition_ctx
const uint8_t ff_vp9_default_kf_ymode_probs[10][10][9]
uint8_t * intra_pred_data[3]
const uint8_t ff_vp9_default_kf_uvmode_probs[10][9]
vp9_mc_func mc[5][4][2][2][2]
struct VP9Context::@75 filter
uint8_t coef[4][2][2][6][6][3]
static int inter_recon(AVCodecContext *avctx)
static av_always_inline void mask_edges(VP9Filter *lflvl, int is_uv, int row_and_7, int col_and_7, int w, int h, int col_end, int row_end, enum TxfmMode tx, int skip_inter)
static av_always_inline void mc_chroma_dir(VP9Context *s, vp9_mc_func(*mc)[2], uint8_t *dst_u, uint8_t *dst_v, ptrdiff_t dst_stride, const uint8_t *ref_u, ptrdiff_t src_stride_u, const uint8_t *ref_v, ptrdiff_t src_stride_v, ptrdiff_t y, ptrdiff_t x, const VP56mv *mv, int bw, int bh, int w, int h)
static void intra_recon(AVCodecContext *avctx, ptrdiff_t y_off, ptrdiff_t uv_off)
uint8_t * above_segpred_ctx
bitstream reader API header.
#define ROUNDED_DIV(a, b)
struct VP9Context::@78 tiling
struct VP9Context::@81 counts
static av_always_inline void mc_luma_dir(VP9Context *s, vp9_mc_func(*mc)[2], uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *ref, ptrdiff_t ref_stride, ptrdiff_t y, ptrdiff_t x, const VP56mv *mv, int bw, int bh, int w, int h)
enum CompPredMode comppredmode
uint8_t left_partition_ctx[8]
const int8_t ff_vp9_intramode_tree[9][2]
const int16_t(*[5][4] ff_vp9_scans_nb)[2]
Libavcodec external API header.
static int decode_coeffs(AVCodecContext *avctx)
const uint8_t ff_vp9_model_pareto8[256][8]
uint8_t * above_filter_ctx
const int16_t * ff_vp9_scans[5][4]
VP56mv left_mv_ctx[16][2]
uint8_t left_y_nnz_ctx[16]
const int8_t ff_vp9_inter_mode_tree[3][2]
int width
picture width / height.
uint8_t left_mode_ctx[16]
unsigned eob[4][2][2][6][6][2]
void(* emulated_edge_mc)(uint8_t *buf, const uint8_t *src, ptrdiff_t buf_linesize, ptrdiff_t src_linesize, int block_w, int block_h, int src_x, int src_y, int w, int h)
Copy a rectangular area of samples to a temporary buffer and replicate the border samples...
enum FilterMode filtermode
const int8_t ff_vp9_segmentation_tree[7][2]
enum FilterMode ff_vp9_filter_lut[3]
#define vp56_rac_get_prob
static const uint8_t bwh_tab[2][N_BS_SIZES][2]
if(ac->has_optimized_func)
static const float pred[4]
static const int8_t mv[256][2]
static av_always_inline int vp56_rac_get_prob_branchy(VP56RangeCoder *c, int prob)
VP56mv(* above_mv_ctx)[2]
main external API structure.
enum TxfmType ff_vp9_intra_txfm_type[14]
unsigned single_ref[5][2][2]
int ff_vp9_decode_block(AVCodecContext *avctx, int row, int col, VP9Filter *lflvl, ptrdiff_t yoff, ptrdiff_t uvoff, enum BlockLevel bl, enum BlockPartition bp)
void ff_vp9_fill_mv(VP9Context *s, VP56mv *mv, int mode, int sb)
struct VP9Context::@80 prob
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
uint8_t left_filter_ctx[8]
struct VP9Context::@77::@82 feat[8]
uint8_t tmp_uv[2][32 *32]
struct VP9Context::@77 segmentation
uint8_t * segmentation_map
void(* vp9_mc_func)(uint8_t *dst, const uint8_t *ref, ptrdiff_t dst_stride, ptrdiff_t ref_stride, int h, int mx, int my)
void(* itxfm_add[N_TXFM_SIZES+1][N_TXFM_TYPES])(uint8_t *dst, ptrdiff_t stride, int16_t *block, int eob)
common internal api header.
static av_always_inline int vp8_rac_get(VP56RangeCoder *c)
Core video DSP helper functions.
uint8_t edge_emu_buffer[71 *80]
const int8_t ff_vp9_filter_tree[2][2]
uint8_t * above_intra_ctx
#define LOCAL_ALIGNED_16(t, v,...)
static int decode_block_coeffs(VP56RangeCoder *c, int16_t *coef, int n_coeffs, enum TxfmMode tx, unsigned(*cnt)[6][3], unsigned(*eob)[6][2], uint8_t(*p)[6][11], int nnz, const int16_t *scan, const int16_t(*nb)[2], const int16_t *band_counts, const int16_t *qmul)
uint8_t left_intra_ctx[8]
uint8_t * above_uv_nnz_ctx[2]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.