blob: b5a3fbf36208ec4a93a3c52ebf266a86f3f456a4 [file] [log] [blame]
Yaowu Xue6ad9ab2013-02-07 11:51:23 -08001/*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 *
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 */
10
Dmitry Kovalev347f3a02013-02-27 11:17:38 -080011#ifndef VP9_COMMON_VP9_IDCT_H_
12#define VP9_COMMON_VP9_IDCT_H_
Yaowu Xue6ad9ab2013-02-07 11:51:23 -080013
Christian Duvivierc1292032013-02-27 12:29:06 -080014#include <assert.h>
15
Yaowu Xue6ad9ab2013-02-07 11:51:23 -080016#include "./vpx_config.h"
Dmitry Kovalev3603dfb2013-03-07 12:24:35 -080017#include "vp9/common/vp9_common.h"
Dmitry Kovalevbe7eec72013-10-02 14:13:33 -070018#include "vp9/common/vp9_enums.h"
Jingning Hane8b133c2015-07-30 18:53:18 -070019#include "vpx_dsp/inv_txfm.h"
20#include "vpx_dsp/txfm_common.h"
21#include "vpx_ports/mem.h"
Yunqing Wang35bc02c2013-02-26 16:27:41 -080022
James Zern0940c9c2014-01-18 12:16:11 -080023#ifdef __cplusplus
24extern "C" {
25#endif
26
Deb Mukherjee10783d42014-09-02 16:34:09 -070027typedef void (*transform_1d)(const tran_low_t*, tran_low_t*);
Dmitry Kovalev347f3a02013-02-27 11:17:38 -080028
29typedef struct {
30 transform_1d cols, rows; // vertical and horizontal
31} transform_2d;
32
Deb Mukherjee10783d42014-09-02 16:34:09 -070033#if CONFIG_VP9_HIGHBITDEPTH
Deb Mukherjee1929c9b2014-10-08 12:43:22 -070034typedef void (*highbd_transform_1d)(const tran_low_t*, tran_low_t*, int bd);
Dmitry Kovalevbe7eec72013-10-02 14:13:33 -070035
Deb Mukherjee10783d42014-09-02 16:34:09 -070036typedef struct {
Deb Mukherjee1929c9b2014-10-08 12:43:22 -070037 highbd_transform_1d cols, rows; // vertical and horizontal
38} highbd_transform_2d;
Deb Mukherjee10783d42014-09-02 16:34:09 -070039#endif // CONFIG_VP9_HIGHBITDEPTH
40
41void vp9_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
42 int eob);
43void vp9_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
44 int eob);
45void vp9_idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride,
46 int eob);
Jingning Han08a453b2015-08-03 14:51:10 -070047void vp9_idct16x16_add(const tran_low_t *input, uint8_t *dest, int stride,
48 int eob);
Deb Mukherjee10783d42014-09-02 16:34:09 -070049void vp9_idct32x32_add(const tran_low_t *input, uint8_t *dest, int stride,
Dmitry Kovalev65f118d2013-10-11 18:27:12 -070050 int eob);
Dmitry Kovalevbe7eec72013-10-02 14:13:33 -070051
Deb Mukherjee10783d42014-09-02 16:34:09 -070052void vp9_iht4x4_add(TX_TYPE tx_type, const tran_low_t *input, uint8_t *dest,
Dmitry Kovalevac468dd2013-10-11 15:49:05 -070053 int stride, int eob);
Deb Mukherjee10783d42014-09-02 16:34:09 -070054void vp9_iht8x8_add(TX_TYPE tx_type, const tran_low_t *input, uint8_t *dest,
Dmitry Kovalevac468dd2013-10-11 15:49:05 -070055 int stride, int eob);
Deb Mukherjee10783d42014-09-02 16:34:09 -070056void vp9_iht16x16_add(TX_TYPE tx_type, const tran_low_t *input, uint8_t *dest,
Dmitry Kovalevac468dd2013-10-11 15:49:05 -070057 int stride, int eob);
Dmitry Kovalevbe7eec72013-10-02 14:13:33 -070058
Deb Mukherjee10783d42014-09-02 16:34:09 -070059#if CONFIG_VP9_HIGHBITDEPTH
Deb Mukherjee1929c9b2014-10-08 12:43:22 -070060void vp9_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
Deb Mukherjee10783d42014-09-02 16:34:09 -070061 int eob, int bd);
Deb Mukherjee1929c9b2014-10-08 12:43:22 -070062void vp9_highbd_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
Deb Mukherjee10783d42014-09-02 16:34:09 -070063 int eob, int bd);
Deb Mukherjee1929c9b2014-10-08 12:43:22 -070064void vp9_highbd_idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride,
65 int eob, int bd);
66void vp9_highbd_idct16x16_add(const tran_low_t *input, uint8_t *dest,
67 int stride, int eob, int bd);
68void vp9_highbd_idct32x32_add(const tran_low_t *input, uint8_t *dest,
69 int stride, int eob, int bd);
70void vp9_highbd_iht4x4_add(TX_TYPE tx_type, const tran_low_t *input,
Deb Mukherjee10783d42014-09-02 16:34:09 -070071 uint8_t *dest, int stride, int eob, int bd);
Deb Mukherjee1929c9b2014-10-08 12:43:22 -070072void vp9_highbd_iht8x8_add(TX_TYPE tx_type, const tran_low_t *input,
73 uint8_t *dest, int stride, int eob, int bd);
74void vp9_highbd_iht16x16_add(TX_TYPE tx_type, const tran_low_t *input,
75 uint8_t *dest, int stride, int eob, int bd);
Deb Mukherjee10783d42014-09-02 16:34:09 -070076#endif // CONFIG_VP9_HIGHBITDEPTH
James Zern0940c9c2014-01-18 12:16:11 -080077#ifdef __cplusplus
78} // extern "C"
79#endif
80
Dmitry Kovalev347f3a02013-02-27 11:17:38 -080081#endif // VP9_COMMON_VP9_IDCT_H_