1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libvpx/vp8/common/invtrans.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,62 @@ 1.4 +/* 1.5 + * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 1.6 + * 1.7 + * Use of this source code is governed by a BSD-style license 1.8 + * that can be found in the LICENSE file in the root of the source 1.9 + * tree. An additional intellectual property rights grant can be found 1.10 + * in the file PATENTS. All contributing project authors may 1.11 + * be found in the AUTHORS file in the root of the source tree. 1.12 + */ 1.13 + 1.14 + 1.15 +#ifndef __INC_INVTRANS_H 1.16 +#define __INC_INVTRANS_H 1.17 + 1.18 +#include "vpx_config.h" 1.19 +#include "vp8_rtcd.h" 1.20 +#include "blockd.h" 1.21 +#include "onyxc_int.h" 1.22 + 1.23 +#if CONFIG_MULTITHREAD 1.24 +#include "vpx_mem/vpx_mem.h" 1.25 +#endif 1.26 + 1.27 +static void eob_adjust(char *eobs, short *diff) 1.28 +{ 1.29 + /* eob adjust.... the idct can only skip if both the dc and eob are zero */ 1.30 + int js; 1.31 + for(js = 0; js < 16; js++) 1.32 + { 1.33 + if((eobs[js] == 0) && (diff[0] != 0)) 1.34 + eobs[js]++; 1.35 + diff+=16; 1.36 + } 1.37 +} 1.38 + 1.39 +static void vp8_inverse_transform_mby(MACROBLOCKD *xd) 1.40 +{ 1.41 + short *DQC = xd->dequant_y1; 1.42 + 1.43 + if (xd->mode_info_context->mbmi.mode != SPLITMV) 1.44 + { 1.45 + /* do 2nd order transform on the dc block */ 1.46 + if (xd->eobs[24] > 1) 1.47 + { 1.48 + vp8_short_inv_walsh4x4 1.49 + (&xd->block[24].dqcoeff[0], xd->qcoeff); 1.50 + } 1.51 + else 1.52 + { 1.53 + vp8_short_inv_walsh4x4_1 1.54 + (&xd->block[24].dqcoeff[0], xd->qcoeff); 1.55 + } 1.56 + eob_adjust(xd->eobs, xd->qcoeff); 1.57 + 1.58 + DQC = xd->dequant_y1_dc; 1.59 + } 1.60 + vp8_dequant_idct_add_y_block 1.61 + (xd->qcoeff, DQC, 1.62 + xd->dst.y_buffer, 1.63 + xd->dst.y_stride, xd->eobs); 1.64 +} 1.65 +#endif