ref: e6dcf2aeb6138b162412e42d8fc9db6deb5b05db
parent: a8e31d624aa50c15d8bf8e403ac8256b780eceed
author: Dmitry Kovalev <[email protected]>
date: Tue Oct 29 08:18:53 EDT 2013
Fixing wrongly initialized tx_type variable. Wrong value was used in get_tx_type_4x4() function, so making initialization before that call. Change-Id: Ief30bb1e0c03b2f23d993bbf9ae18d7150ba9a83
--- 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,