diff options
author | Paul Wilkins <paulwilkins@google.com> | 2018-09-17 15:41:13 +0100 |
---|---|---|
committer | Paul Wilkins <paulwilkins@google.com> | 2018-09-17 15:53:56 +0100 |
commit | f0f2ba17d2b6ecef339634d4d8e245e3ab793242 (patch) | |
tree | 53bce75196311b466fa3c7ca28e5bca44a855bc9 /vp9 | |
parent | 32f86223ace2cc90c817f5bda197092a75dd4745 (diff) | |
download | libvpx-f0f2ba17d2b6ecef339634d4d8e245e3ab793242.tar libvpx-f0f2ba17d2b6ecef339634d4d8e245e3ab793242.tar.gz libvpx-f0f2ba17d2b6ecef339634d4d8e245e3ab793242.tar.bz2 libvpx-f0f2ba17d2b6ecef339634d4d8e245e3ab793242.zip |
Remove multi_arf_enabled.
Remove deprecated multi_arf_enabled flag and associated code.
Change-Id: I73f06362a10faa5b3bd91a78eedb201a96434f18
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_encoder.h | 1 | ||||
-rw-r--r-- | vp9/encoder/vp9_firstpass.c | 46 |
2 files changed, 1 insertions, 46 deletions
diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h index 2c0635933..ab39b44ff 100644 --- a/vp9/encoder/vp9_encoder.h +++ b/vp9/encoder/vp9_encoder.h @@ -689,7 +689,6 @@ typedef struct VP9_COMP { // Indices are: max_tx_size-1, tx_size_ctx, tx_size int tx_size_cost[TX_SIZES - 1][TX_SIZE_CONTEXTS][TX_SIZES]; - int multi_arf_enabled; int multi_arf_last_grp_enabled; #if CONFIG_VP9_TEMPORAL_DENOISING diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 43df9b70b..ba40182a2 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -2179,7 +2179,6 @@ static int define_gf_group_structure(VP9_COMP *cpi) { int i; int frame_index = 0; int key_frame; - int mid_frame_idx; unsigned char arf_buffer_indices[MAX_ACTIVE_ARFS]; int normal_frames; @@ -2220,17 +2219,6 @@ static int define_gf_group_structure(VP9_COMP *cpi) { arf_buffer_indices[cpi->multi_arf_last_grp_enabled && rc->source_alt_ref_active]; ++frame_index; - - if (cpi->multi_arf_enabled) { - // Set aside a slot for a level 1 arf. - gf_group->update_type[frame_index] = ARF_UPDATE; - gf_group->rf_level[frame_index] = GF_ARF_LOW; - gf_group->arf_src_offset[frame_index] = - (unsigned char)((rc->baseline_gf_interval >> 1) - 1); - gf_group->arf_update_idx[frame_index] = arf_buffer_indices[1]; - gf_group->arf_ref_idx[frame_index] = arf_buffer_indices[0]; - ++frame_index; - } } if (rc->source_alt_ref_pending && cpi->multi_layer_arf) { @@ -2248,9 +2236,6 @@ static int define_gf_group_structure(VP9_COMP *cpi) { return frame_index; } - // Define middle frame - mid_frame_idx = frame_index + (rc->baseline_gf_interval >> 1) - 1; - normal_frames = rc->baseline_gf_interval - (key_frame || rc->source_alt_ref_pending); @@ -2258,10 +2243,6 @@ static int define_gf_group_structure(VP9_COMP *cpi) { int arf_idx = 0; if (twopass->stats_in >= twopass->stats_in_end) break; - if (rc->source_alt_ref_pending && cpi->multi_arf_enabled) { - if (frame_index <= mid_frame_idx) arf_idx = 1; - } - gf_group->arf_update_idx[frame_index] = arf_buffer_indices[arf_idx]; gf_group->arf_ref_idx[frame_index] = arf_buffer_indices[arf_idx]; @@ -2282,17 +2263,13 @@ static int define_gf_group_structure(VP9_COMP *cpi) { if (rc->source_alt_ref_pending) { gf_group->update_type[frame_index] = OVERLAY_UPDATE; gf_group->rf_level[frame_index] = INTER_NORMAL; - - // Final setup for second arf and its overlay. - if (cpi->multi_arf_enabled) - gf_group->update_type[mid_frame_idx] = OVERLAY_UPDATE; } else { gf_group->update_type[frame_index] = GF_UPDATE; gf_group->rf_level[frame_index] = GF_ARF_STD; } // Note whether multi-arf was enabled this group for next time. - cpi->multi_arf_last_grp_enabled = cpi->multi_arf_enabled; + cpi->multi_arf_last_grp_enabled = 0; return frame_index; } @@ -2310,7 +2287,6 @@ static void allocate_gf_group_bits(VP9_COMP *cpi, int64_t gf_group_bits, int key_frame; const int max_bits = frame_max_bits(&cpi->rc, oxcf); int64_t total_group_bits = gf_group_bits; - int mid_boost_bits = 0; int mid_frame_idx; int normal_frames; int normal_frame_bits; @@ -2344,9 +2320,6 @@ static void allocate_gf_group_bits(VP9_COMP *cpi, int64_t gf_group_bits, gf_group->bit_allocation[frame_index] = gf_arf_bits; ++frame_index; - - // Set aside a slot for a level 1 arf. - if (cpi->multi_arf_enabled) ++frame_index; } // Define middle frame @@ -2436,11 +2409,6 @@ static void allocate_gf_group_bits(VP9_COMP *cpi, int64_t gf_group_bits, target_frame_size -= last_frame_reduction; } - if (rc->source_alt_ref_pending && cpi->multi_arf_enabled) { - mid_boost_bits += (target_frame_size >> 4); - target_frame_size -= (target_frame_size >> 4); - } - target_frame_size = clamp(target_frame_size, 0, VPXMIN(max_bits, (int)total_group_bits)); @@ -2455,15 +2423,6 @@ static void allocate_gf_group_bits(VP9_COMP *cpi, int64_t gf_group_bits, // We need to configure the frame at the end of the sequence + 1 that will be // the start frame for the next group. Otherwise prior to the call to // vp9_rc_get_second_pass_params() the data will be undefined. - - if (rc->source_alt_ref_pending) { - // Final setup for second arf and its overlay. - if (cpi->multi_arf_enabled) { - gf_group->bit_allocation[2] = - gf_group->bit_allocation[mid_frame_idx] + mid_boost_bits; - gf_group->bit_allocation[mid_frame_idx] = 0; - } - } } // Adjusts the ARNF filter for a GF group. @@ -2689,9 +2648,6 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) { // Calculate the boost for alt ref. rc->gfu_boost = calc_arf_boost(cpi, forward_frames, (i - 1)); rc->source_alt_ref_pending = 1; - - // Test to see if multi arf is appropriate. - cpi->multi_arf_enabled = 0; } else { rc->gfu_boost = VPXMIN(MAX_GF_BOOST, calc_arf_boost(cpi, 0, (i - 1))); rc->source_alt_ref_pending = 0; |