Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
eb4cb433
Commit
eb4cb433
authored
Jan 22, 2014
by
James Zern
Committed by
Gerrit Code Review
Jan 22, 2014
Browse files
Merge "Enforce effective motion vector search range"
parents
af148538
20cf22a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_mcomp.c
View file @
eb4cb433
...
...
@@ -24,10 +24,15 @@
// #define NEW_DIAMOND_SEARCH
void
vp9_set_mv_search_range
(
MACROBLOCK
*
x
,
const
MV
*
mv
)
{
const
int
col_min
=
(
mv
->
col
>>
3
)
-
MAX_FULL_PEL_VAL
+
(
mv
->
col
&
7
?
1
:
0
);
const
int
row_min
=
(
mv
->
row
>>
3
)
-
MAX_FULL_PEL_VAL
+
(
mv
->
row
&
7
?
1
:
0
);
const
int
col_max
=
(
mv
->
col
>>
3
)
+
MAX_FULL_PEL_VAL
;
const
int
row_max
=
(
mv
->
row
>>
3
)
+
MAX_FULL_PEL_VAL
;
int
col_min
=
(
mv
->
col
>>
3
)
-
MAX_FULL_PEL_VAL
+
(
mv
->
col
&
7
?
1
:
0
);
int
row_min
=
(
mv
->
row
>>
3
)
-
MAX_FULL_PEL_VAL
+
(
mv
->
row
&
7
?
1
:
0
);
int
col_max
=
(
mv
->
col
>>
3
)
+
MAX_FULL_PEL_VAL
;
int
row_max
=
(
mv
->
row
>>
3
)
+
MAX_FULL_PEL_VAL
;
col_min
=
MAX
(
col_min
,
(
MV_LOW
>>
3
)
+
1
);
row_min
=
MAX
(
row_min
,
(
MV_LOW
>>
3
)
+
1
);
col_max
=
MIN
(
col_max
,
(
MV_UPP
>>
3
)
-
1
);
row_max
=
MIN
(
row_max
,
(
MV_UPP
>>
3
)
-
1
);
// Get intersection of UMV window and valid MV window to reduce # of checks
// in diamond search.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment