2010-05-18 17:58:33 +02:00
|
|
|
/*
|
2010-09-09 14:16:39 +02:00
|
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
2010-05-18 17:58:33 +02:00
|
|
|
*
|
2010-06-18 18:39:21 +02:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
2010-06-04 22:19:40 +02:00
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
2010-06-18 18:39:21 +02:00
|
|
|
* in the file PATENTS. All contributing project authors may
|
2010-06-04 22:19:40 +02:00
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2010-05-18 17:58:33 +02:00
|
|
|
*/
|
|
|
|
|
2012-12-23 16:20:10 +01:00
|
|
|
#include "./vpx_config.h"
|
2012-11-09 02:09:30 +01:00
|
|
|
#include "vp9_rtcd.h"
|
2012-11-28 19:41:40 +01:00
|
|
|
#include "vp9/encoder/vp9_quantize.h"
|
2012-11-27 22:59:17 +01:00
|
|
|
#include "vp9/common/vp9_reconintra.h"
|
2012-11-28 19:41:40 +01:00
|
|
|
#include "vp9/encoder/vp9_encodemb.h"
|
2012-11-27 22:59:17 +01:00
|
|
|
#include "vp9/common/vp9_invtrans.h"
|
2012-11-28 19:41:40 +01:00
|
|
|
#include "vp9/encoder/vp9_encodeintra.h"
|
2010-05-18 17:58:33 +02:00
|
|
|
|
2013-04-02 23:50:40 +02:00
|
|
|
static void encode_intra4x4block(MACROBLOCK *x, int ib);
|
|
|
|
|
2012-10-31 01:53:32 +01:00
|
|
|
int vp9_encode_intra(VP9_COMP *cpi, MACROBLOCK *x, int use_16x16_pred) {
|
2012-08-10 15:12:43 +02:00
|
|
|
MB_MODE_INFO * mbmi = &x->e_mbd.mode_info_context->mbmi;
|
2012-07-14 00:21:29 +02:00
|
|
|
(void) cpi;
|
2011-06-14 12:39:06 +02:00
|
|
|
|
2012-07-14 00:21:29 +02:00
|
|
|
if (use_16x16_pred) {
|
2012-08-10 15:12:43 +02:00
|
|
|
mbmi->mode = DC_PRED;
|
|
|
|
mbmi->uv_mode = DC_PRED;
|
|
|
|
mbmi->ref_frame = INTRA_FRAME;
|
2012-07-14 00:21:29 +02:00
|
|
|
|
2013-02-20 19:16:24 +01:00
|
|
|
vp9_encode_intra16x16mby(&cpi->common, x);
|
2012-07-14 00:21:29 +02:00
|
|
|
} else {
|
2013-02-28 22:18:02 +01:00
|
|
|
int i;
|
|
|
|
|
2012-07-14 00:21:29 +02:00
|
|
|
for (i = 0; i < 16; i++) {
|
|
|
|
x->e_mbd.block[i].bmi.as_mode.first = B_DC_PRED;
|
2013-04-02 23:50:40 +02:00
|
|
|
encode_intra4x4block(x, i);
|
2011-06-14 12:39:06 +02:00
|
|
|
}
|
2012-07-14 00:21:29 +02:00
|
|
|
}
|
2011-06-14 12:39:06 +02:00
|
|
|
|
2013-04-23 17:26:10 +02:00
|
|
|
return vp9_get_mb_ss(x->plane[0].src_diff);
|
2011-06-14 12:39:06 +02:00
|
|
|
}
|
2011-05-20 03:37:13 +02:00
|
|
|
|
2013-04-02 23:50:40 +02:00
|
|
|
static void encode_intra4x4block(MACROBLOCK *x, int ib) {
|
2012-07-14 00:21:29 +02:00
|
|
|
BLOCKD *b = &x->e_mbd.block[ib];
|
|
|
|
BLOCK *be = &x->block[ib];
|
2013-04-02 23:50:40 +02:00
|
|
|
MACROBLOCKD * const xd = &x->e_mbd;
|
2012-10-16 01:41:41 +02:00
|
|
|
TX_TYPE tx_type;
|
2013-04-23 17:26:10 +02:00
|
|
|
int16_t* const src_diff =
|
|
|
|
raster_block_offset_int16(xd, BLOCK_SIZE_MB16X16, 0, ib,
|
|
|
|
x->plane[0].src_diff);
|
2013-04-23 23:38:52 +02:00
|
|
|
int16_t* const coeff = BLOCK_OFFSET(x->plane[0].coeff, ib, 16);
|
2011-05-20 03:37:13 +02:00
|
|
|
|
2013-04-02 23:50:40 +02:00
|
|
|
assert(ib < 16);
|
|
|
|
|
2012-10-09 22:19:15 +02:00
|
|
|
#if CONFIG_NEWBINTRAMODES
|
2013-03-16 17:26:52 +01:00
|
|
|
b->bmi.as_mode.context = vp9_find_bpred_context(&x->e_mbd, b);
|
2012-10-09 22:19:15 +02:00
|
|
|
#endif
|
|
|
|
|
2013-04-15 18:31:27 +02:00
|
|
|
vp9_intra4x4_predict(&x->e_mbd, b, b->bmi.as_mode.first,
|
|
|
|
*(b->base_dst) + b->dst, b->dst_stride);
|
2013-04-23 17:26:10 +02:00
|
|
|
vp9_subtract_block(4, 4, src_diff, 16,
|
|
|
|
*(be->base_src) + be->src, be->src_stride,
|
|
|
|
*(b->base_dst) + b->dst, b->dst_stride);
|
2010-05-18 17:58:33 +02:00
|
|
|
|
2013-03-06 00:18:06 +01:00
|
|
|
tx_type = get_tx_type_4x4(&x->e_mbd, ib);
|
2012-10-16 01:41:41 +02:00
|
|
|
if (tx_type != DCT_DCT) {
|
2013-04-23 23:38:52 +02:00
|
|
|
vp9_short_fht4x4(src_diff, coeff, 16, tx_type);
|
2013-02-27 19:00:24 +01:00
|
|
|
vp9_ht_quantize_b_4x4(x, ib, tx_type);
|
2013-04-02 23:50:40 +02:00
|
|
|
vp9_short_iht4x4(BLOCK_OFFSET(xd->plane[0].dqcoeff, ib, 16),
|
|
|
|
b->diff, 16, tx_type);
|
2012-10-22 20:55:29 +02:00
|
|
|
} else {
|
2013-04-23 23:38:52 +02:00
|
|
|
x->fwd_txm4x4(src_diff, coeff, 32);
|
2013-04-04 21:03:27 +02:00
|
|
|
x->quantize_b_4x4(x, ib, 16);
|
|
|
|
vp9_inverse_transform_b_4x4(&x->e_mbd, xd->plane[0].eobs[ib],
|
2013-04-02 23:50:40 +02:00
|
|
|
BLOCK_OFFSET(xd->plane[0].dqcoeff, ib, 16),
|
|
|
|
b->diff, 32);
|
2012-09-10 07:42:35 +02:00
|
|
|
}
|
2010-05-18 17:58:33 +02:00
|
|
|
|
2013-04-15 18:31:27 +02:00
|
|
|
vp9_recon_b(*(b->base_dst) + b->dst, b->diff,
|
|
|
|
*(b->base_dst) + b->dst, b->dst_stride);
|
2010-05-18 17:58:33 +02:00
|
|
|
}
|
|
|
|
|
2012-11-25 04:33:58 +01:00
|
|
|
void vp9_encode_intra4x4mby(MACROBLOCK *mb) {
|
2012-07-14 00:21:29 +02:00
|
|
|
int i;
|
2010-05-18 17:58:33 +02:00
|
|
|
|
2012-07-14 00:21:29 +02:00
|
|
|
for (i = 0; i < 16; i++)
|
2013-04-02 23:50:40 +02:00
|
|
|
encode_intra4x4block(mb, i);
|
2010-05-18 17:58:33 +02:00
|
|
|
}
|
|
|
|
|
2013-02-20 19:16:24 +01:00
|
|
|
void vp9_encode_intra16x16mby(VP9_COMMON *const cm, MACROBLOCK *x) {
|
2012-10-13 18:27:54 +02:00
|
|
|
MACROBLOCKD *xd = &x->e_mbd;
|
|
|
|
TX_SIZE tx_size = xd->mode_info_context->mbmi.txfm_size;
|
2011-11-04 19:29:51 +01:00
|
|
|
|
2013-04-15 18:31:27 +02:00
|
|
|
vp9_build_intra_predictors_sby_s(xd, BLOCK_SIZE_MB16X16);
|
2013-04-23 17:26:10 +02:00
|
|
|
vp9_subtract_sby(x, BLOCK_SIZE_MB16X16);
|
2011-11-04 19:29:51 +01:00
|
|
|
|
2013-02-28 22:18:02 +01:00
|
|
|
switch (tx_size) {
|
|
|
|
case TX_16X16:
|
2013-04-11 19:57:16 +02:00
|
|
|
vp9_transform_sby_16x16(x, BLOCK_SIZE_MB16X16);
|
|
|
|
vp9_quantize_sby_16x16(x, BLOCK_SIZE_MB16X16);
|
2013-02-28 22:18:02 +01:00
|
|
|
if (x->optimize)
|
2013-04-11 19:57:16 +02:00
|
|
|
vp9_optimize_sby_16x16(cm, x, BLOCK_SIZE_MB16X16);
|
|
|
|
vp9_inverse_transform_sby_16x16(xd, BLOCK_SIZE_MB16X16);
|
2013-02-28 22:18:02 +01:00
|
|
|
break;
|
|
|
|
case TX_8X8:
|
2013-04-11 19:57:16 +02:00
|
|
|
vp9_transform_sby_8x8(x, BLOCK_SIZE_MB16X16);
|
|
|
|
vp9_quantize_sby_8x8(x, BLOCK_SIZE_MB16X16);
|
2013-02-28 22:18:02 +01:00
|
|
|
if (x->optimize)
|
2013-04-11 19:57:16 +02:00
|
|
|
vp9_optimize_sby_8x8(cm, x, BLOCK_SIZE_MB16X16);
|
|
|
|
vp9_inverse_transform_sby_8x8(xd, BLOCK_SIZE_MB16X16);
|
2013-02-28 22:18:02 +01:00
|
|
|
break;
|
|
|
|
default:
|
2013-04-11 19:57:16 +02:00
|
|
|
vp9_transform_sby_4x4(x, BLOCK_SIZE_MB16X16);
|
|
|
|
vp9_quantize_sby_4x4(x, BLOCK_SIZE_MB16X16);
|
2013-02-28 22:18:02 +01:00
|
|
|
if (x->optimize)
|
2013-04-11 19:57:16 +02:00
|
|
|
vp9_optimize_sby_4x4(cm, x, BLOCK_SIZE_MB16X16);
|
|
|
|
vp9_inverse_transform_sby_4x4(xd, BLOCK_SIZE_MB16X16);
|
2013-02-28 22:18:02 +01:00
|
|
|
break;
|
2012-07-14 00:21:29 +02:00
|
|
|
}
|
|
|
|
|
2013-04-19 21:12:00 +02:00
|
|
|
vp9_recon_sby(xd, BLOCK_SIZE_MB16X16);
|
2010-05-18 17:58:33 +02:00
|
|
|
}
|
|
|
|
|
2013-02-20 19:16:24 +01:00
|
|
|
void vp9_encode_intra16x16mbuv(VP9_COMMON *const cm, MACROBLOCK *x) {
|
2012-10-13 18:27:54 +02:00
|
|
|
MACROBLOCKD *xd = &x->e_mbd;
|
|
|
|
TX_SIZE tx_size = xd->mode_info_context->mbmi.txfm_size;
|
|
|
|
|
2013-04-15 18:31:27 +02:00
|
|
|
vp9_build_intra_predictors_sbuv_s(xd, BLOCK_SIZE_MB16X16);
|
2013-04-23 17:26:10 +02:00
|
|
|
vp9_subtract_sbuv(x, BLOCK_SIZE_MB16X16);
|
2012-10-28 18:38:23 +01:00
|
|
|
|
2013-02-28 22:18:02 +01:00
|
|
|
switch (tx_size) {
|
|
|
|
case TX_4X4:
|
2013-04-11 19:57:16 +02:00
|
|
|
vp9_transform_sbuv_4x4(x, BLOCK_SIZE_MB16X16);
|
|
|
|
vp9_quantize_sbuv_4x4(x, BLOCK_SIZE_MB16X16);
|
2013-02-28 22:18:02 +01:00
|
|
|
if (x->optimize)
|
2013-04-11 19:57:16 +02:00
|
|
|
vp9_optimize_sbuv_4x4(cm, x, BLOCK_SIZE_MB16X16);
|
|
|
|
vp9_inverse_transform_sbuv_4x4(xd, BLOCK_SIZE_MB16X16);
|
2013-02-28 22:18:02 +01:00
|
|
|
break;
|
|
|
|
default: // 16x16 or 8x8
|
2013-04-11 19:57:16 +02:00
|
|
|
vp9_transform_sbuv_8x8(x, BLOCK_SIZE_MB16X16);
|
|
|
|
vp9_quantize_sbuv_8x8(x, BLOCK_SIZE_MB16X16);
|
2013-02-28 22:18:02 +01:00
|
|
|
if (x->optimize)
|
2013-04-11 19:57:16 +02:00
|
|
|
vp9_optimize_sbuv_8x8(cm, x, BLOCK_SIZE_MB16X16);
|
|
|
|
vp9_inverse_transform_sbuv_8x8(xd, BLOCK_SIZE_MB16X16);
|
2013-02-28 22:18:02 +01:00
|
|
|
break;
|
|
|
|
}
|
2012-07-14 00:21:29 +02:00
|
|
|
|
2013-04-20 23:17:57 +02:00
|
|
|
vp9_recon_sbuv(xd, BLOCK_SIZE_MB16X16);
|
2010-05-18 17:58:33 +02:00
|
|
|
}
|
2011-08-05 01:30:27 +02:00
|
|
|
|
2012-11-25 04:33:58 +01:00
|
|
|
void vp9_encode_intra8x8(MACROBLOCK *x, int ib) {
|
2012-10-11 02:18:22 +02:00
|
|
|
MACROBLOCKD *xd = &x->e_mbd;
|
|
|
|
BLOCKD *b = &xd->block[ib];
|
2012-07-14 00:21:29 +02:00
|
|
|
BLOCK *be = &x->block[ib];
|
2013-04-23 17:26:10 +02:00
|
|
|
int16_t* const src_diff =
|
|
|
|
raster_block_offset_int16(xd, BLOCK_SIZE_MB16X16, 0, ib,
|
|
|
|
x->plane[0].src_diff);
|
2012-07-14 00:21:29 +02:00
|
|
|
const int iblock[4] = {0, 1, 4, 5};
|
|
|
|
int i;
|
2012-10-16 01:41:41 +02:00
|
|
|
TX_TYPE tx_type;
|
2011-08-05 01:30:27 +02:00
|
|
|
|
2013-04-15 18:31:27 +02:00
|
|
|
vp9_intra8x8_predict(xd, b, b->bmi.as_mode.first,
|
|
|
|
*(b->base_dst) + b->dst, b->dst_stride);
|
2012-11-16 00:14:38 +01:00
|
|
|
// generate residual blocks
|
2013-04-23 17:26:10 +02:00
|
|
|
vp9_subtract_block(8, 8, src_diff, 16,
|
|
|
|
*(be->base_src) + be->src, be->src_stride,
|
|
|
|
*(b->base_dst) + b->dst, b->dst_stride);
|
2011-08-05 01:30:27 +02:00
|
|
|
|
2012-10-13 18:27:54 +02:00
|
|
|
if (xd->mode_info_context->mbmi.txfm_size == TX_8X8) {
|
2012-08-01 19:18:25 +02:00
|
|
|
int idx = (ib & 0x02) ? (ib + 2) : ib;
|
2013-04-23 23:38:52 +02:00
|
|
|
int16_t* const dqcoeff = BLOCK_OFFSET(xd->plane[0].dqcoeff, idx, 16);
|
|
|
|
int16_t* const coeff = BLOCK_OFFSET(x->plane[0].coeff, idx, 16);
|
2012-08-01 19:18:25 +02:00
|
|
|
|
2013-04-02 23:50:40 +02:00
|
|
|
assert(idx < 16);
|
2013-03-06 00:18:06 +01:00
|
|
|
tx_type = get_tx_type_8x8(xd, ib);
|
2012-10-16 01:41:41 +02:00
|
|
|
if (tx_type != DCT_DCT) {
|
2013-04-23 23:38:52 +02:00
|
|
|
vp9_short_fht8x8(src_diff, coeff, 16, tx_type);
|
2013-04-04 21:03:27 +02:00
|
|
|
x->quantize_b_8x8(x, idx, tx_type, 16);
|
2013-04-02 23:50:40 +02:00
|
|
|
vp9_short_iht8x8(dqcoeff, xd->block[ib].diff,
|
2013-02-26 03:19:55 +01:00
|
|
|
16, tx_type);
|
2012-10-16 01:41:41 +02:00
|
|
|
} else {
|
2013-04-23 23:38:52 +02:00
|
|
|
x->fwd_txm8x8(src_diff, coeff, 32);
|
2013-04-04 21:03:27 +02:00
|
|
|
x->quantize_b_8x8(x, idx, DCT_DCT, 16);
|
2013-04-02 23:50:40 +02:00
|
|
|
vp9_short_idct8x8(dqcoeff, xd->block[ib].diff, 32);
|
2012-10-16 01:41:41 +02:00
|
|
|
}
|
2012-10-11 02:18:22 +02:00
|
|
|
} else {
|
2012-08-01 19:18:25 +02:00
|
|
|
for (i = 0; i < 4; i++) {
|
2013-04-02 23:50:40 +02:00
|
|
|
int idx = ib + iblock[i];
|
2013-04-23 23:38:52 +02:00
|
|
|
int16_t* const dqcoeff = BLOCK_OFFSET(xd->plane[0].dqcoeff, idx, 16);
|
|
|
|
int16_t* const coeff = BLOCK_OFFSET(x->plane[0].coeff, idx, 16);
|
2013-04-23 17:26:10 +02:00
|
|
|
int16_t* const src_diff =
|
|
|
|
raster_block_offset_int16(xd, BLOCK_SIZE_MB16X16, 0, idx,
|
|
|
|
x->plane[0].src_diff);
|
2013-04-02 23:50:40 +02:00
|
|
|
|
|
|
|
assert(idx < 16);
|
2012-08-01 19:18:25 +02:00
|
|
|
b = &xd->block[ib + iblock[i]];
|
2012-10-11 02:18:22 +02:00
|
|
|
be = &x->block[ib + iblock[i]];
|
2013-03-06 00:18:06 +01:00
|
|
|
tx_type = get_tx_type_4x4(xd, ib + iblock[i]);
|
2012-11-16 00:14:38 +01:00
|
|
|
if (tx_type != DCT_DCT) {
|
2013-04-23 23:38:52 +02:00
|
|
|
vp9_short_fht4x4(src_diff, coeff, 16, tx_type);
|
2013-02-27 19:00:24 +01:00
|
|
|
vp9_ht_quantize_b_4x4(x, ib + iblock[i], tx_type);
|
2013-04-02 23:50:40 +02:00
|
|
|
vp9_short_iht4x4(dqcoeff, b->diff, 16, tx_type);
|
2013-03-06 00:18:06 +01:00
|
|
|
} else if (!(i & 1) &&
|
|
|
|
get_tx_type_4x4(xd, ib + iblock[i] + 1) == DCT_DCT) {
|
2013-04-23 23:38:52 +02:00
|
|
|
x->fwd_txm8x4(src_diff, coeff, 32);
|
2013-04-04 21:03:27 +02:00
|
|
|
x->quantize_b_4x4_pair(x, ib + iblock[i], ib + iblock[i] + 1, 16);
|
|
|
|
vp9_inverse_transform_b_4x4(xd, xd->plane[0].eobs[ib + iblock[i]],
|
2013-04-02 23:50:40 +02:00
|
|
|
dqcoeff, b->diff, 32);
|
2013-04-04 21:03:27 +02:00
|
|
|
vp9_inverse_transform_b_4x4(xd, xd->plane[0].eobs[ib + iblock[i] + 1],
|
2013-04-02 23:50:40 +02:00
|
|
|
dqcoeff + 16, (b + 1)->diff, 32);
|
2013-02-06 23:13:05 +01:00
|
|
|
i++;
|
2012-11-16 00:14:38 +01:00
|
|
|
} else {
|
2013-04-23 23:38:52 +02:00
|
|
|
x->fwd_txm4x4(src_diff, coeff, 32);
|
2013-04-04 21:03:27 +02:00
|
|
|
x->quantize_b_4x4(x, ib + iblock[i], 16);
|
|
|
|
vp9_inverse_transform_b_4x4(xd, xd->plane[0].eobs[ib + iblock[i]],
|
2013-04-02 23:50:40 +02:00
|
|
|
dqcoeff, b->diff, 32);
|
2012-11-16 00:14:38 +01:00
|
|
|
}
|
2012-08-01 19:18:25 +02:00
|
|
|
}
|
|
|
|
}
|
2012-10-11 02:18:22 +02:00
|
|
|
|
|
|
|
// reconstruct submacroblock
|
|
|
|
for (i = 0; i < 4; i++) {
|
|
|
|
b = &xd->block[ib + iblock[i]];
|
2013-04-15 18:31:27 +02:00
|
|
|
vp9_recon_b_c(*(b->base_dst) + b->dst, b->diff, *(b->base_dst) + b->dst,
|
2012-10-11 02:18:22 +02:00
|
|
|
b->dst_stride);
|
|
|
|
}
|
2011-08-05 01:30:27 +02:00
|
|
|
}
|
|
|
|
|
2012-11-25 04:33:58 +01:00
|
|
|
void vp9_encode_intra8x8mby(MACROBLOCK *x) {
|
2013-02-28 22:18:02 +01:00
|
|
|
int i;
|
2012-07-14 00:21:29 +02:00
|
|
|
|
2013-02-28 22:18:02 +01:00
|
|
|
for (i = 0; i < 4; i++)
|
|
|
|
vp9_encode_intra8x8(x, vp9_i8x8_block[i]);
|
2011-08-05 01:30:27 +02:00
|
|
|
}
|
|
|
|
|
2013-02-28 22:18:02 +01:00
|
|
|
static void encode_intra_uv4x4(MACROBLOCK *x, int ib, int mode) {
|
2013-04-02 23:50:40 +02:00
|
|
|
MACROBLOCKD * const xd = &x->e_mbd;
|
2012-07-14 00:21:29 +02:00
|
|
|
BLOCKD *b = &x->e_mbd.block[ib];
|
|
|
|
BLOCK *be = &x->block[ib];
|
2013-04-02 23:50:40 +02:00
|
|
|
int16_t * const dqcoeff = MB_SUBBLOCK_FIELD(xd, dqcoeff, ib);
|
2013-04-23 23:38:52 +02:00
|
|
|
int16_t* const coeff = MB_SUBBLOCK_FIELD(x, coeff, ib);
|
2013-04-04 21:03:27 +02:00
|
|
|
const int plane = ib < 20 ? 1 : 2;
|
|
|
|
const int block = ib < 20 ? ib - 16 : ib - 20;
|
2013-04-23 17:26:10 +02:00
|
|
|
int16_t* const src_diff =
|
|
|
|
raster_block_offset_int16(xd, BLOCK_SIZE_MB16X16, plane, block,
|
|
|
|
x->plane[plane].src_diff);
|
2011-08-05 01:30:27 +02:00
|
|
|
|
2013-04-02 23:50:40 +02:00
|
|
|
assert(ib >= 16 && ib < 24);
|
2013-04-15 18:31:27 +02:00
|
|
|
vp9_intra_uv4x4_predict(&x->e_mbd, b, mode,
|
|
|
|
*(b->base_dst) + b->dst, b->dst_stride);
|
2011-08-05 01:30:27 +02:00
|
|
|
|
2013-04-23 17:26:10 +02:00
|
|
|
assert(xd->plane[1].subsampling_x == 1);
|
|
|
|
vp9_subtract_block(4, 4, src_diff, 8,
|
|
|
|
*(be->base_src) + be->src, be->src_stride,
|
|
|
|
*(b->base_dst) + b->dst, b->dst_stride);
|
2011-08-05 01:30:27 +02:00
|
|
|
|
2013-04-23 23:38:52 +02:00
|
|
|
x->fwd_txm4x4(src_diff, coeff, 16);
|
2013-04-04 21:03:27 +02:00
|
|
|
x->quantize_b_4x4(x, ib, 16);
|
|
|
|
vp9_inverse_transform_b_4x4(&x->e_mbd, xd->plane[plane].eobs[block],
|
2013-04-02 23:50:40 +02:00
|
|
|
dqcoeff, b->diff, 16);
|
2011-08-05 01:30:27 +02:00
|
|
|
|
2013-04-15 18:31:27 +02:00
|
|
|
vp9_recon_uv_b_c(*(b->base_dst) + b->dst, b->diff, *(b->base_dst) + b->dst,
|
2012-11-01 00:09:17 +01:00
|
|
|
b->dst_stride);
|
2011-08-05 01:30:27 +02:00
|
|
|
}
|
|
|
|
|
2012-11-25 04:33:58 +01:00
|
|
|
void vp9_encode_intra8x8mbuv(MACROBLOCK *x) {
|
2013-02-28 22:18:02 +01:00
|
|
|
int i;
|
2012-10-13 18:27:54 +02:00
|
|
|
|
2012-07-14 00:21:29 +02:00
|
|
|
for (i = 0; i < 4; i++) {
|
2013-02-28 22:18:02 +01:00
|
|
|
BLOCKD *b = &x->e_mbd.block[vp9_i8x8_block[i]];
|
|
|
|
int mode = b->bmi.as_mode.first;
|
|
|
|
|
|
|
|
encode_intra_uv4x4(x, i + 16, mode); // u
|
|
|
|
encode_intra_uv4x4(x, i + 20, mode); // v
|
2012-07-14 00:21:29 +02:00
|
|
|
}
|
2011-08-05 01:30:27 +02:00
|
|
|
}
|