Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 1 | /* |
Yaowu Xu | bde4ac8 | 2016-11-28 15:26:06 -0800 | [diff] [blame] | 2 | * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 3 | * |
Yaowu Xu | bde4ac8 | 2016-11-28 15:26:06 -0800 | [diff] [blame] | 4 | * This source code is subject to the terms of the BSD 2 Clause License and |
| 5 | * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License |
| 6 | * was not distributed with this source code in the LICENSE file, you can |
| 7 | * obtain it at www.aomedia.org/license/software. If the Alliance for Open |
| 8 | * Media Patent License 1.0 was not distributed with this source code in the |
| 9 | * PATENTS file, you can obtain it at www.aomedia.org/license/patent. |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 10 | */ |
| 11 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 12 | #ifndef AV1_FWD_TXFM2D_CFG_H_ |
| 13 | #define AV1_FWD_TXFM2D_CFG_H_ |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 14 | #include "av1/common/enums.h" |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 15 | #include "av1/common/av1_fwd_txfm1d.h" |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 16 | // ---------------- config fwd_dct_dct_4 ---------------- |
| 17 | static const int8_t fwd_shift_dct_dct_4[3] = { 2, 0, 0 }; |
| 18 | static const int8_t fwd_stage_range_col_dct_dct_4[4] = { 15, 16, 17, 17 }; |
| 19 | static const int8_t fwd_stage_range_row_dct_dct_4[4] = { 17, 18, 18, 18 }; |
| 20 | static const int8_t fwd_cos_bit_col_dct_dct_4[4] = { 13, 13, 13, 13 }; |
| 21 | static const int8_t fwd_cos_bit_row_dct_dct_4[4] = { 13, 13, 13, 13 }; |
| 22 | |
| 23 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_dct_dct_4 = { |
| 24 | 4, // .txfm_size |
| 25 | 4, // .stage_num_col |
| 26 | 4, // .stage_num_row |
| 27 | // 0, // .log_scale |
| 28 | fwd_shift_dct_dct_4, // .shift |
| 29 | fwd_stage_range_col_dct_dct_4, // .stage_range_col |
| 30 | fwd_stage_range_row_dct_dct_4, // .stage_range_row |
| 31 | fwd_cos_bit_col_dct_dct_4, // .cos_bit_col |
| 32 | fwd_cos_bit_row_dct_dct_4, // .cos_bit_row |
| 33 | TXFM_TYPE_DCT4, // .txfm_type_col |
| 34 | TXFM_TYPE_DCT4 |
| 35 | }; // .txfm_type_row |
| 36 | |
| 37 | // ---------------- config fwd_dct_dct_8 ---------------- |
| 38 | static const int8_t fwd_shift_dct_dct_8[3] = { 2, -1, 0 }; |
| 39 | static const int8_t fwd_stage_range_col_dct_dct_8[6] = { |
| 40 | 15, 16, 17, 18, 18, 18 |
| 41 | }; |
| 42 | static const int8_t fwd_stage_range_row_dct_dct_8[6] = { |
| 43 | 17, 18, 19, 19, 19, 19 |
| 44 | }; |
| 45 | static const int8_t fwd_cos_bit_col_dct_dct_8[6] = { 13, 13, 13, 13, 13, 13 }; |
| 46 | static const int8_t fwd_cos_bit_row_dct_dct_8[6] = { 13, 13, 13, 13, 13, 13 }; |
| 47 | |
| 48 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_dct_dct_8 = { |
| 49 | 8, // .txfm_size |
| 50 | 6, // .stage_num_col |
| 51 | 6, // .stage_num_row |
| 52 | // 0, // .log_scale |
| 53 | fwd_shift_dct_dct_8, // .shift |
| 54 | fwd_stage_range_col_dct_dct_8, // .stage_range_col |
| 55 | fwd_stage_range_row_dct_dct_8, // .stage_range_row |
| 56 | fwd_cos_bit_col_dct_dct_8, // .cos_bit_col |
| 57 | fwd_cos_bit_row_dct_dct_8, // .cos_bit_row |
| 58 | TXFM_TYPE_DCT8, // .txfm_type_col |
| 59 | TXFM_TYPE_DCT8 |
| 60 | }; // .txfm_type_row |
| 61 | |
| 62 | // ---------------- config fwd_dct_dct_16 ---------------- |
| 63 | static const int8_t fwd_shift_dct_dct_16[3] = { 2, -2, 0 }; |
| 64 | static const int8_t fwd_stage_range_col_dct_dct_16[8] = { 15, 16, 17, 18, |
| 65 | 19, 19, 19, 19 }; |
| 66 | static const int8_t fwd_stage_range_row_dct_dct_16[8] = { 17, 18, 19, 20, |
| 67 | 20, 20, 20, 20 }; |
| 68 | static const int8_t fwd_cos_bit_col_dct_dct_16[8] = { 13, 13, 13, 13, |
| 69 | 13, 13, 13, 13 }; |
| 70 | static const int8_t fwd_cos_bit_row_dct_dct_16[8] = { 12, 12, 12, 12, |
| 71 | 12, 12, 12, 12 }; |
| 72 | |
| 73 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_dct_dct_16 = { |
| 74 | 16, // .txfm_size |
| 75 | 8, // .stage_num_col |
| 76 | 8, // .stage_num_row |
| 77 | // 0, // .log_scale |
| 78 | fwd_shift_dct_dct_16, // .shift |
| 79 | fwd_stage_range_col_dct_dct_16, // .stage_range_col |
| 80 | fwd_stage_range_row_dct_dct_16, // .stage_range_row |
| 81 | fwd_cos_bit_col_dct_dct_16, // .cos_bit_col |
| 82 | fwd_cos_bit_row_dct_dct_16, // .cos_bit_row |
| 83 | TXFM_TYPE_DCT16, // .txfm_type_col |
| 84 | TXFM_TYPE_DCT16 |
| 85 | }; // .txfm_type_row |
| 86 | |
| 87 | // ---------------- config fwd_dct_dct_32 ---------------- |
| 88 | static const int8_t fwd_shift_dct_dct_32[3] = { 2, -4, 0 }; |
| 89 | static const int8_t fwd_stage_range_col_dct_dct_32[10] = { 15, 16, 17, 18, 19, |
| 90 | 20, 20, 20, 20, 20 }; |
| 91 | static const int8_t fwd_stage_range_row_dct_dct_32[10] = { 16, 17, 18, 19, 20, |
| 92 | 20, 20, 20, 20, 20 }; |
| 93 | static const int8_t fwd_cos_bit_col_dct_dct_32[10] = { 12, 12, 12, 12, 12, |
| 94 | 12, 12, 12, 12, 12 }; |
| 95 | static const int8_t fwd_cos_bit_row_dct_dct_32[10] = { 12, 12, 12, 12, 12, |
| 96 | 12, 12, 12, 12, 12 }; |
| 97 | |
| 98 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_dct_dct_32 = { |
| 99 | 32, // .txfm_size |
| 100 | 10, // .stage_num_col |
| 101 | 10, // .stage_num_row |
| 102 | // 1, // .log_scale |
| 103 | fwd_shift_dct_dct_32, // .shift |
| 104 | fwd_stage_range_col_dct_dct_32, // .stage_range_col |
| 105 | fwd_stage_range_row_dct_dct_32, // .stage_range_row |
| 106 | fwd_cos_bit_col_dct_dct_32, // .cos_bit_col |
| 107 | fwd_cos_bit_row_dct_dct_32, // .cos_bit_row |
| 108 | TXFM_TYPE_DCT32, // .txfm_type_col |
| 109 | TXFM_TYPE_DCT32 |
| 110 | }; // .txfm_type_row |
| 111 | |
| 112 | // ---------------- config fwd_dct_dct_64 ---------------- |
Debargha Mukherjee | 67d1347 | 2016-11-01 14:37:39 -0700 | [diff] [blame] | 113 | static const int8_t fwd_shift_dct_dct_64[3] = { 0, -2, -2 }; |
Yaowu Xu | c27fc14 | 2016-08-22 16:08:15 -0700 | [diff] [blame] | 114 | static const int8_t fwd_stage_range_col_dct_dct_64[12] = { |
| 115 | 13, 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, 19 |
| 116 | }; |
| 117 | static const int8_t fwd_stage_range_row_dct_dct_64[12] = { |
| 118 | 17, 18, 19, 20, 21, 22, 22, 22, 22, 22, 22, 22 |
| 119 | }; |
| 120 | static const int8_t fwd_cos_bit_col_dct_dct_64[12] = { 15, 15, 15, 15, 15, 14, |
| 121 | 13, 13, 13, 13, 13, 13 }; |
| 122 | static const int8_t fwd_cos_bit_row_dct_dct_64[12] = { 15, 14, 13, 12, 11, 10, |
| 123 | 10, 10, 10, 10, 10, 10 }; |
| 124 | |
| 125 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_dct_dct_64 = { |
| 126 | 64, // .txfm_size |
| 127 | 12, // .stage_num_col |
| 128 | 12, // .stage_num_row |
| 129 | fwd_shift_dct_dct_64, // .shift |
| 130 | fwd_stage_range_col_dct_dct_64, // .stage_range_col |
| 131 | fwd_stage_range_row_dct_dct_64, // .stage_range_row |
| 132 | fwd_cos_bit_col_dct_dct_64, // .cos_bit_col |
| 133 | fwd_cos_bit_row_dct_dct_64, // .cos_bit_row |
| 134 | TXFM_TYPE_DCT64, // .txfm_type_col |
| 135 | TXFM_TYPE_DCT64 |
| 136 | }; // .txfm_type_row |
| 137 | |
| 138 | // ---------------- config fwd_dct_adst_4 ---------------- |
| 139 | static const int8_t fwd_shift_dct_adst_4[3] = { 2, 0, 0 }; |
| 140 | static const int8_t fwd_stage_range_col_dct_adst_4[4] = { 15, 16, 17, 17 }; |
| 141 | static const int8_t fwd_stage_range_row_dct_adst_4[6] = { |
| 142 | 17, 17, 17, 18, 18, 18 |
| 143 | }; |
| 144 | static const int8_t fwd_cos_bit_col_dct_adst_4[4] = { 13, 13, 13, 13 }; |
| 145 | static const int8_t fwd_cos_bit_row_dct_adst_4[6] = { 13, 13, 13, 13, 13, 13 }; |
| 146 | |
| 147 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_dct_adst_4 = { |
| 148 | 4, // .txfm_size |
| 149 | 4, // .stage_num_col |
| 150 | 6, // .stage_num_row |
| 151 | // 0, // .log_scale |
| 152 | fwd_shift_dct_adst_4, // .shift |
| 153 | fwd_stage_range_col_dct_adst_4, // .stage_range_col |
| 154 | fwd_stage_range_row_dct_adst_4, // .stage_range_row |
| 155 | fwd_cos_bit_col_dct_adst_4, // .cos_bit_col |
| 156 | fwd_cos_bit_row_dct_adst_4, // .cos_bit_row |
| 157 | TXFM_TYPE_DCT4, // .txfm_type_col |
| 158 | TXFM_TYPE_ADST4 |
| 159 | }; // .txfm_type_row |
| 160 | |
| 161 | // ---------------- config fwd_dct_adst_8 ---------------- |
| 162 | static const int8_t fwd_shift_dct_adst_8[3] = { 2, -1, 0 }; |
| 163 | static const int8_t fwd_stage_range_col_dct_adst_8[6] = { |
| 164 | 15, 16, 17, 18, 18, 18 |
| 165 | }; |
| 166 | static const int8_t fwd_stage_range_row_dct_adst_8[8] = { 17, 17, 17, 18, |
| 167 | 18, 19, 19, 19 }; |
| 168 | static const int8_t fwd_cos_bit_col_dct_adst_8[6] = { 13, 13, 13, 13, 13, 13 }; |
| 169 | static const int8_t fwd_cos_bit_row_dct_adst_8[8] = { 13, 13, 13, 13, |
| 170 | 13, 13, 13, 13 }; |
| 171 | |
| 172 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_dct_adst_8 = { |
| 173 | 8, // .txfm_size |
| 174 | 6, // .stage_num_col |
| 175 | 8, // .stage_num_row |
| 176 | // 0, // .log_scale |
| 177 | fwd_shift_dct_adst_8, // .shift |
| 178 | fwd_stage_range_col_dct_adst_8, // .stage_range_col |
| 179 | fwd_stage_range_row_dct_adst_8, // .stage_range_row |
| 180 | fwd_cos_bit_col_dct_adst_8, // .cos_bit_col |
| 181 | fwd_cos_bit_row_dct_adst_8, // .cos_bit_row |
| 182 | TXFM_TYPE_DCT8, // .txfm_type_col |
| 183 | TXFM_TYPE_ADST8 |
| 184 | }; // .txfm_type_row |
| 185 | |
| 186 | // ---------------- config fwd_dct_adst_16 ---------------- |
| 187 | static const int8_t fwd_shift_dct_adst_16[3] = { 2, -2, 0 }; |
| 188 | static const int8_t fwd_stage_range_col_dct_adst_16[8] = { 15, 16, 17, 18, |
| 189 | 19, 19, 19, 19 }; |
| 190 | static const int8_t fwd_stage_range_row_dct_adst_16[10] = { |
| 191 | 17, 17, 17, 18, 18, 19, 19, 20, 20, 20 |
| 192 | }; |
| 193 | static const int8_t fwd_cos_bit_col_dct_adst_16[8] = { 13, 13, 13, 13, |
| 194 | 13, 13, 13, 13 }; |
| 195 | static const int8_t fwd_cos_bit_row_dct_adst_16[10] = { 12, 12, 12, 12, 12, |
| 196 | 12, 12, 12, 12, 12 }; |
| 197 | |
| 198 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_dct_adst_16 = { |
| 199 | 16, // .txfm_size |
| 200 | 8, // .stage_num_col |
| 201 | 10, // .stage_num_row |
| 202 | // 0, // .log_scale |
| 203 | fwd_shift_dct_adst_16, // .shift |
| 204 | fwd_stage_range_col_dct_adst_16, // .stage_range_col |
| 205 | fwd_stage_range_row_dct_adst_16, // .stage_range_row |
| 206 | fwd_cos_bit_col_dct_adst_16, // .cos_bit_col |
| 207 | fwd_cos_bit_row_dct_adst_16, // .cos_bit_row |
| 208 | TXFM_TYPE_DCT16, // .txfm_type_col |
| 209 | TXFM_TYPE_ADST16 |
| 210 | }; // .txfm_type_row |
| 211 | |
| 212 | // ---------------- config fwd_dct_adst_32 ---------------- |
| 213 | static const int8_t fwd_shift_dct_adst_32[3] = { 2, -4, 0 }; |
| 214 | static const int8_t fwd_stage_range_col_dct_adst_32[10] = { |
| 215 | 15, 16, 17, 18, 19, 20, 20, 20, 20, 20 |
| 216 | }; |
| 217 | static const int8_t fwd_stage_range_row_dct_adst_32[12] = { |
| 218 | 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 20 |
| 219 | }; |
| 220 | static const int8_t fwd_cos_bit_col_dct_adst_32[10] = { 12, 12, 12, 12, 12, |
| 221 | 12, 12, 12, 12, 12 }; |
| 222 | static const int8_t fwd_cos_bit_row_dct_adst_32[12] = { |
| 223 | 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 |
| 224 | }; |
| 225 | |
| 226 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_dct_adst_32 = { |
| 227 | 32, // .txfm_size |
| 228 | 10, // .stage_num_col |
| 229 | 12, // .stage_num_row |
| 230 | // 1, // .log_scale |
| 231 | fwd_shift_dct_adst_32, // .shift |
| 232 | fwd_stage_range_col_dct_adst_32, // .stage_range_col |
| 233 | fwd_stage_range_row_dct_adst_32, // .stage_range_row |
| 234 | fwd_cos_bit_col_dct_adst_32, // .cos_bit_col |
| 235 | fwd_cos_bit_row_dct_adst_32, // .cos_bit_row |
| 236 | TXFM_TYPE_DCT32, // .txfm_type_col |
| 237 | TXFM_TYPE_ADST32 |
| 238 | }; // .txfm_type_row |
| 239 | // ---------------- config fwd_adst_adst_4 ---------------- |
| 240 | static const int8_t fwd_shift_adst_adst_4[3] = { 2, 0, 0 }; |
| 241 | static const int8_t fwd_stage_range_col_adst_adst_4[6] = { 15, 15, 16, |
| 242 | 17, 17, 17 }; |
| 243 | static const int8_t fwd_stage_range_row_adst_adst_4[6] = { 17, 17, 17, |
| 244 | 18, 18, 18 }; |
| 245 | static const int8_t fwd_cos_bit_col_adst_adst_4[6] = { 13, 13, 13, 13, 13, 13 }; |
| 246 | static const int8_t fwd_cos_bit_row_adst_adst_4[6] = { 13, 13, 13, 13, 13, 13 }; |
| 247 | |
| 248 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_adst_adst_4 = { |
| 249 | 4, // .txfm_size |
| 250 | 6, // .stage_num_col |
| 251 | 6, // .stage_num_row |
| 252 | // 0, // .log_scale |
| 253 | fwd_shift_adst_adst_4, // .shift |
| 254 | fwd_stage_range_col_adst_adst_4, // .stage_range_col |
| 255 | fwd_stage_range_row_adst_adst_4, // .stage_range_row |
| 256 | fwd_cos_bit_col_adst_adst_4, // .cos_bit_col |
| 257 | fwd_cos_bit_row_adst_adst_4, // .cos_bit_row |
| 258 | TXFM_TYPE_ADST4, // .txfm_type_col |
| 259 | TXFM_TYPE_ADST4 |
| 260 | }; // .txfm_type_row |
| 261 | |
| 262 | // ---------------- config fwd_adst_adst_8 ---------------- |
| 263 | static const int8_t fwd_shift_adst_adst_8[3] = { 2, -1, 0 }; |
| 264 | static const int8_t fwd_stage_range_col_adst_adst_8[8] = { 15, 15, 16, 17, |
| 265 | 17, 18, 18, 18 }; |
| 266 | static const int8_t fwd_stage_range_row_adst_adst_8[8] = { 17, 17, 17, 18, |
| 267 | 18, 19, 19, 19 }; |
| 268 | static const int8_t fwd_cos_bit_col_adst_adst_8[8] = { 13, 13, 13, 13, |
| 269 | 13, 13, 13, 13 }; |
| 270 | static const int8_t fwd_cos_bit_row_adst_adst_8[8] = { 13, 13, 13, 13, |
| 271 | 13, 13, 13, 13 }; |
| 272 | |
| 273 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_adst_adst_8 = { |
| 274 | 8, // .txfm_size |
| 275 | 8, // .stage_num_col |
| 276 | 8, // .stage_num_row |
| 277 | // 0, // .log_scale |
| 278 | fwd_shift_adst_adst_8, // .shift |
| 279 | fwd_stage_range_col_adst_adst_8, // .stage_range_col |
| 280 | fwd_stage_range_row_adst_adst_8, // .stage_range_row |
| 281 | fwd_cos_bit_col_adst_adst_8, // .cos_bit_col |
| 282 | fwd_cos_bit_row_adst_adst_8, // .cos_bit_row |
| 283 | TXFM_TYPE_ADST8, // .txfm_type_col |
| 284 | TXFM_TYPE_ADST8 |
| 285 | }; // .txfm_type_row |
| 286 | |
| 287 | // ---------------- config fwd_adst_adst_16 ---------------- |
| 288 | static const int8_t fwd_shift_adst_adst_16[3] = { 2, -2, 0 }; |
| 289 | static const int8_t fwd_stage_range_col_adst_adst_16[10] = { |
| 290 | 15, 15, 16, 17, 17, 18, 18, 19, 19, 19 |
| 291 | }; |
| 292 | static const int8_t fwd_stage_range_row_adst_adst_16[10] = { |
| 293 | 17, 17, 17, 18, 18, 19, 19, 20, 20, 20 |
| 294 | }; |
| 295 | static const int8_t fwd_cos_bit_col_adst_adst_16[10] = { 13, 13, 13, 13, 13, |
| 296 | 13, 13, 13, 13, 13 }; |
| 297 | static const int8_t fwd_cos_bit_row_adst_adst_16[10] = { 12, 12, 12, 12, 12, |
| 298 | 12, 12, 12, 12, 12 }; |
| 299 | |
| 300 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_adst_adst_16 = { |
| 301 | 16, // .txfm_size |
| 302 | 10, // .stage_num_col |
| 303 | 10, // .stage_num_row |
| 304 | // 0, // .log_scale |
| 305 | fwd_shift_adst_adst_16, // .shift |
| 306 | fwd_stage_range_col_adst_adst_16, // .stage_range_col |
| 307 | fwd_stage_range_row_adst_adst_16, // .stage_range_row |
| 308 | fwd_cos_bit_col_adst_adst_16, // .cos_bit_col |
| 309 | fwd_cos_bit_row_adst_adst_16, // .cos_bit_row |
| 310 | TXFM_TYPE_ADST16, // .txfm_type_col |
| 311 | TXFM_TYPE_ADST16 |
| 312 | }; // .txfm_type_row |
| 313 | |
| 314 | // ---------------- config fwd_adst_adst_32 ---------------- |
| 315 | static const int8_t fwd_shift_adst_adst_32[3] = { 2, -4, 0 }; |
| 316 | static const int8_t fwd_stage_range_col_adst_adst_32[12] = { |
| 317 | 15, 15, 16, 17, 17, 18, 18, 19, 19, 20, 20, 20 |
| 318 | }; |
| 319 | static const int8_t fwd_stage_range_row_adst_adst_32[12] = { |
| 320 | 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 20 |
| 321 | }; |
| 322 | static const int8_t fwd_cos_bit_col_adst_adst_32[12] = { |
| 323 | 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 |
| 324 | }; |
| 325 | static const int8_t fwd_cos_bit_row_adst_adst_32[12] = { |
| 326 | 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 |
| 327 | }; |
| 328 | |
| 329 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_adst_adst_32 = { |
| 330 | 32, // .txfm_size |
| 331 | 12, // .stage_num_col |
| 332 | 12, // .stage_num_row |
| 333 | // 1, // .log_scale |
| 334 | fwd_shift_adst_adst_32, // .shift |
| 335 | fwd_stage_range_col_adst_adst_32, // .stage_range_col |
| 336 | fwd_stage_range_row_adst_adst_32, // .stage_range_row |
| 337 | fwd_cos_bit_col_adst_adst_32, // .cos_bit_col |
| 338 | fwd_cos_bit_row_adst_adst_32, // .cos_bit_row |
| 339 | TXFM_TYPE_ADST32, // .txfm_type_col |
| 340 | TXFM_TYPE_ADST32 |
| 341 | }; // .txfm_type_row |
| 342 | |
| 343 | // ---------------- config fwd_adst_dct_4 ---------------- |
| 344 | static const int8_t fwd_shift_adst_dct_4[3] = { 2, 0, 0 }; |
| 345 | static const int8_t fwd_stage_range_col_adst_dct_4[6] = { |
| 346 | 15, 15, 16, 17, 17, 17 |
| 347 | }; |
| 348 | static const int8_t fwd_stage_range_row_adst_dct_4[4] = { 17, 18, 18, 18 }; |
| 349 | static const int8_t fwd_cos_bit_col_adst_dct_4[6] = { 13, 13, 13, 13, 13, 13 }; |
| 350 | static const int8_t fwd_cos_bit_row_adst_dct_4[4] = { 13, 13, 13, 13 }; |
| 351 | |
| 352 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_adst_dct_4 = { |
| 353 | 4, // .txfm_size |
| 354 | 6, // .stage_num_col |
| 355 | 4, // .stage_num_row |
| 356 | // 0, // .log_scale |
| 357 | fwd_shift_adst_dct_4, // .shift |
| 358 | fwd_stage_range_col_adst_dct_4, // .stage_range_col |
| 359 | fwd_stage_range_row_adst_dct_4, // .stage_range_row |
| 360 | fwd_cos_bit_col_adst_dct_4, // .cos_bit_col |
| 361 | fwd_cos_bit_row_adst_dct_4, // .cos_bit_row |
| 362 | TXFM_TYPE_ADST4, // .txfm_type_col |
| 363 | TXFM_TYPE_DCT4 |
| 364 | }; // .txfm_type_row |
| 365 | |
| 366 | // ---------------- config fwd_adst_dct_8 ---------------- |
| 367 | static const int8_t fwd_shift_adst_dct_8[3] = { 2, -1, 0 }; |
| 368 | static const int8_t fwd_stage_range_col_adst_dct_8[8] = { 15, 15, 16, 17, |
| 369 | 17, 18, 18, 18 }; |
| 370 | static const int8_t fwd_stage_range_row_adst_dct_8[6] = { |
| 371 | 17, 18, 19, 19, 19, 19 |
| 372 | }; |
| 373 | static const int8_t fwd_cos_bit_col_adst_dct_8[8] = { 13, 13, 13, 13, |
| 374 | 13, 13, 13, 13 }; |
| 375 | static const int8_t fwd_cos_bit_row_adst_dct_8[6] = { 13, 13, 13, 13, 13, 13 }; |
| 376 | |
| 377 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_adst_dct_8 = { |
| 378 | 8, // .txfm_size |
| 379 | 8, // .stage_num_col |
| 380 | 6, // .stage_num_row |
| 381 | // 0, // .log_scale |
| 382 | fwd_shift_adst_dct_8, // .shift |
| 383 | fwd_stage_range_col_adst_dct_8, // .stage_range_col |
| 384 | fwd_stage_range_row_adst_dct_8, // .stage_range_row |
| 385 | fwd_cos_bit_col_adst_dct_8, // .cos_bit_col |
| 386 | fwd_cos_bit_row_adst_dct_8, // .cos_bit_row |
| 387 | TXFM_TYPE_ADST8, // .txfm_type_col |
| 388 | TXFM_TYPE_DCT8 |
| 389 | }; // .txfm_type_row |
| 390 | |
| 391 | // ---------------- config fwd_adst_dct_16 ---------------- |
| 392 | static const int8_t fwd_shift_adst_dct_16[3] = { 2, -2, 0 }; |
| 393 | static const int8_t fwd_stage_range_col_adst_dct_16[10] = { |
| 394 | 15, 15, 16, 17, 17, 18, 18, 19, 19, 19 |
| 395 | }; |
| 396 | static const int8_t fwd_stage_range_row_adst_dct_16[8] = { 17, 18, 19, 20, |
| 397 | 20, 20, 20, 20 }; |
| 398 | static const int8_t fwd_cos_bit_col_adst_dct_16[10] = { 13, 13, 13, 13, 13, |
| 399 | 13, 13, 13, 13, 13 }; |
| 400 | static const int8_t fwd_cos_bit_row_adst_dct_16[8] = { 12, 12, 12, 12, |
| 401 | 12, 12, 12, 12 }; |
| 402 | |
| 403 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_adst_dct_16 = { |
| 404 | 16, // .txfm_size |
| 405 | 10, // .stage_num_col |
| 406 | 8, // .stage_num_row |
| 407 | // 0, // .log_scale |
| 408 | fwd_shift_adst_dct_16, // .shift |
| 409 | fwd_stage_range_col_adst_dct_16, // .stage_range_col |
| 410 | fwd_stage_range_row_adst_dct_16, // .stage_range_row |
| 411 | fwd_cos_bit_col_adst_dct_16, // .cos_bit_col |
| 412 | fwd_cos_bit_row_adst_dct_16, // .cos_bit_row |
| 413 | TXFM_TYPE_ADST16, // .txfm_type_col |
| 414 | TXFM_TYPE_DCT16 |
| 415 | }; // .txfm_type_row |
| 416 | |
| 417 | // ---------------- config fwd_adst_dct_32 ---------------- |
| 418 | static const int8_t fwd_shift_adst_dct_32[3] = { 2, -4, 0 }; |
| 419 | static const int8_t fwd_stage_range_col_adst_dct_32[12] = { |
| 420 | 15, 15, 16, 17, 17, 18, 18, 19, 19, 20, 20, 20 |
| 421 | }; |
| 422 | static const int8_t fwd_stage_range_row_adst_dct_32[10] = { |
| 423 | 16, 17, 18, 19, 20, 20, 20, 20, 20, 20 |
| 424 | }; |
| 425 | static const int8_t fwd_cos_bit_col_adst_dct_32[12] = { |
| 426 | 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 |
| 427 | }; |
| 428 | static const int8_t fwd_cos_bit_row_adst_dct_32[10] = { 12, 12, 12, 12, 12, |
| 429 | 12, 12, 12, 12, 12 }; |
| 430 | |
| 431 | static const TXFM_2D_CFG fwd_txfm_2d_cfg_adst_dct_32 = { |
| 432 | 32, // .txfm_size |
| 433 | 12, // .stage_num_col |
| 434 | 10, // .stage_num_row |
| 435 | // 1, // .log_scale |
| 436 | fwd_shift_adst_dct_32, // .shift |
| 437 | fwd_stage_range_col_adst_dct_32, // .stage_range_col |
| 438 | fwd_stage_range_row_adst_dct_32, // .stage_range_row |
| 439 | fwd_cos_bit_col_adst_dct_32, // .cos_bit_col |
| 440 | fwd_cos_bit_row_adst_dct_32, // .cos_bit_row |
| 441 | TXFM_TYPE_ADST32, // .txfm_type_col |
| 442 | TXFM_TYPE_DCT32 |
| 443 | }; // .txfm_type_row |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 444 | #endif // AV1_FWD_TXFM2D_CFG_H_ |