summaryrefslogtreecommitdiff
path: root/vp8/encoder/encodeintra.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2012-08-01 10:18:25 -0700
committerJingning Han <jingning@google.com>2012-08-02 09:09:17 -0700
commitc7846ebc3438aa3e1611398567bf950d0656c590 (patch)
treedbec3e20a943343731a1ba72aaa5fc376a97d85d /vp8/encoder/encodeintra.c
parent171b4ae1575ccfcf02dcaebd49a099c3a23fa0eb (diff)
downloadlibvpx-c7846ebc3438aa3e1611398567bf950d0656c590.tar
libvpx-c7846ebc3438aa3e1611398567bf950d0656c590.tar.gz
libvpx-c7846ebc3438aa3e1611398567bf950d0656c590.tar.bz2
libvpx-c7846ebc3438aa3e1611398567bf950d0656c590.zip
Use 8x8 DCT transform for I8X8 prediction mode
Apply 2D-DCT transform of dimension 8x8 to encode prediction residuals of I8X8 mode. Brought back block type 3 probability context model for 8x8 tokens, which is used for the coefficients of Y blocks in I8x8 modes. The coefficient costs estimate of I8X8 mode in rate-distortion is also changed appropriately. Performance results: derf: 0.246 yt: 0.114 std-hd: 0.730 hd: 0.670 Change-Id: If1d970eeb4e1827c9f0d2c5b27d33089b347ea27
Diffstat (limited to 'vp8/encoder/encodeintra.c')
-rw-r--r--vp8/encoder/encodeintra.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/vp8/encoder/encodeintra.c b/vp8/encoder/encodeintra.c
index 46b352ef8..01ae03a23 100644
--- a/vp8/encoder/encodeintra.c
+++ b/vp8/encoder/encodeintra.c
@@ -306,6 +306,25 @@ void vp8_encode_intra8x8(const VP8_ENCODER_RTCD *rtcd,
}
#endif
+#if CONFIG_HTRANS8X8
+ {
+ MACROBLOCKD *xd = &x->e_mbd;
+ int idx = (ib & 0x02) ? (ib + 2) : ib;
+
+ // generate residual blocks
+ vp8_subtract_4b_c(be, b, 16);
+ x->vp8_short_fdct8x8(be->src_diff, (x->block + idx)->coeff, 32);
+ x->quantize_b_8x8(x->block + idx, xd->block + idx);
+ vp8_short_idct8x8_c(xd->block[idx].dqcoeff, xd->block[ib].diff, 32);
+
+ // reconstruct submacroblock
+ for (i = 0; i < 4; i++) {
+ b = &xd->block[ib + iblock[i]];
+ vp8_recon_b_c(b->predictor, b->diff, *(b->base_dst) + b->dst,
+ b->dst_stride);
+ }
+ }
+#else
for (i = 0; i < 4; i++) {
b = &x->e_mbd.block[ib + iblock[i]];
be = &x->block[ib + iblock[i]];
@@ -314,8 +333,10 @@ void vp8_encode_intra8x8(const VP8_ENCODER_RTCD *rtcd,
x->quantize_b(be, b);
vp8_inverse_transform_b(IF_RTCD(&rtcd->common->idct), b, 32);
RECON_INVOKE(&rtcd->common->recon, recon)(b->predictor,
- b->diff, *(b->base_dst) + b->dst, b->dst_stride);
+ b->diff, *(b->base_dst) + b->dst,
+ b->dst_stride);
}
+#endif
}
extern const int vp8_i8x8_block[4];