Cleanup for the entropy experiment
Minor performance changes
0.03% better on lowres
0.01% better on midres
Change-Id: I7a7168f3a2a4d17a03353841a416eff6edf1e241
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 3fde419..6264d4c 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -4641,10 +4641,9 @@
#if CONFIG_ENTROPY
if (cm->do_subframe_update &&
cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) {
- if ((mi_row + MI_SIZE) %
- (MI_SIZE *
- AOMMAX(cm->mi_rows / MI_SIZE / COEF_PROBS_BUFS, 1)) ==
- 0 &&
+ const int mi_rows_per_update =
+ MI_SIZE * AOMMAX(cm->mi_rows / MI_SIZE / COEF_PROBS_BUFS, 1);
+ if ((mi_row + MI_SIZE) % mi_rows_per_update == 0 &&
mi_row + MI_SIZE < cm->mi_rows &&
cm->coef_probs_update_idx < COEF_PROBS_BUFS - 1) {
TX_SIZE t;