summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encodemb.c59
-rw-r--r--vp9/encoder/vp9_quantize.c28
-rw-r--r--vp9/encoder/vp9_rdopt.c38
-rw-r--r--vp9/encoder/vp9_tokenize.c6
4 files changed, 64 insertions, 67 deletions
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c
index 823e92d07..a11bb3ecf 100644
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -68,8 +68,8 @@ void vp9_subtract_sb(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
void vp9_transform_sby_32x32(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) - 1, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) - 1);
+ const int bwl = b_width_log2(bsize) - 3, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 3);
const int stride = 32 << bwl;
int n;
@@ -82,8 +82,8 @@ void vp9_transform_sby_32x32(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_transform_sby_16x16(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize), bw = 1 << bwl;
- const int bh = 1 << mb_height_log2(bsize);
+ const int bwl = b_width_log2(bsize) - 2, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 2);
const int stride = 16 << bwl, bstride = 4 << bwl;
MACROBLOCKD *const xd = &x->e_mbd;
int n;
@@ -105,8 +105,8 @@ void vp9_transform_sby_16x16(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_transform_sby_8x8(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 1, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) + 1);
+ const int bwl = b_width_log2(bsize) - 1, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 1);
const int stride = 8 << bwl, bstride = 2 << bwl;
MACROBLOCKD *const xd = &x->e_mbd;
int n;
@@ -126,8 +126,8 @@ void vp9_transform_sby_8x8(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_transform_sby_4x4(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 2, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) + 2);
+ const int bwl = b_width_log2(bsize), bw = 1 << bwl;
+ const int bh = 1 << b_height_log2(bsize);
const int stride = 4 << bwl;
MACROBLOCKD *const xd = &x->e_mbd;
int n;
@@ -154,7 +154,7 @@ void vp9_transform_sbuv_32x32(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_transform_sbuv_16x16(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize), bhl = mb_height_log2(bsize);
+ const int bwl = b_width_log2(bsize) - 2, bhl = b_height_log2(bsize) - 2;
const int bw = 1 << (bwl - 1), bh = 1 << (bhl - 1);
const int stride = 16 << (bwl - 1);
int n;
@@ -171,7 +171,7 @@ void vp9_transform_sbuv_16x16(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_transform_sbuv_8x8(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 1, bhl = mb_height_log2(bsize) + 1;
+ const int bwl = b_width_log2(bsize) - 1, bhl = b_height_log2(bsize) - 1;
const int bw = 1 << (bwl - 1), bh = 1 << (bhl - 1);
const int stride = 8 << (bwl - 1);
int n;
@@ -188,7 +188,7 @@ void vp9_transform_sbuv_8x8(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_transform_sbuv_4x4(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 2, bhl = mb_height_log2(bsize) + 2;
+ const int bwl = b_width_log2(bsize), bhl = b_height_log2(bsize);
const int bw = 1 << (bwl - 1), bh = 1 << (bhl - 1);
const int stride = 4 << (bwl - 1);
int n;
@@ -288,7 +288,7 @@ static void optimize_b(VP9_COMMON *const cm,
}
case TX_8X8: {
const BLOCK_SIZE_TYPE sb_type = xd->mode_info_context->mbmi.sb_type;
- const int sz = 3 + mb_width_log2(sb_type);
+ const int sz = 1 + b_width_log2(sb_type);
const int x = ib & ((1 << sz) - 1), y = ib - x;
const TX_TYPE tx_type = get_tx_type_8x8(xd, y + (x >> 1));
scan = get_scan_8x8(tx_type);
@@ -297,7 +297,7 @@ static void optimize_b(VP9_COMMON *const cm,
}
case TX_16X16: {
const BLOCK_SIZE_TYPE sb_type = xd->mode_info_context->mbmi.sb_type;
- const int sz = 4 + mb_width_log2(sb_type);
+ const int sz = 2 + b_width_log2(sb_type);
const int x = ib & ((1 << sz) - 1), y = ib - x;
const TX_TYPE tx_type = get_tx_type_16x16(xd, y + (x >> 2));
scan = get_scan_16x16(tx_type);
@@ -486,8 +486,8 @@ static void optimize_b(VP9_COMMON *const cm,
void vp9_optimize_sby_32x32(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) - 1, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) - 1);
+ const int bwl = b_width_log2(bsize) - 3, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 3);
ENTROPY_CONTEXT ta[2], tl[2];
int n;
@@ -516,8 +516,8 @@ void vp9_optimize_sby_32x32(VP9_COMMON *const cm, MACROBLOCK *x,
void vp9_optimize_sby_16x16(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize), bw = 1 << bwl;
- const int bh = 1 << mb_height_log2(bsize);
+ const int bwl = b_width_log2(bsize) - 2, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 2);
ENTROPY_CONTEXT ta[4], tl[4];
int n;
@@ -539,8 +539,8 @@ void vp9_optimize_sby_16x16(VP9_COMMON *const cm, MACROBLOCK *x,
void vp9_optimize_sby_8x8(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 1, bw = 1 << bwl;
- const int bh = 2 << mb_height_log2(bsize);
+ const int bwl = b_width_log2(bsize) - 1, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 1);
ENTROPY_CONTEXT ta[8], tl[8];
int n;
@@ -567,20 +567,17 @@ void vp9_optimize_sby_8x8(VP9_COMMON *const cm, MACROBLOCK *x,
void vp9_optimize_sby_4x4(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- int bwl = mb_width_log2(bsize), bw = 1 << bwl;
- int bh = 1 << mb_height_log2(bsize);
+ int bwl = b_width_log2(bsize), bw = 1 << bwl;
+ int bh = 1 << b_height_log2(bsize);
ENTROPY_CONTEXT ta[16], tl[16];
int n;
- for (n = 0; n < bw; n++)
- vpx_memcpy(&ta[n * 4], x->e_mbd.above_context + n,
+ for (n = 0; n < bw; n += 4)
+ vpx_memcpy(&ta[n], x->e_mbd.above_context + (n >> 2),
sizeof(ENTROPY_CONTEXT) * 4);
- for (n = 0; n < bh; n++)
- vpx_memcpy(&tl[n * 4], x->e_mbd.left_context + n,
+ for (n = 0; n < bh; n += 4)
+ vpx_memcpy(&tl[n], x->e_mbd.left_context + (n >> 2),
sizeof(ENTROPY_CONTEXT) * 4);
- bw *= 4;
- bh *= 4;
- bwl += 2;
for (n = 0; n < bw * bh; n++) {
const int x_idx = n & (bw - 1), y_idx = n >> bwl;
@@ -617,7 +614,7 @@ void vp9_optimize_sbuv_32x32(VP9_COMMON *const cm, MACROBLOCK *x,
void vp9_optimize_sbuv_16x16(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize), bhl = mb_height_log2(bsize);
+ const int bwl = b_width_log2(bsize) - 2, bhl = b_height_log2(bsize) - 2;
const int bw = 1 << (bwl - 1);
const int bh = 1 << (bhl - 1);
int uvoff = 16 << (bwl + bhl);
@@ -651,7 +648,7 @@ void vp9_optimize_sbuv_16x16(VP9_COMMON *const cm, MACROBLOCK *x,
void vp9_optimize_sbuv_8x8(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 1, bhl = mb_height_log2(bsize) + 1;
+ const int bwl = b_width_log2(bsize) - 1, bhl = b_height_log2(bsize) - 1;
const int bw = 1 << (bwl - 1);
const int bh = 1 << (bhl - 1);
int uvoff = 4 << (bwl + bhl);
@@ -683,7 +680,7 @@ void vp9_optimize_sbuv_8x8(VP9_COMMON *const cm, MACROBLOCK *x,
void vp9_optimize_sbuv_4x4(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 2, bhl = mb_height_log2(bsize) + 2;
+ const int bwl = b_width_log2(bsize), bhl = b_height_log2(bsize);
const int bw = 1 << (bwl - 1);
const int bh = 1 << (bhl - 1);
int uvoff = 1 << (bwl + bhl);
diff --git a/vp9/encoder/vp9_quantize.c b/vp9/encoder/vp9_quantize.c
index b275ab19b..3c60af76b 100644
--- a/vp9/encoder/vp9_quantize.c
+++ b/vp9/encoder/vp9_quantize.c
@@ -327,8 +327,8 @@ void vp9_regular_quantize_b_32x32(MACROBLOCK *mb, int b_idx, int y_blocks) {
}
void vp9_quantize_sby_32x32(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bw = 1 << (mb_width_log2(bsize) - 1);
- const int bh = 1 << (mb_height_log2(bsize) - 1);
+ const int bw = 1 << (b_width_log2(bsize) - 3);
+ const int bh = 1 << (b_height_log2(bsize) - 3);
int n;
for (n = 0; n < bw * bh; n++)
@@ -336,8 +336,8 @@ void vp9_quantize_sby_32x32(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_quantize_sby_16x16(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize), bw = 1 << bwl;
- const int bh = 1 << mb_height_log2(bsize);
+ const int bwl = b_width_log2(bsize) - 2, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 2);
const int bstride = 16 << bwl;
int n;
@@ -350,8 +350,8 @@ void vp9_quantize_sby_16x16(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_quantize_sby_8x8(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 1, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) + 1);
+ const int bwl = b_width_log2(bsize) - 1, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 1);
const int bstride = 4 << bwl;
int n;
@@ -364,8 +364,8 @@ void vp9_quantize_sby_8x8(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_quantize_sby_4x4(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 2, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) + 2);
+ const int bwl = b_width_log2(bsize), bw = 1 << bwl;
+ const int bh = 1 << b_height_log2(bsize);
MACROBLOCKD *const xd = &x->e_mbd;
int n;
@@ -386,8 +386,8 @@ void vp9_quantize_sbuv_32x32(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_quantize_sbuv_16x16(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize);
- const int bhl = mb_height_log2(bsize);
+ const int bwl = b_width_log2(bsize) - 2;
+ const int bhl = b_height_log2(bsize) - 2;
const int uoff = 16 << (bhl + bwl);
int i;
@@ -396,8 +396,8 @@ void vp9_quantize_sbuv_16x16(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_quantize_sbuv_8x8(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize);
- const int bhl = mb_height_log2(bsize);
+ const int bwl = b_width_log2(bsize) - 2;
+ const int bhl = b_height_log2(bsize) - 2;
const int uoff = 16 << (bhl + bwl);
int i;
@@ -406,8 +406,8 @@ void vp9_quantize_sbuv_8x8(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
}
void vp9_quantize_sbuv_4x4(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize);
- const int bhl = mb_height_log2(bsize);
+ const int bwl = b_width_log2(bsize) - 2;
+ const int bhl = b_height_log2(bsize) - 2;
const int uoff = 16 << (bhl + bwl);
int i;
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 5c4402a5b..6778c09b0 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -360,7 +360,7 @@ static INLINE int cost_coeffs(VP9_COMMON *const cm, MACROBLOCK *mb,
}
case TX_8X8: {
const BLOCK_SIZE_TYPE sb_type = xd->mode_info_context->mbmi.sb_type;
- const int sz = 3 + mb_width_log2(sb_type);
+ const int sz = 1 + b_width_log2(sb_type);
const int x = ib & ((1 << sz) - 1), y = ib - x;
TX_TYPE tx_type = (type == PLANE_TYPE_Y_WITH_DC) ?
get_tx_type_8x8(xd, y + (x >> 1)) : DCT_DCT;
@@ -376,7 +376,7 @@ static INLINE int cost_coeffs(VP9_COMMON *const cm, MACROBLOCK *mb,
}
case TX_16X16: {
const BLOCK_SIZE_TYPE sb_type = xd->mode_info_context->mbmi.sb_type;
- const int sz = 4 + mb_width_log2(sb_type);
+ const int sz = 2 + b_width_log2(sb_type);
const int x = ib & ((1 << sz) - 1), y = ib - x;
TX_TYPE tx_type = (type == PLANE_TYPE_Y_WITH_DC) ?
get_tx_type_16x16(xd, y + (x >> 2)) : DCT_DCT;
@@ -666,8 +666,8 @@ static int block_error_sbuv(MACROBLOCK *x, BLOCK_SIZE_TYPE bsize, int shift) {
static int rdcost_sby_4x4(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 2, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) + 2);
+ const int bwl = b_width_log2(bsize), bw = 1 << bwl;
+ const int bh = 1 << b_height_log2(bsize);
int cost = 0, b;
MACROBLOCKD *const xd = &x->e_mbd;
ENTROPY_CONTEXT_PLANES t_above[4], t_left[4];
@@ -691,7 +691,7 @@ static int rdcost_sby_4x4(VP9_COMMON *const cm, MACROBLOCK *x,
static void super_block_yrd_4x4(VP9_COMMON *const cm, MACROBLOCK *x,
int *rate, int *distortion, int *skippable,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 2, bhl = mb_height_log2(bsize) + 2;
+ const int bwl = b_width_log2(bsize), bhl = b_height_log2(bsize);
MACROBLOCKD *const xd = &x->e_mbd;
xd->mode_info_context->mbmi.txfm_size = TX_4X4;
@@ -705,8 +705,8 @@ static void super_block_yrd_4x4(VP9_COMMON *const cm, MACROBLOCK *x,
static int rdcost_sby_8x8(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 1, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) + 1);
+ const int bwl = b_width_log2(bsize) - 1, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 1);
int cost = 0, b;
MACROBLOCKD *const xd = &x->e_mbd;
ENTROPY_CONTEXT_PLANES t_above[4], t_left[4];
@@ -744,8 +744,8 @@ static void super_block_yrd_8x8(VP9_COMMON *const cm, MACROBLOCK *x,
static int rdcost_sby_16x16(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize), bw = 1 << bwl;
- const int bh = 1 << mb_height_log2(bsize);
+ const int bwl = b_width_log2(bsize) - 2, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 2);
int cost = 0, b;
MACROBLOCKD *const xd = &x->e_mbd;
ENTROPY_CONTEXT_PLANES t_above[4], t_left[4];
@@ -781,8 +781,8 @@ static void super_block_yrd_16x16(VP9_COMMON *const cm, MACROBLOCK *x,
static int rdcost_sby_32x32(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) - 1, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) - 1);
+ const int bwl = b_width_log2(bsize) - 3, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 3);
int cost = 0, b;
MACROBLOCKD * const xd = &x->e_mbd;
ENTROPY_CONTEXT_PLANES t_above[4], t_left[4];
@@ -1345,8 +1345,8 @@ static int64_t rd_pick_intra8x8mby_modes_and_txsz(VP9_COMP *cpi, MACROBLOCK *x,
#define UVCTX(c, p) ((p) ? (c).v : (c).u)
static int rd_cost_sbuv_4x4(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 1, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) + 1);
+ const int bwl = b_width_log2(bsize) - 1, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 1);
int yoff = 4 * bw * bh;
int p, b, cost = 0;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -1386,8 +1386,8 @@ static void super_block_uvrd_4x4(VP9_COMMON *const cm, MACROBLOCK *x,
static int rd_cost_sbuv_8x8(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize), bw = 1 << bwl;
- const int bh = 1 << mb_height_log2(bsize);
+ const int bwl = b_width_log2(bsize) - 2, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 2);
int yoff = 16 * bw * bh;
int p, b, cost = 0;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -1427,8 +1427,8 @@ static void super_block_uvrd_8x8(VP9_COMMON *const cm, MACROBLOCK *x,
static int rd_cost_sbuv_16x16(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) - 1, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) - 1);
+ const int bwl = b_width_log2(bsize) - 3, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 3);
int yoff = 64 * bw * bh;
int p, b, cost = 0;
MACROBLOCKD *const xd = &x->e_mbd;
@@ -1468,8 +1468,8 @@ static void super_block_uvrd_16x16(VP9_COMMON *const cm, MACROBLOCK *x,
static int rd_cost_sbuv_32x32(VP9_COMMON *const cm, MACROBLOCK *x,
BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) - 2, bw = 1 << bwl;
- const int bh = 1 << (mb_height_log2(bsize) - 2);
+ const int bwl = b_width_log2(bsize) - 4, bw = 1 << bwl;
+ const int bh = 1 << (b_height_log2(bsize) - 4);
int yoff = 256 * bh * bw;
int p, b, cost = 0;
MACROBLOCKD *const xd = &x->e_mbd;
diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c
index 0edf126bd..67e139053 100644
--- a/vp9/encoder/vp9_tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -210,7 +210,7 @@ static void tokenize_b(VP9_COMP *cpi,
break;
}
case TX_8X8: {
- const int sz = 3 + mb_width_log2(sb_type);
+ const int sz = 1 + b_width_log2(sb_type);
const int x = ib & ((1 << sz) - 1), y = ib - x;
tx_type = (type == PLANE_TYPE_Y_WITH_DC) ?
get_tx_type_8x8(xd, y + (x >> 1)) : DCT_DCT;
@@ -227,7 +227,7 @@ static void tokenize_b(VP9_COMP *cpi,
break;
}
case TX_16X16: {
- const int sz = 4 + mb_width_log2(sb_type);
+ const int sz = 2 + b_width_log2(sb_type);
const int x = ib & ((1 << sz) - 1), y = ib - x;
tx_type = (type == PLANE_TYPE_Y_WITH_DC) ?
get_tx_type_16x16(xd, y + (x >> 2)) : DCT_DCT;
@@ -468,7 +468,7 @@ void vp9_tokenize_sb(VP9_COMP *cpi,
MACROBLOCKD *xd,
TOKENEXTRA **t,
int dry_run, BLOCK_SIZE_TYPE bsize) {
- const int bwl = mb_width_log2(bsize) + 2, bhl = mb_height_log2(bsize) + 2;
+ const int bwl = b_width_log2(bsize), bhl = b_height_log2(bsize);
VP9_COMMON * const cm = &cpi->common;
MB_MODE_INFO * const mbmi = &xd->mode_info_context->mbmi;
TOKENEXTRA *t_backup = *t;