Commit da9397af authored by Luc Trudeau's avatar Luc Trudeau

unit_height does not need to be in the inner loop

Change-Id: Ib03758eb5ab32ee7d0f87d216bc5fad591578597
parent 7b517095
......@@ -156,9 +156,9 @@ void av1_foreach_transformed_block_in_plane(
// Keep track of the row and column of the blocks we use so that we know
// if we are in the unrestricted motion border.
for (r = 0; r < max_blocks_high; r += mu_blocks_high) {
const int unit_height = AOMMIN(mu_blocks_high + r, max_blocks_high);
// Skip visiting the sub blocks that are wholly within the UMV.
for (c = 0; c < max_blocks_wide; c += mu_blocks_wide) {
const int unit_height = AOMMIN(mu_blocks_high + r, max_blocks_high);
const int unit_width = AOMMIN(mu_blocks_wide + c, max_blocks_wide);
for (blk_row = r; blk_row < unit_height; blk_row += txh_unit) {
for (blk_col = c; blk_col < unit_width; blk_col += txw_unit) {
......
......@@ -2003,8 +2003,8 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi,
mu_blocks_high = AOMMIN(max_blocks_high, mu_blocks_high);
for (row = 0; row < max_blocks_high; row += mu_blocks_high) {
for (col = 0; col < max_blocks_wide; col += mu_blocks_wide) {
const int unit_height = AOMMIN(mu_blocks_high + row, max_blocks_high);
for (col = 0; col < max_blocks_wide; col += mu_blocks_wide) {
const int unit_width = AOMMIN(mu_blocks_wide + col, max_blocks_wide);
for (blk_row = row; blk_row < unit_height; blk_row += stepr)
......
......@@ -2628,9 +2628,9 @@ static void write_tokens_b(AV1_COMP *cpi, const TileInfo *const tile,
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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment