ref: 74b4dd480e2cbfe032ea5759c7592b42da2d7250
parent: ec8be105189bae3004933a91cad3a40f3d1a1eb9
parent: 8eea617d51672e6dcd6b347d6f8bf5bfe41c2634
author: Jingning Han <jingning@google.com>
date: Wed Sep 12 17:06:53 EDT 2018
Merge changes I7173f2fe,I460b6c4b,I5070657f,I2b3e1e16 * changes: Remove some deprecated FRAME_UPDATE_TYPE elements. Remove some deprecated constants. Remove unused rate control data elements Remove extra_arf_allowed.
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -61,12 +61,6 @@
#define ALTREF_FRAME 3
#define MAX_REF_FRAMES 4
-#define LAST2_FRAME 4
-#define LAST3_FRAME 5
-#define BWDREF_FRAME 6
-#define ALTREF2_FRAME 7
-#define LAST_REF_FRAMES 3
-
typedef int8_t MV_REFERENCE_FRAME;
// This structure now relates to 8x8 block regions.
--- a/vp9/encoder/vp9_encoder.h
+++ b/vp9/encoder/vp9_encoder.h
@@ -528,8 +528,6 @@
int refresh_last_frame;
int refresh_golden_frame;
- int refresh_bwd_ref_frame;
- int refresh_alt2_ref_frame;
int refresh_alt_ref_frame;
int ext_refresh_frame_flags_pending;
@@ -774,7 +772,6 @@
int arf_map[MAX_EXT_ARFS + 1];
int arf_pos_in_gf[MAX_EXT_ARFS + 1];
int arf_pos_for_ovrly[MAX_EXT_ARFS + 1];
- int extra_arf_allowed;
int multi_layer_arf;
vpx_roi_map_t roi;
--- a/vp9/encoder/vp9_firstpass.h
+++ b/vp9/encoder/vp9_firstpass.h
@@ -117,13 +117,8 @@
GF_UPDATE = 2,
ARF_UPDATE = 3,
OVERLAY_UPDATE = 4,
- USE_BUF_FRAME = 5, // Use show existing frame, no ref buffer update
- BRF_UPDATE = 6, // Backward Reference Frame
- LAST_BIPRED_UPDATE = 7, // Last Bi-predictive Frame
- BIPRED_UPDATE = 8, // Bi-predictive Frame, but not the last one
- INTNL_OVERLAY_UPDATE = 9, // Internal Overlay Frame
- INTNL_ARF_UPDATE = 10, // Internal Altref Frame (candidate for ALTREF2)
- FRAME_UPDATE_TYPES = 11
+ USE_BUF_FRAME = 5, // Use show existing frame, no ref buffer update
+ FRAME_UPDATE_TYPES = 6
} FRAME_UPDATE_TYPE;
#define FC_ANIMATION_THRESH 0.15
--- a/vp9/encoder/vp9_ratectrl.h
+++ b/vp9/encoder/vp9_ratectrl.h
@@ -114,16 +114,6 @@
int source_alt_ref_active;
int is_src_frame_alt_ref;
- // Length of the bi-predictive frame group interval
- int bipred_group_interval;
-
- // NOTE: Different types of frames may have different bits allocated
- // accordingly, aiming to achieve the overall optimal RD performance.
- int is_bwd_ref_frame;
- int is_last_bipred_frame;
- int is_bipred_frame;
- int is_src_frame_ext_arf;
-
int avg_frame_bandwidth; // Average frame size target for clip
int min_frame_bandwidth; // Minimum allocation used for any frame
int max_frame_bandwidth; // Maximum burst rate allowed for a frame.
--- a/vp9/encoder/vp9_rd.c
+++ b/vp9/encoder/vp9_rd.c
@@ -164,8 +164,14 @@
static const int rd_boost_factor[16] = { 64, 32, 32, 32, 24, 16, 12, 12,
8, 8, 4, 4, 2, 2, 1, 0 };
+
+// Note that the element below for frame type "USE_BUF_FRAME", which indicates
+// that the show frame flag is set, should not be used as no real frame
+// is encoded so we should not reach here. However, a dummy value
+// is inserted here to make sure the data structure has the right number
+// of values assigned.
static const int rd_frame_type_factor[FRAME_UPDATE_TYPES] = { 128, 144, 128,
- 128, 144 };
+ 128, 144, 144 };
int64_t vp9_compute_rd_mult_based_on_qindex(const VP9_COMP *cpi, int qindex) {
const int64_t q = vp9_dc_quant(qindex, 0, cpi->common.bit_depth);