Merge "Break tile row dependencies." into nextgenv2
This commit is contained in:
Коммит
61ac55314d
|
@ -173,7 +173,7 @@ static uint8_t scan_row_mbmi(const VP10_COMMON *cm, const MACROBLOCKD *xd,
|
|||
mi_pos.row = row_offset;
|
||||
mi_pos.col = i;
|
||||
|
||||
if (is_inside(tile, mi_col, mi_row, cm->mi_rows, &mi_pos)) {
|
||||
if (is_inside(tile, mi_col, mi_row, &mi_pos)) {
|
||||
const MODE_INFO *const candidate_mi =
|
||||
xd->mi[mi_pos.row * xd->mi_stride + mi_pos.col];
|
||||
const MB_MODE_INFO *const candidate = &candidate_mi->mbmi;
|
||||
|
@ -208,7 +208,7 @@ static uint8_t scan_col_mbmi(const VP10_COMMON *cm, const MACROBLOCKD *xd,
|
|||
mi_pos.row = i;
|
||||
mi_pos.col = col_offset;
|
||||
|
||||
if (is_inside(tile, mi_col, mi_row, cm->mi_rows, &mi_pos)) {
|
||||
if (is_inside(tile, mi_col, mi_row, &mi_pos)) {
|
||||
const MODE_INFO *const candidate_mi =
|
||||
xd->mi[mi_pos.row * xd->mi_stride + mi_pos.col];
|
||||
const MB_MODE_INFO *const candidate = &candidate_mi->mbmi;
|
||||
|
@ -241,7 +241,7 @@ static uint8_t scan_blk_mbmi(const VP10_COMMON *cm, const MACROBLOCKD *xd,
|
|||
mi_pos.row = row_offset;
|
||||
mi_pos.col = col_offset;
|
||||
|
||||
if (is_inside(tile, mi_col, mi_row, cm->mi_rows, &mi_pos) &&
|
||||
if (is_inside(tile, mi_col, mi_row, &mi_pos) &&
|
||||
*refmv_count < MAX_REF_MV_STACK_SIZE) {
|
||||
const MODE_INFO *const candidate_mi =
|
||||
xd->mi[mi_pos.row * xd->mi_stride + mi_pos.col];
|
||||
|
@ -387,7 +387,7 @@ static void setup_ref_mv_list(const VP10_COMMON *cm, const MACROBLOCKD *xd,
|
|||
mi_pos.row = blk_row;
|
||||
mi_pos.col = blk_col;
|
||||
|
||||
if (!is_inside(&xd->tile, mi_col, mi_row, cm->mi_rows, &mi_pos))
|
||||
if (!is_inside(&xd->tile, mi_col, mi_row, &mi_pos))
|
||||
continue;
|
||||
|
||||
for (ref = 0; ref < 2; ++ref) {
|
||||
|
@ -565,7 +565,7 @@ static void find_mv_refs_idx(const VP10_COMMON *cm, const MACROBLOCKD *xd,
|
|||
// and we also need to keep a mode count.
|
||||
for (i = 0; i < 2; ++i) {
|
||||
const POSITION *const mv_ref = &mv_ref_search[i];
|
||||
if (is_inside(tile, mi_col, mi_row, cm->mi_rows, mv_ref)) {
|
||||
if (is_inside(tile, mi_col, mi_row, mv_ref)) {
|
||||
const MODE_INFO *const candidate_mi = xd->mi[mv_ref->col + mv_ref->row *
|
||||
xd->mi_stride];
|
||||
const MB_MODE_INFO *const candidate = &candidate_mi->mbmi;
|
||||
|
@ -587,7 +587,7 @@ static void find_mv_refs_idx(const VP10_COMMON *cm, const MACROBLOCKD *xd,
|
|||
// mode counts.
|
||||
for (; i < MVREF_NEIGHBOURS; ++i) {
|
||||
const POSITION *const mv_ref = &mv_ref_search[i];
|
||||
if (is_inside(tile, mi_col, mi_row, cm->mi_rows, mv_ref)) {
|
||||
if (is_inside(tile, mi_col, mi_row, mv_ref)) {
|
||||
const MB_MODE_INFO *const candidate = &xd->mi[mv_ref->col + mv_ref->row *
|
||||
xd->mi_stride]->mbmi;
|
||||
different_ref_found = 1;
|
||||
|
@ -633,7 +633,7 @@ static void find_mv_refs_idx(const VP10_COMMON *cm, const MACROBLOCKD *xd,
|
|||
if (different_ref_found) {
|
||||
for (i = 0; i < MVREF_NEIGHBOURS; ++i) {
|
||||
const POSITION *mv_ref = &mv_ref_search[i];
|
||||
if (is_inside(tile, mi_col, mi_row, cm->mi_rows, mv_ref)) {
|
||||
if (is_inside(tile, mi_col, mi_row, mv_ref)) {
|
||||
const MB_MODE_INFO *const candidate = &xd->mi[mv_ref->col + mv_ref->row
|
||||
* xd->mi_stride]->mbmi;
|
||||
|
||||
|
@ -678,7 +678,7 @@ Done:
|
|||
|
||||
#if CONFIG_EXT_INTER
|
||||
// This function keeps a mode count for a given MB/SB
|
||||
void vp10_update_mv_context(const VP10_COMMON *cm, const MACROBLOCKD *xd,
|
||||
void vp10_update_mv_context(const MACROBLOCKD *xd,
|
||||
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
|
||||
int_mv *mv_ref_list,
|
||||
int block, int mi_row, int mi_col,
|
||||
|
@ -697,7 +697,7 @@ void vp10_update_mv_context(const VP10_COMMON *cm, const MACROBLOCKD *xd,
|
|||
// If the size < 8x8, we get the mv from the bmi substructure;
|
||||
for (i = 0; i < 2; ++i) {
|
||||
const POSITION *const mv_ref = &mv_ref_search[i];
|
||||
if (is_inside(tile, mi_col, mi_row, cm->mi_rows, mv_ref)) {
|
||||
if (is_inside(tile, mi_col, mi_row, mv_ref)) {
|
||||
const MODE_INFO *const candidate_mi =
|
||||
xd->mi[mv_ref->col + mv_ref->row * xd->mi_stride];
|
||||
const MB_MODE_INFO *const candidate = &candidate_mi->mbmi;
|
||||
|
@ -739,7 +739,7 @@ void vp10_find_mv_refs(const VP10_COMMON *cm, const MACROBLOCKD *xd,
|
|||
int idx, all_zero = 1;
|
||||
#endif
|
||||
#if CONFIG_EXT_INTER
|
||||
vp10_update_mv_context(cm, xd, mi, ref_frame, mv_ref_list, -1,
|
||||
vp10_update_mv_context(xd, mi, ref_frame, mv_ref_list, -1,
|
||||
mi_row, mi_col,
|
||||
#if CONFIG_REF_MV
|
||||
compound_mode_context);
|
||||
|
|
|
@ -223,20 +223,12 @@ static INLINE int_mv scale_mv(const MB_MODE_INFO *mbmi, int ref,
|
|||
// Checks that the given mi_row, mi_col and search point
|
||||
// are inside the borders of the tile.
|
||||
static INLINE int is_inside(const TileInfo *const tile,
|
||||
int mi_col, int mi_row, int mi_rows,
|
||||
int mi_col, int mi_row,
|
||||
const POSITION *mi_pos) {
|
||||
#if CONFIG_EXT_TILE
|
||||
(void) mi_rows;
|
||||
return !(mi_row + mi_pos->row < tile->mi_row_start ||
|
||||
mi_col + mi_pos->col < tile->mi_col_start ||
|
||||
mi_row + mi_pos->row >= tile->mi_row_end ||
|
||||
mi_col + mi_pos->col >= tile->mi_col_end);
|
||||
#else
|
||||
return !(mi_row + mi_pos->row < 0 ||
|
||||
mi_col + mi_pos->col < tile->mi_col_start ||
|
||||
mi_row + mi_pos->row >= mi_rows ||
|
||||
mi_col + mi_pos->col >= tile->mi_col_end);
|
||||
#endif // CONFIG_EXT_TILE
|
||||
}
|
||||
|
||||
static INLINE void lower_mv_precision(MV *mv, int allow_hp) {
|
||||
|
@ -367,7 +359,7 @@ void vp10_append_sub8x8_mvs_for_idx(VP10_COMMON *cm, MACROBLOCKD *xd,
|
|||
|
||||
#if CONFIG_EXT_INTER
|
||||
// This function keeps a mode count for a given MB/SB
|
||||
void vp10_update_mv_context(const VP10_COMMON *cm, const MACROBLOCKD *xd,
|
||||
void vp10_update_mv_context(const MACROBLOCKD *xd,
|
||||
MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame,
|
||||
int_mv *mv_ref_list,
|
||||
int block, int mi_row, int mi_col,
|
||||
|
|
|
@ -466,11 +466,7 @@ static INLINE void set_mi_row_col(MACROBLOCKD *xd, const TileInfo *const tile,
|
|||
xd->mb_to_right_edge = ((mi_cols - bw - mi_col) * MI_SIZE) * 8;
|
||||
|
||||
// Are edges available for intra prediction?
|
||||
#if CONFIG_EXT_TILE
|
||||
xd->up_available = (mi_row > tile->mi_row_start);
|
||||
#else
|
||||
xd->up_available = (mi_row != 0);
|
||||
#endif // CONFIG_EXT_TILE
|
||||
xd->left_available = (mi_col > tile->mi_col_start);
|
||||
if (xd->up_available) {
|
||||
xd->above_mi = xd->mi[-xd->mi_stride];
|
||||
|
|
|
@ -1286,11 +1286,7 @@ void vp10_build_obmc_inter_prediction(VP10_COMMON *cm,
|
|||
const TileInfo *const tile = &xd->tile;
|
||||
BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type;
|
||||
int plane, i, mi_step;
|
||||
#if CONFIG_EXT_TILE
|
||||
int above_available = mi_row > 0 && (mi_row - 1 >= tile->mi_row_start);
|
||||
#else
|
||||
int above_available = mi_row > 0;
|
||||
#endif // CONFIG_EXT_TILE
|
||||
int above_available = mi_row > tile->mi_row_start;
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
int is_hbd = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? 1 : 0;
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
@ -1462,17 +1458,11 @@ void vp10_build_prediction_by_above_preds(VP10_COMMON *cm,
|
|||
int mi_row, int mi_col,
|
||||
uint8_t *tmp_buf[MAX_MB_PLANE],
|
||||
int tmp_stride[MAX_MB_PLANE]) {
|
||||
#if CONFIG_EXT_TILE
|
||||
const TileInfo *const tile = &xd->tile;
|
||||
#endif // CONFIG_EXT_TILE
|
||||
BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type;
|
||||
int i, j, mi_step, ref;
|
||||
|
||||
#if CONFIG_EXT_TILE
|
||||
if (mi_row == 0 || (mi_row - 1) < tile->mi_row_start)
|
||||
#else
|
||||
if (mi_row == 0)
|
||||
#endif // CONFIG_EXT_TILE
|
||||
if (mi_row <= tile->mi_row_start)
|
||||
return;
|
||||
|
||||
for (i = 0; i < VPXMIN(xd->n8_w, cm->mi_cols - mi_col); i += mi_step) {
|
||||
|
|
|
@ -1024,11 +1024,7 @@ static MB_MODE_INFO *set_offsets_extend(VP10_COMMON *const cm,
|
|||
set_mi_row_col(xd, tile, mi_row_pred, bh, mi_col_pred, bw,
|
||||
cm->mi_rows, cm->mi_cols);
|
||||
|
||||
#if CONFIG_EXT_TILE
|
||||
xd->up_available = (mi_row_ori > tile->mi_row_start);
|
||||
#else
|
||||
xd->up_available = (mi_row_ori != 0);
|
||||
#endif // CONFIG_EXT_TILE
|
||||
xd->left_available = (mi_col_ori > tile->mi_col_start);
|
||||
|
||||
set_plane_n4(xd, bw, bh, bwl, bhl);
|
||||
|
|
|
@ -1442,7 +1442,7 @@ static void read_inter_block_mode_info(VP10Decoder *const pbi,
|
|||
#if CONFIG_EXT_INTER
|
||||
{
|
||||
int_mv mv_ref_list[MAX_MV_REF_CANDIDATES];
|
||||
vp10_update_mv_context(cm, xd, mi, mbmi->ref_frame[ref],
|
||||
vp10_update_mv_context(xd, mi, mbmi->ref_frame[ref],
|
||||
mv_ref_list, j, mi_row, mi_col, NULL);
|
||||
#endif // CONFIG_EXT_INTER
|
||||
vp10_append_sub8x8_mvs_for_idx(cm, xd, j, ref, mi_row, mi_col,
|
||||
|
|
|
@ -379,11 +379,7 @@ static void set_offsets_extend(VP10_COMP *cpi, ThreadData *td,
|
|||
assert(!(mi_col_pred & (mi_width - 1)) && !(mi_row_pred & (mi_height - 1)));
|
||||
set_mi_row_col(xd, tile, mi_row_pred, mi_height, mi_col_pred, mi_width,
|
||||
cm->mi_rows, cm->mi_cols);
|
||||
#if CONFIG_EXT_TILE
|
||||
xd->up_available = (mi_row_ori > tile->mi_row_start);
|
||||
#else
|
||||
xd->up_available = (mi_row_ori != 0);
|
||||
#endif // CONFIG_EXT_TILE
|
||||
xd->left_available = (mi_col_ori > tile->mi_col_start);
|
||||
|
||||
// R/D setup.
|
||||
|
|
|
@ -4986,7 +4986,7 @@ static int64_t rd_pick_best_sub8x8_mode(VP10_COMP *cpi, MACROBLOCK *x,
|
|||
const MV_REFERENCE_FRAME frame = mbmi->ref_frame[ref];
|
||||
#if CONFIG_EXT_INTER
|
||||
int_mv mv_ref_list[MAX_MV_REF_CANDIDATES];
|
||||
vp10_update_mv_context(cm, xd, mi, frame, mv_ref_list, i,
|
||||
vp10_update_mv_context(xd, mi, frame, mv_ref_list, i,
|
||||
mi_row, mi_col, NULL);
|
||||
#endif // CONFIG_EXT_INTER
|
||||
frame_mv[ZEROMV][frame].as_int = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче