Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
c4c0b2e7
Commit
c4c0b2e7
authored
Aug 28, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Aug 28, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Replacing int_mv with MV."
parents
143be253
668d3cf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
vp9/encoder/vp9_rd.c
vp9/encoder/vp9_rd.c
+7
-13
No files found.
vp9/encoder/vp9_rd.c
View file @
c4c0b2e7
...
...
@@ -364,18 +364,15 @@ void vp9_mv_pred(VP9_COMP *cpi, MACROBLOCK *x,
int
ref_frame
,
BLOCK_SIZE
block_size
)
{
MACROBLOCKD
*
xd
=
&
x
->
e_mbd
;
MB_MODE_INFO
*
mbmi
=
&
xd
->
mi
[
0
]
->
mbmi
;
int_mv
this_mv
;
int
i
;
int
zero_seen
=
0
;
int
best_index
=
0
;
int
best_sad
=
INT_MAX
;
int
this_sad
=
INT_MAX
;
int
max_mv
=
0
;
uint8_t
*
src_y_ptr
=
x
->
plane
[
0
].
src
.
buf
;
uint8_t
*
ref_y_ptr
;
int
row_offset
,
col_offset
;
int
num_mv_refs
=
MAX_MV_REF_CANDIDATES
+
const
int
num_mv_refs
=
MAX_MV_REF_CANDIDATES
+
(
cpi
->
sf
.
adaptive_motion_search
&&
cpi
->
common
.
show_frame
&&
block_size
<
cpi
->
sf
.
max_partition_size
);
...
...
@@ -387,19 +384,16 @@ void vp9_mv_pred(VP9_COMP *cpi, MACROBLOCK *x,
// Get the sad for each candidate reference mv.
for
(
i
=
0
;
i
<
num_mv_refs
;
++
i
)
{
this_mv
.
as_mv
=
pred_mv
[
i
];
const
MV
*
this_mv
=
&
pred_mv
[
i
];
max_mv
=
MAX
(
max_mv
,
MAX
(
abs
(
this_mv
.
as_mv
.
row
),
abs
(
this_mv
.
as_mv
.
col
))
>>
3
);
// Only need to check zero mv once.
if
(
!
this_mv
.
as_int
&&
zero_seen
)
max_mv
=
MAX
(
max_mv
,
MAX
(
abs
(
this_mv
->
row
),
abs
(
this_mv
->
col
))
>>
3
);
if
(
is_zero_mv
(
this_mv
)
&&
zero_seen
)
continue
;
zero_seen
=
zero_
seen
||
!
this_mv
.
as_int
;
zero_seen
|
=
is_
zero_
mv
(
this_mv
)
;
row_offset
=
this_mv
.
as_mv
.
row
>>
3
;
col_offset
=
this_mv
.
as_mv
.
col
>>
3
;
ref_y_ptr
=
ref_y_buffer
+
(
ref_y_stride
*
row_offset
)
+
col_offset
;
ref_y_ptr
=
&
ref_y_buffer
[
ref_y_stride
*
(
this_mv
->
row
>>
3
)
+
(
this_mv
->
col
>>
3
)];
// Find sad for current vector.
this_sad
=
cpi
->
fn_ptr
[
block_size
].
sdf
(
src_y_ptr
,
x
->
plane
[
0
].
src
.
stride
,
...
...
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