Lines Matching refs:mb_x
898 static int vp7_calculate_mb_offset(int mb_x, int mb_y, int mb_width,
903 int new = (mb_y + yoffset) * vwidth + mb_x + xoffset;
918 int mb_x, int mb_y, int layout)
937 if (vp7_calculate_mb_offset(mb_x, mb_y, s->mb_width, pred->xoffset,
1009 int mb_x, int mb_y, int layout)
1109 int mb_x, int keyframe, int layout)
1124 top = s->intra4x4_pred_mode_top + 4 * mb_x;
1143 void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y,
1179 decode_intra4x4_modes(s, c, mb, mb_x, 1, layout);
1186 AV_WN32A(s->intra4x4_pred_mode_top + 4 * mb_x, modes);
1205 vp7_decode_mvs(s, mb, mb_x, mb_y, layout);
1207 vp8_decode_mvs(s, mb, mb_x, mb_y, layout);
1213 decode_intra4x4_modes(s, c, mb, mb_x, 0, layout);
1456 uint8_t *src_cr, int linesize, int uvlinesize, int mb_x,
1475 if (mb_x < mb_width - 1)
1489 int check_dc_pred8x8_mode(int mode, int mb_x, int mb_y)
1491 if (!mb_x)
1498 int check_tm_pred8x8_mode(int mode, int mb_x, int mb_y, int vp7)
1500 if (!mb_x)
1507 int check_intra_pred8x8_mode_emuedge(int mode, int mb_x, int mb_y, int vp7)
1511 return check_dc_pred8x8_mode(mode, mb_x, mb_y);
1515 return !mb_x ? (vp7 ? DC_128_PRED8x8 : DC_129_PRED8x8) : mode;
1517 return check_tm_pred8x8_mode(mode, mb_x, mb_y, vp7);
1523 int check_tm_pred4x4_mode(int mode, int mb_x, int mb_y, int vp7)
1525 if (!mb_x) {
1533 int check_intra_pred4x4_mode_emuedge(int mode, int mb_x, int mb_y,
1538 if (!mb_x && mb_y) {
1553 return !mb_x ? (vp7 ? DC_128_PRED : DC_129_PRED) : mode;
1555 return check_tm_pred4x4_mode(mode, mb_x, mb_y, vp7);
1561 if (!mb_y || !mb_x)
1570 VP8Macroblock *mb, int mb_x, int mb_y, int is_vp7)
1578 xchg_mb_border(s->top_border[mb_x + 1], dst[0], dst[1], dst[2],
1579 s->linesize, s->uvlinesize, mb_x, mb_y, s->mb_width,
1583 mode = check_intra_pred8x8_mode_emuedge(mb->mode, mb_x, mb_y, is_vp7);
1598 if (mb_y && mb_x == s->mb_width - 1) {
1618 mode = check_intra_pred4x4_mode_emuedge(intra4x4[x], mb_x + x,
1628 if (!(mb_x + x)) {
1634 if (!(mb_x + x)) {
1672 mb_x, mb_y, is_vp7);
1677 xchg_mb_border(s->top_border[mb_x + 1], dst[0], dst[1], dst[2],
1678 s->linesize, s->uvlinesize, mb_x, mb_y, s->mb_width,
1852 void prefetch_motion(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y,
1857 int x_off = mb_x << 4, y_off = mb_y << 4;
1861 int off = mx + (my + (mb_x & 3) * 4) * s->linesize + 64;
1866 off = (mx >> 1) + ((my >> 1) + (mb_x & 7)) * s->uvlinesize + 64;
1876 VP8Macroblock *mb, int mb_x, int mb_y)
1878 int x_off = mb_x << 4, y_off = mb_y << 4;
2055 int mb_x, int mb_y, int is_vp7)
2089 if (mb_x) {
2142 int mb_x, int mb_y)
2156 if (mb_x)
2179 int mb_x, mb_y;
2192 for (mb_x = 0; mb_x < s->mb_width; mb_x++, mb_xy++, mb++) {
2196 decode_mb_mode(s, mb, mb_x, mb_y, curframe->seg_map->data + mb_xy,
2236 #define update_pos(td, mb_y, mb_x) \
2238 int pos = (mb_y << 16) | (mb_x & 0xFFFF); \
2256 #define update_pos(td, mb_y, mb_x)
2265 int mb_x, mb_xy = mb_y * s->mb_width;
2302 for (mb_x = 0; mb_x < s->mb_width; mb_x++, mb_xy++, mb++) {
2303 // Wait for previous thread to read mb_x+2, and reach mb_y-1.
2307 mb_x + (is_vp7 ? 2 : 1),
2311 mb_x + (is_vp7 ? 2 : 1) + s->mb_width + 3,
2316 s->vdsp.prefetch(dst[0] + (mb_x & 3) * 4 * s->linesize + 64,
2318 s->vdsp.prefetch(dst[1] + (mb_x & 7) * s->uvlinesize + 64,
2322 decode_mb_mode(s, mb, mb_x, mb_y, curframe->seg_map->data + mb_xy,
2326 prefetch_motion(s, mb, mb_x, mb_y, mb_xy, VP56_FRAME_PREVIOUS);
2329 decode_mb_coeffs(s, td, c, mb, s->top_nnz[mb_x], td->left_nnz, is_vp7);
2332 intra_predict(s, td, dst, mb, mb_x, mb_y, is_vp7);
2334 inter_predict(s, td, dst, mb, mb_x, mb_y);
2336 prefetch_motion(s, mb, mb_x, mb_y, mb_xy, VP56_FRAME_GOLDEN);
2342 AV_WN64(s->top_nnz[mb_x], 0); // array of 9, so unaligned
2348 s->top_nnz[mb_x][8] = 0;
2353 filter_level_for_mb(s, mb, &td->filter_strength[mb_x], is_vp7);
2357 backup_mb_border(s->top_border[mb_x + 1], dst[0],
2360 backup_mb_border(s->top_border[mb_x + 1], dst[0],
2364 prefetch_motion(s, mb, mb_x, mb_y, mb_xy, VP56_FRAME_GOLDEN2);
2372 if (mb_x == s->mb_width + 1) {
2375 update_pos(td, mb_y, mb_x);
2397 int mb_x, mb_y = td->thread_mb_pos >> 16, num_jobs = s->num_jobs;
2421 for (mb_x = 0; mb_x < s->mb_width; mb_x++, mb++) {
2422 VP8FilterStrength *f = &td->filter_strength[mb_x];
2425 (mb_x + 1) + (s->mb_width + 3), mb_y - 1);
2428 check_thread_pos(td, next_td, mb_x + 1, mb_y + 1);
2432 backup_mb_border(s->top_border[mb_x + 1], dst[0],
2435 backup_mb_border(s->top_border[mb_x + 1], dst[0],
2440 filter_mb_simple(s, dst[0], f, mb_x, mb_y);
2442 filter_mb(s, dst, f, mb_x, mb_y, is_vp7);
2447 update_pos(td, mb_y, (s->mb_width + 3) + mb_x);