Commit 359a6796 authored by Ranjit Kumar Tulabandu's avatar Ranjit Kumar Tulabandu Committed by Yunqing Wang

Changes to facilitate row based multi-threading of ARNR filtering

Change-Id: I2fd72af00afbbeb903e4fe364611abcc148f2fbb
parent 106c620a
......@@ -420,6 +420,14 @@ typedef struct {
double max_cpb_size; // in bits
} LevelConstraint;
typedef struct ARNRFilterData {
YV12_BUFFER_CONFIG *frames[MAX_LAG_BUFFERS];
int strength;
int frame_count;
int alt_ref_index;
struct scale_factors sf;
} ARNRFilterData;
typedef struct VP9_COMP {
QUANTS quants;
ThreadData td;
......@@ -662,6 +670,7 @@ typedef struct VP9_COMP {
MultiThreadHandle multi_thread_ctxt;
void (*row_mt_sync_read_ptr)(VP9RowMTSync *const, int, int);
void (*row_mt_sync_write_ptr)(VP9RowMTSync *const, int, int, const int);
ARNRFilterData arnr_filter_data;
int new_mt;
// Previous Partition Info
......
......@@ -45,8 +45,8 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, const MV *ref_mv,
mv_sf->search_method = HEX;
vp9_full_pixel_search(cpi, x, BLOCK_16X16, &ref_full, step_param,
x->errorperbit, cond_cost_list(cpi, cost_list), ref_mv,
dst_mv, 0, 0);
cpi->sf.mv.search_method, x->errorperbit,
cond_cost_list(cpi, cost_list), ref_mv, dst_mv, 0, 0);
mv_sf->search_method = old_search_method;
// Try sub-pixel MC
......
......@@ -2364,11 +2364,11 @@ static int is_exhaustive_allowed(VP9_COMP *cpi, MACROBLOCK *x) {
}
int vp9_full_pixel_search(VP9_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize,
MV *mvp_full, int step_param, int error_per_bit,
int *cost_list, const MV *ref_mv, MV *tmp_mv,
int var_max, int rd) {
MV *mvp_full, int step_param, int search_method,
int error_per_bit, int *cost_list, const MV *ref_mv,
MV *tmp_mv, int var_max, int rd) {
const SPEED_FEATURES *const sf = &cpi->sf;
const SEARCH_METHODS method = sf->mv.search_method;
const SEARCH_METHODS method = (SEARCH_METHODS)search_method;
vp9_variance_fn_ptr_t *fn_ptr = &cpi->fn_ptr[bsize];
int var = 0;
if (cost_list) {
......
......@@ -105,9 +105,9 @@ int vp9_refining_search_8p_c(const MACROBLOCK *x, MV *ref_mv, int error_per_bit,
struct VP9_COMP;
int vp9_full_pixel_search(struct VP9_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize,
MV *mvp_full, int step_param, int error_per_bit,
int *cost_list, const MV *ref_mv, MV *tmp_mv,
int var_max, int rd);
MV *mvp_full, int step_param, int search_method,
int error_per_bit, int *cost_list, const MV *ref_mv,
MV *tmp_mv, int var_max, int rd);
#ifdef __cplusplus
} // extern "C"
......
......@@ -184,9 +184,9 @@ static int combined_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
else
center_mv = tmp_mv->as_mv;
vp9_full_pixel_search(cpi, x, bsize, &mvp_full, step_param, sadpb,
cond_cost_list(cpi, cost_list), &center_mv,
&tmp_mv->as_mv, INT_MAX, 0);
vp9_full_pixel_search(
cpi, x, bsize, &mvp_full, step_param, cpi->sf.mv.search_method, sadpb,
cond_cost_list(cpi, cost_list), &center_mv, &tmp_mv->as_mv, INT_MAX, 0);
x->mv_limits = tmp_mv_limits;
......@@ -2260,10 +2260,10 @@ void vp9_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x, int mi_row,
vp9_set_mv_search_range(&x->mv_limits,
&mbmi_ext->ref_mvs[0]->as_mv);
vp9_full_pixel_search(cpi, x, bsize, &mvp_full, step_param,
x->sadperbit4, cond_cost_list(cpi, cost_list),
&mbmi_ext->ref_mvs[ref_frame][0].as_mv,
&tmp_mv, INT_MAX, 0);
vp9_full_pixel_search(
cpi, x, bsize, &mvp_full, step_param, cpi->sf.mv.search_method,
x->sadperbit4, cond_cost_list(cpi, cost_list),
&mbmi_ext->ref_mvs[ref_frame][0].as_mv, &tmp_mv, INT_MAX, 0);
x->mv_limits = tmp_mv_limits;
......
......@@ -1998,7 +1998,8 @@ static int64_t rd_pick_best_sub8x8_mode(
vp9_set_mv_search_range(&x->mv_limits, &bsi->ref_mv[0]->as_mv);
bestsme = vp9_full_pixel_search(
cpi, x, bsize, &mvp_full, step_param, sadpb,
cpi, x, bsize, &mvp_full, step_param, cpi->sf.mv.search_method,
sadpb,
sf->mv.subpel_search_method != SUBPEL_TREE ? cost_list : NULL,
&bsi->ref_mv[0]->as_mv, new_mv, INT_MAX, 1);
......@@ -2403,9 +2404,9 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize,
mvp_full.col >>= 3;
mvp_full.row >>= 3;
bestsme = vp9_full_pixel_search(cpi, x, bsize, &mvp_full, step_param, sadpb,
cond_cost_list(cpi, cost_list), &ref_mv,
&tmp_mv->as_mv, INT_MAX, 1);
bestsme = vp9_full_pixel_search(
cpi, x, bsize, &mvp_full, step_param, cpi->sf.mv.search_method, sadpb,
cond_cost_list(cpi, cost_list), &ref_mv, &tmp_mv->as_mv, INT_MAX, 1);
x->mv_limits = tmp_mv_limits;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment