summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@google.com>2013-01-10 08:23:59 -0800
committerRonald S. Bultje <rbultje@google.com>2013-01-10 08:23:59 -0800
commitaa2effa954782b04db3acc93c1daeaa2c2ba1553 (patch)
tree9fdf7dbb40b781cf2ea083bdf56a72c4cff6c0bb /vp9/encoder
parent460501fe8467e93551bde48ce521bc4fe089e2ec (diff)
downloadlibvpx-aa2effa954782b04db3acc93c1daeaa2c2ba1553.tar
libvpx-aa2effa954782b04db3acc93c1daeaa2c2ba1553.tar.gz
libvpx-aa2effa954782b04db3acc93c1daeaa2c2ba1553.tar.bz2
libvpx-aa2effa954782b04db3acc93c1daeaa2c2ba1553.zip
Merge tx32x32 experiment.
Change-Id: I615651e4c7b09e576a341ad425cf80c393637833
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_bitstream.c24
-rw-r--r--vp9/encoder/vp9_block.h10
-rw-r--r--vp9/encoder/vp9_dct.c6
-rw-r--r--vp9/encoder/vp9_encodeframe.c59
-rw-r--r--vp9/encoder/vp9_encodemb.c4
-rw-r--r--vp9/encoder/vp9_encodemb.h4
-rw-r--r--vp9/encoder/vp9_onyx_if.c2
-rw-r--r--vp9/encoder/vp9_onyx_int.h6
-rw-r--r--vp9/encoder/vp9_quantize.c16
-rw-r--r--vp9/encoder/vp9_quantize.h2
-rw-r--r--vp9/encoder/vp9_ratectrl.c4
-rw-r--r--vp9/encoder/vp9_rdopt.c58
-rw-r--r--vp9/encoder/vp9_tokenize.c46
-rw-r--r--vp9/encoder/vp9_tokenize.h6
14 files changed, 16 insertions, 231 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c
index ba06bffbf..d8659cbf8 100644
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -972,10 +972,8 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
vp9_write(bc, sz != TX_4X4, pc->prob_tx[0]);
if (sz != TX_4X4 && mode != I8X8_PRED && mode != SPLITMV) {
vp9_write(bc, sz != TX_8X8, pc->prob_tx[1]);
-#if CONFIG_TX32X32
if (mi->sb_type && sz != TX_8X8)
vp9_write(bc, sz != TX_16X16, pc->prob_tx[2]);
-#endif
}
}
}
@@ -1078,10 +1076,8 @@ static void write_mb_modes_kf(const VP9_COMP *cpi,
vp9_write(bc, sz != TX_4X4, c->prob_tx[0]);
if (sz != TX_4X4 && ym <= TM_PRED) {
vp9_write(bc, sz != TX_8X8, c->prob_tx[1]);
-#if CONFIG_TX32X32
if (m->mbmi.sb_type && sz != TX_8X8)
vp9_write(bc, sz != TX_16X16, c->prob_tx[2]);
-#endif
}
}
}
@@ -1262,14 +1258,12 @@ static void build_coeff_contexts(VP9_COMP *cpi) {
cpi, hybrid_context_counters_16x16,
#endif
cpi->frame_hybrid_branch_ct_16x16, BLOCK_TYPES_16X16);
-#if CONFIG_TX32X32
build_tree_distribution(cpi->frame_coef_probs_32x32,
cpi->coef_counts_32x32,
#ifdef ENTROPY_STATS
cpi, context_counters_32x32,
#endif
cpi->frame_branch_ct_32x32, BLOCK_TYPES_32X32);
-#endif
}
static void update_coef_probs_common(vp9_writer* const bc,
@@ -1446,7 +1440,6 @@ static void update_coef_probs(VP9_COMP* const cpi, vp9_writer* const bc) {
BLOCK_TYPES_16X16);
}
-#if CONFIG_TX32X32
if (cpi->common.txfm_mode > ALLOW_16X16) {
update_coef_probs_common(bc,
#ifdef ENTROPY_STATS
@@ -1458,7 +1451,6 @@ static void update_coef_probs(VP9_COMP* const cpi, vp9_writer* const bc) {
cpi->frame_branch_ct_32x32,
BLOCK_TYPES_32X32);
}
-#endif
}
#ifdef PACKET_TESTING
@@ -1699,9 +1691,7 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
cpi->txfm_count_32x32p[TX_4X4] +
cpi->txfm_count_32x32p[TX_8X8] +
cpi->txfm_count_32x32p[TX_16X16] +
-#if CONFIG_TX32X32
cpi->txfm_count_32x32p[TX_32X32] +
-#endif
cpi->txfm_count_16x16p[TX_4X4] +
cpi->txfm_count_16x16p[TX_8X8] +
cpi->txfm_count_16x16p[TX_16X16] +
@@ -1711,35 +1701,25 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
cpi->txfm_count_16x16p[TX_8X8],
cpi->txfm_count_32x32p[TX_8X8] +
cpi->txfm_count_32x32p[TX_16X16] +
-#if CONFIG_TX32X32
cpi->txfm_count_32x32p[TX_32X32] +
-#endif
cpi->txfm_count_16x16p[TX_8X8] +
cpi->txfm_count_16x16p[TX_16X16]);
-#if CONFIG_TX32X32
pc->prob_tx[2] = get_prob(cpi->txfm_count_32x32p[TX_16X16],
cpi->txfm_count_32x32p[TX_16X16] +
cpi->txfm_count_32x32p[TX_32X32]);
-#endif
} else {
pc->prob_tx[0] = 128;
pc->prob_tx[1] = 128;
-#if CONFIG_TX32X32
pc->prob_tx[2] = 128;
-#endif
}
vp9_write_literal(&header_bc, pc->txfm_mode <= 3 ? pc->txfm_mode : 3, 2);
-#if CONFIG_TX32X32
if (pc->txfm_mode > ALLOW_16X16) {
vp9_write_bit(&header_bc, pc->txfm_mode == TX_MODE_SELECT);
}
-#endif
if (pc->txfm_mode == TX_MODE_SELECT) {
vp9_write_literal(&header_bc, pc->prob_tx[0], 8);
vp9_write_literal(&header_bc, pc->prob_tx[1], 8);
-#if CONFIG_TX32X32
vp9_write_literal(&header_bc, pc->prob_tx[2], 8);
-#endif
}
}
@@ -1960,10 +1940,8 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
cpi->common.fc.coef_probs_16x16);
vp9_copy(cpi->common.fc.pre_hybrid_coef_probs_16x16,
cpi->common.fc.hybrid_coef_probs_16x16);
-#if CONFIG_TX32X32
vp9_copy(cpi->common.fc.pre_coef_probs_32x32,
cpi->common.fc.coef_probs_32x32);
-#endif
vp9_copy(cpi->common.fc.pre_sb_ymode_prob, cpi->common.fc.sb_ymode_prob);
vp9_copy(cpi->common.fc.pre_ymode_prob, cpi->common.fc.ymode_prob);
vp9_copy(cpi->common.fc.pre_uv_mode_prob, cpi->common.fc.uv_mode_prob);
@@ -2125,10 +2103,8 @@ void print_tree_update_probs() {
print_tree_update_for_type(f, hybrid_tree_update_hist_16x16,
BLOCK_TYPES_16X16,
"vp9_coef_update_probs_16x16[BLOCK_TYPES_16X16]");
-#if CONFIG_TX32X32
print_tree_update_for_type(f, tree_update_hist_32x32, BLOCK_TYPES_32X32,
"vp9_coef_update_probs_32x32[BLOCK_TYPES_32X32]");
-#endif
fclose(f);
f = fopen("treeupdate.bin", "wb");
diff --git a/vp9/encoder/vp9_block.h b/vp9/encoder/vp9_block.h
index f856daddf..1960b9162 100644
--- a/vp9/encoder/vp9_block.h
+++ b/vp9/encoder/vp9_block.h
@@ -35,15 +35,11 @@ typedef struct block {
int16_t *zbin;
int16_t *zbin_8x8;
int16_t *zbin_16x16;
-#if CONFIG_TX32X32
int16_t *zbin_32x32;
-#endif
int16_t *zrun_zbin_boost;
int16_t *zrun_zbin_boost_8x8;
int16_t *zrun_zbin_boost_16x16;
-#if CONFIG_TX32X32
int16_t *zrun_zbin_boost_32x32;
-#endif
int16_t *round;
// Zbin Over Quant value
@@ -57,9 +53,7 @@ typedef struct block {
int eob_max_offset;
int eob_max_offset_8x8;
int eob_max_offset_16x16;
-#if CONFIG_TX32X32
int eob_max_offset_32x32;
-#endif
} BLOCK;
typedef struct {
@@ -92,12 +86,10 @@ typedef struct {
int64_t txfm_rd_diff[NB_TXFM_MODES];
} PICK_MODE_CONTEXT;
-#if CONFIG_TX32X32
typedef struct superblock {
DECLARE_ALIGNED(16, int16_t, src_diff[32*32+16*16*2]);
DECLARE_ALIGNED(16, int16_t, coeff[32*32+16*16*2]);
} SUPERBLOCK;
-#endif
typedef struct macroblock {
DECLARE_ALIGNED(16, int16_t, src_diff[400]); // 16x16 Y 8x8 U 8x8 V 4x4 2nd Y
@@ -106,9 +98,7 @@ typedef struct macroblock {
// 1 DC 2nd order block each with 16 entries
BLOCK block[25];
-#if CONFIG_TX32X32
SUPERBLOCK sb_coeff_data;
-#endif
YV12_BUFFER_CONFIG src;
diff --git a/vp9/encoder/vp9_dct.c b/vp9/encoder/vp9_dct.c
index 0de6393a0..46d8ca315 100644
--- a/vp9/encoder/vp9_dct.c
+++ b/vp9/encoder/vp9_dct.c
@@ -1332,9 +1332,7 @@ void vp9_short_fdct16x16_c(int16_t *input, int16_t *out, int pitch) {
#undef ROUNDING
#endif
-#if CONFIG_TX32X32 || CONFIG_TX64X64
#if !CONFIG_DWTDCTHYBRID
-#if CONFIG_TX32X32
static void dct32_1d(double *input, double *output, int stride) {
static const double C1 = 0.998795456205; // cos(pi * 1 / 64)
static const double C2 = 0.995184726672; // cos(pi * 2 / 64)
@@ -1685,7 +1683,6 @@ void vp9_short_fdct32x32_c(int16_t *input, int16_t *out, int pitch) {
vp9_clear_system_state(); // Make it simd safe : __asm emms;
}
-#endif // CONFIG_TX32X32
#else // CONFIG_DWTDCTHYBRID
@@ -2142,7 +2139,6 @@ static void vp9_short_fdct16x16_c_f(short *input, short *out, int pitch,
vp9_clear_system_state(); // Make it simd safe : __asm emms;
}
-#if CONFIG_TX32X32
void vp9_short_fdct32x32_c(short *input, short *out, int pitch) {
// assume out is a 32x32 buffer
short buffer[16 * 16];
@@ -2173,7 +2169,6 @@ void vp9_short_fdct32x32_c(short *input, short *out, int pitch) {
for (i = 0; i < 16; ++i)
vpx_memcpy(out + i * 32 + 33 * 16, buffer + i * 16, sizeof(short) * 16);
}
-#endif // CONFIG_TX32X32
#if CONFIG_TX64X64
void vp9_short_fdct64x64_c(short *input, short *out, int pitch) {
@@ -2235,4 +2230,3 @@ void vp9_short_fdct64x64_c(short *input, short *out, int pitch) {
}
#endif // CONFIG_TX64X64
#endif // CONFIG_DWTDCTHYBRID
-#endif // CONFIG_TX32X32 || CONFIG_TX64X64
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 0abf22cff..3ae8bd6d6 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -461,11 +461,9 @@ static void update_state(VP9_COMP *cpi,
}
}
}
-#if CONFIG_TX32X32
if (block_size == 16) {
ctx->txfm_rd_diff[ALLOW_32X32] = ctx->txfm_rd_diff[ALLOW_16X16];
}
-#endif
if (mb_mode == B_PRED) {
for (i = 0; i < 16; i++) {
@@ -1299,9 +1297,7 @@ static void encode_frame_internal(VP9_COMP *cpi) {
vp9_zero(cpi->hybrid_coef_counts_8x8);
vp9_zero(cpi->coef_counts_16x16);
vp9_zero(cpi->hybrid_coef_counts_16x16);
-#if CONFIG_TX32X32
vp9_zero(cpi->coef_counts_32x32);
-#endif
#if CONFIG_NEW_MVREF
vp9_zero(cpi->mb_mv_ref_count);
#endif
@@ -1570,11 +1566,7 @@ void vp9_encode_frame(VP9_COMP *cpi) {
* keyframe's probabilities as an estimate of what the current keyframe's
* coefficient cost distributions may look like. */
if (frame_type == 0) {
-#if CONFIG_TX32X32
txfm_type = ALLOW_32X32;
-#else
- txfm_type = ALLOW_16X16;
-#endif
} else
#if 0
/* FIXME (rbultje)
@@ -1605,15 +1597,9 @@ void vp9_encode_frame(VP9_COMP *cpi) {
} else
txfm_type = ALLOW_8X8;
#else
-#if CONFIG_TX32X32
txfm_type = cpi->rd_tx_select_threshes[frame_type][ALLOW_32X32] >=
- cpi->rd_tx_select_threshes[frame_type][TX_MODE_SELECT] ?
- ALLOW_32X32 : TX_MODE_SELECT;
-#else
- txfm_type = cpi->rd_tx_select_threshes[frame_type][ALLOW_16X16] >=
- cpi->rd_tx_select_threshes[frame_type][TX_MODE_SELECT] ?
- ALLOW_16X16 : TX_MODE_SELECT;
-#endif
+ cpi->rd_tx_select_threshes[frame_type][TX_MODE_SELECT] ?
+ ALLOW_32X32 : TX_MODE_SELECT;
#endif
cpi->common.txfm_mode = txfm_type;
if (txfm_type != TX_MODE_SELECT) {
@@ -1665,11 +1651,7 @@ void vp9_encode_frame(VP9_COMP *cpi) {
const int count8x8_8x8p = cpi->txfm_count_8x8p[TX_8X8];
const int count16x16_16x16p = cpi->txfm_count_16x16p[TX_16X16];
const int count16x16_lp = cpi->txfm_count_32x32p[TX_16X16];
-#if CONFIG_TX32X32
const int count32x32 = cpi->txfm_count_32x32p[TX_32X32];
-#else
- const int count32x32 = 0;
-#endif
if (count4x4 == 0 && count16x16_lp == 0 && count16x16_16x16p == 0 &&
count32x32 == 0) {
@@ -1679,15 +1661,11 @@ void vp9_encode_frame(VP9_COMP *cpi) {
count8x8_lp == 0 && count16x16_lp == 0 && count32x32 == 0) {
cpi->common.txfm_mode = ONLY_4X4;
reset_skip_txfm_size(cpi, TX_4X4);
-#if CONFIG_TX32X32
} else if (count8x8_lp == 0 && count16x16_lp == 0 && count4x4 == 0) {
cpi->common.txfm_mode = ALLOW_32X32;
-#endif
} else if (count32x32 == 0 && count8x8_lp == 0 && count4x4 == 0) {
cpi->common.txfm_mode = ALLOW_16X16;
-#if CONFIG_TX32X32
reset_skip_txfm_size(cpi, TX_16X16);
-#endif
}
}
@@ -1913,7 +1891,6 @@ static void update_sb64_skip_coeff_state(VP9_COMP *cpi,
int skip[16], int output_enabled) {
MACROBLOCK *const x = &cpi->mb;
-#if CONFIG_TX32X32
if (x->e_mbd.mode_info_context->mbmi.txfm_size == TX_32X32) {
TOKENEXTRA tokens[4][1024+512];
int n_tokens[4], n;
@@ -1961,9 +1938,7 @@ static void update_sb64_skip_coeff_state(VP9_COMP *cpi,
(*tp) += n_tokens[n];
}
}
- } else
-#endif // CONFIG_TX32X32
- {
+ } else {
TOKENEXTRA tokens[16][16 * 25];
int n_tokens[16], n;
@@ -2388,7 +2363,6 @@ static void encode_superblock32(VP9_COMP *cpi, TOKENEXTRA **t,
xd->dst.y_stride, xd->dst.uv_stride);
}
-#if CONFIG_TX32X32
if (xd->mode_info_context->mbmi.txfm_size == TX_32X32) {
if (!x->skip) {
vp9_subtract_sby_s_c(x->sb_coeff_data.src_diff, src, src_y_stride,
@@ -2435,9 +2409,7 @@ static void encode_superblock32(VP9_COMP *cpi, TOKENEXTRA **t,
mi[mis + 1].mbmi.mb_skip_coeff = mi->mbmi.mb_skip_coeff;
}
skip[0] = skip[2] = skip[1] = skip[3] = mi->mbmi.mb_skip_coeff;
- } else
-#endif
- {
+ } else {
for (n = 0; n < 4; n++) {
int x_idx = n & 1, y_idx = n >> 1;
@@ -2502,11 +2474,7 @@ static void encode_superblock32(VP9_COMP *cpi, TOKENEXTRA **t,
cpi->txfm_count_32x32p[mi->mbmi.txfm_size]++;
} else {
TX_SIZE sz = (cm->txfm_mode == TX_MODE_SELECT) ?
-#if CONFIG_TX32X32
TX_32X32 :
-#else
- TX_16X16 :
-#endif
cm->txfm_mode;
mi->mbmi.txfm_size = sz;
if (mb_col < cm->mb_cols - 1)
@@ -2634,7 +2602,6 @@ static void encode_superblock64(VP9_COMP *cpi, TOKENEXTRA **t,
xd->dst.y_stride, xd->dst.uv_stride);
}
-#if CONFIG_TX32X32
if (xd->mode_info_context->mbmi.txfm_size == TX_32X32) {
int n;
@@ -2705,9 +2672,7 @@ static void encode_superblock64(VP9_COMP *cpi, TOKENEXTRA **t,
}
skip[n] = xd->mode_info_context->mbmi.mb_skip_coeff;
}
- } else
-#endif
- {
+ } else {
for (n = 0; n < 16; n++) {
const int x_idx = n & 3, y_idx = n >> 2;
@@ -2766,15 +2731,9 @@ static void encode_superblock64(VP9_COMP *cpi, TOKENEXTRA **t,
if (output_enabled) {
if (cm->txfm_mode == TX_MODE_SELECT &&
!((cm->mb_no_coeff_skip &&
- (
-#if CONFIG_TX32X32
- (mi->mbmi.txfm_size == TX_32X32 &&
+ ((mi->mbmi.txfm_size == TX_32X32 &&
skip[0] && skip[1] && skip[2] && skip[3]) ||
-#endif // CONFIG_TX32X32
- (
-#if CONFIG_TX32X32
- mi->mbmi.txfm_size != TX_32X32 &&
-#endif // CONFIG_TX32X32
+ (mi->mbmi.txfm_size != TX_32X32 &&
skip[0] && skip[1] && skip[2] && skip[3] &&
skip[4] && skip[5] && skip[6] && skip[7] &&
skip[8] && skip[9] && skip[10] && skip[11] &&
@@ -2785,11 +2744,7 @@ static void encode_superblock64(VP9_COMP *cpi, TOKENEXTRA **t,
} else {
int x, y;
TX_SIZE sz = (cm->txfm_mode == TX_MODE_SELECT) ?
-#if CONFIG_TX32X32
TX_32X32 :
-#else
- TX_16X16 :
-#endif
cm->txfm_mode;
for (y = 0; y < 4; y++) {
for (x = 0; x < 4; x++) {
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c
index a6b41fffb..45278a71b 100644
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -108,7 +108,6 @@ void vp9_subtract_mby_s_c(int16_t *diff, const uint8_t *src, int src_stride,
}
}
-#if CONFIG_TX32X32
void vp9_subtract_sby_s_c(int16_t *diff, const uint8_t *src, int src_stride,
const uint8_t *pred, int dst_stride) {
int r, c;
@@ -152,7 +151,6 @@ void vp9_subtract_sbuv_s_c(int16_t *diff, const uint8_t *usrc,
vsrc += src_stride;
}
}
-#endif
void vp9_subtract_mby_c(int16_t *diff, uint8_t *src,
uint8_t *pred, int stride) {
@@ -311,7 +309,6 @@ void vp9_transform_mb_16x16(MACROBLOCK *x) {
vp9_transform_mbuv_8x8(x);
}
-#if CONFIG_TX32X32
void vp9_transform_sby_32x32(MACROBLOCK *x) {
SUPERBLOCK * const x_sb = &x->sb_coeff_data;
vp9_short_fdct32x32(x_sb->src_diff, x_sb->coeff, 64);
@@ -325,7 +322,6 @@ void vp9_transform_sbuv_16x16(MACROBLOCK *x) {
x->vp9_short_fdct16x16(x_sb->src_diff + 1280,
x_sb->coeff + 1280, 32);
}
-#endif
#define RDTRUNC(RM,DM,R,D) ( (128+(R)*(RM)) & 0xFF )
#define RDTRUNC_8x8(RM,DM,R,D) ( (128+(R)*(RM)) & 0xFF )
diff --git a/vp9/encoder/vp9_encodemb.h b/vp9/encoder/vp9_encodemb.h
index b8bf7de0d..f3c679227 100644
--- a/vp9/encoder/vp9_encodemb.h
+++ b/vp9/encoder/vp9_encodemb.h
@@ -43,10 +43,8 @@ void vp9_transform_mb_16x16(MACROBLOCK *mb);
void vp9_transform_mby_16x16(MACROBLOCK *x);
void vp9_optimize_mby_16x16(MACROBLOCK *x);
-#if CONFIG_TX32X32
void vp9_transform_sby_32x32(MACROBLOCK *x);
void vp9_transform_sbuv_16x16(MACROBLOCK *x);
-#endif
void vp9_fidct_mb(MACROBLOCK *x);
@@ -59,13 +57,11 @@ void vp9_subtract_mbuv_s_c(int16_t *diff, const uint8_t *usrc,
void vp9_subtract_mby_s_c(int16_t *diff, const uint8_t *src,
int src_stride, const uint8_t *pred,
int dst_stride);
-#if CONFIG_TX32X32
void vp9_subtract_sby_s_c(int16_t *diff, const uint8_t *src, int src_stride,
const uint8_t *pred, int dst_stride);
void vp9_subtract_sbuv_s_c(int16_t *diff, const uint8_t *usrc,
const uint8_t *vsrc, int src_stride,
const uint8_t *upred,
const uint8_t *vpred, int dst_stride);
-#endif // CONFIG_TX32X32
#endif // VP9_ENCODER_VP9_ENCODEMB_H_
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 6a4c62496..90f350004 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -3461,9 +3461,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
vp9_copy(cpi->common.fc.coef_counts_16x16, cpi->coef_counts_16x16);
vp9_copy(cpi->common.fc.hybrid_coef_counts_16x16,
cpi->hybrid_coef_counts_16x16);
-#if CONFIG_TX32X32
vp9_copy(cpi->common.fc.coef_counts_32x32, cpi->coef_counts_32x32);
-#endif
vp9_adapt_coef_probs(&cpi->common);
if (cpi->common.frame_type != KEY_FRAME) {
vp9_copy(cpi->common.fc.sb_ymode_counts, cpi->sb_ymode_count);
diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h
index 403335047..74a58b430 100644
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -92,9 +92,7 @@ typedef struct {
vp9_coeff_probs hybrid_coef_probs_8x8[BLOCK_TYPES_8X8];
vp9_coeff_probs coef_probs_16x16[BLOCK_TYPES_16X16];
vp9_coeff_probs hybrid_coef_probs_16x16[BLOCK_TYPES_16X16];
-#if CONFIG_TX32X32
vp9_coeff_probs coef_probs_32x32[BLOCK_TYPES_32X32];
-#endif
vp9_prob sb_ymode_prob[VP9_I32X32_MODES - 1];
vp9_prob ymode_prob[VP9_YMODES - 1]; /* interframe intra mode probs */
@@ -331,14 +329,12 @@ typedef struct VP9_COMP {
DECLARE_ALIGNED(16, short, zrun_zbin_boost_y2_16x16[QINDEX_RANGE][256]);
DECLARE_ALIGNED(16, short, zrun_zbin_boost_uv_16x16[QINDEX_RANGE][256]);
-#if CONFIG_TX32X32
DECLARE_ALIGNED(16, short, Y1zbin_32x32[QINDEX_RANGE][1024]);
DECLARE_ALIGNED(16, short, Y2zbin_32x32[QINDEX_RANGE][1024]);
DECLARE_ALIGNED(16, short, UVzbin_32x32[QINDEX_RANGE][1024]);
DECLARE_ALIGNED(16, short, zrun_zbin_boost_y1_32x32[QINDEX_RANGE][1024]);
DECLARE_ALIGNED(16, short, zrun_zbin_boost_y2_32x32[QINDEX_RANGE][1024]);
DECLARE_ALIGNED(16, short, zrun_zbin_boost_uv_32x32[QINDEX_RANGE][1024]);
-#endif
MACROBLOCK mb;
VP9_COMMON common;
@@ -509,11 +505,9 @@ typedef struct VP9_COMP {
vp9_coeff_probs frame_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16];
vp9_coeff_stats frame_hybrid_branch_ct_16x16[BLOCK_TYPES_16X16];
-#if CONFIG_TX32X32
vp9_coeff_count coef_counts_32x32[BLOCK_TYPES_32X32];
vp9_coeff_probs frame_coef_probs_32x32[BLOCK_TYPES_32X32];
vp9_coeff_stats frame_branch_ct_32x32[BLOCK_TYPES_32X32];
-#endif
int gfu_boost;
int last_boost;
diff --git a/vp9/encoder/vp9_quantize.c b/vp9/encoder/vp9_quantize.c
index 98396a1a7..36b656713 100644
--- a/vp9/encoder/vp9_quantize.c
+++ b/vp9/encoder/vp9_quantize.c
@@ -379,7 +379,6 @@ void vp9_regular_quantize_b_16x16(BLOCK *b, BLOCKD *d) {
&d->eob, vp9_default_zig_zag1d_16x16, 1);
}
-#if CONFIG_TX32X32
void vp9_quantize_sby_32x32(MACROBLOCK *x) {
x->e_mbd.block[0].eob = 0;
quantize(x->block[0].zrun_zbin_boost_32x32,
@@ -413,7 +412,6 @@ void vp9_quantize_sbuv_16x16(MACROBLOCK *x) {
&x->e_mbd.block[i].eob,
vp9_default_zig_zag1d_16x16, 1);
}
-#endif
/* quantize_b_pair function pointer in MACROBLOCK structure is set to one of
* these two C functions if corresponding optimized routine is not available.
@@ -472,7 +470,6 @@ void vp9_init_quantizer(VP9_COMP *cpi) {
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
};
-#if CONFIG_TX32X32
static const int zbin_boost_32x32[1024] = {
0, 0, 0, 8, 8, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28,
30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 48, 48, 48, 48, 48, 48,
@@ -539,7 +536,6 @@ void vp9_init_quantizer(VP9_COMP *cpi) {
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
};
-#endif
int qrounding_factor = 48;
@@ -569,11 +565,9 @@ void vp9_init_quantizer(VP9_COMP *cpi) {
((quant_val * zbin_boost_8x8[0]) + 64) >> 7;
cpi->zrun_zbin_boost_y1_16x16[Q][0] =
((quant_val * zbin_boost_16x16[0]) + 64) >> 7;
-#if CONFIG_TX32X32
cpi->Y1zbin_32x32[Q][0] = ((qzbin_factor * quant_val) + 64) >> 7;
cpi->zrun_zbin_boost_y1_32x32[Q][0] =
((quant_val * zbin_boost_32x32[0]) + 64) >> 7;
-#endif
quant_val = vp9_dc2quant(Q, cpi->common.y2dc_delta_q);
@@ -677,7 +671,6 @@ void vp9_init_quantizer(VP9_COMP *cpi) {
cpi->zrun_zbin_boost_uv_16x16[Q][i] =
((quant_val * zbin_boost_16x16[i]) + 64) >> 7;
}
-#if CONFIG_TX32X32
// 32x32 structures. Same comment above applies.
for (i = 1; i < 1024; i++) {
int rc = vp9_default_zig_zag1d_32x32[i];
@@ -687,7 +680,6 @@ void vp9_init_quantizer(VP9_COMP *cpi) {
cpi->zrun_zbin_boost_y1_32x32[Q][i] =
((quant_val * zbin_boost_32x32[i]) + 64) >> 7;
}
-#endif
}
}
@@ -727,17 +719,13 @@ void vp9_mb_init_quantizer(VP9_COMP *cpi, MACROBLOCK *x) {
x->block[i].zbin = cpi->Y1zbin[QIndex];
x->block[i].zbin_8x8 = cpi->Y1zbin_8x8[QIndex];
x->block[i].zbin_16x16 = cpi->Y1zbin_16x16[QIndex];
-#if CONFIG_TX32X32
x->block[i].zbin_32x32 = cpi->Y1zbin_32x32[QIndex];
-#endif
x->block[i].round = cpi->Y1round[QIndex];
x->e_mbd.block[i].dequant = cpi->common.Y1dequant[QIndex];
x->block[i].zrun_zbin_boost = cpi->zrun_zbin_boost_y1[QIndex];
x->block[i].zrun_zbin_boost_8x8 = cpi->zrun_zbin_boost_y1_8x8[QIndex];
x->block[i].zrun_zbin_boost_16x16 = cpi->zrun_zbin_boost_y1_16x16[QIndex];
-#if CONFIG_TX32X32
x->block[i].zrun_zbin_boost_32x32 = cpi->zrun_zbin_boost_y1_32x32[QIndex];
-#endif
x->block[i].zbin_extra = (int16_t)zbin_extra;
// Segment max eob offset feature.
@@ -748,17 +736,13 @@ void vp9_mb_init_quantizer(VP9_COMP *cpi, MACROBLOCK *x) {
vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
x->block[i].eob_max_offset_16x16 =
vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
-#if CONFIG_TX32X32
x->block[i].eob_max_offset_32x32 =
vp9_get_segdata(xd, segment_id, SEG_LVL_EOB);
-#endif
} else {
x->block[i].eob_max_offset = 16;
x->block[i].eob_max_offset_8x8 = 64;
x->block[i].eob_max_offset_16x16 = 256;
-#if CONFIG_TX32X32
x->block[i].eob_max_offset_32x32 = 1024;
-#endif
}
}
diff --git a/vp9/encoder/vp9_quantize.h b/vp9/encoder/vp9_quantize.h
index 4ca3081db..ac44a751c 100644
--- a/vp9/encoder/vp9_quantize.h
+++ b/vp9/encoder/vp9_quantize.h
@@ -78,10 +78,8 @@ void vp9_quantize_mb_16x16(MACROBLOCK *x);
extern prototype_quantize_block(vp9_quantize_quantb_16x16);
extern prototype_quantize_mb(vp9_quantize_mby_16x16);
-#if CONFIG_TX32X32
void vp9_quantize_sby_32x32(MACROBLOCK *x);
void vp9_quantize_sbuv_16x16(MACROBLOCK *x);
-#endif
struct VP9_COMP;
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 353ab979f..f663b56c9 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -173,9 +173,7 @@ void vp9_save_coding_context(VP9_COMP *cpi) {
vp9_copy(cc->hybrid_coef_probs_8x8, cm->fc.hybrid_coef_probs_8x8);
vp9_copy(cc->coef_probs_16x16, cm->fc.coef_probs_16x16);
vp9_copy(cc->hybrid_coef_probs_16x16, cm->fc.hybrid_coef_probs_16x16);
-#if CONFIG_TX32X32
vp9_copy(cc->coef_probs_32x32, cm->fc.coef_probs_32x32);
-#endif
vp9_copy(cc->switchable_interp_prob, cm->fc.switchable_interp_prob);
#if CONFIG_COMP_INTERINTRA_PRED
cc->interintra_prob = cm->fc.interintra_prob;
@@ -233,9 +231,7 @@ void vp9_restore_coding_context(VP9_COMP *cpi) {
vp9_copy(cm->fc.hybrid_coef_probs_8x8, cc->hybrid_coef_probs_8x8);
vp9_copy(cm->fc.coef_probs_16x16, cc->coef_probs_16x16);
vp9_copy(cm->fc.hybrid_coef_probs_16x16, cc->hybrid_coef_probs_16x16);
-#if CONFIG_TX32X32
vp9_copy(cm->fc.coef_probs_32x32, cc->coef_probs_32x32);
-#endif
vp9_copy(cm->fc.switchable_interp_prob, cc->switchable_interp_prob);
#if CONFIG_COMP_INTERINTRA_PRED
cm->fc.interintra_prob = cc->interintra_prob;
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index a8ece2c58..7d2c489d5 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -293,10 +293,8 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int QIndex) {
fill_token_costs(cpi->mb.hybrid_token_costs[TX_16X16],
cpi->common.fc.hybrid_coef_probs_16x16, BLOCK_TYPES_16X16);
-#if CONFIG_TX32X32
fill_token_costs(cpi->mb.token_costs[TX_32X32],
cpi->common.fc.coef_probs_32x32, BLOCK_TYPES_32X32);
-#endif
/*rough estimate for costing*/
cpi->common.kf_ymode_probs_index = cpi->common.base_qindex >> 4;
@@ -435,9 +433,7 @@ static int cost_coeffs(MACROBLOCK *mb,
int pt;
const int eob = b->eob;
MACROBLOCKD *xd = &mb->e_mbd;
-#if CONFIG_TX32X32
const int ib = (int)(b - xd->block);
-#endif
int c = (type == PLANE_TYPE_Y_NO_DC) ? 1 : 0;
int cost = 0, seg_eob;
const int segment_id = xd->mode_info_context->mbmi.segment_id;
@@ -480,21 +476,17 @@ static int cost_coeffs(MACROBLOCK *mb,
scan = vp9_default_zig_zag1d_16x16;
band = vp9_coef_bands_16x16;
seg_eob = 256;
-#if CONFIG_TX32X32
if (type == PLANE_TYPE_UV) {
const int uv_idx = ib - 16;
qcoeff_ptr = xd->sb_coeff_data.qcoeff + 1024 + 64 * uv_idx;
}
-#endif
break;
-#if CONFIG_TX32X32
case TX_32X32:
scan = vp9_default_zig_zag1d_32x32;
band = vp9_coef_bands_32x32;
seg_eob = 1024;
qcoeff_ptr = xd->sb_coeff_data.qcoeff;
break;
-#endif
default:
abort();
break;
@@ -761,21 +753,17 @@ static void choose_txfm_size_from_rd(VP9_COMP *cpi, MACROBLOCK *x,
}
}
-#if CONFIG_TX32X32
if (max_txfm_size == TX_32X32 &&
(cm->txfm_mode == ALLOW_32X32 ||
(cm->txfm_mode == TX_MODE_SELECT &&
rd[TX_32X32][1] < rd[TX_16X16][1] && rd[TX_32X32][1] < rd[TX_8X8][1] &&
rd[TX_32X32][1] < rd[TX_4X4][1]))) {
mbmi->txfm_size = TX_32X32;
- } else
-#endif
- if ( cm->txfm_mode == ALLOW_16X16 ||
-#if CONFIG_TX32X32
- (max_txfm_size == TX_16X16 && cm->txfm_mode == ALLOW_32X32) ||
-#endif
- (cm->txfm_mode == TX_MODE_SELECT &&
- rd[TX_16X16][1] < rd[TX_8X8][1] && rd[TX_16X16][1] < rd[TX_4X4][1])) {
+ } else if ( cm->txfm_mode == ALLOW_16X16 ||
+ (max_txfm_size == TX_16X16 && cm->txfm_mode == ALLOW_32X32) ||
+ (cm->txfm_mode == TX_MODE_SELECT &&
+ rd[TX_16X16][1] < rd[TX_8X8][1] &&
+ rd[TX_16X16][1] < rd[TX_4X4][1])) {
mbmi->txfm_size = TX_16X16;
} else if (cm->txfm_mode == ALLOW_8X8 ||
(cm->txfm_mode == TX_MODE_SELECT && rd[TX_8X8][1] < rd[TX_4X4][1])) {
@@ -792,15 +780,12 @@ static void choose_txfm_size_from_rd(VP9_COMP *cpi, MACROBLOCK *x,
txfm_cache[ONLY_4X4] = rd[TX_4X4][0];
txfm_cache[ALLOW_8X8] = rd[TX_8X8][0];
txfm_cache[ALLOW_16X16] = rd[TX_16X16][0];
-#if CONFIG_TX32X32
txfm_cache[ALLOW_32X32] = rd[max_txfm_size][0];
if (max_txfm_size == TX_32X32 &&
rd[TX_32X32][1] < rd[TX_16X16][1] && rd[TX_32X32][1] < rd[TX_8X8][1] &&
rd[TX_32X32][1] < rd[TX_4X4][1])
txfm_cache[TX_MODE_SELECT] = rd[TX_32X32][1];
- else
-#endif
- if (rd[TX_16X16][1] < rd[TX_8X8][1] && rd[TX_16X16][1] < rd[TX_4X4][1])
+ else if (rd[TX_16X16][1] < rd[TX_8X8][1] && rd[TX_16X16][1] < rd[TX_4X4][1])
txfm_cache[TX_MODE_SELECT] = rd[TX_16X16][1];
else
txfm_cache[TX_MODE_SELECT] = rd[TX_4X4][1] < rd[TX_8X8][1] ?
@@ -833,7 +818,6 @@ static void copy_predictor(uint8_t *dst, const uint8_t *predictor) {
d[12] = p[12];
}
-#if CONFIG_TX32X32
static int rdcost_sby_32x32(MACROBLOCK *x, int backup) {
MACROBLOCKD * const xd = &x->e_mbd;
ENTROPY_CONTEXT_PLANES t_above, t_left;
@@ -895,7 +879,6 @@ static void super_block_yrd_32x32(MACROBLOCK *x,
*rate = rdcost_sby_32x32(x, backup);
*skippable = vp9_sby_is_skippable_32x32(&x->e_mbd);
}
-#endif
static void super_block_yrd(VP9_COMP *cpi,
MACROBLOCK *x, int *rate, int *distortion,
@@ -918,11 +901,9 @@ static void super_block_yrd(VP9_COMP *cpi,
s[n] = 1;
}
-#if CONFIG_TX32X32
vp9_subtract_sby_s_c(x->sb_coeff_data.src_diff, src, src_y_stride,
dst, dst_y_stride);
super_block_yrd_32x32(x, &r[TX_32X32][0], &d[TX_32X32], &s[TX_32X32], 1);
-#endif
#if DEBUG_ERROR
int err[3] = { 0, 0, 0 };
@@ -1003,7 +984,6 @@ static void super_block_64_yrd(VP9_COMP *cpi,
s[n] = 1;
}
-#if CONFIG_TX32X32
for (n = 0; n < 4; n++) {
int x_idx = n & 1, y_idx = n >> 1;
int r_tmp, d_tmp, s_tmp;
@@ -1020,7 +1000,6 @@ static void super_block_64_yrd(VP9_COMP *cpi,
d[TX_32X32] += d_tmp;
s[TX_32X32] = s[TX_32X32] && s_tmp;
}
-#endif
#if DEBUG_ERROR
int err[3] = { 0, 0, 0 };
@@ -1784,7 +1763,6 @@ static int64_t rd_inter16x16_uv_8x8(VP9_COMP *cpi, MACROBLOCK *x, int *rate,
return RDCOST(x->rdmult, x->rddiv, *rate, *distortion);
}
-#if CONFIG_TX32X32
static int rd_cost_sbuv_16x16(MACROBLOCK *x, int backup) {
int b;
int cost = 0;
@@ -1824,7 +1802,6 @@ static void rd_inter32x32_uv_16x16(MACROBLOCK *x, int *rate,
xd->sb_coeff_data.dqcoeff + 1024, 512) >> 2;
*skip = vp9_sbuv_is_skippable_16x16(xd);
}
-#endif
static int64_t rd_inter32x32_uv(VP9_COMP *cpi, MACROBLOCK *x, int *rate,
int *distortion, int fullpixel, int *skip) {
@@ -1834,15 +1811,12 @@ static int64_t rd_inter32x32_uv(VP9_COMP *cpi, MACROBLOCK *x, int *rate,
const uint8_t *vsrc = x->src.v_buffer, *vdst = xd->dst.v_buffer;
int src_uv_stride = x->src.uv_stride, dst_uv_stride = xd->dst.uv_stride;
-#if CONFIG_TX32X32
if (mbmi->txfm_size == TX_32X32) {
vp9_subtract_sbuv_s_c(x->sb_coeff_data.src_diff,
usrc, vsrc, src_uv_stride,
udst, vdst, dst_uv_stride);
rd_inter32x32_uv_16x16(x, rate, distortion, skip, 1);
- } else
-#endif
- {
+ } else {
int n, r = 0, d = 0;
int skippable = 1;
ENTROPY_CONTEXT_PLANES t_above[2], t_left[2];
@@ -2040,15 +2014,12 @@ static void super_block_uvrd(MACROBLOCK *x,
const uint8_t *vsrc = x->src.v_buffer, *vdst = xd->dst.v_buffer;
int src_uv_stride = x->src.uv_stride, dst_uv_stride = xd->dst.uv_stride;
-#if CONFIG_TX32X32
if (mbmi->txfm_size == TX_32X32) {
vp9_subtract_sbuv_s_c(x->sb_coeff_data.src_diff,
usrc, vsrc, src_uv_stride,
udst, vdst, dst_uv_stride);
rd_inter32x32_uv_16x16(x, rate, distortion, skippable, 1);
- } else
-#endif
- {
+ } else {
int d = 0, r = 0, n, s = 1;
ENTROPY_CONTEXT_PLANES t_above[2], t_left[2];
ENTROPY_CONTEXT_PLANES *ta_orig = xd->above_context;
@@ -2113,7 +2084,6 @@ static void super_block_64_uvrd(MACROBLOCK *x,
memcpy(t_above, xd->above_context, sizeof(t_above));
memcpy(t_left, xd->left_context, sizeof(t_left));
-#if CONFIG_TX32X32
if (mbmi->txfm_size == TX_32X32) {
int n;
@@ -2136,9 +2106,7 @@ static void super_block_64_uvrd(MACROBLOCK *x,
d += d_tmp;
s = s && s_tmp;
}
- } else
-#endif
- {
+ } else {
for (n = 0; n < 16; n++) {
int x_idx = n & 3, y_idx = n >> 2;
@@ -4749,11 +4717,9 @@ static int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
int dist_uv_4x4 = 0, dist_uv_8x8 = 0, uv_skip_4x4 = 0, uv_skip_8x8 = 0;
MB_PREDICTION_MODE mode_uv_4x4 = NEARESTMV, mode_uv_8x8 = NEARESTMV;
int switchable_filter_index = 0;
-#if CONFIG_TX32X32
int rate_uv_16x16 = 0, rate_uv_tokenonly_16x16 = 0;
int dist_uv_16x16 = 0, uv_skip_16x16 = 0;
MB_PREDICTION_MODE mode_uv_16x16 = NEARESTMV;
-#endif
x->skip = 0;
xd->mode_info_context->mbmi.segment_id = segment_id;
@@ -4790,7 +4756,6 @@ static int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
&dist_uv_8x8, &uv_skip_8x8);
mode_uv_8x8 = mbmi->uv_mode;
}
-#if CONFIG_TX32X32
if (cm->txfm_mode >= ALLOW_32X32) {
mbmi->txfm_size = TX_32X32;
rd_pick_intra_sb64uv_mode(cpi, x, &rate_uv_16x16,
@@ -4798,7 +4763,6 @@ static int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
&dist_uv_16x16, &uv_skip_16x16);
mode_uv_16x16 = mbmi->uv_mode;
}
-#endif // CONFIG_TX32X32
} else {
assert(block_size == BLOCK_32X32);
mbmi->mode = DC_PRED;
@@ -4814,14 +4778,12 @@ static int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
&dist_uv_8x8, &uv_skip_8x8);
mode_uv_8x8 = mbmi->uv_mode;
}
-#if CONFIG_TX32X32
if (cm->txfm_mode >= ALLOW_32X32) {
mbmi->txfm_size = TX_32X32;
rd_pick_intra_sbuv_mode(cpi, x, &rate_uv_16x16, &rate_uv_tokenonly_16x16,
&dist_uv_16x16, &uv_skip_16x16);
mode_uv_16x16 = mbmi->uv_mode;
}
-#endif // CONFIG_TX32X32
}
for (mode_index = 0; mode_index < MAX_MODES;
@@ -4965,13 +4927,11 @@ static int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
distortion_uv = dist_uv_4x4;
skippable = skippable && uv_skip_4x4;
mbmi->uv_mode = mode_uv_4x4;
-#if CONFIG_TX32X32
} else if (mbmi->txfm_size == TX_32X32) {
rate_uv = rate_uv_16x16;
distortion_uv = dist_uv_16x16;
skippable = skippable && uv_skip_16x16;
mbmi->uv_mode = mode_uv_16x16;
-#endif // CONFIG_TX32X32
} else {
rate_uv = rate_uv_8x8;
distortion_uv = dist_uv_8x8;
diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c
index dda81c838..fc99311ae 100644
--- a/vp9/encoder/vp9_tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -31,9 +31,7 @@ vp9_coeff_accum context_counters_8x8[BLOCK_TYPES_8X8];
vp9_coeff_accum hybrid_context_counters_8x8[BLOCK_TYPES_8X8];
vp9_coeff_accum context_counters_16x16[BLOCK_TYPES_16X16];
vp9_coeff_accum hybrid_context_counters_16x16[BLOCK_TYPES_16X16];
-#if CONFIG_TX32X32
vp9_coeff_accum context_counters_32x32[BLOCK_TYPES_32X32];
-#endif
extern vp9_coeff_stats tree_update_hist_4x4[BLOCK_TYPES_4X4];
extern vp9_coeff_stats hybrid_tree_update_hist_4x4[BLOCK_TYPES_4X4];
@@ -41,9 +39,7 @@ extern vp9_coeff_stats tree_update_hist_8x8[BLOCK_TYPES_8X8];
extern vp9_coeff_stats hybrid_tree_update_hist_8x8[BLOCK_TYPES_8X8];
extern vp9_coeff_stats tree_update_hist_16x16[BLOCK_TYPES_16X16];
extern vp9_coeff_stats hybrid_tree_update_hist_16x16[BLOCK_TYPES_16X16];
-#if CONFIG_TX32X32
extern vp9_coeff_stats tree_update_hist_32x32[BLOCK_TYPES_32X32];
-#endif
#endif /* ENTROPY_STATS */
static TOKENVALUE dct_value_tokens[DCT_MAX_VALUE * 2];
@@ -141,12 +137,10 @@ static void tokenize_b(VP9_COMP *cpi,
vp9_block2left[tx_size][ib];
ENTROPY_CONTEXT a_ec = *a, l_ec = *l;
-#if CONFIG_TX32X32
ENTROPY_CONTEXT *const a1 = (ENTROPY_CONTEXT *)(&xd->above_context[1]) +
vp9_block2above[tx_size][ib];
ENTROPY_CONTEXT *const l1 = (ENTROPY_CONTEXT *)(&xd->left_context[1]) +
vp9_block2left[tx_size][ib];
-#endif
switch (tx_size) {
@@ -195,11 +189,9 @@ static void tokenize_b(VP9_COMP *cpi,
if (type != PLANE_TYPE_UV) {
a_ec = (a[0] + a[1] + a[2] + a[3]) != 0;
l_ec = (l[0] + l[1] + l[2] + l[3]) != 0;
-#if CONFIG_TX32X32
} else {
a_ec = (a[0] + a[1] + a1[0] + a1[1]) != 0;
l_ec = (l[0] + l[1] + l1[0] + l1[1]) != 0;
-#endif
}
#endif
seg_eob = 256;
@@ -212,14 +204,11 @@ static void tokenize_b(VP9_COMP *cpi,
counts = cpi->coef_counts_16x16;
probs = cpi->common.fc.coef_probs_16x16;
}
-#if CONFIG_TX32X32
if (type == PLANE_TYPE_UV) {
int uv_idx = (ib - 16) >> 2;
qcoeff_ptr = xd->sb_coeff_data.qcoeff + 1024 + 256 * uv_idx;
}
-#endif
break;
-#if CONFIG_TX32X32
case TX_32X32:
#if CONFIG_CNVCONTEXT
a_ec = a[0] + a[1] + a[2] + a[3] +
@@ -236,7 +225,6 @@ static void tokenize_b(VP9_COMP *cpi,
probs = cpi->common.fc.coef_probs_32x32;
qcoeff_ptr = xd->sb_coeff_data.qcoeff;
break;
-#endif
}
VP9_COMBINEENTROPYCONTEXTS(pt, a_ec, l_ec);
@@ -294,19 +282,15 @@ static void tokenize_b(VP9_COMP *cpi,
if (type != PLANE_TYPE_UV) {
a[1] = a[2] = a[3] = a_ec;
l[1] = l[2] = l[3] = l_ec;
-#if CONFIG_TX32X32
} else {
a1[0] = a1[1] = a[1] = a_ec;
l1[0] = l1[1] = l[1] = l_ec;
-#endif
}
-#if CONFIG_TX32X32
} else if (tx_size == TX_32X32) {
a[1] = a[2] = a[3] = a_ec;
l[1] = l[2] = l[3] = l_ec;
a1[0] = a1[1] = a1[2] = a1[3] = a_ec;
l1[0] = l1[1] = l1[2] = l1[3] = l_ec;
-#endif
}
}
@@ -378,7 +362,6 @@ static int mb_is_skippable_16x16(MACROBLOCKD *xd) {
return (vp9_mby_is_skippable_16x16(xd) & vp9_mbuv_is_skippable_8x8(xd));
}
-#if CONFIG_TX32X32
int vp9_sby_is_skippable_32x32(MACROBLOCKD *xd) {
int skip = 1;
skip &= !xd->block[0].eob;
@@ -440,7 +423,6 @@ void vp9_tokenize_sb(VP9_COMP *cpi,
if (dry_run)
*t = t_backup;
}
-#endif
void vp9_tokenize_mb(VP9_COMP *cpi,
MACROBLOCKD *xd,
@@ -557,9 +539,7 @@ void init_context_counters(void) {
vpx_memset(context_counters_16x16, 0, sizeof(context_counters_16x16));
vpx_memset(hybrid_context_counters_16x16, 0,
sizeof(hybrid_context_counters_16x16));
-#if CONFIG_TX32X32
vpx_memset(context_counters_32x32, 0, sizeof(context_counters_32x32));
-#endif
} else {
fread(context_counters_4x4, sizeof(context_counters_4x4), 1, f);
fread(hybrid_context_counters_4x4,
@@ -570,9 +550,7 @@ void init_context_counters(void) {
fread(context_counters_16x16, sizeof(context_counters_16x16), 1, f);
fread(hybrid_context_counters_16x16,
sizeof(hybrid_context_counters_16x16), 1, f);
-#if CONFIG_TX32X32
fread(context_counters_32x32, sizeof(context_counters_32x32), 1, f);
-#endif
fclose(f);
}
@@ -587,9 +565,7 @@ void init_context_counters(void) {
vpx_memset(tree_update_hist_16x16, 0, sizeof(tree_update_hist_16x16));
vpx_memset(hybrid_tree_update_hist_16x16, 0,
sizeof(hybrid_tree_update_hist_16x16));
-#if CONFIG_TX32X32
vpx_memset(tree_update_hist_32x32, 0, sizeof(tree_update_hist_32x32));
-#endif
} else {
fread(tree_update_hist_4x4, sizeof(tree_update_hist_4x4), 1, f);
fread(hybrid_tree_update_hist_4x4,
@@ -600,9 +576,7 @@ void init_context_counters(void) {
fread(tree_update_hist_16x16, sizeof(tree_update_hist_16x16), 1, f);
fread(hybrid_tree_update_hist_16x16,
sizeof(hybrid_tree_update_hist_16x16), 1, f);
-#if CONFIG_TX32X32
fread(tree_update_hist_32x32, sizeof(tree_update_hist_32x32), 1, f);
-#endif
fclose(f);
}
}
@@ -702,10 +676,8 @@ void print_context_counters() {
"vp9_default_coef_counts_16x16[BLOCK_TYPES_16X16]");
print_counter(f, hybrid_context_counters_16x16, BLOCK_TYPES_16X16,
"vp9_default_hybrid_coef_counts_16x16[BLOCK_TYPES_16X16]");
-#if CONFIG_TX32X32
print_counter(f, context_counters_32x32, BLOCK_TYPES_32X32,
"vp9_default_coef_counts_32x32[BLOCK_TYPES_32X32]");
-#endif
/* print coefficient probabilities */
print_probs(f, context_counters_4x4, BLOCK_TYPES_4X4,
@@ -720,10 +692,8 @@ void print_context_counters() {
"default_coef_probs_16x16[BLOCK_TYPES_16X16]");
print_probs(f, hybrid_context_counters_16x16, BLOCK_TYPES_16X16,
"default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]");
-#if CONFIG_TX32X32
print_probs(f, context_counters_32x32, BLOCK_TYPES_32X32,
"default_coef_probs_32x32[BLOCK_TYPES_32X32]");
-#endif
fclose(f);
@@ -737,9 +707,7 @@ void print_context_counters() {
fwrite(context_counters_16x16, sizeof(context_counters_16x16), 1, f);
fwrite(hybrid_context_counters_16x16,
sizeof(hybrid_context_counters_16x16), 1, f);
-#if CONFIG_TX32X32
fwrite(context_counters_32x32, sizeof(context_counters_32x32), 1, f);
-#endif
fclose(f);
}
#endif
@@ -768,12 +736,10 @@ static __inline void stuff_b(VP9_COMP *cpi,
ENTROPY_CONTEXT *const l = (ENTROPY_CONTEXT *)xd->left_context +
vp9_block2left[tx_size][ib];
ENTROPY_CONTEXT a_ec = *a, l_ec = *l;
-#if CONFIG_TX32X32
ENTROPY_CONTEXT *const a1 = (ENTROPY_CONTEXT *)(&xd->above_context[1]) +
vp9_block2above[tx_size][ib];
ENTROPY_CONTEXT *const l1 = (ENTROPY_CONTEXT *)(&xd->left_context[1]) +
vp9_block2left[tx_size][ib];
-#endif
switch (tx_size) {
default:
@@ -808,11 +774,9 @@ static __inline void stuff_b(VP9_COMP *cpi,
if (type != PLANE_TYPE_UV) {
a_ec = (a[0] + a[1] + a[2] + a[3]) != 0;
l_ec = (l[0] + l[1] + l[2] + l[3]) != 0;
-#if CONFIG_TX32X32
} else {
a_ec = (a[0] + a[1] + a1[0] + a1[1]) != 0;
l_ec = (l[0] + l[1] + l1[0] + l1[1]) != 0;
-#endif
}
#endif
bands = vp9_coef_bands_16x16;
@@ -824,7 +788,6 @@ static __inline void stuff_b(VP9_COMP *cpi,
probs = cpi->common.fc.coef_probs_16x16;
}
break;
-#if CONFIG_TX32X32
case TX_32X32:
#if CONFIG_CNVCONTEXT
a_ec = a[0] + a[1] + a[2] + a[3] +
@@ -838,7 +801,6 @@ static __inline void stuff_b(VP9_COMP *cpi,
counts = cpi->coef_counts_32x32;
probs = cpi->common.fc.coef_probs_32x32;
break;
-#endif
}
VP9_COMBINEENTROPYCONTEXTS(pt, a_ec, l_ec);
@@ -857,19 +819,15 @@ static __inline void stuff_b(VP9_COMP *cpi,
if (type != PLANE_TYPE_UV) {
a[1] = a[2] = a[3] = 0;
l[1] = l[2] = l[3] = 0;
-#if CONFIG_TX32X32
} else {
a1[0] = a1[1] = a[1] = a_ec;
l1[0] = l1[1] = l[1] = l_ec;
-#endif
}
-#if CONFIG_TX32X32
} else if (tx_size == TX_32X32) {
a[1] = a[2] = a[3] = a_ec;
l[1] = l[2] = l[3] = l_ec;
a1[0] = a1[1] = a1[2] = a1[3] = a_ec;
l1[0] = l1[1] = l1[2] = l1[3] = l_ec;
-#endif
}
if (!dry_run) {
@@ -983,7 +941,6 @@ void vp9_stuff_mb(VP9_COMP *cpi, MACROBLOCKD *xd, TOKENEXTRA **t, int dry_run) {
}
}
-#if CONFIG_TX32X32
static void stuff_sb_32x32(VP9_COMP *cpi, MACROBLOCKD *xd,
TOKENEXTRA **t, int dry_run) {
int b;
@@ -1003,11 +960,8 @@ void vp9_stuff_sb(VP9_COMP *cpi, MACROBLOCKD *xd, TOKENEXTRA **t, int dry_run) {
*t = t_backup;
}
}
-#endif
-#if CONFIG_TX32X32
void vp9_fix_contexts_sb(MACROBLOCKD *xd) {
vpx_memset(xd->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES) * 2);
vpx_memset(xd->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES) * 2);
}
-#endif
diff --git a/vp9/encoder/vp9_tokenize.h b/vp9/encoder/vp9_tokenize.h
index 9bc756e82..3eeb8fa5a 100644
--- a/vp9/encoder/vp9_tokenize.h
+++ b/vp9/encoder/vp9_tokenize.h
@@ -36,10 +36,8 @@ extern int vp9_mbuv_is_skippable_4x4(MACROBLOCKD *xd);
extern int vp9_mby_is_skippable_8x8(MACROBLOCKD *xd, int has_y2_block);
extern int vp9_mbuv_is_skippable_8x8(MACROBLOCKD *xd);
extern int vp9_mby_is_skippable_16x16(MACROBLOCKD *xd);
-#if CONFIG_TX32X32
extern int vp9_sby_is_skippable_32x32(MACROBLOCKD *xd);
extern int vp9_sbuv_is_skippable_16x16(MACROBLOCKD *xd);
-#endif
struct VP9_COMP;
@@ -50,14 +48,10 @@ extern void vp9_tokenize_sb(struct VP9_COMP *cpi, MACROBLOCKD *xd,
extern void vp9_stuff_mb(struct VP9_COMP *cpi, MACROBLOCKD *xd,
TOKENEXTRA **t, int dry_run);
-#if CONFIG_TX32X32
extern void vp9_stuff_sb(struct VP9_COMP *cpi, MACROBLOCKD *xd,
TOKENEXTRA **t, int dry_run);
-#endif
-#if CONFIG_TX32X32
extern void vp9_fix_contexts_sb(MACROBLOCKD *xd);
-#endif
#ifdef ENTROPY_STATS
void init_context_counters();
void print_context_counters();