summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-08-22 01:37:21 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-08-22 01:37:21 -0700
commita33f1784913f0d647741da2cf9807187da9b823f (patch)
tree473a78fd4278200d99300f44d91c1b4d6ad63ae5 /vp9
parent359b571448c98a7fe7466f2bc9e840e87737bc56 (diff)
parent4172d7c584cc36768b957233d2fbca23914dbec8 (diff)
downloadlibvpx-a33f1784913f0d647741da2cf9807187da9b823f.tar
libvpx-a33f1784913f0d647741da2cf9807187da9b823f.tar.gz
libvpx-a33f1784913f0d647741da2cf9807187da9b823f.tar.bz2
libvpx-a33f1784913f0d647741da2cf9807187da9b823f.zip
Merge "Cleaning up foreach_transformed_block_in_plane."
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/vp9_blockd.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h
index 3c5984a89..d6ba525a6 100644
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -400,8 +400,8 @@ static INLINE void foreach_transformed_block_in_plane(
const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi)
: mbmi->txfm_size;
const BLOCK_SIZE_TYPE plane_bsize = get_plane_block_size(bsize, pd);
- const int bw = b_width_log2(plane_bsize);
- const int bh = b_height_log2(plane_bsize);
+ const int num_4x4_w = num_4x4_blocks_wide_lookup[plane_bsize];
+ const int num_4x4_h = num_4x4_blocks_high_lookup[plane_bsize];
const int step = 1 << (tx_size << 1);
int i;
@@ -411,8 +411,8 @@ static INLINE void foreach_transformed_block_in_plane(
if (xd->mb_to_right_edge < 0 || xd->mb_to_bottom_edge < 0) {
int r, c;
- int max_blocks_wide = 1 << bw;
- int max_blocks_high = 1 << bh;
+ int max_blocks_wide = num_4x4_w;
+ int max_blocks_high = num_4x4_h;
// xd->mb_to_right_edge is in units of pixels * 8. This converts
// it to 4x4 block sizes.
@@ -426,15 +426,15 @@ static INLINE void foreach_transformed_block_in_plane(
// Unlike the normal case - in here we have to 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 < (1 << bh); r += (1 << tx_size)) {
- for (c = 0; c < (1 << bw); c += (1 << tx_size)) {
+ for (r = 0; r < num_4x4_h; r += (1 << tx_size)) {
+ for (c = 0; c < num_4x4_w; c += (1 << tx_size)) {
if (r < max_blocks_high && c < max_blocks_wide)
visit(plane, i, plane_bsize, tx_size, arg);
i += step;
}
}
} else {
- for (i = 0; i < (1 << (bw + bh)); i += step)
+ for (i = 0; i < num_4x4_w * num_4x4_h; i += step)
visit(plane, i, plane_bsize, tx_size, arg);
}
}