ref: b4139d582da35b8ead22d6dc77055ab31175034e
parent: cb035614d094a943fb45d16c65f1e5c3b19fe50c
parent: e6dcf2aeb6138b162412e42d8fc9db6deb5b05db
author: Dmitry Kovalev <[email protected]>
date: Tue Oct 29 10:07:16 EDT 2013
Merge "Fixing wrongly initialized tx_type variable."
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1032,7 +1032,7 @@
ENTROPY_CONTEXT ta[2], tempa[2];
ENTROPY_CONTEXT tl[2], templ[2];
- TX_TYPE tx_type = DCT_DCT;
+
const int num_4x4_blocks_wide = num_4x4_blocks_wide_lookup[bsize];
const int num_4x4_blocks_high = num_4x4_blocks_high_lookup[bsize];
int idx, idy;
@@ -1072,8 +1072,7 @@
uint8_t *src = src_init + idx * 4 + idy * 4 * src_stride;
uint8_t *dst = dst_init + idx * 4 + idy * 4 * dst_stride;
const int block = ib + idy * 2 + idx;
-
- get_scan_nb_4x4(tx_type, &scan, &nb);
+ TX_TYPE tx_type;
xd->mi_8x8[0]->bmi[block].as_mode = mode;
src_diff = raster_block_offset_int16(BLOCK_8X8, block, p->src_diff);
coeff = BLOCK_OFFSET(x->plane[0].coeff, block);
@@ -1087,10 +1086,13 @@
dst, dst_stride);
tx_type = get_tx_type_4x4(PLANE_TYPE_Y_WITH_DC, xd, block);
+ get_scan_nb_4x4(tx_type, &scan, &nb);
+
if (tx_type != DCT_DCT)
vp9_short_fht4x4(src_diff, coeff, 8, tx_type);
else
x->fwd_txm4x4(src_diff, coeff, 8);
+
vp9_regular_quantize_b_4x4(x, 16, block, scan, get_iscan_4x4(tx_type));
ratey += cost_coeffs(x, 0, block,