ref: 46ce6ddec408c41a68a81b3af563d073c45e3cc3
parent: e3168b0c54d2fd7371f65e347add93bf9b2fafc4
parent: bbe68fbd2a6c2c300568c19a09fb33b019502368
author: Jingning Han <[email protected]>
date: Mon Nov 18 07:35:34 EST 2013
Merge "Constrain encoder motion search range"
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -406,8 +406,6 @@
// for first pass test
while ((quart_frm << sr) < MAX_FULL_PEL_VAL)
sr++;
- if (sr)
- sr--;
step_param += sr;
further_steps -= sr;
--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -51,9 +51,6 @@
while ((size << sr) < MAX_FULL_PEL_VAL)
sr++;
- if (sr)
- sr--;
-
sr += cpi->sf.reduce_first_step_size;
sr = MIN(sr, (cpi->sf.max_step_search_steps - 2));
return sr;
--- a/vp9/encoder/vp9_mcomp.h
+++ b/vp9/encoder/vp9_mcomp.h
@@ -18,8 +18,9 @@
// The maximum number of steps in a step search given the largest
// allowed initial step
#define MAX_MVSEARCH_STEPS 11
-// Max full pel mv specified in 1 pel units
-#define MAX_FULL_PEL_VAL ((1 << (MAX_MVSEARCH_STEPS)) - 1)
+// Max full pel mv specified in the unit of full pixel
+// Enable the use of motion vector in range [-1023, 1023].
+#define MAX_FULL_PEL_VAL ((1 << (MAX_MVSEARCH_STEPS - 1)) - 1)
// Maximum size of the first step in full pel units
#define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1))
// Allowed motion vector pixel distance outside image border