summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_bitstream.c
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2014-06-09 16:25:31 +0100
committerPaul Wilkins <paulwilkins@google.com>2014-06-24 12:59:14 +0100
commit2e430cba616fcb6db8a92a94ba9fa4263a2121b0 (patch)
tree2e59ebab56406879f5327579b8a14d42cd194402 /vp9/encoder/vp9_bitstream.c
parent2518e33bec555d88a3ea0f56b2d2f402e7f07bdf (diff)
downloadlibvpx-2e430cba616fcb6db8a92a94ba9fa4263a2121b0.tar
libvpx-2e430cba616fcb6db8a92a94ba9fa4263a2121b0.tar.gz
libvpx-2e430cba616fcb6db8a92a94ba9fa4263a2121b0.tar.bz2
libvpx-2e430cba616fcb6db8a92a94ba9fa4263a2121b0.zip
Experiment for mid group second arf.
This patch implements a mechanism for inserting a second arf at the mid position of arf groups. It is currently disabled by default using the flag multi_arf_enabled. Results are currently down somewhat in initial testing if multi-arf is enabled. Most of the loss is attributable to the fact that code to preserve the previous golden frame (in the arf buffer) in cases where we are coding an overlay frame, is currently disabled in the multi-arf case. Change-Id: I1d777318ca09f147db2e8c86d7315fe86168c865
Diffstat (limited to 'vp9/encoder/vp9_bitstream.c')
-rw-r--r--vp9/encoder/vp9_bitstream.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c
index 76f5e7bbe..80787e567 100644
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -895,8 +895,8 @@ static int get_refresh_mask(VP9_COMP *cpi) {
if (!cpi->multi_arf_enabled && cpi->refresh_golden_frame &&
!cpi->refresh_alt_ref_frame) {
#else
- if (cpi->refresh_golden_frame && !cpi->refresh_alt_ref_frame &&
- !cpi->use_svc) {
+ if (!cpi->multi_arf_enabled && cpi->refresh_golden_frame &&
+ cpi->rc.is_src_frame_alt_ref && !cpi->use_svc) {
#endif
// Preserve the previously existing golden frame and update the frame in
// the alt ref slot instead. This is highly specific to the use of
@@ -919,6 +919,11 @@ static int get_refresh_mask(VP9_COMP *cpi) {
cpi->arf_buffer_idx[sn];
}
#endif
+ if ((cpi->pass == 2) && cpi->multi_arf_enabled) {
+ GF_GROUP *gf_group = &cpi->twopass.gf_group;
+ arf_idx = gf_group->arf_update_idx[gf_group->index];
+ }
+
return (cpi->refresh_last_frame << cpi->lst_fb_idx) |
(cpi->refresh_golden_frame << cpi->gld_fb_idx) |
(cpi->refresh_alt_ref_frame << arf_idx);