summaryrefslogtreecommitdiff
path: root/vp8/decoder/detokenize.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2012-08-29 11:25:38 -0700
committerJingning Han <jingning@google.com>2012-08-30 16:52:25 -0700
commitde6dfa6bb0cd680ca446a15b52b2a026859eb1e6 (patch)
tree50bc09ddb7d72155a8a37079cf33c25fdf4a60bc /vp8/decoder/detokenize.c
parentc59e36fc76ce3c5dd0b9a40e8f95a225248ce018 (diff)
downloadlibvpx-de6dfa6bb0cd680ca446a15b52b2a026859eb1e6.tar
libvpx-de6dfa6bb0cd680ca446a15b52b2a026859eb1e6.tar.gz
libvpx-de6dfa6bb0cd680ca446a15b52b2a026859eb1e6.tar.bz2
libvpx-de6dfa6bb0cd680ca446a15b52b2a026859eb1e6.zip
hybrid transform of 16x16 dimension
Enable ADST/DCT of dimension 16x16 for I16X16 modes. This change provides benefits mostly for hd sequences. Set up the framework for selectable transform dimension. Also allowing quantization parameter threshold to control the use of hybrid transform (This is currently disabled by setting threshold always above the quantization parameter. Adaptive thresholding can be built upon this, which will further improve the coding performance.) The coding performance gains (with respect to the codec that has all other configuration settings turned on) are derf: 0.013 yt: 0.086 hd: 0.198 std-hd: 0.501 Change-Id: Ibb4263a61fc74e0b3c345f54d73e8c73552bf926
Diffstat (limited to 'vp8/decoder/detokenize.c')
-rw-r--r--vp8/decoder/detokenize.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/vp8/decoder/detokenize.c b/vp8/decoder/detokenize.c
index a6c837084..e9ea0c10b 100644
--- a/vp8/decoder/detokenize.c
+++ b/vp8/decoder/detokenize.c
@@ -39,7 +39,7 @@ DECLARE_ALIGNED(16, const int, coef_bands_x_8x8[64]) = {
7 * OCB_X, 7 * OCB_X, 7 * OCB_X, 7 * OCB_X, 7 * OCB_X, 7 * OCB_X, 7 * OCB_X, 7 * OCB_X,
};
-#if CONFIG_TX16X16
+#if CONFIG_TX16X16 || CONFIG_HYBRIDTRANSFORM16X16
DECLARE_ALIGNED(16, const int, coef_bands_x_16x16[256]) = {
0 * OCB_X, 1 * OCB_X, 2 * OCB_X, 3 * OCB_X, 5 * OCB_X, 4 * OCB_X, 4 * OCB_X, 5 * OCB_X, 5 * OCB_X, 3 * OCB_X, 6 * OCB_X, 3 * OCB_X, 5 * OCB_X, 4 * OCB_X, 6 * OCB_X, 6 * OCB_X,
6 * OCB_X, 5 * OCB_X, 5 * OCB_X, 6 * OCB_X, 6 * OCB_X, 6 * OCB_X, 6 * OCB_X, 6 * OCB_X, 6 * OCB_X, 6 * OCB_X, 6 * OCB_X, 6 * OCB_X, 6 * OCB_X, 6 * OCB_X, 6 * OCB_X, 6 * OCB_X,
@@ -105,7 +105,7 @@ void vp8_reset_mb_tokens_context(MACROBLOCKD *xd) {
if ((xd->mode_info_context->mbmi.mode != B_PRED &&
xd->mode_info_context->mbmi.mode != I8X8_PRED &&
xd->mode_info_context->mbmi.mode != SPLITMV)
-#if CONFIG_TX16X16
+#if CONFIG_TX16X16 || CONFIG_HYBRIDTRANSFORM16X16
|| xd->mode_info_context->mbmi.txfm_size == TX_16X16
#endif
) {
@@ -225,7 +225,7 @@ void static count_tokens_8x8(INT16 *qcoeff_ptr, int block, int type,
}
}
-#if CONFIG_TX16X16
+#if CONFIG_TX16X16 || CONFIG_HYBRIDTRANSFORM16X16
void static count_tokens_16x16(INT16 *qcoeff_ptr, int block, int type,
ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l,
int eob, int seg_eob, FRAME_CONTEXT *fc) {
@@ -302,7 +302,7 @@ static int vp8_decode_coefs(VP8D_COMP *dx, const MACROBLOCKD *xd,
case TX_8X8:
coef_probs = fc->coef_probs_8x8[type][0][0];
break;
-#if CONFIG_TX16X16
+#if CONFIG_TX16X16 || CONFIG_HYBRIDTRANSFORM16X16
case TX_16X16:
coef_probs = fc->coef_probs_16x16[type][0][0];
break;
@@ -398,14 +398,14 @@ SKIP_START:
}
else if (block_type == TX_8X8)
count_tokens_8x8(qcoeff_ptr, i, type, a, l, c, seg_eob, fc);
-#if CONFIG_TX16X16
+#if CONFIG_TX16X16 || CONFIG_HYBRIDTRANSFORM16X16
else
count_tokens_16x16(qcoeff_ptr, i, type, a, l, c, seg_eob, fc);
#endif
return c;
}
-#if CONFIG_TX16X16
+#if CONFIG_TX16X16 || CONFIG_HYBRIDTRANSFORM16X16
int vp8_decode_mb_tokens_16x16(VP8D_COMP *pbi, MACROBLOCKD *xd) {
ENTROPY_CONTEXT* const A = (ENTROPY_CONTEXT *)xd->above_context;
ENTROPY_CONTEXT* const L = (ENTROPY_CONTEXT *)xd->left_context;
@@ -417,6 +417,7 @@ int vp8_decode_mb_tokens_16x16(VP8D_COMP *pbi, MACROBLOCKD *xd) {
INT16 *qcoeff_ptr = &xd->qcoeff[0];
type = PLANE_TYPE_Y_WITH_DC;
+
if (seg_active)
seg_eob = get_segdata(xd, segment_id, SEG_LVL_EOB);
else