Commit 302d0970 authored by Todd Nguyen's avatar Todd Nguyen Committed by Urvang Joshi

Add experiment bgsprite

Work in progress to generate ARF with stitched background image.

Change-Id: I2fea75bbe5ac6f713f53eb5825776dadfc1d98c5
parent bda59df3
......@@ -21,6 +21,8 @@ AV1_CX_SRCS-yes += av1_cx_iface.c
AV1_CX_SRCS-yes += encoder/av1_quantize.c
AV1_CX_SRCS-yes += encoder/av1_quantize.h
AV1_CX_SRCS-yes += encoder/bitstream.c
AV1_CX_SRCS-$(CONFIG_BGSPRITE) += encoder/bgsprite.c
AV1_CX_SRCS-$(CONFIG_BGSPRITE) += encoder/bgsprite.h
AV1_CX_SRCS-yes += encoder/context_tree.c
AV1_CX_SRCS-yes += encoder/context_tree.h
AV1_CX_SRCS-yes += encoder/cost.h
......
This diff is collapsed.
/*
* Copyright (c) 2017, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#ifndef AV1_ENCODER_BGSPRITE_H_
#define AV1_ENCODER_BGSPRITE_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "av1/encoder/encoder.h"
// Creates alternate reference frame staring from source image + frames up to
// 'distance' past source frame.
// Returns 0 on success and 1 on failure.
int av1_background_sprite(AV1_COMP *cpi, int distance);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // AV1_ENCODER_BGSPRITE_H_
......@@ -31,6 +31,9 @@
#include "av1/encoder/aq_cyclicrefresh.h"
#include "av1/encoder/aq_variance.h"
#include "av1/encoder/bitstream.h"
#if CONFIG_BGSPRITE
#include "av1/encoder/bgsprite.h"
#endif // CONFIG_BGSPRITE
#if CONFIG_ANS
#include "aom_dsp/buf_ans.h"
#endif
......@@ -5397,8 +5400,15 @@ int av1_get_compressed_data(AV1_COMP *cpi, unsigned int *frame_flags,
cpi->alt_ref_source = source;
if (oxcf->arnr_max_frames > 0) {
// Produce the filtered ARF frame.
// Produce the filtered ARF frame.
#if CONFIG_BGSPRITE
int bgsprite_ret = av1_background_sprite(cpi, arf_src_index);
if (bgsprite_ret != EXIT_SUCCESS) {
av1_temporal_filter(cpi, arf_src_index);
}
#else
av1_temporal_filter(cpi, arf_src_index);
#endif // CONFIG_BGSPRITE
aom_extend_frame_borders(&cpi->alt_ref_buffer);
force_src_buffer = &cpi->alt_ref_buffer;
}
......
......@@ -324,6 +324,7 @@ EXPERIMENT_LIST="
lgt
sbl_symbol
ncobmc_adapt_weight
bgsprite
"
CONFIG_LIST="
dependency_tracking
......@@ -537,6 +538,7 @@ post_process_cmdline() {
enabled new_multisymbol && enable_feature ec_adapt
enabled warped_motion && disable_feature ncobmc_adapt_weight
enabled ncobmc_adapt_weight && enable_feature motion_var
enabled bgsprite && enable_feature global_motion
if ! enabled delta_q && enabled ext_delta_q; then
log_echo "ext_delta_q requires delta_q, so disabling ext_delta_q"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment