Merge "VP9: Eliminate up_available and left_available"
[aom.git] / vp8 / common / invtrans.h
blob9cfea8d513166b7152146648b7d6d29516b95e2b
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
12 #ifndef VP8_COMMON_INVTRANS_H_
13 #define VP8_COMMON_INVTRANS_H_
15 #include "./vpx_config.h"
16 #include "vp8_rtcd.h"
17 #include "blockd.h"
18 #include "onyxc_int.h"
20 #if CONFIG_MULTITHREAD
21 #include "vpx_mem/vpx_mem.h"
22 #endif
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 static void eob_adjust(char *eobs, short *diff)
30 /* eob adjust.... the idct can only skip if both the dc and eob are zero */
31 int js;
32 for(js = 0; js < 16; js++)
34 if((eobs[js] == 0) && (diff[0] != 0))
35 eobs[js]++;
36 diff+=16;
40 static INLINE void vp8_inverse_transform_mby(MACROBLOCKD *xd)
42 short *DQC = xd->dequant_y1;
44 if (xd->mode_info_context->mbmi.mode != SPLITMV)
46 /* do 2nd order transform on the dc block */
47 if (xd->eobs[24] > 1)
49 vp8_short_inv_walsh4x4
50 (&xd->block[24].dqcoeff[0], xd->qcoeff);
52 else
54 vp8_short_inv_walsh4x4_1
55 (&xd->block[24].dqcoeff[0], xd->qcoeff);
57 eob_adjust(xd->eobs, xd->qcoeff);
59 DQC = xd->dequant_y1_dc;
61 vp8_dequant_idct_add_y_block
62 (xd->qcoeff, DQC,
63 xd->dst.y_buffer,
64 xd->dst.y_stride, xd->eobs);
66 #ifdef __cplusplus
67 } // extern "C"
68 #endif
70 #endif // VP8_COMMON_INVTRANS_H_