unit_height does not need to be in the inner loop
Change-Id: Ib03758eb5ab32ee7d0f87d216bc5fad591578597
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 69d16d1..856e367 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -2628,9 +2628,9 @@
const int bkw = tx_size_wide_unit[max_tx_size];
const int bkh = tx_size_high_unit[max_tx_size];
for (row = 0; row < num_4x4_h; row += mu_blocks_high) {
+ const int unit_height = AOMMIN(mu_blocks_high + row, num_4x4_h);
for (col = 0; col < num_4x4_w; col += mu_blocks_wide) {
int blk_row, blk_col;
- const int unit_height = AOMMIN(mu_blocks_high + row, num_4x4_h);
const int unit_width = AOMMIN(mu_blocks_wide + col, num_4x4_w);
for (blk_row = row; blk_row < unit_height; blk_row += bkh) {
for (blk_col = col; blk_col < unit_width; blk_col += bkw) {