/src/libde265/libde265/fallback-dct.h
Line | Count | Source |
1 | | /* |
2 | | * H.265 video codec. |
3 | | * Copyright (c) 2013-2014 struktur AG, Dirk Farin <farin@struktur.de> |
4 | | * |
5 | | * This file is part of libde265. |
6 | | * |
7 | | * libde265 is free software: you can redistribute it and/or modify |
8 | | * it under the terms of the GNU Lesser General Public License as |
9 | | * published by the Free Software Foundation, either version 3 of |
10 | | * the License, or (at your option) any later version. |
11 | | * |
12 | | * libde265 is distributed in the hope that it will be useful, |
13 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | | * GNU Lesser General Public License for more details. |
16 | | * |
17 | | * You should have received a copy of the GNU Lesser General Public License |
18 | | * along with libde265. If not, see <http://www.gnu.org/licenses/>. |
19 | | */ |
20 | | |
21 | | #ifndef FALLBACK_DCT_H |
22 | | #define FALLBACK_DCT_H |
23 | | |
24 | | #include <stddef.h> |
25 | | #include <stdint.h> |
26 | | |
27 | | #include "util.h" |
28 | | |
29 | | |
30 | | // --- decoding --- |
31 | | |
32 | | void transform_skip_8_fallback(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride); |
33 | | void transform_bypass_fallback(int32_t *r, const int16_t *coeffs, int nT); |
34 | | |
35 | | void transform_skip_rdpcm_v_8_fallback(uint8_t *dst, const int16_t *coeffs, int nT, ptrdiff_t stride); |
36 | | void transform_skip_rdpcm_h_8_fallback(uint8_t *dst, const int16_t *coeffs, int nT, ptrdiff_t stride); |
37 | | void transform_bypass_rdpcm_v_fallback(int32_t *r, const int16_t *coeffs,int nT); |
38 | | void transform_bypass_rdpcm_h_fallback(int32_t *r, const int16_t *coeffs,int nT); |
39 | | |
40 | | void transform_4x4_luma_add_8_fallback(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride); |
41 | | void transform_4x4_add_8_fallback(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride); |
42 | | void transform_8x8_add_8_fallback(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride); |
43 | | void transform_16x16_add_8_fallback(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride); |
44 | | void transform_32x32_add_8_fallback(uint8_t *dst, const int16_t *coeffs, ptrdiff_t stride); |
45 | | |
46 | | |
47 | | void transform_skip_16_fallback(uint16_t *dst, const int16_t *coeffs, ptrdiff_t stride, int bit_depth); |
48 | | void transform_bypass_16_fallback(uint16_t *dst, const int16_t *coeffs, int nT, ptrdiff_t stride, int bit_depth); |
49 | | |
50 | | void transform_4x4_luma_add_16_fallback(uint16_t *dst, const int16_t *coeffs, ptrdiff_t stride, int bit_depth); |
51 | | void transform_4x4_add_16_fallback(uint16_t *dst, const int16_t *coeffs, ptrdiff_t stride, int bit_depth); |
52 | | void transform_8x8_add_16_fallback(uint16_t *dst, const int16_t *coeffs, ptrdiff_t stride, int bit_depth); |
53 | | void transform_16x16_add_16_fallback(uint16_t *dst, const int16_t *coeffs, ptrdiff_t stride, int bit_depth); |
54 | | void transform_32x32_add_16_fallback(uint16_t *dst, const int16_t *coeffs, ptrdiff_t stride, int bit_depth); |
55 | | |
56 | | void rotate_coefficients_fallback(int16_t *coeff, int nT); |
57 | | |
58 | | |
59 | | void transform_idst_4x4_fallback(int32_t *dst, const int16_t *coeffs, int bdShift, int max_coeff_bits); |
60 | | void transform_idct_4x4_fallback(int32_t *dst, const int16_t *coeffs, int bdShift, int max_coeff_bits); |
61 | | void transform_idct_8x8_fallback(int32_t *dst, const int16_t *coeffs, int bdShift, int max_coeff_bits); |
62 | | void transform_idct_16x16_fallback(int32_t *dst, const int16_t *coeffs, int bdShift, int max_coeff_bits); |
63 | | void transform_idct_32x32_fallback(int32_t *dst, const int16_t *coeffs, int bdShift, int max_coeff_bits); |
64 | | |
65 | | template <class pixel_t> |
66 | | void add_residual_fallback(pixel_t *dst, ptrdiff_t stride, |
67 | | const int32_t* r, int nT, int bit_depth) |
68 | 0 | { |
69 | 0 | for (int y=0;y<nT;y++) |
70 | 0 | for (int x=0;x<nT;x++) { |
71 | 0 | dst[y*stride+x] = Clip_BitDepth(dst[y*stride+x] + r[y*nT+x], bit_depth); |
72 | 0 | } |
73 | 0 | } Unexecuted instantiation: void add_residual_fallback<unsigned char>(unsigned char*, long, int const*, int, int) Unexecuted instantiation: void add_residual_fallback<unsigned short>(unsigned short*, long, int const*, int, int) |
74 | | |
75 | | // Inverse quantization without scaling list (int32 fast path; see acceleration.h). |
76 | | void dequant_coeff_block_fallback(int16_t* coeffBuf, const int16_t* coeffList, |
77 | | const int16_t* coeffPos, int nCoeff, |
78 | | int32_t fact, int32_t offset, int32_t bdShift); |
79 | | |
80 | | |
81 | | void rdpcm_v_fallback(int32_t* residual, const int16_t* coeffs, int nT, int tsShift,int bdShift); |
82 | | void rdpcm_h_fallback(int32_t* residual, const int16_t* coeffs, int nT, int tsShift,int bdShift); |
83 | | |
84 | | void transform_skip_residual_fallback(int32_t *residual, const int16_t *coeffs, int nT, |
85 | | int tsShift,int bdShift); |
86 | | |
87 | | |
88 | | // --- encoding --- |
89 | | |
90 | | void fdst_4x4_8_fallback(int16_t *coeffs, const int16_t *input, ptrdiff_t stride); |
91 | | void fdct_4x4_8_fallback(int16_t *coeffs, const int16_t *input, ptrdiff_t stride); |
92 | | void fdct_8x8_8_fallback(int16_t *coeffs, const int16_t *input, ptrdiff_t stride); |
93 | | void fdct_16x16_8_fallback(int16_t *coeffs, const int16_t *input, ptrdiff_t stride); |
94 | | void fdct_32x32_8_fallback(int16_t *coeffs, const int16_t *input, ptrdiff_t stride); |
95 | | |
96 | | void hadamard_4x4_8_fallback(int16_t *coeffs, const int16_t *input, ptrdiff_t stride); |
97 | | void hadamard_8x8_8_fallback(int16_t *coeffs, const int16_t *input, ptrdiff_t stride); |
98 | | void hadamard_16x16_8_fallback(int16_t *coeffs, const int16_t *input, ptrdiff_t stride); |
99 | | void hadamard_32x32_8_fallback(int16_t *coeffs, const int16_t *input, ptrdiff_t stride); |
100 | | |
101 | | #endif |