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: #ifndef __INC_INVTRANS_H michael@0: #define __INC_INVTRANS_H michael@0: michael@0: #include "vpx_config.h" michael@0: #include "vp8_rtcd.h" michael@0: #include "blockd.h" michael@0: #include "onyxc_int.h" michael@0: michael@0: #if CONFIG_MULTITHREAD michael@0: #include "vpx_mem/vpx_mem.h" michael@0: #endif michael@0: michael@0: static void eob_adjust(char *eobs, short *diff) michael@0: { michael@0: /* eob adjust.... the idct can only skip if both the dc and eob are zero */ michael@0: int js; michael@0: for(js = 0; js < 16; js++) michael@0: { michael@0: if((eobs[js] == 0) && (diff[0] != 0)) michael@0: eobs[js]++; michael@0: diff+=16; michael@0: } michael@0: } michael@0: michael@0: static void vp8_inverse_transform_mby(MACROBLOCKD *xd) michael@0: { michael@0: short *DQC = xd->dequant_y1; michael@0: michael@0: if (xd->mode_info_context->mbmi.mode != SPLITMV) michael@0: { michael@0: /* do 2nd order transform on the dc block */ michael@0: if (xd->eobs[24] > 1) michael@0: { michael@0: vp8_short_inv_walsh4x4 michael@0: (&xd->block[24].dqcoeff[0], xd->qcoeff); michael@0: } michael@0: else michael@0: { michael@0: vp8_short_inv_walsh4x4_1 michael@0: (&xd->block[24].dqcoeff[0], xd->qcoeff); michael@0: } michael@0: eob_adjust(xd->eobs, xd->qcoeff); michael@0: michael@0: DQC = xd->dequant_y1_dc; michael@0: } michael@0: vp8_dequant_idct_add_y_block michael@0: (xd->qcoeff, DQC, michael@0: xd->dst.y_buffer, michael@0: xd->dst.y_stride, xd->eobs); michael@0: } michael@0: #endif