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
319867d7
Commit
319867d7
authored
11 years ago
by
Dmitry Kovalev
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Cleaning up vp9_build_inter_predictor function."
parents
78671e2e
5f0a52fa
v1.14.0-linphone
1.4.X
experimental
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m31-baseline
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
stable-vp9-decoder
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/common/vp9_reconinter.c
+32
-46
vp9/common/vp9_reconinter.c
with
32 additions
and
46 deletions
vp9/common/vp9_reconinter.c
+
32
−
46
View file @
319867d7
...
@@ -220,19 +220,19 @@ static INLINE int round_mv_comp_q4(int value) {
...
@@ -220,19 +220,19 @@ static INLINE int round_mv_comp_q4(int value) {
return
(
value
<
0
?
value
-
2
:
value
+
2
)
/
4
;
return
(
value
<
0
?
value
-
2
:
value
+
2
)
/
4
;
}
}
static
int
mi_mv_pred_row_q4
(
const
MODE_INFO
*
mi
,
int
idx
)
{
static
MV
mi_mv_pred_q4
(
const
MODE_INFO
*
mi
,
int
idx
)
{
return
round_mv_comp_q4
(
mi
->
bmi
[
0
].
as_mv
[
idx
].
as_mv
.
row
+
MV
res
=
{
round_mv_comp_q4
(
mi
->
bmi
[
0
].
as_mv
[
idx
].
as_mv
.
row
+
mi
->
bmi
[
1
].
as_mv
[
idx
].
as_mv
.
row
+
mi
->
bmi
[
1
].
as_mv
[
idx
].
as_mv
.
row
+
mi
->
bmi
[
2
].
as_mv
[
idx
].
as_mv
.
row
+
mi
->
bmi
[
2
].
as_mv
[
idx
].
as_mv
.
row
+
mi
->
bmi
[
3
].
as_mv
[
idx
].
as_mv
.
row
);
mi
->
bmi
[
3
].
as_mv
[
idx
].
as_mv
.
row
),
round_mv_comp_q4
(
mi
->
bmi
[
0
].
as_mv
[
idx
].
as_mv
.
col
+
mi
->
bmi
[
1
].
as_mv
[
idx
].
as_mv
.
col
+
mi
->
bmi
[
2
].
as_mv
[
idx
].
as_mv
.
col
+
mi
->
bmi
[
3
].
as_mv
[
idx
].
as_mv
.
col
)
};
return
res
;
}
}
static
int
mi_mv_pred_col_q4
(
const
MODE_INFO
*
mi
,
int
idx
)
{
return
round_mv_comp_q4
(
mi
->
bmi
[
0
].
as_mv
[
idx
].
as_mv
.
col
+
mi
->
bmi
[
1
].
as_mv
[
idx
].
as_mv
.
col
+
mi
->
bmi
[
2
].
as_mv
[
idx
].
as_mv
.
col
+
mi
->
bmi
[
3
].
as_mv
[
idx
].
as_mv
.
col
);
}
// TODO(jkoleszar): yet another mv clamping function :-(
// TODO(jkoleszar): yet another mv clamping function :-(
MV
clamp_mv_to_umv_border_sb
(
const
MV
*
src_mv
,
MV
clamp_mv_to_umv_border_sb
(
const
MV
*
src_mv
,
...
@@ -299,44 +299,30 @@ static void build_inter_predictors(int plane, int block,
...
@@ -299,44 +299,30 @@ static void build_inter_predictors(int plane, int block,
// dest
// dest
uint8_t
*
const
dst
=
arg
->
dst
[
plane
]
+
arg
->
dst_stride
[
plane
]
*
y
+
x
;
uint8_t
*
const
dst
=
arg
->
dst
[
plane
]
+
arg
->
dst_stride
[
plane
]
*
y
+
x
;
// motion vector
// TODO(jkoleszar): All chroma MVs in SPLITMV mode are taken as the
const
MV
*
mv
;
// same MV (the average of the 4 luma MVs) but we could do something
MV
split_chroma_mv
;
// smarter for non-4:2:0. Just punt for now, pending the changes to get
int_mv
clamped_mv
;
// rid of SPLITMV mode entirely.
const
MV
mv
=
mi
->
mbmi
.
sb_type
<
BLOCK_SIZE_SB8X8
if
(
mi
->
mbmi
.
sb_type
<
BLOCK_SIZE_SB8X8
)
{
?
(
plane
==
0
?
mi
->
bmi
[
block
].
as_mv
[
which_mv
].
as_mv
if
(
plane
==
0
)
{
:
mi_mv_pred_q4
(
mi
,
which_mv
))
mv
=
&
mi
->
bmi
[
block
].
as_mv
[
which_mv
].
as_mv
;
:
mi
->
mbmi
.
mv
[
which_mv
].
as_mv
;
}
else
{
// TODO(jkoleszar): All chroma MVs in SPLITMV mode are taken as the
// TODO(jkoleszar): This clamping is done in the incorrect place for the
// same MV (the average of the 4 luma MVs) but we could do something
// scaling case. It needs to be done on the scaled MV, not the pre-scaling
// smarter for non-4:2:0. Just punt for now, pending the changes to get
// MV. Note however that it performs the subsampling aware scaling so
// rid of SPLITMV mode entirely.
// that the result is always q4.
split_chroma_mv
.
row
=
mi_mv_pred_row_q4
(
mi
,
which_mv
);
const
MV
res_mv
=
clamp_mv_to_umv_border_sb
(
&
mv
,
bwl
,
bhl
,
split_chroma_mv
.
col
=
mi_mv_pred_col_q4
(
mi
,
which_mv
);
xd
->
plane
[
plane
].
subsampling_x
,
mv
=
&
split_chroma_mv
;
xd
->
plane
[
plane
].
subsampling_y
,
}
xd
->
mb_to_left_edge
,
}
else
{
xd
->
mb_to_top_edge
,
mv
=
&
mi
->
mbmi
.
mv
[
which_mv
].
as_mv
;
xd
->
mb_to_right_edge
,
}
xd
->
mb_to_bottom_edge
);
/* TODO(jkoleszar): This clamping is done in the incorrect place for the
* scaling case. It needs to be done on the scaled MV, not the pre-scaling
* MV. Note however that it performs the subsampling aware scaling so
* that the result is always q4.
*/
clamped_mv
.
as_mv
=
clamp_mv_to_umv_border_sb
(
mv
,
bwl
,
bhl
,
xd
->
plane
[
plane
].
subsampling_x
,
xd
->
plane
[
plane
].
subsampling_y
,
xd
->
mb_to_left_edge
,
xd
->
mb_to_top_edge
,
xd
->
mb_to_right_edge
,
xd
->
mb_to_bottom_edge
);
scale
->
set_scaled_offsets
(
scale
,
arg
->
y
+
y
,
arg
->
x
+
x
);
scale
->
set_scaled_offsets
(
scale
,
arg
->
y
+
y
,
arg
->
x
+
x
);
vp9_build_inter_predictor
(
pre
,
pre_stride
,
vp9_build_inter_predictor
(
pre
,
pre_stride
,
dst
,
arg
->
dst_stride
[
plane
],
dst
,
arg
->
dst_stride
[
plane
],
&
clamped_mv
.
a
s_mv
,
&
xd
->
scale_factor
[
which_mv
],
&
re
s_mv
,
&
xd
->
scale_factor
[
which_mv
],
4
<<
pred_w
,
4
<<
pred_h
,
which_mv
,
4
<<
pred_w
,
4
<<
pred_h
,
which_mv
,
&
xd
->
subpix
,
MV_PRECISION_Q4
);
&
xd
->
subpix
,
MV_PRECISION_Q4
);
}
}
...
...
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