Merge "Constrain encoder motion search range"
This commit is contained in:
@@ -406,8 +406,6 @@ static void first_pass_motion_search(VP9_COMP *cpi, MACROBLOCK *x,
|
|||||||
// for first pass test
|
// for first pass test
|
||||||
while ((quart_frm << sr) < MAX_FULL_PEL_VAL)
|
while ((quart_frm << sr) < MAX_FULL_PEL_VAL)
|
||||||
sr++;
|
sr++;
|
||||||
if (sr)
|
|
||||||
sr--;
|
|
||||||
|
|
||||||
step_param += sr;
|
step_param += sr;
|
||||||
further_steps -= sr;
|
further_steps -= sr;
|
||||||
|
@@ -51,9 +51,6 @@ int vp9_init_search_range(VP9_COMP *cpi, int size) {
|
|||||||
while ((size << sr) < MAX_FULL_PEL_VAL)
|
while ((size << sr) < MAX_FULL_PEL_VAL)
|
||||||
sr++;
|
sr++;
|
||||||
|
|
||||||
if (sr)
|
|
||||||
sr--;
|
|
||||||
|
|
||||||
sr += cpi->sf.reduce_first_step_size;
|
sr += cpi->sf.reduce_first_step_size;
|
||||||
sr = MIN(sr, (cpi->sf.max_step_search_steps - 2));
|
sr = MIN(sr, (cpi->sf.max_step_search_steps - 2));
|
||||||
return sr;
|
return sr;
|
||||||
|
@@ -18,8 +18,9 @@
|
|||||||
// The maximum number of steps in a step search given the largest
|
// The maximum number of steps in a step search given the largest
|
||||||
// allowed initial step
|
// allowed initial step
|
||||||
#define MAX_MVSEARCH_STEPS 11
|
#define MAX_MVSEARCH_STEPS 11
|
||||||
// Max full pel mv specified in 1 pel units
|
// Max full pel mv specified in the unit of full pixel
|
||||||
#define MAX_FULL_PEL_VAL ((1 << (MAX_MVSEARCH_STEPS)) - 1)
|
// 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
|
// Maximum size of the first step in full pel units
|
||||||
#define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1))
|
#define MAX_FIRST_STEP (1 << (MAX_MVSEARCH_STEPS-1))
|
||||||
// Allowed motion vector pixel distance outside image border
|
// Allowed motion vector pixel distance outside image border
|
||||||
|
Reference in New Issue
Block a user