Unified · Split
| @@ -820,6 +820,8 @@ void vp9_first_pass_encode_tile_mb_row(VP9_COMP *cpi, ThreadData *td, · 819 unmodified lines | |||
| 820 | VP9_COMMON *const cm = &cpi->common; | 820 | VP9_COMMON *const cm = &cpi->common; |
| 821 | MACROBLOCKD *const xd = &x->e_mbd; | 821 | MACROBLOCKD *const xd = &x->e_mbd; |
| 822 | TileInfo tile = tile_data->tile_info; | 822 | TileInfo tile = tile_data->tile_info; |
| 823 | const int mb_col_start = ROUND_POWER_OF_TWO(tile.mi_col_start, 1); | ||
| 824 | const int mb_col_end = ROUND_POWER_OF_TWO(tile.mi_col_end, 1); | ||
| 823 | struct macroblock_plane *const p = x->plane; | 825 | struct macroblock_plane *const p = x->plane; |
| 824 | struct macroblockd_plane *const pd = xd->plane; | 826 | struct macroblockd_plane *const pd = xd->plane; |
| 825 | const PICK_MODE_CONTEXT *ctx = &td->pc_root->none; | 827 | const PICK_MODE_CONTEXT *ctx = &td->pc_root->none; |
| @@ -846,9 +848,8 @@ void vp9_first_pass_encode_tile_mb_row(VP9_COMP *cpi, ThreadData *td, · 20 unmodified lines | |||
| 846 | assert(new_yv12 != NULL); | 848 | assert(new_yv12 != NULL); |
| 847 | assert(frame_is_intra_only(cm) || (lst_yv12 != NULL)); | 849 | assert(frame_is_intra_only(cm) || (lst_yv12 != NULL)); |
| 848 | 850 | ||
| 849 | xd->mi = cm->mi_grid_visible + xd->mi_stride * (mb_row << 1) + | 851 | xd->mi = cm->mi_grid_visible + xd->mi_stride * (mb_row << 1) + mb_col_start; |
| 850 | (tile.mi_col_start >> 1); | 852 | xd->mi[0] = cm->mi + xd->mi_stride * (mb_row << 1) + mb_col_start; |
| 851 | xd->mi[0] = cm->mi + xd->mi_stride * (mb_row << 1) + (tile.mi_col_start >> 1); | ||
| 852 | 853 | ||
| 853 | for (i = 0; i < MAX_MB_PLANE; ++i) { | 854 | for (i = 0; i < MAX_MB_PLANE; ++i) { |
| 854 | p[i].coeff = ctx->coeff_pbuf[i][1]; | 855 | p[i].coeff = ctx->coeff_pbuf[i][1]; |
| @@ -862,10 +863,9 @@ void vp9_first_pass_encode_tile_mb_row(VP9_COMP *cpi, ThreadData *td, · 7 unmodified lines | |||
| 862 | uv_mb_height = 16 >> (new_yv12->y_height > new_yv12->uv_height); | 863 | uv_mb_height = 16 >> (new_yv12->y_height > new_yv12->uv_height); |
| 863 | 864 | ||
| 864 | // Reset above block coeffs. | 865 | // Reset above block coeffs. |
| 865 | recon_yoffset = | 866 | recon_yoffset = (mb_row * recon_y_stride * 16) + mb_col_start * 16; |
| 866 | (mb_row * recon_y_stride * 16) + (tile.mi_col_start >> 1) * 16; | 867 | recon_uvoffset = |
| 867 | recon_uvoffset = (mb_row * recon_uv_stride * uv_mb_height) + | 868 | (mb_row * recon_uv_stride * uv_mb_height) + mb_col_start * uv_mb_height; |
| 868 | (tile.mi_col_start >> 1) * uv_mb_height; | ||
| 869 | 869 | ||
| 870 | // Set up limit values for motion vectors to prevent them extending | 870 | // Set up limit values for motion vectors to prevent them extending |
| 871 | // outside the UMV borders. | 871 | // outside the UMV borders. |
| @@ -873,8 +873,7 @@ void vp9_first_pass_encode_tile_mb_row(VP9_COMP *cpi, ThreadData *td, · 1 unmodified line | |||
| 873 | x->mv_limits.row_max = | 873 | x->mv_limits.row_max = |
| 874 | ((cm->mb_rows - 1 - mb_row) * 16) + BORDER_MV_PIXELS_B16; | 874 | ((cm->mb_rows - 1 - mb_row) * 16) + BORDER_MV_PIXELS_B16; |
| 875 | 875 | ||
| 876 | for (mb_col = tile.mi_col_start >> 1, c = 0; mb_col < (tile.mi_col_end >> 1); | 876 | for (mb_col = mb_col_start, c = 0; mb_col < mb_col_end; ++mb_col, c++) { |
| 877 | ++mb_col, c++) { | ||
| 878 | int this_error; | 877 | int this_error; |
| 879 | int this_intra_error; | 878 | int this_intra_error; |
| 880 | const int use_dc_pred = (mb_col || mb_row) && (!mb_col || !mb_row); | 879 | const int use_dc_pred = (mb_col || mb_row) && (!mb_col || !mb_row); |
| @@ -920,7 +919,7 @@ void vp9_first_pass_encode_tile_mb_row(VP9_COMP *cpi, ThreadData *td, · 39 unmodified lines | |||
| 920 | x->skip_encode = 0; | 919 | x->skip_encode = 0; |
| 921 | x->fp_src_pred = 0; | 920 | x->fp_src_pred = 0; |
| 922 | // Do intra prediction based on source pixels for tile boundaries | 921 | // Do intra prediction based on source pixels for tile boundaries |
| 923 | if ((mb_col == (tile.mi_col_start >> 1)) && mb_col != 0) { | 922 | if (mb_col == mb_col_start && mb_col != 0) { |
| 924 | xd->left_mi = &mi_left; | 923 | xd->left_mi = &mi_left; |
| 925 | x->fp_src_pred = 1; | 924 | x->fp_src_pred = 1; |
| 926 | } | 925 | } |
| @@ -1310,7 +1309,7 @@ void vp9_first_pass_encode_tile_mb_row(VP9_COMP *cpi, ThreadData *td, · 383 unmodified lines | |||
| 1310 | recon_uvoffset += uv_mb_height; | 1309 | recon_uvoffset += uv_mb_height; |
| 1311 | 1310 | ||
| 1312 | // Accumulate row level stats to the corresponding tile stats | 1311 | // Accumulate row level stats to the corresponding tile stats |
| 1313 | if (cpi->row_mt && mb_col == (tile.mi_col_end >> 1) - 1) | 1312 | if (cpi->row_mt && mb_col == mb_col_end - 1) |
| 1314 | accumulate_fp_mb_row_stat(tile_data, fp_acc_data); | 1313 | accumulate_fp_mb_row_stat(tile_data, fp_acc_data); |
| 1315 | 1314 | ||
| 1316 | (*(cpi->row_mt_sync_write_ptr))(&tile_data->row_mt_sync, mb_row, c, | 1315 | (*(cpi->row_mt_sync_write_ptr))(&tile_data->row_mt_sync, mb_row, c, |