Rename MAXIMUM_NUM_OF_TX_MODES using the same convention as... Rename MAXIMUM_NUM_OF_TX_MODES using the same convention as TOP_DIP_INTRA_MODEL_COUNT / TOP_INTRA_MODEL_COUNT.
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c index 0f7851f..0440e50 100644 --- a/av1/encoder/rdopt.c +++ b/av1/encoder/rdopt.c
@@ -2157,18 +2157,19 @@ static int prune_motion_mode(int64_t this_model_rd, int64_t top_motion_mode_model_rd[]) { const double thresh_top = 1.00; - for (int i = 0; i < MAXIMUM_NUM_OF_TX_MODES; i++) { + for (int i = 0; i < TOP_MOTION_MODE_MODEL_COUNT; i++) { if (this_model_rd < top_motion_mode_model_rd[i]) { - for (int j = MAXIMUM_NUM_OF_TX_MODES - 1; j > i; j--) { + for (int j = TOP_MOTION_MODE_MODEL_COUNT - 1; j > i; j--) { top_motion_mode_model_rd[j] = top_motion_mode_model_rd[j - 1]; } top_motion_mode_model_rd[i] = this_model_rd; break; } } - if (top_motion_mode_model_rd[MAXIMUM_NUM_OF_TX_MODES - 1] != INT64_MAX && + if (top_motion_mode_model_rd[TOP_MOTION_MODE_MODEL_COUNT - 1] != INT64_MAX && this_model_rd > - thresh_top * top_motion_mode_model_rd[MAXIMUM_NUM_OF_TX_MODES - 1]) + thresh_top * + top_motion_mode_model_rd[TOP_MOTION_MODE_MODEL_COUNT - 1]) return 1; return 0; @@ -4763,10 +4764,10 @@ } #if !CONFIG_FAST_INTER_RDO - int64_t top_motion_mode_model_rd[MAXIMUM_NUM_OF_TX_MODES]; + int64_t top_motion_mode_model_rd[TOP_MOTION_MODE_MODEL_COUNT]; uint8_t enable_tx_prune = do_tx_search; if (enable_tx_prune) { - for (int k = 0; k < MAXIMUM_NUM_OF_TX_MODES; k++) { + for (int k = 0; k < TOP_MOTION_MODE_MODEL_COUNT; k++) { top_motion_mode_model_rd[k] = INT64_MAX; } } @@ -8666,10 +8667,10 @@ // frames. for (PREDICTION_MODE this_mode = 0; this_mode < MB_MODE_COUNT; ++this_mode) { #if CONFIG_FAST_INTER_RDO - int64_t top_motion_mode_model_rd[MAXIMUM_NUM_OF_TX_MODES]; + int64_t top_motion_mode_model_rd[TOP_MOTION_MODE_MODEL_COUNT]; uint8_t enable_tx_prune = do_tx_search; if (enable_tx_prune) { - for (int k = 0; k < MAXIMUM_NUM_OF_TX_MODES; k++) { + for (int k = 0; k < TOP_MOTION_MODE_MODEL_COUNT; k++) { top_motion_mode_model_rd[k] = INT64_MAX; } }
diff --git a/av1/encoder/rdopt.h b/av1/encoder/rdopt.h index dc69de9..31ee5b4 100644 --- a/av1/encoder/rdopt.h +++ b/av1/encoder/rdopt.h
@@ -33,9 +33,9 @@ #define MAX_WINNER_MOTION_MODES 10 #if CONFIG_FAST_INTER_RDO -#define MAXIMUM_NUM_OF_TX_MODES 10 +#define TOP_MOTION_MODE_MODEL_COUNT 10 #else -#define MAXIMUM_NUM_OF_TX_MODES 8 +#define TOP_MOTION_MODE_MODEL_COUNT 8 #endif // CONFIG_FAST_INTER_RDO struct TileInfo;