summaryrefslogtreecommitdiff
path: root/vp8/decoder
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/decoder')
-rw-r--r--vp8/decoder/decodframe.c63
-rw-r--r--vp8/decoder/detokenize.c16
2 files changed, 27 insertions, 52 deletions
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index b4d400641..34b43ce3b 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -407,7 +407,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
int i8x8mode;
BLOCKD *b;
-#if CONFIG_HYBRIDTRANSFORM8X8
int idx = (ib & 0x02) ? (ib + 2) : ib;
short *q = xd->block[idx].qcoeff;
@@ -415,7 +414,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
unsigned char *pre = xd->block[ib].predictor;
unsigned char *dst = *(xd->block[ib].base_dst) + xd->block[ib].dst;
int stride = xd->dst.y_stride;
-#endif
b = &xd->block[ib];
i8x8mode = b->bmi.as_mode.first;
@@ -427,19 +425,8 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
q, dq, pre, dst, 16, stride);
q += 64;
#else
- for (j = 0; j < 4; j++) {
- b = &xd->block[ib + iblock[j]];
- if (xd->eobs[ib + iblock[j]] > 1) {
- DEQUANT_INVOKE(&pbi->dequant, idct_add)
- (b->qcoeff, b->dequant, b->predictor,
- *(b->base_dst) + b->dst, 16, b->dst_stride);
- } else {
- IDCT_INVOKE(RTCD_VTABLE(idct), idct1_scalar_add)
- (b->qcoeff[0] * b->dequant[0], b->predictor,
- *(b->base_dst) + b->dst, 16, b->dst_stride);
- ((int *)b->qcoeff)[0] = 0;
- }
- }
+ vp8_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride);
+ q += 64;
#endif
b = &xd->block[16 + i];
@@ -484,16 +471,14 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
#else
if (xd->eobs[i] > 1)
{
- DEQUANT_INVOKE(&pbi->dequant, idct_add)
- (b->qcoeff, b->dequant, b->predictor,
- *(b->base_dst) + b->dst, 16, b->dst_stride);
- }
- else
- {
- IDCT_INVOKE(RTCD_VTABLE(idct), idct1_scalar_add)
- (b->qcoeff[0] * b->dequant[0], b->predictor,
- *(b->base_dst) + b->dst, 16, b->dst_stride);
- ((int *)b->qcoeff)[0] = 0;
+ DEQUANT_INVOKE(&pbi->dequant, idct_add)
+ (b->qcoeff, b->dequant, b->predictor,
+ *(b->base_dst) + b->dst, 16, b->dst_stride);
+ } else {
+ IDCT_INVOKE(RTCD_VTABLE(idct), idct1_scalar_add)
+ (b->qcoeff[0] * b->dequant[0], b->predictor,
+ *(b->base_dst) + b->dst, 16, b->dst_stride);
+ ((int *)b->qcoeff)[0] = 0;
}
#endif
}
@@ -613,23 +598,23 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
}
#if CONFIG_SUPERBLOCKS
- if (!xd->mode_info_context->mbmi.encoded_as_sb) {
+ if (!xd->mode_info_context->mbmi.encoded_as_sb) {
#endif
- if ((tx_type == TX_8X8 &&
- xd->mode_info_context->mbmi.mode != I8X8_PRED)
+ if ((tx_type == TX_8X8 &&
+ xd->mode_info_context->mbmi.mode != I8X8_PRED)
#if CONFIG_TX16X16 || CONFIG_HYBRIDTRANSFORM16X16
- || tx_type == TX_16X16
+ || tx_type == TX_16X16
#endif
- )
- DEQUANT_INVOKE(&pbi->dequant, idct_add_uv_block_8x8) //
- (xd->qcoeff + 16 * 16, xd->block[16].dequant,
- xd->predictor + 16 * 16, xd->dst.u_buffer, xd->dst.v_buffer,
- xd->dst.uv_stride, xd->eobs + 16, xd); //
- else if (xd->mode_info_context->mbmi.mode != I8X8_PRED)
- DEQUANT_INVOKE(&pbi->dequant, idct_add_uv_block)
- (xd->qcoeff + 16 * 16, xd->block[16].dequant,
- xd->predictor + 16 * 16, xd->dst.u_buffer, xd->dst.v_buffer,
- xd->dst.uv_stride, xd->eobs + 16);
+ )
+ DEQUANT_INVOKE(&pbi->dequant, idct_add_uv_block_8x8) //
+ (xd->qcoeff + 16 * 16, xd->block[16].dequant,
+ xd->predictor + 16 * 16, xd->dst.u_buffer, xd->dst.v_buffer,
+ xd->dst.uv_stride, xd->eobs + 16, xd); //
+ else if (xd->mode_info_context->mbmi.mode != I8X8_PRED)
+ DEQUANT_INVOKE(&pbi->dequant, idct_add_uv_block)
+ (xd->qcoeff + 16 * 16, xd->block[16].dequant,
+ xd->predictor + 16 * 16, xd->dst.u_buffer, xd->dst.v_buffer,
+ xd->dst.uv_stride, xd->eobs + 16);
#if CONFIG_SUPERBLOCKS
}
#endif
diff --git a/vp8/decoder/detokenize.c b/vp8/decoder/detokenize.c
index b1d5a5259..cfb076862 100644
--- a/vp8/decoder/detokenize.c
+++ b/vp8/decoder/detokenize.c
@@ -548,15 +548,10 @@ int vp8_decode_mb_tokens_8x8(VP8D_COMP *pbi, MACROBLOCKD *xd) {
TX_TYPE tx_type = DCT_DCT;
#endif
-#if CONFIG_HYBRIDTRANSFORM8X8
int bufthred = (xd->mode_info_context->mbmi.mode == I8X8_PRED) ? 16 : 24;
if (xd->mode_info_context->mbmi.mode != B_PRED &&
xd->mode_info_context->mbmi.mode != SPLITMV &&
xd->mode_info_context->mbmi.mode != I8X8_PRED) {
-#else
- if (xd->mode_info_context->mbmi.mode != B_PRED &&
- xd->mode_info_context->mbmi.mode != SPLITMV) {
-#endif
ENTROPY_CONTEXT *const a = A + vp8_block2above_8x8[24];
ENTROPY_CONTEXT *const l = L + vp8_block2left_8x8[24];
const int *const scan = vp8_default_zig_zag1d;
@@ -585,11 +580,7 @@ int vp8_decode_mb_tokens_8x8(VP8D_COMP *pbi, MACROBLOCKD *xd) {
else
seg_eob = 64;
-#if CONFIG_HYBRIDTRANSFORM8X8
for (i = 0; i < bufthred ; i += 4) {
-#else
- for (i = 0; i < 24; i += 4) {
-#endif
ENTROPY_CONTEXT *const a = A + vp8_block2above_8x8[i];
ENTROPY_CONTEXT *const l = L + vp8_block2left_8x8[i];
const int *const scan = vp8_default_zig_zag1d_8x8;
@@ -606,7 +597,6 @@ int vp8_decode_mb_tokens_8x8(VP8D_COMP *pbi, MACROBLOCKD *xd) {
}
#endif
- //printf("8: %d\n", tx_type);
c = vp8_decode_coefs(pbi, xd, a, l, type,
#if CONFIG_HYBRIDTRANSFORM8X8 || CONFIG_HYBRIDTRANSFORM || CONFIG_HYBRIDTRANSFORM16X16
tx_type,
@@ -621,10 +611,11 @@ int vp8_decode_mb_tokens_8x8(VP8D_COMP *pbi, MACROBLOCKD *xd) {
qcoeff_ptr += 64;
}
-#if CONFIG_HYBRIDTRANSFORM8X8
- if (xd->mode_info_context->mbmi.mode == I8X8_PRED) {
+ if (bufthred == 16) {
type = PLANE_TYPE_UV;
+#if CONFIG_HYBRIDTRANSFORM8X8 || CONFIG_HYBRIDTRANSFORM || CONFIG_HYBRIDTRANSFORM16X16
tx_type = DCT_DCT;
+#endif
seg_eob = 16;
// use 4x4 transform for U, V components in I8X8 prediction mode
@@ -645,7 +636,6 @@ int vp8_decode_mb_tokens_8x8(VP8D_COMP *pbi, MACROBLOCKD *xd) {
qcoeff_ptr += 16;
}
}
-#endif
return eobtotal;
}