From: Dmitry Kovalev Date: Tue, 11 Mar 2014 01:47:41 +0000 (-0700) Subject: Using MAX_REF_FRAMES constant instead of number 4. X-Git-Tag: v1.4.0~2102^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b9c581393d23995a9866b50817fdb239c030796;p=libvpx Using MAX_REF_FRAMES constant instead of number 4. Change-Id: I6e2fec2814fd366a1ce1321208d3b0e8aa0d98b0 --- diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 10162096a..c7ba70ac1 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -2249,7 +2249,7 @@ static TX_MODE select_tx_mode(const VP9_COMP *cpi) { if (cpi->sf.tx_size_search_method == USE_LARGESTALL) { return ALLOW_32X32; } else if (cpi->sf.tx_size_search_method == USE_FULL_RD) { - const int frame_type = get_frame_type(cpi); + const MV_REFERENCE_FRAME frame_type = get_frame_type(cpi); return cpi->rd_tx_select_threshes[frame_type][ALLOW_32X32] > cpi->rd_tx_select_threshes[frame_type][TX_MODE_SELECT] ? ALLOW_32X32 : TX_MODE_SELECT; diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h index 1540d6e26..10583bcbc 100644 --- a/vp9/encoder/vp9_onyx_int.h +++ b/vp9/encoder/vp9_onyx_int.h @@ -682,13 +682,13 @@ typedef struct VP9_COMP { int rd_thresh_freq_sub8x8[BLOCK_SIZES][MAX_REFS]; int64_t rd_comp_pred_diff[REFERENCE_MODES]; - int64_t rd_prediction_type_threshes[4][REFERENCE_MODES]; + int64_t rd_prediction_type_threshes[MAX_REF_FRAMES][REFERENCE_MODES]; int64_t rd_tx_select_diff[TX_MODES]; // FIXME(rbultje) can this overflow? - int rd_tx_select_threshes[4][TX_MODES]; + int rd_tx_select_threshes[MAX_REF_FRAMES][TX_MODES]; int64_t rd_filter_diff[SWITCHABLE_FILTER_CONTEXTS]; - int64_t rd_filter_threshes[4][SWITCHABLE_FILTER_CONTEXTS]; + int64_t rd_filter_threshes[MAX_REF_FRAMES][SWITCHABLE_FILTER_CONTEXTS]; int64_t rd_filter_cache[SWITCHABLE_FILTER_CONTEXTS]; int64_t mask_filter_rd;