michael@0: /* michael@0: * Copyright (c) 2010 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: michael@0: #include "vpx_config.h" michael@0: #include "vp8_rtcd.h" michael@0: #include "encodemb.h" michael@0: #include "vp8/common/reconinter.h" michael@0: #include "quantize.h" michael@0: #include "tokenize.h" michael@0: #include "vp8/common/invtrans.h" michael@0: #include "vpx_mem/vpx_mem.h" michael@0: #include "rdopt.h" michael@0: michael@0: void vp8_subtract_b_c(BLOCK *be, BLOCKD *bd, int pitch) michael@0: { michael@0: unsigned char *src_ptr = (*(be->base_src) + be->src); michael@0: short *diff_ptr = be->src_diff; michael@0: unsigned char *pred_ptr = bd->predictor; michael@0: int src_stride = be->src_stride; michael@0: michael@0: int r, c; michael@0: michael@0: for (r = 0; r < 4; r++) michael@0: { michael@0: for (c = 0; c < 4; c++) michael@0: { michael@0: diff_ptr[c] = src_ptr[c] - pred_ptr[c]; michael@0: } michael@0: michael@0: diff_ptr += pitch; michael@0: pred_ptr += pitch; michael@0: src_ptr += src_stride; michael@0: } michael@0: } michael@0: michael@0: void vp8_subtract_mbuv_c(short *diff, unsigned char *usrc, unsigned char *vsrc, michael@0: int src_stride, unsigned char *upred, michael@0: unsigned char *vpred, int pred_stride) michael@0: { michael@0: short *udiff = diff + 256; michael@0: short *vdiff = diff + 320; michael@0: michael@0: int r, c; michael@0: michael@0: for (r = 0; r < 8; r++) michael@0: { michael@0: for (c = 0; c < 8; c++) michael@0: { michael@0: udiff[c] = usrc[c] - upred[c]; michael@0: } michael@0: michael@0: udiff += 8; michael@0: upred += pred_stride; michael@0: usrc += src_stride; michael@0: } michael@0: michael@0: for (r = 0; r < 8; r++) michael@0: { michael@0: for (c = 0; c < 8; c++) michael@0: { michael@0: vdiff[c] = vsrc[c] - vpred[c]; michael@0: } michael@0: michael@0: vdiff += 8; michael@0: vpred += pred_stride; michael@0: vsrc += src_stride; michael@0: } michael@0: } michael@0: michael@0: void vp8_subtract_mby_c(short *diff, unsigned char *src, int src_stride, michael@0: unsigned char *pred, int pred_stride) michael@0: { michael@0: int r, c; michael@0: michael@0: for (r = 0; r < 16; r++) michael@0: { michael@0: for (c = 0; c < 16; c++) michael@0: { michael@0: diff[c] = src[c] - pred[c]; michael@0: } michael@0: michael@0: diff += 16; michael@0: pred += pred_stride; michael@0: src += src_stride; michael@0: } michael@0: } michael@0: michael@0: static void vp8_subtract_mb(MACROBLOCK *x) michael@0: { michael@0: BLOCK *b = &x->block[0]; michael@0: michael@0: vp8_subtract_mby(x->src_diff, *(b->base_src), michael@0: b->src_stride, x->e_mbd.dst.y_buffer, x->e_mbd.dst.y_stride); michael@0: vp8_subtract_mbuv(x->src_diff, x->src.u_buffer, michael@0: x->src.v_buffer, x->src.uv_stride, x->e_mbd.dst.u_buffer, michael@0: x->e_mbd.dst.v_buffer, x->e_mbd.dst.uv_stride); michael@0: } michael@0: michael@0: static void build_dcblock(MACROBLOCK *x) michael@0: { michael@0: short *src_diff_ptr = &x->src_diff[384]; michael@0: int i; michael@0: michael@0: for (i = 0; i < 16; i++) michael@0: { michael@0: src_diff_ptr[i] = x->coeff[i * 16]; michael@0: } michael@0: } michael@0: michael@0: void vp8_transform_mbuv(MACROBLOCK *x) michael@0: { michael@0: int i; michael@0: michael@0: for (i = 16; i < 24; i += 2) michael@0: { michael@0: x->short_fdct8x4(&x->block[i].src_diff[0], michael@0: &x->block[i].coeff[0], 16); michael@0: } michael@0: } michael@0: michael@0: michael@0: void vp8_transform_intra_mby(MACROBLOCK *x) michael@0: { michael@0: int i; michael@0: michael@0: for (i = 0; i < 16; i += 2) michael@0: { michael@0: x->short_fdct8x4(&x->block[i].src_diff[0], michael@0: &x->block[i].coeff[0], 32); michael@0: } michael@0: michael@0: /* build dc block from 16 y dc values */ michael@0: build_dcblock(x); michael@0: michael@0: /* do 2nd order transform on the dc block */ michael@0: x->short_walsh4x4(&x->block[24].src_diff[0], michael@0: &x->block[24].coeff[0], 8); michael@0: michael@0: } michael@0: michael@0: michael@0: static void transform_mb(MACROBLOCK *x) michael@0: { michael@0: int i; michael@0: michael@0: for (i = 0; i < 16; i += 2) michael@0: { michael@0: x->short_fdct8x4(&x->block[i].src_diff[0], michael@0: &x->block[i].coeff[0], 32); michael@0: } michael@0: michael@0: /* build dc block from 16 y dc values */ michael@0: if (x->e_mbd.mode_info_context->mbmi.mode != SPLITMV) michael@0: build_dcblock(x); michael@0: michael@0: for (i = 16; i < 24; i += 2) michael@0: { michael@0: x->short_fdct8x4(&x->block[i].src_diff[0], michael@0: &x->block[i].coeff[0], 16); michael@0: } michael@0: michael@0: /* do 2nd order transform on the dc block */ michael@0: if (x->e_mbd.mode_info_context->mbmi.mode != SPLITMV) michael@0: x->short_walsh4x4(&x->block[24].src_diff[0], michael@0: &x->block[24].coeff[0], 8); michael@0: michael@0: } michael@0: michael@0: michael@0: static void transform_mby(MACROBLOCK *x) michael@0: { michael@0: int i; michael@0: michael@0: for (i = 0; i < 16; i += 2) michael@0: { michael@0: x->short_fdct8x4(&x->block[i].src_diff[0], michael@0: &x->block[i].coeff[0], 32); michael@0: } michael@0: michael@0: /* build dc block from 16 y dc values */ michael@0: if (x->e_mbd.mode_info_context->mbmi.mode != SPLITMV) michael@0: { michael@0: build_dcblock(x); michael@0: x->short_walsh4x4(&x->block[24].src_diff[0], michael@0: &x->block[24].coeff[0], 8); michael@0: } michael@0: } michael@0: michael@0: michael@0: michael@0: #define RDTRUNC(RM,DM,R,D) ( (128+(R)*(RM)) & 0xFF ) michael@0: michael@0: typedef struct vp8_token_state vp8_token_state; michael@0: michael@0: struct vp8_token_state{ michael@0: int rate; michael@0: int error; michael@0: signed char next; michael@0: signed char token; michael@0: short qc; michael@0: }; michael@0: michael@0: /* TODO: experiments to find optimal multiple numbers */ michael@0: #define Y1_RD_MULT 4 michael@0: #define UV_RD_MULT 2 michael@0: #define Y2_RD_MULT 16 michael@0: michael@0: static const int plane_rd_mult[4]= michael@0: { michael@0: Y1_RD_MULT, michael@0: Y2_RD_MULT, michael@0: UV_RD_MULT, michael@0: Y1_RD_MULT michael@0: }; michael@0: michael@0: static void optimize_b(MACROBLOCK *mb, int ib, int type, michael@0: ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l) michael@0: { michael@0: BLOCK *b; michael@0: BLOCKD *d; michael@0: vp8_token_state tokens[17][2]; michael@0: unsigned best_mask[2]; michael@0: const short *dequant_ptr; michael@0: const short *coeff_ptr; michael@0: short *qcoeff_ptr; michael@0: short *dqcoeff_ptr; michael@0: int eob; michael@0: int i0; michael@0: int rc; michael@0: int x; michael@0: int sz = 0; michael@0: int next; michael@0: int rdmult; michael@0: int rddiv; michael@0: int final_eob; michael@0: int rd_cost0; michael@0: int rd_cost1; michael@0: int rate0; michael@0: int rate1; michael@0: int error0; michael@0: int error1; michael@0: int t0; michael@0: int t1; michael@0: int best; michael@0: int band; michael@0: int pt; michael@0: int i; michael@0: int err_mult = plane_rd_mult[type]; michael@0: michael@0: b = &mb->block[ib]; michael@0: d = &mb->e_mbd.block[ib]; michael@0: michael@0: /* Enable this to test the effect of RDO as a replacement for the dynamic michael@0: * zero bin instead of an augmentation of it. michael@0: */ michael@0: #if 0 michael@0: vp8_strict_quantize_b(b, d); michael@0: #endif michael@0: michael@0: dequant_ptr = d->dequant; michael@0: coeff_ptr = b->coeff; michael@0: qcoeff_ptr = d->qcoeff; michael@0: dqcoeff_ptr = d->dqcoeff; michael@0: i0 = !type; michael@0: eob = *d->eob; michael@0: michael@0: /* Now set up a Viterbi trellis to evaluate alternative roundings. */ michael@0: rdmult = mb->rdmult * err_mult; michael@0: if(mb->e_mbd.mode_info_context->mbmi.ref_frame==INTRA_FRAME) michael@0: rdmult = (rdmult * 9)>>4; michael@0: michael@0: rddiv = mb->rddiv; michael@0: best_mask[0] = best_mask[1] = 0; michael@0: /* Initialize the sentinel node of the trellis. */ michael@0: tokens[eob][0].rate = 0; michael@0: tokens[eob][0].error = 0; michael@0: tokens[eob][0].next = 16; michael@0: tokens[eob][0].token = DCT_EOB_TOKEN; michael@0: tokens[eob][0].qc = 0; michael@0: *(tokens[eob] + 1) = *(tokens[eob] + 0); michael@0: next = eob; michael@0: for (i = eob; i-- > i0;) michael@0: { michael@0: int base_bits; michael@0: int d2; michael@0: int dx; michael@0: michael@0: rc = vp8_default_zig_zag1d[i]; michael@0: x = qcoeff_ptr[rc]; michael@0: /* Only add a trellis state for non-zero coefficients. */ michael@0: if (x) michael@0: { michael@0: int shortcut=0; michael@0: error0 = tokens[next][0].error; michael@0: error1 = tokens[next][1].error; michael@0: /* Evaluate the first possibility for this state. */ michael@0: rate0 = tokens[next][0].rate; michael@0: rate1 = tokens[next][1].rate; michael@0: t0 = (vp8_dct_value_tokens_ptr + x)->Token; michael@0: /* Consider both possible successor states. */ michael@0: if (next < 16) michael@0: { michael@0: band = vp8_coef_bands[i + 1]; michael@0: pt = vp8_prev_token_class[t0]; michael@0: rate0 += michael@0: mb->token_costs[type][band][pt][tokens[next][0].token]; michael@0: rate1 += michael@0: mb->token_costs[type][band][pt][tokens[next][1].token]; michael@0: } michael@0: rd_cost0 = RDCOST(rdmult, rddiv, rate0, error0); michael@0: rd_cost1 = RDCOST(rdmult, rddiv, rate1, error1); michael@0: if (rd_cost0 == rd_cost1) michael@0: { michael@0: rd_cost0 = RDTRUNC(rdmult, rddiv, rate0, error0); michael@0: rd_cost1 = RDTRUNC(rdmult, rddiv, rate1, error1); michael@0: } michael@0: /* And pick the best. */ michael@0: best = rd_cost1 < rd_cost0; michael@0: base_bits = *(vp8_dct_value_cost_ptr + x); michael@0: dx = dqcoeff_ptr[rc] - coeff_ptr[rc]; michael@0: d2 = dx*dx; michael@0: tokens[i][0].rate = base_bits + (best ? rate1 : rate0); michael@0: tokens[i][0].error = d2 + (best ? error1 : error0); michael@0: tokens[i][0].next = next; michael@0: tokens[i][0].token = t0; michael@0: tokens[i][0].qc = x; michael@0: best_mask[0] |= best << i; michael@0: /* Evaluate the second possibility for this state. */ michael@0: rate0 = tokens[next][0].rate; michael@0: rate1 = tokens[next][1].rate; michael@0: michael@0: if((abs(x)*dequant_ptr[rc]>abs(coeff_ptr[rc])) && michael@0: (abs(x)*dequant_ptr[rc]Token; michael@0: } michael@0: if (next < 16) michael@0: { michael@0: band = vp8_coef_bands[i + 1]; michael@0: if(t0!=DCT_EOB_TOKEN) michael@0: { michael@0: pt = vp8_prev_token_class[t0]; michael@0: rate0 += mb->token_costs[type][band][pt][ michael@0: tokens[next][0].token]; michael@0: } michael@0: if(t1!=DCT_EOB_TOKEN) michael@0: { michael@0: pt = vp8_prev_token_class[t1]; michael@0: rate1 += mb->token_costs[type][band][pt][ michael@0: tokens[next][1].token]; michael@0: } michael@0: } michael@0: michael@0: rd_cost0 = RDCOST(rdmult, rddiv, rate0, error0); michael@0: rd_cost1 = RDCOST(rdmult, rddiv, rate1, error1); michael@0: if (rd_cost0 == rd_cost1) michael@0: { michael@0: rd_cost0 = RDTRUNC(rdmult, rddiv, rate0, error0); michael@0: rd_cost1 = RDTRUNC(rdmult, rddiv, rate1, error1); michael@0: } michael@0: /* And pick the best. */ michael@0: best = rd_cost1 < rd_cost0; michael@0: base_bits = *(vp8_dct_value_cost_ptr + x); michael@0: michael@0: if(shortcut) michael@0: { michael@0: dx -= (dequant_ptr[rc] + sz) ^ sz; michael@0: d2 = dx*dx; michael@0: } michael@0: tokens[i][1].rate = base_bits + (best ? rate1 : rate0); michael@0: tokens[i][1].error = d2 + (best ? error1 : error0); michael@0: tokens[i][1].next = next; michael@0: tokens[i][1].token =best?t1:t0; michael@0: tokens[i][1].qc = x; michael@0: best_mask[1] |= best << i; michael@0: /* Finally, make this the new head of the trellis. */ michael@0: next = i; michael@0: } michael@0: /* There's no choice to make for a zero coefficient, so we don't michael@0: * add a new trellis node, but we do need to update the costs. michael@0: */ michael@0: else michael@0: { michael@0: band = vp8_coef_bands[i + 1]; michael@0: t0 = tokens[next][0].token; michael@0: t1 = tokens[next][1].token; michael@0: /* Update the cost of each path if we're past the EOB token. */ michael@0: if (t0 != DCT_EOB_TOKEN) michael@0: { michael@0: tokens[next][0].rate += mb->token_costs[type][band][0][t0]; michael@0: tokens[next][0].token = ZERO_TOKEN; michael@0: } michael@0: if (t1 != DCT_EOB_TOKEN) michael@0: { michael@0: tokens[next][1].rate += mb->token_costs[type][band][0][t1]; michael@0: tokens[next][1].token = ZERO_TOKEN; michael@0: } michael@0: /* Don't update next, because we didn't add a new node. */ michael@0: } michael@0: } michael@0: michael@0: /* Now pick the best path through the whole trellis. */ michael@0: band = vp8_coef_bands[i + 1]; michael@0: VP8_COMBINEENTROPYCONTEXTS(pt, *a, *l); michael@0: rate0 = tokens[next][0].rate; michael@0: rate1 = tokens[next][1].rate; michael@0: error0 = tokens[next][0].error; michael@0: error1 = tokens[next][1].error; michael@0: t0 = tokens[next][0].token; michael@0: t1 = tokens[next][1].token; michael@0: rate0 += mb->token_costs[type][band][pt][t0]; michael@0: rate1 += mb->token_costs[type][band][pt][t1]; michael@0: rd_cost0 = RDCOST(rdmult, rddiv, rate0, error0); michael@0: rd_cost1 = RDCOST(rdmult, rddiv, rate1, error1); michael@0: if (rd_cost0 == rd_cost1) michael@0: { michael@0: rd_cost0 = RDTRUNC(rdmult, rddiv, rate0, error0); michael@0: rd_cost1 = RDTRUNC(rdmult, rddiv, rate1, error1); michael@0: } michael@0: best = rd_cost1 < rd_cost0; michael@0: final_eob = i0 - 1; michael@0: for (i = next; i < eob; i = next) michael@0: { michael@0: x = tokens[i][best].qc; michael@0: if (x) michael@0: final_eob = i; michael@0: rc = vp8_default_zig_zag1d[i]; michael@0: qcoeff_ptr[rc] = x; michael@0: dqcoeff_ptr[rc] = x * dequant_ptr[rc]; michael@0: next = tokens[i][best].next; michael@0: best = (best_mask[best] >> i) & 1; michael@0: } michael@0: final_eob++; michael@0: michael@0: *a = *l = (final_eob != !type); michael@0: *d->eob = (char)final_eob; michael@0: } michael@0: static void check_reset_2nd_coeffs(MACROBLOCKD *x, int type, michael@0: ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l) michael@0: { michael@0: int sum=0; michael@0: int i; michael@0: BLOCKD *bd = &x->block[24]; michael@0: michael@0: if(bd->dequant[0]>=35 && bd->dequant[1]>=35) michael@0: return; michael@0: michael@0: for(i=0;i<(*bd->eob);i++) michael@0: { michael@0: int coef = bd->dqcoeff[vp8_default_zig_zag1d[i]]; michael@0: sum+= (coef>=0)?coef:-coef; michael@0: if(sum>=35) michael@0: return; michael@0: } michael@0: /************************************************************************** michael@0: our inverse hadamard transform effectively is weighted sum of all 16 inputs michael@0: with weight either 1 or -1. It has a last stage scaling of (sum+3)>>3. And michael@0: dc only idct is (dc+4)>>3. So if all the sums are between -35 and 29, the michael@0: output after inverse wht and idct will be all zero. A sum of absolute value michael@0: smaller than 35 guarantees all 16 different (+1/-1) weighted sums in wht michael@0: fall between -35 and +35. michael@0: **************************************************************************/ michael@0: if(sum < 35) michael@0: { michael@0: for(i=0;i<(*bd->eob);i++) michael@0: { michael@0: int rc = vp8_default_zig_zag1d[i]; michael@0: bd->qcoeff[rc]=0; michael@0: bd->dqcoeff[rc]=0; michael@0: } michael@0: *bd->eob = 0; michael@0: *a = *l = (*bd->eob != !type); michael@0: } michael@0: } michael@0: michael@0: static void optimize_mb(MACROBLOCK *x) michael@0: { michael@0: int b; michael@0: int type; michael@0: int has_2nd_order; michael@0: michael@0: ENTROPY_CONTEXT_PLANES t_above, t_left; michael@0: ENTROPY_CONTEXT *ta; michael@0: ENTROPY_CONTEXT *tl; michael@0: michael@0: vpx_memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES)); michael@0: vpx_memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES)); michael@0: michael@0: ta = (ENTROPY_CONTEXT *)&t_above; michael@0: tl = (ENTROPY_CONTEXT *)&t_left; michael@0: michael@0: has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED michael@0: && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); michael@0: type = has_2nd_order ? PLANE_TYPE_Y_NO_DC : PLANE_TYPE_Y_WITH_DC; michael@0: michael@0: for (b = 0; b < 16; b++) michael@0: { michael@0: optimize_b(x, b, type, michael@0: ta + vp8_block2above[b], tl + vp8_block2left[b]); michael@0: } michael@0: michael@0: for (b = 16; b < 24; b++) michael@0: { michael@0: optimize_b(x, b, PLANE_TYPE_UV, michael@0: ta + vp8_block2above[b], tl + vp8_block2left[b]); michael@0: } michael@0: michael@0: if (has_2nd_order) michael@0: { michael@0: b=24; michael@0: optimize_b(x, b, PLANE_TYPE_Y2, michael@0: ta + vp8_block2above[b], tl + vp8_block2left[b]); michael@0: check_reset_2nd_coeffs(&x->e_mbd, PLANE_TYPE_Y2, michael@0: ta + vp8_block2above[b], tl + vp8_block2left[b]); michael@0: } michael@0: } michael@0: michael@0: michael@0: void vp8_optimize_mby(MACROBLOCK *x) michael@0: { michael@0: int b; michael@0: int type; michael@0: int has_2nd_order; michael@0: michael@0: ENTROPY_CONTEXT_PLANES t_above, t_left; michael@0: ENTROPY_CONTEXT *ta; michael@0: ENTROPY_CONTEXT *tl; michael@0: michael@0: if (!x->e_mbd.above_context) michael@0: return; michael@0: michael@0: if (!x->e_mbd.left_context) michael@0: return; michael@0: michael@0: vpx_memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES)); michael@0: vpx_memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES)); michael@0: michael@0: ta = (ENTROPY_CONTEXT *)&t_above; michael@0: tl = (ENTROPY_CONTEXT *)&t_left; michael@0: michael@0: has_2nd_order = (x->e_mbd.mode_info_context->mbmi.mode != B_PRED michael@0: && x->e_mbd.mode_info_context->mbmi.mode != SPLITMV); michael@0: type = has_2nd_order ? PLANE_TYPE_Y_NO_DC : PLANE_TYPE_Y_WITH_DC; michael@0: michael@0: for (b = 0; b < 16; b++) michael@0: { michael@0: optimize_b(x, b, type, michael@0: ta + vp8_block2above[b], tl + vp8_block2left[b]); michael@0: } michael@0: michael@0: michael@0: if (has_2nd_order) michael@0: { michael@0: b=24; michael@0: optimize_b(x, b, PLANE_TYPE_Y2, michael@0: ta + vp8_block2above[b], tl + vp8_block2left[b]); michael@0: check_reset_2nd_coeffs(&x->e_mbd, PLANE_TYPE_Y2, michael@0: ta + vp8_block2above[b], tl + vp8_block2left[b]); michael@0: } michael@0: } michael@0: michael@0: void vp8_optimize_mbuv(MACROBLOCK *x) michael@0: { michael@0: int b; michael@0: ENTROPY_CONTEXT_PLANES t_above, t_left; michael@0: ENTROPY_CONTEXT *ta; michael@0: ENTROPY_CONTEXT *tl; michael@0: michael@0: if (!x->e_mbd.above_context) michael@0: return; michael@0: michael@0: if (!x->e_mbd.left_context) michael@0: return; michael@0: michael@0: vpx_memcpy(&t_above, x->e_mbd.above_context, sizeof(ENTROPY_CONTEXT_PLANES)); michael@0: vpx_memcpy(&t_left, x->e_mbd.left_context, sizeof(ENTROPY_CONTEXT_PLANES)); michael@0: michael@0: ta = (ENTROPY_CONTEXT *)&t_above; michael@0: tl = (ENTROPY_CONTEXT *)&t_left; michael@0: michael@0: for (b = 16; b < 24; b++) michael@0: { michael@0: optimize_b(x, b, PLANE_TYPE_UV, michael@0: ta + vp8_block2above[b], tl + vp8_block2left[b]); michael@0: } michael@0: } michael@0: michael@0: void vp8_encode_inter16x16(MACROBLOCK *x) michael@0: { michael@0: vp8_build_inter_predictors_mb(&x->e_mbd); michael@0: michael@0: vp8_subtract_mb(x); michael@0: michael@0: transform_mb(x); michael@0: michael@0: vp8_quantize_mb(x); michael@0: michael@0: if (x->optimize) michael@0: optimize_mb(x); michael@0: } michael@0: michael@0: /* this funciton is used by first pass only */ michael@0: void vp8_encode_inter16x16y(MACROBLOCK *x) michael@0: { michael@0: BLOCK *b = &x->block[0]; michael@0: michael@0: vp8_build_inter16x16_predictors_mby(&x->e_mbd, x->e_mbd.dst.y_buffer, michael@0: x->e_mbd.dst.y_stride); michael@0: michael@0: vp8_subtract_mby(x->src_diff, *(b->base_src), michael@0: b->src_stride, x->e_mbd.dst.y_buffer, x->e_mbd.dst.y_stride); michael@0: michael@0: transform_mby(x); michael@0: michael@0: vp8_quantize_mby(x); michael@0: michael@0: vp8_inverse_transform_mby(&x->e_mbd); michael@0: }