sb8x8 integration in rd loop.

Work-in-progress, not yet ready for review. TODO items:
- bitstream writing (encoder) and reading (decoder)
- decoder reconstruction

Change-Id: I5afb7284e7e0480847b47cd0097cb469433c9081
This commit is contained in:
Ronald S. Bultje
2013-04-30 16:13:20 -07:00
parent ad6890316c
commit d068d869b9
26 changed files with 1580 additions and 146 deletions

View File

@@ -22,12 +22,15 @@ int vp9_encode_intra(VP9_COMP *cpi, MACROBLOCK *x, int use_16x16_pred) {
MB_MODE_INFO * mbmi = &x->e_mbd.mode_info_context->mbmi;
(void) cpi;
#if !CONFIG_SB8X8
if (use_16x16_pred) {
#endif
mbmi->mode = DC_PRED;
mbmi->uv_mode = DC_PRED;
mbmi->ref_frame = INTRA_FRAME;
vp9_encode_intra16x16mby(&cpi->common, x);
#if !CONFIG_SB8X8
} else {
int i;
@@ -36,6 +39,7 @@ int vp9_encode_intra(VP9_COMP *cpi, MACROBLOCK *x, int use_16x16_pred) {
encode_intra4x4block(x, i, BLOCK_SIZE_MB16X16);
}
}
#endif
return vp9_get_mb_ss(x->plane[0].src_diff);
}
@@ -58,7 +62,7 @@ static void encode_intra4x4block(MACROBLOCK *x, int ib,
xd->plane[0].diff);
int16_t* const coeff = BLOCK_OFFSET(x->plane[0].coeff, ib, 16);
assert(ib < 16);
assert(ib < (16 >> (2 * CONFIG_SB8X8)));
#if CONFIG_NEWBINTRAMODES
xd->mode_info_context->bmi[ib].as_mode.context =
@@ -68,22 +72,22 @@ static void encode_intra4x4block(MACROBLOCK *x, int ib,
vp9_intra4x4_predict(&x->e_mbd, ib,
xd->mode_info_context->bmi[ib].as_mode.first,
dst, xd->plane[0].dst.stride);
vp9_subtract_block(4, 4, src_diff, 16,
vp9_subtract_block(4, 4, src_diff, 16 >> CONFIG_SB8X8,
src, x->plane[0].src.stride,
dst, xd->plane[0].dst.stride);
tx_type = get_tx_type_4x4(&x->e_mbd, ib);
if (tx_type != DCT_DCT) {
vp9_short_fht4x4(src_diff, coeff, 16, tx_type);
vp9_short_fht4x4(src_diff, coeff, 16 >> CONFIG_SB8X8, tx_type);
x->quantize_b_4x4(x, ib, tx_type, 16);
vp9_short_iht4x4(BLOCK_OFFSET(xd->plane[0].dqcoeff, ib, 16),
diff, 16, tx_type);
diff, 16 >> CONFIG_SB8X8, tx_type);
} else {
x->fwd_txm4x4(src_diff, coeff, 32);
x->fwd_txm4x4(src_diff, coeff, 32 >> CONFIG_SB8X8);
x->quantize_b_4x4(x, ib, tx_type, 16);
vp9_inverse_transform_b_4x4(&x->e_mbd, xd->plane[0].eobs[ib],
BLOCK_OFFSET(xd->plane[0].dqcoeff, ib, 16),
diff, 32);
diff, 32 >> CONFIG_SB8X8);
}
vp9_recon_b(dst, diff, dst, xd->plane[0].dst.stride);
@@ -159,6 +163,7 @@ void vp9_encode_intra16x16mbuv(VP9_COMMON *const cm, MACROBLOCK *x) {
vp9_recon_sbuv(xd, BLOCK_SIZE_MB16X16);
}
#if !CONFIG_SB8X8
void vp9_encode_intra8x8(MACROBLOCK *x, int ib) {
MACROBLOCKD *xd = &x->e_mbd;
uint8_t* const src =
@@ -304,3 +309,4 @@ void vp9_encode_intra8x8mbuv(MACROBLOCK *x) {
encode_intra_uv4x4(x, i + 20, mode); // v
}
}
#endif