summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_ratectrl.c
diff options
context:
space:
mode:
authorpaulwilkins <paulwilkins@google.com>2015-12-08 15:48:24 +0000
committerpaulwilkins <paulwilkins@google.com>2015-12-08 16:54:42 +0000
commit4e692bbee29d1566e43ed4499249651d4c01f9c4 (patch)
tree026c07c829b65d4b499dc72723904f7bf12a7229 /vp9/encoder/vp9_ratectrl.c
parent9d85ce8e0cc588629650690a5fa0ed559ed77d30 (diff)
downloadlibvpx-4e692bbee29d1566e43ed4499249651d4c01f9c4.tar
libvpx-4e692bbee29d1566e43ed4499249651d4c01f9c4.tar.gz
libvpx-4e692bbee29d1566e43ed4499249651d4c01f9c4.tar.bz2
libvpx-4e692bbee29d1566e43ed4499249651d4c01f9c4.zip
Changes to exhaustive motion search.
This change has been imported from VP9 and alters the nature and use of exhaustive motion search. Firstly any exhaustive search is preceded by a normal step search. The exhaustive search is only carried out if the distortion resulting from the step search is above a threshold value. Secondly the simple +/- 64 exhaustive search is replaced by a multi stage mesh based search where each stage has a range and step/interval size. Subsequent stages use the best position from the previous stage as the center of the search but use a reduced range and interval size. For example: stage 1: Range +/- 64 interval 4 stage 2: Range +/- 32 interval 2 stage 3: Range +/- 15 interval 1 This process, especially when it follows on from a normal step search, has shown itself to be almost as effective as a full range exhaustive search with step 1 but greatly lowers the computational complexity such that it can be used in some cases for speeds 0-2. This patch also removes a double exhaustive search for sub 8x8 blocks which also contained a bug (the two searches used different distortion metrics). For best quality in my test animation sequence this patch has almost no impact on quality but improves encode speed by more than 5X. Restricted use in good quality speeds 0-2 yields significant quality gains on the animation test of 0.2 - 0.5 db with only a small impact on encode speed. On most natural video clips, however, where the step search is performing well, the quality gain and speed impact are small. Change-Id: Iac24152ae239f42a246f39ee5f00fe62d193cb98
Diffstat (limited to 'vp9/encoder/vp9_ratectrl.c')
-rw-r--r--vp9/encoder/vp9_ratectrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 45445df8d..8ab51cd20 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1075,7 +1075,7 @@ static int rc_pick_q_and_bounds_two_pass(const VP9_COMP *cpi,
if (!cpi->refresh_alt_ref_frame) {
active_best_quality = cq_level;
} else {
- active_best_quality = get_gf_active_quality(rc, q, cm->bit_depth);
+ active_best_quality = get_gf_active_quality(rc, q, cm->bit_depth);
// Modify best quality for second level arfs. For mode VPX_Q this
// becomes the baseline frame q.