summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_speed_features.h
diff options
context:
space:
mode:
authorpaulwilkins <paulwilkins@google.com>2015-10-14 10:38:49 +0100
committerpaulwilkins <paulwilkins@google.com>2015-11-13 10:16:31 +0000
commit0149fb3d6b24f1df7f215ca12a2d8c8f70fd64f3 (patch)
tree45566ba550821b5b121db1d60293c5751fd72a48 /vp9/encoder/vp9_speed_features.h
parent75017283277e3e2aa5fba99260b56396b295f8e8 (diff)
downloadlibvpx-0149fb3d6b24f1df7f215ca12a2d8c8f70fd64f3.tar
libvpx-0149fb3d6b24f1df7f215ca12a2d8c8f70fd64f3.tar.gz
libvpx-0149fb3d6b24f1df7f215ca12a2d8c8f70fd64f3.tar.bz2
libvpx-0149fb3d6b24f1df7f215ca12a2d8c8f70fd64f3.zip
Changes to exhaustive motion search.
This change 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 clips though the quality gain and speed impact are small. Change-Id: Id22967a840e996e1db273f6ac4ff03f4f52d49aa
Diffstat (limited to 'vp9/encoder/vp9_speed_features.h')
-rw-r--r--vp9/encoder/vp9_speed_features.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_speed_features.h b/vp9/encoder/vp9_speed_features.h
index 575e98cf5..e674a4f91 100644
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -195,6 +195,13 @@ typedef struct MV_SPEED_FEATURES {
int fullpel_search_step_param;
} MV_SPEED_FEATURES;
+#define MAX_MESH_STEP 6
+
+typedef struct MESH_PATTERN {
+ int range;
+ int interval;
+} MESH_PATTERN;
+
typedef struct SPEED_FEATURES {
MV_SPEED_FEATURES mv;
@@ -299,6 +306,18 @@ typedef struct SPEED_FEATURES {
// point for this motion search and limits the search range around it.
int adaptive_motion_search;
+ // Flag for allowing some use of exhaustive searches;
+ int allow_exhaustive_searches;
+
+ // Threshold for allowing exhaistive motion search.
+ int exhaustive_searches_thresh;
+
+ // Maximum number of exhaustive searches for a frame.
+ int max_exaustive_pct;
+
+ // Pattern to be used for any exhaustive mesh searches.
+ MESH_PATTERN mesh_patterns[MAX_MESH_STEP];
+
int schedule_mode_search;
// Allows sub 8x8 modes to use the prediction filter that was determined