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