Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
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
3ba5df49
Commit
3ba5df49
authored
Feb 19, 2014
by
Dmitry Kovalev
Committed by
Gerrit Code Review
Feb 19, 2014
Browse files
Merge "Adding is_mv_valid() function."
parents
43b7959d
9b75f381
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/decoder/vp9_decodemv.c
View file @
3ba5df49
...
@@ -356,6 +356,11 @@ static void read_intra_block_mode_info(VP9_COMMON *const cm, MODE_INFO *mi,
...
@@ -356,6 +356,11 @@ static void read_intra_block_mode_info(VP9_COMMON *const cm, MODE_INFO *mi,
mbmi
->
uv_mode
=
read_intra_mode_uv
(
cm
,
r
,
mbmi
->
mode
);
mbmi
->
uv_mode
=
read_intra_mode_uv
(
cm
,
r
,
mbmi
->
mode
);
}
}
static
INLINE
int
is_mv_valid
(
const
MV
*
mv
)
{
return
mv
->
row
>
MV_LOW
&&
mv
->
row
<
MV_UPP
&&
mv
->
col
>
MV_LOW
&&
mv
->
col
<
MV_UPP
;
}
static
INLINE
int
assign_mv
(
VP9_COMMON
*
cm
,
MB_PREDICTION_MODE
mode
,
static
INLINE
int
assign_mv
(
VP9_COMMON
*
cm
,
MB_PREDICTION_MODE
mode
,
int_mv
mv
[
2
],
int_mv
ref_mv
[
2
],
int_mv
mv
[
2
],
int_mv
ref_mv
[
2
],
int_mv
nearest_mv
[
2
],
int_mv
near_mv
[
2
],
int_mv
nearest_mv
[
2
],
int_mv
near_mv
[
2
],
...
@@ -367,14 +372,10 @@ static INLINE int assign_mv(VP9_COMMON *cm, MB_PREDICTION_MODE mode,
...
@@ -367,14 +372,10 @@ static INLINE int assign_mv(VP9_COMMON *cm, MB_PREDICTION_MODE mode,
case
NEWMV
:
{
case
NEWMV
:
{
nmv_context_counts
*
const
mv_counts
=
cm
->
frame_parallel_decoding_mode
?
nmv_context_counts
*
const
mv_counts
=
cm
->
frame_parallel_decoding_mode
?
NULL
:
&
cm
->
counts
.
mv
;
NULL
:
&
cm
->
counts
.
mv
;
read_mv
(
r
,
&
mv
[
0
].
as_mv
,
&
ref_mv
[
0
].
as_mv
,
&
cm
->
fc
.
nmvc
,
mv_counts
,
allow_hp
);
if
(
is_compound
)
read_mv
(
r
,
&
mv
[
1
].
as_mv
,
&
ref_mv
[
1
].
as_mv
,
&
cm
->
fc
.
nmvc
,
mv_counts
,
allow_hp
);
for
(
i
=
0
;
i
<
1
+
is_compound
;
++
i
)
{
for
(
i
=
0
;
i
<
1
+
is_compound
;
++
i
)
{
ret
=
ret
&&
mv
[
i
].
as_mv
.
row
<
MV_UPP
&&
mv
[
i
].
as_mv
.
row
>
MV_LOW
;
read_mv
(
r
,
&
mv
[
i
].
as_mv
,
&
ref_mv
[
i
].
as_mv
,
&
cm
->
fc
.
nmvc
,
mv_counts
,
ret
=
ret
&&
mv
[
i
].
as_mv
.
col
<
MV_UPP
&&
mv
[
i
].
as_mv
.
col
>
MV_LOW
;
allow_hp
);
ret
=
ret
&&
is_mv_valid
(
&
mv
[
i
].
as_mv
);
}
}
break
;
break
;
}
}
...
...
Write
Preview
Supports
Markdown
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