idct.h 3.33 KB
Newer Older
Jingning Han's avatar
Jingning Han committed
1 2 3 4 5 6 7 8 9 10
/*
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

11 12
#ifndef VP10_COMMON_IDCT_H_
#define VP10_COMMON_IDCT_H_
Jingning Han's avatar
Jingning Han committed
13 14 15 16

#include <assert.h>

#include "./vpx_config.h"
Yaowu Xu's avatar
Yaowu Xu committed
17 18
#include "av1/common/common.h"
#include "av1/common/enums.h"
Yaowu Xu's avatar
Yaowu Xu committed
19 20 21
#include "aom_dsp/inv_txfm.h"
#include "aom_dsp/txfm_common.h"
#include "aom_ports/mem.h"
Jingning Han's avatar
Jingning Han committed
22 23 24 25 26

#ifdef __cplusplus
extern "C" {
#endif

clang-format's avatar
clang-format committed
27
typedef void (*transform_1d)(const tran_low_t *, tran_low_t *);
Jingning Han's avatar
Jingning Han committed
28 29 30 31 32

typedef struct {
  transform_1d cols, rows;  // vertical and horizontal
} transform_2d;

33
#if CONFIG_VPX_HIGHBITDEPTH
clang-format's avatar
clang-format committed
34
typedef void (*highbd_transform_1d)(const tran_low_t *, tran_low_t *, int bd);
Jingning Han's avatar
Jingning Han committed
35 36 37 38

typedef struct {
  highbd_transform_1d cols, rows;  // vertical and horizontal
} highbd_transform_2d;
39
#endif  // CONFIG_VPX_HIGHBITDEPTH
Jingning Han's avatar
Jingning Han committed
40 41

void vp10_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
clang-format's avatar
clang-format committed
42
                      int eob);
Jingning Han's avatar
Jingning Han committed
43
void vp10_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
clang-format's avatar
clang-format committed
44
                      int eob);
Jingning Han's avatar
Jingning Han committed
45

clang-format's avatar
clang-format committed
46 47 48 49 50 51 52 53
void vp10_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, int stride,
                           int eob, TX_TYPE tx_type, int lossless);
void vp10_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest, int stride,
                           int eob, TX_TYPE tx_type);
void vp10_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest, int stride,
                             int eob, TX_TYPE tx_type);
void vp10_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest, int stride,
                             int eob, TX_TYPE tx_type);
Jingning Han's avatar
Jingning Han committed
54

55
#if CONFIG_VPX_HIGHBITDEPTH
Jingning Han's avatar
Jingning Han committed
56
void vp10_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
clang-format's avatar
clang-format committed
57
                             int eob, int bd);
Jingning Han's avatar
Jingning Han committed
58
void vp10_highbd_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
clang-format's avatar
clang-format committed
59
                             int eob, int bd);
Jingning Han's avatar
Jingning Han committed
60
void vp10_highbd_idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride,
clang-format's avatar
clang-format committed
61
                             int eob, int bd);
Jingning Han's avatar
Jingning Han committed
62
void vp10_highbd_idct16x16_add(const tran_low_t *input, uint8_t *dest,
clang-format's avatar
clang-format committed
63
                               int stride, int eob, int bd);
Jingning Han's avatar
Jingning Han committed
64
void vp10_highbd_idct32x32_add(const tran_low_t *input, uint8_t *dest,
clang-format's avatar
clang-format committed
65
                               int stride, int eob, int bd);
hui su's avatar
hui su committed
66 67
void vp10_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest,
                                  int stride, int eob, int bd, TX_TYPE tx_type,
68
                                  int lossless);
hui su's avatar
hui su committed
69 70 71 72 73 74 75 76
void vp10_highbd_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest,
                                  int stride, int eob, int bd, TX_TYPE tx_type);
void vp10_highbd_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest,
                                    int stride, int eob, int bd,
                                    TX_TYPE tx_type);
void vp10_highbd_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest,
                                    int stride, int eob, int bd,
                                    TX_TYPE tx_type);
77
#endif  // CONFIG_VPX_HIGHBITDEPTH
Jingning Han's avatar
Jingning Han committed
78 79 80 81
#ifdef __cplusplus
}  // extern "C"
#endif

82
#endif  // VP10_COMMON_IDCT_H_