add --enable-mv-compress to reduce the storage of temporal mv candidate

Change-Id: I5a2469d10f7295f1b8a6bea64e36b8325c8dca22
This commit is contained in:
zhipin deng 2017-02-17 17:49:03 +08:00
Родитель 4e6a8f301d
Коммит eb019b877c
2 изменённых файлов: 29 добавлений и 0 удалений

Просмотреть файл

@ -361,8 +361,13 @@ static int add_col_ref_mv(const AV1_COMMON *cm,
int coll_blk_count = 0;
const int weight_unit = mi_size_wide[BLOCK_8X8];
#if CONFIG_MV_COMPRESS
mi_pos.row = (mi_row & 0x01) ? blk_row : blk_row + 1;
mi_pos.col = (mi_col & 0x01) ? blk_col : blk_col + 1;
#else
mi_pos.row = blk_row;
mi_pos.col = blk_col;
#endif
#if CONFIG_DEPENDENT_HORZTILES
if (!is_inside(&xd->tile, mi_col, mi_row, cm->mi_rows,
@ -410,10 +415,18 @@ static void setup_ref_mv_list(const AV1_COMMON *cm, const MACROBLOCKD *xd,
CANDIDATE_MV tmp_mv;
int len, nr_len;
#if CONFIG_MV_COMPRESS
const MV_REF *const prev_frame_mvs_base =
cm->use_prev_frame_mvs
? cm->prev_frame->mvs + (((mi_row >> 1) << 1) + 1) * cm->mi_cols +
((mi_col >> 1) << 1) + 1
: NULL;
#else
const MV_REF *const prev_frame_mvs_base =
cm->use_prev_frame_mvs
? cm->prev_frame->mvs + mi_row * cm->mi_cols + mi_col
: NULL;
#endif
const int bs = AOMMAX(xd->n8_w, xd->n8_h);
const int has_tr = has_top_right(xd, mi_row, mi_col, bs);
@ -592,10 +605,25 @@ static void find_mv_refs_idx(const AV1_COMMON *cm, const MACROBLOCKD *xd,
#endif
int different_ref_found = 0;
int context_counter = 0;
#if CONFIG_MV_COMPRESS
const TileInfo *const tile_ = &xd->tile;
int mi_row_end = tile_->mi_row_end;
int mi_col_end = tile_->mi_col_end;
const MV_REF *const prev_frame_mvs =
cm->use_prev_frame_mvs
? cm->prev_frame->mvs +
AOMMIN(((mi_row >> 1) << 1) + 1 + (((xd->n8_h - 1) >> 1) << 1),
mi_row_end - 1) *
cm->mi_cols +
AOMMIN(((mi_col >> 1) << 1) + 1 + (((xd->n8_w - 1) >> 1) << 1),
mi_col_end - 1)
: NULL;
#else
const MV_REF *const prev_frame_mvs =
cm->use_prev_frame_mvs
? cm->prev_frame->mvs + mi_row * cm->mi_cols + mi_col
: NULL;
#endif
const TileInfo *const tile = &xd->tile;
const BLOCK_SIZE bsize = mi->mbmi.sb_type;
const int bw = block_size_wide[AOMMAX(bsize, BLOCK_8X8)];

1
configure поставляемый
Просмотреть файл

@ -311,6 +311,7 @@ EXPERIMENT_LIST="
palette_throughput
ref_adapt
lv_map
mv_compress
"
CONFIG_LIST="
dependency_tracking