Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
ea77b034
Commit
ea77b034
authored
11 years ago
by
Yaowu Xu
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Converted assert to error checking"
parents
c093b622
535a1085
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/debargha/playground
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
v1.3.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp9/decoder/vp9_decodemv.c
+17
-11
vp9/decoder/vp9_decodemv.c
with
17 additions
and
11 deletions
vp9/decoder/vp9_decodemv.c
+
17
−
11
View file @
ea77b034
...
...
@@ -425,11 +425,12 @@ static void read_intra_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
mbmi
->
uv_mode
=
read_intra_mode_uv
(
cm
,
r
,
mbmi
->
mode
);
}
static
INLINE
void
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
best_mv
[
2
],
int_mv
nearest_mv
[
2
],
int_mv
near_mv
[
2
],
int
is_compound
,
int
allow_hp
,
vp9_reader
*
r
)
{
int
i
;
int
ret
=
1
;
switch
(
mode
)
{
case
NEWMV
:
...
...
@@ -438,6 +439,10 @@ static INLINE void assign_mv(VP9_COMMON *cm, MB_PREDICTION_MODE mode,
if
(
is_compound
)
read_mv
(
r
,
&
mv
[
1
].
as_mv
,
&
best_mv
[
1
].
as_mv
,
&
cm
->
fc
.
nmvc
,
&
cm
->
counts
.
mv
,
allow_hp
);
for
(
i
=
0
;
i
<
1
+
is_compound
;
++
i
)
{
ret
=
ret
&&
mv
[
i
].
as_mv
.
row
<
MV_UPP
&&
mv
[
i
].
as_mv
.
row
>
MV_LOW
;
ret
=
ret
&&
mv
[
i
].
as_mv
.
col
<
MV_UPP
&&
mv
[
i
].
as_mv
.
col
>
MV_LOW
;
}
break
;
case
NEARESTMV
:
mv
[
0
].
as_int
=
nearest_mv
[
0
].
as_int
;
...
...
@@ -455,13 +460,9 @@ static INLINE void assign_mv(VP9_COMMON *cm, MB_PREDICTION_MODE mode,
mv
[
1
].
as_int
=
0
;
break
;
default:
assert
(
!
"Invalid inter mode value."
);
}
for
(
i
=
0
;
i
<
1
+
is_compound
;
++
i
)
{
assert
(
mv
[
i
].
as_mv
.
row
<
MV_UPP
&&
mv
[
i
].
as_mv
.
row
>
MV_LOW
);
assert
(
mv
[
i
].
as_mv
.
col
<
MV_UPP
&&
mv
[
i
].
as_mv
.
col
>
MV_LOW
);
return
0
;
}
return
ret
;
}
static
int
read_is_inter_block
(
VP9D_COMP
*
pbi
,
int
segment_id
,
vp9_reader
*
r
)
{
...
...
@@ -557,8 +558,12 @@ static void read_inter_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
mi_row
,
mi_col
);
}
assign_mv
(
cm
,
b_mode
,
block
,
best
,
nearest
,
nearmv
,
is_compound
,
allow_hp
,
r
);
if
(
!
assign_mv
(
cm
,
b_mode
,
block
,
best
,
nearest
,
nearmv
,
is_compound
,
allow_hp
,
r
))
{
xd
->
corrupted
|=
1
;
break
;
};
mi
->
bmi
[
j
].
as_mv
[
0
].
as_int
=
block
[
0
].
as_int
;
if
(
is_compound
)
...
...
@@ -576,8 +581,9 @@ static void read_inter_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
mbmi
->
mv
[
0
].
as_int
=
mi
->
bmi
[
3
].
as_mv
[
0
].
as_int
;
mbmi
->
mv
[
1
].
as_int
=
mi
->
bmi
[
3
].
as_mv
[
1
].
as_int
;
}
else
{
assign_mv
(
cm
,
mbmi
->
mode
,
mbmi
->
mv
,
best
,
nearest
,
nearmv
,
is_compound
,
allow_hp
,
r
);
xd
->
corrupted
|=
!
assign_mv
(
cm
,
mbmi
->
mode
,
mbmi
->
mv
,
best
,
nearest
,
nearmv
,
is_compound
,
allow_hp
,
r
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets