summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.c
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2013-06-26 17:06:25 +0100
committerPaul Wilkins <paulwilkins@google.com>2013-06-26 19:48:39 +0100
commit9f3ab83486e5259293b8074600019d4e38f3eae2 (patch)
tree8a3b7be90a9c4ae12220afbc9447028600b5b11b /vp9/encoder/vp9_rdopt.c
parent689957e3ad60b46ec8e22665f0d95d03c50f100e (diff)
downloadlibvpx-9f3ab83486e5259293b8074600019d4e38f3eae2.tar
libvpx-9f3ab83486e5259293b8074600019d4e38f3eae2.tar.gz
libvpx-9f3ab83486e5259293b8074600019d4e38f3eae2.tar.bz2
libvpx-9f3ab83486e5259293b8074600019d4e38f3eae2.zip
Auto adapt step size feature.
Also tweaks to other features and experiments with what is on and off at different speed settings. Change-Id: I3e1d0be0d195216bf17c2ac5df67f34ce0b306b2
Diffstat (limited to 'vp9/encoder/vp9_rdopt.c')
-rw-r--r--vp9/encoder/vp9_rdopt.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index dc3536387..381c85c23 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -228,7 +228,10 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int qindex) {
}
cpi->rd_baseline_thresh[bsize][i] = cpi->rd_threshes[bsize][i];
- cpi->rd_thresh_freq_fact[bsize][i] = MAX_RD_THRESH_FREQ_FACT;
+ if (cpi->sf.adpative_rd_thresh)
+ cpi->rd_thresh_freq_fact[bsize][i] = MAX_RD_THRESH_FREQ_FACT;
+ else
+ cpi->rd_thresh_freq_fact[bsize][i] = BASE_RD_THRESH_FREQ_FACT;
}
}
} else {
@@ -248,7 +251,11 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int qindex) {
cpi->rd_threshes[bsize][i] = INT_MAX;
}
cpi->rd_baseline_thresh[bsize][i] = cpi->rd_threshes[bsize][i];
- cpi->rd_thresh_freq_fact[bsize][i] = MAX_RD_THRESH_FREQ_FACT;
+
+ if (cpi->sf.adpative_rd_thresh)
+ cpi->rd_thresh_freq_fact[bsize][i] = MAX_RD_THRESH_FREQ_FACT;
+ else
+ cpi->rd_thresh_freq_fact[bsize][i] = BASE_RD_THRESH_FREQ_FACT;
}
}
}
@@ -2018,8 +2025,14 @@ static void single_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
vp9_clamp_mv_min_max(x, &ref_mv);
- step_param = vp9_init_search_range(
- cpi, MIN(cpi->common.width, cpi->common.height));
+ // Work out the size of the first step in the mv step search.
+ // 0 here is maximum length first step. 1 is MAX >> 1 etc.
+ if (cpi->sf.auto_mv_step_size && cpi->common.show_frame) {
+ step_param = vp9_init_search_range(cpi, cpi->max_mv_magnitude);
+ } else {
+ step_param = vp9_init_search_range(
+ cpi, MIN(cpi->common.width, cpi->common.height));
+ }
// mvp_full.as_int = ref_mv[0].as_int;
mvp_full.as_int =