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
cba8e16e
Commit
cba8e16e
authored
11 years ago
by
Ronald S. Bultje
Browse files
Options
Download
Patches
Plain Diff
Decrease scope of frame_mv argument to handle_inter_mode().
Change-Id: I81c637c61ecc33cb66beb59a2a33166d66b9a0a2
parent
75fca6ff
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
m29-baseline
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/encoder/vp9_rdopt.c
+13
-14
vp9/encoder/vp9_rdopt.c
with
13 additions
and
14 deletions
vp9/encoder/vp9_rdopt.c
+
13
−
14
View file @
cba8e16e
...
...
@@ -1891,8 +1891,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
int
*
rate_uv
,
int
*
distortion_uv
,
int
*
mode_excluded
,
int
*
disable_skip
,
INTERPOLATIONFILTERTYPE
*
best_filter
,
int_mv
frame_mv
[
MB_MODE_COUNT
]
[
MAX_REF_FRAMES
],
int_mv
*
frame_mv
,
YV12_BUFFER_CONFIG
**
scaled_ref_frame
,
int
mi_row
,
int
mi_col
,
int_mv
single_newmv
[
MAX_REF_FRAMES
])
{
...
...
@@ -1967,8 +1966,8 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
scaled_first_yv12
=
xd
->
plane
[
0
].
pre
[
0
];
// Initialize mv using single prediction mode result.
frame_mv
[
NEWMV
][
refs
[
0
]].
as_int
=
single_newmv
[
refs
[
0
]].
as_int
;
frame_mv
[
NEWMV
][
refs
[
1
]].
as_int
=
single_newmv
[
refs
[
1
]].
as_int
;
frame_mv
[
refs
[
0
]].
as_int
=
single_newmv
[
refs
[
0
]].
as_int
;
frame_mv
[
refs
[
1
]].
as_int
=
single_newmv
[
refs
[
1
]].
as_int
;
// Allow joint search multiple times iteratively for each ref frame
// and break out the search loop if it couldn't find better mv.
...
...
@@ -1993,7 +1992,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
vp9_build_inter_predictor
(
ref_yv12
[
!
id
].
buf
,
ref_yv12
[
!
id
].
stride
,
second_pred
,
pw
,
&
frame_mv
[
NEWMV
][
refs
[
!
id
]],
&
frame_mv
[
refs
[
!
id
]],
&
xd
->
scale_factor
[
!
id
],
pw
,
ph
,
0
,
&
xd
->
subpix
);
...
...
@@ -2004,7 +2003,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
vp9_clamp_mv_min_max
(
x
,
&
ref_mv
[
id
]);
// Use mv result from single mode as mvp.
tmp_mv
.
as_int
=
frame_mv
[
NEWMV
][
refs
[
id
]].
as_int
;
tmp_mv
.
as_int
=
frame_mv
[
refs
[
id
]].
as_int
;
tmp_mv
.
as_mv
.
col
>>=
3
;
tmp_mv
.
as_mv
.
row
>>=
3
;
...
...
@@ -2039,7 +2038,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
xd
->
plane
[
0
].
pre
[
0
]
=
scaled_first_yv12
;
if
(
bestsme
<
last_besterr
[
id
])
{
frame_mv
[
NEWMV
][
refs
[
id
]].
as_int
=
frame_mv
[
refs
[
id
]].
as_int
=
xd
->
mode_info_context
->
bmi
[
0
].
as_mv
[
1
].
as_int
=
tmp_mv
.
as_int
;
last_besterr
[
id
]
=
bestsme
;
}
else
{
...
...
@@ -2065,14 +2064,14 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
vpx_free
(
second_pred
);
}
if
(
frame_mv
[
NEWMV
][
refs
[
0
]].
as_int
==
INVALID_MV
||
frame_mv
[
NEWMV
][
refs
[
1
]].
as_int
==
INVALID_MV
)
if
(
frame_mv
[
refs
[
0
]].
as_int
==
INVALID_MV
||
frame_mv
[
refs
[
1
]].
as_int
==
INVALID_MV
)
return
INT64_MAX
;
*
rate2
+=
vp9_mv_bit_cost
(
&
frame_mv
[
NEWMV
][
refs
[
0
]],
*
rate2
+=
vp9_mv_bit_cost
(
&
frame_mv
[
refs
[
0
]],
&
ref_mv
[
0
],
x
->
nmvjointcost
,
x
->
mvcost
,
96
,
x
->
e_mbd
.
allow_high_precision_mv
);
*
rate2
+=
vp9_mv_bit_cost
(
&
frame_mv
[
NEWMV
][
refs
[
1
]],
*
rate2
+=
vp9_mv_bit_cost
(
&
frame_mv
[
refs
[
1
]],
&
ref_mv
[
1
],
x
->
nmvjointcost
,
x
->
mvcost
,
96
,
x
->
e_mbd
.
allow_high_precision_mv
);
...
...
@@ -2139,7 +2138,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
x
->
nmvjointcost
,
x
->
mvcost
,
&
dis
,
&
sse
);
}
frame_mv
[
NEWMV
][
refs
[
0
]].
as_int
=
frame_mv
[
refs
[
0
]].
as_int
=
xd
->
mode_info_context
->
bmi
[
0
].
as_mv
[
0
].
as_int
=
tmp_mv
.
as_int
;
single_newmv
[
refs
[
0
]].
as_int
=
tmp_mv
.
as_int
;
...
...
@@ -2164,7 +2163,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
break
;
}
for
(
i
=
0
;
i
<
num_refs
;
++
i
)
{
cur_mv
[
i
]
=
frame_mv
[
this_mode
][
refs
[
i
]];
cur_mv
[
i
]
=
frame_mv
[
refs
[
i
]];
// Clip "next_nearest" so that it does not extend to far out of image
if
(
this_mode
==
NEWMV
)
assert
(
!
clamp_mv2
(
&
cur_mv
[
i
],
xd
));
...
...
@@ -2868,7 +2867,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
&
rate_y
,
&
distortion_y
,
&
rate_uv
,
&
distortion_uv
,
&
mode_excluded
,
&
disable_skip
,
&
tmp_best_filter
,
frame_mv
,
&
tmp_best_filter
,
frame_mv
[
this_mode
]
,
scaled_ref_frame
,
mi_row
,
mi_col
,
single_newmv
);
if
(
this_rd
==
INT64_MAX
)
...
...
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