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
40047bef
Commit
40047bef
authored
11 years ago
by
Dmitry Kovalev
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Using array of motion vectors instead of separate variables."
parents
cd945c7b
c151bdd4
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
pcs-2013
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
+27
-31
vp9/decoder/vp9_decodemv.c
with
27 additions
and
31 deletions
vp9/decoder/vp9_decodemv.c
+
27
−
31
View file @
40047bef
...
...
@@ -418,8 +418,7 @@ static void read_inter_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
const
BLOCK_SIZE
bsize
=
mbmi
->
sb_type
;
const
int
allow_hp
=
xd
->
allow_high_precision_mv
;
int_mv
nearest
,
nearby
,
best_mv
;
int_mv
nearest_second
,
nearby_second
,
best_mv_second
;
int_mv
nearest
[
2
],
near
[
2
],
best
[
2
];
uint8_t
inter_mode_ctx
;
MV_REFERENCE_FRAME
ref0
;
int
is_compound
;
...
...
@@ -444,8 +443,8 @@ static void read_inter_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
// nearest, nearby
if
(
bsize
<
BLOCK_8X8
||
mbmi
->
mode
!=
ZEROMV
)
{
vp9_find_best_ref_mvs
(
xd
,
mbmi
->
ref_mvs
[
ref0
],
&
nearest
,
&
near
by
);
best
_mv
.
as_int
=
mbmi
->
ref_mvs
[
ref0
]
[
0
].
as_int
;
vp9_find_best_ref_mvs
(
xd
,
mbmi
->
ref_mvs
[
ref0
],
&
nearest
[
0
]
,
&
near
[
0
]
);
best
[
0
]
.
as_int
=
nearest
[
0
].
as_int
;
}
if
(
is_compound
)
{
...
...
@@ -454,9 +453,8 @@ static void read_inter_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
ref1
,
mbmi
->
ref_mvs
[
ref1
],
mi_row
,
mi_col
);
if
(
bsize
<
BLOCK_8X8
||
mbmi
->
mode
!=
ZEROMV
)
{
vp9_find_best_ref_mvs
(
xd
,
mbmi
->
ref_mvs
[
ref1
],
&
nearest_second
,
&
nearby_second
);
best_mv_second
.
as_int
=
mbmi
->
ref_mvs
[
ref1
][
0
].
as_int
;
vp9_find_best_ref_mvs
(
xd
,
mbmi
->
ref_mvs
[
ref1
],
&
nearest
[
1
],
&
near
[
1
]);
best
[
1
].
as_int
=
nearest
[
1
].
as_int
;
}
}
...
...
@@ -471,50 +469,48 @@ static void read_inter_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
int
b_mode
;
for
(
idy
=
0
;
idy
<
2
;
idy
+=
num_4x4_h
)
{
for
(
idx
=
0
;
idx
<
2
;
idx
+=
num_4x4_w
)
{
int_mv
block
mv
,
secondmv
;
int_mv
block
[
2
]
;
const
int
j
=
idy
*
2
+
idx
;
b_mode
=
read_inter_mode
(
cm
,
r
,
inter_mode_ctx
);
if
(
b_mode
==
NEARESTMV
||
b_mode
==
NEARMV
)
{
vp9_append_sub8x8_mvs_for_idx
(
cm
,
xd
,
&
nearest
,
&
near
by
,
j
,
0
,
vp9_append_sub8x8_mvs_for_idx
(
cm
,
xd
,
&
nearest
[
0
]
,
&
near
[
0
]
,
j
,
0
,
mi_row
,
mi_col
);
if
(
is_compound
)
vp9_append_sub8x8_mvs_for_idx
(
cm
,
xd
,
&
nearest_second
,
&
nearby_second
,
j
,
1
,
mi_row
,
mi_col
);
vp9_append_sub8x8_mvs_for_idx
(
cm
,
xd
,
&
nearest
[
1
],
&
near
[
1
],
j
,
1
,
mi_row
,
mi_col
);
}
switch
(
b_mode
)
{
case
NEWMV
:
read_mv
(
r
,
&
blockmv
.
as_mv
,
&
best_mv
.
as_mv
,
nmvc
,
&
cm
->
counts
.
mv
,
allow_hp
);
read_mv
(
r
,
&
block
[
0
].
as_mv
,
&
best
[
0
].
as_mv
,
nmvc
,
&
cm
->
counts
.
mv
,
allow_hp
);
if
(
is_compound
)
read_mv
(
r
,
&
secondmv
.
as_mv
,
&
best
_mv_second
.
as_mv
,
nmvc
,
&
cm
->
counts
.
mv
,
allow_hp
);
read_mv
(
r
,
&
block
[
1
]
.
as_mv
,
&
best
[
1
]
.
as_mv
,
nmvc
,
&
cm
->
counts
.
mv
,
allow_hp
);
break
;
case
NEARESTMV
:
block
mv
.
as_int
=
nearest
.
as_int
;
block
[
0
]
.
as_int
=
nearest
[
0
]
.
as_int
;
if
(
is_compound
)
secondmv
.
as_int
=
nearest
_second
.
as_int
;
block
[
1
]
.
as_int
=
nearest
[
1
]
.
as_int
;
break
;
case
NEARMV
:
block
mv
.
as_int
=
near
by
.
as_int
;
block
[
0
]
.
as_int
=
near
[
0
]
.
as_int
;
if
(
is_compound
)
secondmv
.
as_int
=
near
by_second
.
as_int
;
block
[
1
]
.
as_int
=
near
[
1
]
.
as_int
;
break
;
case
ZEROMV
:
block
mv
.
as_int
=
0
;
block
[
0
]
.
as_int
=
0
;
if
(
is_compound
)
secondmv
.
as_int
=
0
;
block
[
1
]
.
as_int
=
0
;
break
;
default:
assert
(
!
"Invalid inter mode value"
);
}
mi
->
bmi
[
j
].
as_mv
[
0
].
as_int
=
block
mv
.
as_int
;
mi
->
bmi
[
j
].
as_mv
[
0
].
as_int
=
block
[
0
]
.
as_int
;
if
(
is_compound
)
mi
->
bmi
[
j
].
as_mv
[
1
].
as_int
=
secondmv
.
as_int
;
mi
->
bmi
[
j
].
as_mv
[
1
].
as_int
=
block
[
1
]
.
as_int
;
if
(
num_4x4_h
==
2
)
mi
->
bmi
[
j
+
2
]
=
mi
->
bmi
[
j
];
...
...
@@ -529,15 +525,15 @@ static void read_inter_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
}
else
{
switch
(
mbmi
->
mode
)
{
case
NEARMV
:
mv0
->
as_int
=
near
by
.
as_int
;
mv0
->
as_int
=
near
[
0
]
.
as_int
;
if
(
is_compound
)
mv1
->
as_int
=
near
by_second
.
as_int
;
mv1
->
as_int
=
near
[
1
]
.
as_int
;
break
;
case
NEARESTMV
:
mv0
->
as_int
=
nearest
.
as_int
;
mv0
->
as_int
=
nearest
[
0
]
.
as_int
;
if
(
is_compound
)
mv1
->
as_int
=
nearest
_second
.
as_int
;
mv1
->
as_int
=
nearest
[
1
]
.
as_int
;
break
;
case
ZEROMV
:
...
...
@@ -547,9 +543,9 @@ static void read_inter_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
break
;
case
NEWMV
:
read_mv
(
r
,
&
mv0
->
as_mv
,
&
best
_mv
.
as_mv
,
nmvc
,
&
cm
->
counts
.
mv
,
allow_hp
);
read_mv
(
r
,
&
mv0
->
as_mv
,
&
best
[
0
]
.
as_mv
,
nmvc
,
&
cm
->
counts
.
mv
,
allow_hp
);
if
(
is_compound
)
read_mv
(
r
,
&
mv1
->
as_mv
,
&
best
_mv_second
.
as_mv
,
nmvc
,
&
cm
->
counts
.
mv
,
read_mv
(
r
,
&
mv1
->
as_mv
,
&
best
[
1
]
.
as_mv
,
nmvc
,
&
cm
->
counts
.
mv
,
allow_hp
);
break
;
default:
...
...
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