summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure1
-rw-r--r--vp9/encoder/vp9_encoder.c11
-rw-r--r--vp9/encoder/vp9_firstpass.c3
-rw-r--r--vp9/encoder/vp9_svc_layercontext.c2
-rw-r--r--vp9/vp9_cx_iface.c2
5 files changed, 15 insertions, 4 deletions
diff --git a/configure b/configure
index 8f73067aa..c08659aca 100755
--- a/configure
+++ b/configure
@@ -278,6 +278,7 @@ HAVE_LIST="
EXPERIMENT_LIST="
fp_mb_stats
emulate_hardware
+ non_greedy_mv
"
CONFIG_LIST="
dependency_tracking
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index f0e4901d5..1fd4a036a 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -6098,11 +6098,20 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags,
// Is multi-arf enabled.
// Note that at the moment multi_arf is only configured for 2 pass VBR and
// will not work properly with svc.
- if ((oxcf->pass == 2) && !cpi->use_svc && (cpi->oxcf.enable_auto_arf > 1))
+ // TODO(jingning): enable dual ARF encoding when auto-alt-ref is set to be 2.
+ // We will refactor and integrate the dual ARF and multi-layer ARF system
+ // next and deprecate this special control setting, instead make auto-alt-ref
+ // directly controls the ARF layer depth.
+ if ((oxcf->pass == 2) && !cpi->use_svc && (cpi->oxcf.enable_auto_arf == 2))
cpi->multi_arf_allowed = 1;
else
cpi->multi_arf_allowed = 0;
+ if (oxcf->pass == 2 && !cpi->use_svc && cpi->oxcf.enable_auto_arf > 2)
+ cpi->multi_layer_arf = 1;
+ else
+ cpi->multi_layer_arf = 0;
+
// Normal defaults
cm->reset_frame_context = 0;
cm->refresh_frame_context = 1;
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index ae6d97c98..5108620c6 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -44,6 +44,7 @@
#define COMPLEXITY_STATS_OUTPUT 0
#define FIRST_PASS_Q 10.0
+#define NORMAL_BOOST 100
#define MIN_ARF_GF_BOOST 240
#define MIN_DECAY_FACTOR 0.01
#define NEW_MV_MODE_PENALTY 32
@@ -2070,7 +2071,7 @@ static int calculate_boost_bits(int frame_count, int boost,
// return 0 for invalid inputs (could arise e.g. through rounding errors)
if (!boost || (total_group_bits <= 0) || (frame_count < 0)) return 0;
- allocation_chunks = (frame_count * 100) + boost;
+ allocation_chunks = (frame_count * NORMAL_BOOST) + boost;
// Prevent overflow.
if (boost > 1023) {
diff --git a/vp9/encoder/vp9_svc_layercontext.c b/vp9/encoder/vp9_svc_layercontext.c
index 78a771a41..1321c4575 100644
--- a/vp9/encoder/vp9_svc_layercontext.c
+++ b/vp9/encoder/vp9_svc_layercontext.c
@@ -1201,7 +1201,7 @@ void vp9_svc_update_ref_frame(VP9_COMP *const cpi) {
vp9_svc_update_ref_frame_buffer_idx(cpi);
}
-void vp9_svc_adjust_frame_rate(VP9_COMP *cpi) {
+void vp9_svc_adjust_frame_rate(VP9_COMP *const cpi) {
int64_t this_duration =
cpi->svc.timebase_fac * cpi->svc.duration[cpi->svc.spatial_layer_id];
vp9_new_framerate(cpi, 10000000.0 / this_duration);
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c
index 6cf4134ea..67dbc5075 100644
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -249,7 +249,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
RANGE_CHECK(extra_cfg, row_mt, 0, 1);
RANGE_CHECK(extra_cfg, motion_vector_unit_test, 0, 2);
- RANGE_CHECK(extra_cfg, enable_auto_alt_ref, 0, 2);
+ RANGE_CHECK(extra_cfg, enable_auto_alt_ref, 0, MAX_ARF_LAYERS);
RANGE_CHECK(extra_cfg, cpu_used, -9, 9);
RANGE_CHECK_HI(extra_cfg, noise_sensitivity, 6);
RANGE_CHECK(extra_cfg, tile_columns, 0, 6);