Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
7fed5044
Commit
7fed5044
authored
Aug 23, 2016
by
Wei-ting Lin
Committed by
Gerrit Code Review
Aug 23, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Allow LF_UPDATE type of frames to use BWDREF" into nextgenv2
parents
49b85d39
4e8acca9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
5 deletions
+25
-5
vp10/encoder/encoder.c
vp10/encoder/encoder.c
+10
-2
vp10/encoder/firstpass.c
vp10/encoder/firstpass.c
+15
-3
No files found.
vp10/encoder/encoder.c
View file @
7fed5044
...
...
@@ -3260,7 +3260,8 @@ void vp10_update_reference_frames(VP10_COMP *cpi) {
// NOTE: The ALT_REFs' are indexed reversely, and ALT0 refers to the
// farthest ALT_REF from the first frame in the gf group.
int
tmp
=
cpi
->
arf_map
[
0
];
cpi
->
arf_map
[
0
]
=
cpi
->
bwd_fb_idx
;
cpi
->
arf_map
[
0
]
=
cpi
->
alt_fb_idx
;
cpi
->
alt_fb_idx
=
cpi
->
bwd_fb_idx
;
cpi
->
bwd_fb_idx
=
tmp
;
}
ref_cnt_fb
(
pool
->
frame_bufs
,
&
cm
->
ref_frame_map
[
cpi
->
bwd_fb_idx
],
...
...
@@ -3309,7 +3310,14 @@ void vp10_update_reference_frames(VP10_COMP *cpi) {
// v v v
// lst_fb_idxes[2], lst_fb_idxes[0], lst_fb_idxes[1]
int
ref_frame
;
if
(
cpi
->
rc
.
is_bwd_ref_frame
&&
cpi
->
num_extra_arfs
)
{
// We have swapped the virtual indices to use ALT0 as BWD_REF
// and we need to swap them back.
int
tmp
=
cpi
->
arf_map
[
0
];
cpi
->
arf_map
[
0
]
=
cpi
->
alt_fb_idx
;
cpi
->
alt_fb_idx
=
cpi
->
bwd_fb_idx
;
cpi
->
bwd_fb_idx
=
tmp
;
}
if
(
cm
->
frame_type
==
KEY_FRAME
)
{
for
(
ref_frame
=
0
;
ref_frame
<
LAST_REF_FRAMES
;
++
ref_frame
)
{
ref_cnt_fb
(
pool
->
frame_bufs
,
...
...
vp10/encoder/firstpass.c
View file @
7fed5044
...
...
@@ -2577,7 +2577,18 @@ static void configure_buffer_updates(VP10_COMP *cpi) {
case
LF_UPDATE
:
#if CONFIG_EXT_REFS
cpi
->
refresh_bwd_ref_frame
=
0
;
// If we have extra ALT_REFs, we can use the farthest ALT (ALT0) as
// the BWD_REF.
if
(
cpi
->
num_extra_arfs
)
{
int
tmp
=
cpi
->
bwd_fb_idx
;
cpi
->
rc
.
is_bwd_ref_frame
=
1
;
cpi
->
bwd_fb_idx
=
cpi
->
alt_fb_idx
;
cpi
->
alt_fb_idx
=
cpi
->
arf_map
[
0
];;
cpi
->
arf_map
[
0
]
=
tmp
;
}
else
{
cpi
->
rc
.
is_bwd_ref_frame
=
0
;
}
#endif // CONFIG_EXT_REFS
cpi
->
refresh_last_frame
=
1
;
cpi
->
refresh_golden_frame
=
0
;
...
...
@@ -2620,12 +2631,13 @@ static void configure_buffer_updates(VP10_COMP *cpi) {
cpi
->
refresh_alt_ref_frame
=
0
;
cpi
->
rc
.
is_bwd_ref_frame
=
1
;
if
(
cpi
->
num_extra_arfs
)
{
// Allow BRF use
s
the farthest ALT_REF (ALT0) as BWD_REF by swapping
// Allow BRF use the farthest ALT_REF (ALT0) as BWD_REF by swapping
// the virtual indices.
// NOTE: The indices will be swapped back after this frame is encoded
// (in vp10_update_reference_frames()).
int
tmp
=
cpi
->
bwd_fb_idx
;
cpi
->
bwd_fb_idx
=
cpi
->
arf_map
[
0
];
cpi
->
bwd_fb_idx
=
cpi
->
alt_fb_idx
;
cpi
->
alt_fb_idx
=
cpi
->
arf_map
[
0
];
cpi
->
arf_map
[
0
]
=
tmp
;
}
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment