From 8eea617d51672e6dcd6b347d6f8bf5bfe41c2634 Mon Sep 17 00:00:00 2001 From: Paul Wilkins Date: Wed, 12 Sep 2018 12:53:10 +0100 Subject: [PATCH] Remove some deprecated FRAME_UPDATE_TYPE elements. Removal of some frame types relating to deprecated multi-arf work. Added a dummy value for the USE_BUF_FRAME frame type in the declaration of the rd_frame_type_factor[FRAME_UPDATE_TYPES] structure. Change-Id: I7173f2fe33a53117e1bde6f9621efc1a5951240b --- vp9/encoder/vp9_firstpass.h | 9 ++------- vp9/encoder/vp9_rd.c | 8 +++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/vp9/encoder/vp9_firstpass.h b/vp9/encoder/vp9_firstpass.h index c12ef9cf2..8d0f335af 100644 --- a/vp9/encoder/vp9_firstpass.h +++ b/vp9/encoder/vp9_firstpass.h @@ -117,13 +117,8 @@ typedef enum { 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 diff --git a/vp9/encoder/vp9_rd.c b/vp9/encoder/vp9_rd.c index 9048499da..2e4a4fe9f 100644 --- a/vp9/encoder/vp9_rd.c +++ b/vp9/encoder/vp9_rd.c @@ -164,8 +164,14 @@ void vp9_init_me_luts(void) { 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); -- 2.40.0