av1_fwd_txfm1d_cfg.h 36.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/*
 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
 *
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 */

#ifndef AV1_FWD_TXFM2D_CFG_H_
#define AV1_FWD_TXFM2D_CFG_H_
#include "av1/common/enums.h"
15
#include "av1/encoder/av1_fwd_txfm1d.h"
16

17 18 19 20 21
//  ---------------- 4x4 1D constants -----------------------
// shift
static const int8_t fwd_shift_4[3] = { 2, 0, 0 };

// stage range
22 23 24 25
static const int8_t fwd_stage_range_col_dct_4[4] = { 0, 1, 2, 2 };
static const int8_t fwd_stage_range_row_dct_4[4] = { 2, 3, 3, 3 };
static const int8_t fwd_stage_range_col_adst_4[6] = { 0, 0, 1, 2, 2, 2 };
static const int8_t fwd_stage_range_row_adst_4[6] = { 2, 2, 2, 3, 3, 3 };
26 27
static const int8_t fwd_stage_range_col_idx_4[1] = { 1 };
static const int8_t fwd_stage_range_row_idx_4[1] = { 2 };
28

29 30 31 32 33 34 35 36 37 38 39
// cos bit
static const int8_t fwd_cos_bit_col_dct_4[4] = { 13, 13, 13, 13 };
static const int8_t fwd_cos_bit_row_dct_4[4] = { 13, 13, 13, 13 };
static const int8_t fwd_cos_bit_col_adst_4[6] = { 13, 13, 13, 13, 13, 13 };
static const int8_t fwd_cos_bit_row_adst_4[6] = { 13, 13, 13, 13, 13, 13 };

//  ---------------- 8x8 1D constants -----------------------
// shift
static const int8_t fwd_shift_8[3] = { 2, -1, 0 };

// stage range
40 41 42 43
static const int8_t fwd_stage_range_col_dct_8[6] = { 0, 1, 2, 3, 3, 3 };
static const int8_t fwd_stage_range_row_dct_8[6] = { 3, 4, 5, 5, 5, 5 };
static const int8_t fwd_stage_range_col_adst_8[8] = { 0, 0, 1, 2, 2, 3, 3, 3 };
static const int8_t fwd_stage_range_row_adst_8[8] = { 3, 3, 3, 4, 4, 5, 5, 5 };
44 45
static const int8_t fwd_stage_range_col_idx_8[1] = { 1 };
static const int8_t fwd_stage_range_row_idx_8[1] = { 4 };
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61

// cos bit
static const int8_t fwd_cos_bit_col_dct_8[6] = { 13, 13, 13, 13, 13, 13 };
static const int8_t fwd_cos_bit_row_dct_8[6] = { 13, 13, 13, 13, 13, 13 };
static const int8_t fwd_cos_bit_col_adst_8[8] = {
  13, 13, 13, 13, 13, 13, 13, 13
};
static const int8_t fwd_cos_bit_row_adst_8[8] = {
  13, 13, 13, 13, 13, 13, 13, 13
};

//  ---------------- 16x16 1D constants -----------------------
// shift
static const int8_t fwd_shift_16[3] = { 2, -2, 0 };

// stage range
62 63 64 65 66 67 68
static const int8_t fwd_stage_range_col_dct_16[8] = { 0, 1, 2, 3, 4, 4, 4, 4 };
static const int8_t fwd_stage_range_row_dct_16[8] = { 4, 5, 6, 7, 7, 7, 7, 7 };
static const int8_t fwd_stage_range_col_adst_16[10] = { 0, 0, 1, 2, 2,
                                                        3, 3, 4, 4, 4 };
static const int8_t fwd_stage_range_row_adst_16[10] = {
  4, 4, 4, 5, 5, 6, 6, 7, 7, 7,
};
69 70 71 72

static const int8_t fwd_stage_range_col_idx_16[1] = { 2 };

static const int8_t fwd_stage_range_row_idx_16[1] = { 6 };
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90

// cos bit
static const int8_t fwd_cos_bit_col_dct_16[8] = {
  13, 13, 13, 13, 13, 13, 13, 13
};
static const int8_t fwd_cos_bit_row_dct_16[8] = {
  12, 12, 12, 12, 12, 12, 12, 12
};
static const int8_t fwd_cos_bit_col_adst_16[10] = { 13, 13, 13, 13, 13,
                                                    13, 13, 13, 13, 13 };
static const int8_t fwd_cos_bit_row_adst_16[10] = { 12, 12, 12, 12, 12,
                                                    12, 12, 12, 12, 12 };

//  ---------------- 32x32 1D constants -----------------------
// shift
static const int8_t fwd_shift_32[3] = { 2, -4, 0 };

// stage range
91 92 93 94 95 96 97 98
static const int8_t fwd_stage_range_col_dct_32[10] = { 0, 1, 2, 3, 4,
                                                       5, 5, 5, 5, 5 };
static const int8_t fwd_stage_range_row_dct_32[10] = { 5, 6, 7, 8, 9,
                                                       9, 9, 9, 9, 9 };
static const int8_t fwd_stage_range_col_adst_32[12] = { 0, 0, 1, 2, 2, 3,
                                                        3, 4, 4, 5, 5, 5 };
static const int8_t fwd_stage_range_row_adst_32[12] = { 5, 5, 5, 6, 6, 7,
                                                        7, 8, 8, 9, 9, 9 };
99 100
static const int8_t fwd_stage_range_col_idx_32[1] = { 2 };
static const int8_t fwd_stage_range_row_idx_32[1] = { 7 };
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116

// cos bit
static const int8_t fwd_cos_bit_col_dct_32[10] = { 12, 12, 12, 12, 12,
                                                   12, 12, 12, 12, 12 };
static const int8_t fwd_cos_bit_row_dct_32[10] = { 12, 12, 12, 12, 12,
                                                   12, 12, 12, 12, 12 };
static const int8_t fwd_cos_bit_col_adst_32[12] = { 12, 12, 12, 12, 12, 12,
                                                    12, 12, 12, 12, 12, 12 };
static const int8_t fwd_cos_bit_row_adst_32[12] = { 12, 12, 12, 12, 12, 12,
                                                    12, 12, 12, 12, 12, 12 };

//  ---------------- 64x64 1D constants -----------------------
// shift
static const int8_t fwd_shift_64[3] = { 0, -2, -2 };

// stage range
117 118 119 120
static const int8_t fwd_stage_range_col_dct_64[12] = { 0, 1, 2, 3, 4, 5,
                                                       6, 6, 6, 6, 6, 6 };
static const int8_t fwd_stage_range_row_dct_64[12] = { 6,  7,  8,  9,  10, 11,
                                                       11, 11, 11, 11, 11, 11 };
121 122
static const int8_t fwd_stage_range_col_idx_64[1] = { 3 };
static const int8_t fwd_stage_range_row_idx_64[1] = { 9 };
123 124

// cos bit
Urvang Joshi's avatar
Urvang Joshi committed
125
static const int8_t fwd_cos_bit_col_dct_64[12] = { 13, 13, 13, 13, 13, 13,
126
                                                   13, 13, 13, 13, 13, 13 };
127
static const int8_t fwd_cos_bit_row_dct_64[12] = { 13, 13, 12, 11, 10, 10,
128 129
                                                   10, 10, 10, 10, 10, 10 };

130 131
//  ---------------- 4x8 1D constants -----------------------
#define fwd_shift_4x8 fwd_shift_8
132 133
static const int8_t fwd_stage_range_row_dct_4x8[4] = { 3, 4, 4, 4 };
static const int8_t fwd_stage_range_row_adst_4x8[6] = { 3, 3, 3, 4, 4, 4 };
134
static const int8_t fwd_stage_range_row_idx_4x8[1] = { 4 };
135 136
static const int8_t fwd_cos_bit_row_dct_4x8[6] = { 13, 12, 12, 12 };
static const int8_t fwd_cos_bit_row_adst_4x8[6] = { 13, 13, 12, 12, 12, 12 };
137 138 139

//  ---------------- 8x4 1D constants -----------------------
#define fwd_shift_8x4 fwd_shift_8
140 141 142 143
static const int8_t fwd_stage_range_row_dct_8x4[6] = { 2, 3, 4, 4, 4, 4 };
static const int8_t fwd_stage_range_row_adst_8x4[8] = {
  2, 2, 2, 3, 3, 4, 4, 4
};
144
static const int8_t fwd_stage_range_row_idx_8x4[1] = { 3 };
145
static const int8_t fwd_cos_bit_row_dct_8x4[6] = { 13, 13, 12, 12, 12, 12 };
146
static const int8_t fwd_cos_bit_row_adst_8x4[8] = { 13, 13, 13, 13,
147
                                                    12, 12, 12, 12 };
148 149 150

//  ---------------- 8x16 1D constants -----------------------
#define fwd_shift_8x16 fwd_shift_16
151 152 153 154
static const int8_t fwd_stage_range_row_dct_8x16[6] = { 4, 5, 6, 6, 6, 6 };
static const int8_t fwd_stage_range_row_adst_8x16[8] = {
  4, 4, 4, 5, 5, 6, 6, 6
};
155
static const int8_t fwd_stage_range_row_idx_8x16[1] = { 5 };
156 157 158
static const int8_t fwd_cos_bit_row_dct_8x16[6] = { 12, 12, 11, 11, 11, 11 };
static const int8_t fwd_cos_bit_row_adst_8x16[8] = { 12, 12, 12, 12,
                                                     11, 11, 11, 11 };
159

160
//  ---------------- 16x8 1D constants -----------------------
161
#define fwd_shift_16x8 fwd_shift_16
162 163 164 165 166
static const int8_t fwd_stage_range_row_dct_16x8[8] = {
  3, 4, 5, 6, 6, 6, 6, 6
};
static const int8_t fwd_stage_range_row_adst_16x8[10] = { 3, 3, 3, 4, 4,
                                                          5, 5, 6, 6, 6 };
167
static const int8_t fwd_stage_range_row_idx_16x8[1] = { 5 };
168 169 170 171
static const int8_t fwd_cos_bit_row_dct_16x8[8] = { 12, 12, 12, 11,
                                                    11, 11, 11, 11 };
static const int8_t fwd_cos_bit_row_adst_16x8[10] = { 12, 12, 12, 12, 12,
                                                      12, 11, 11, 11, 11 };
172 173 174

//  ---------------- 16x32 1D constants -----------------------
#define fwd_shift_16x32 fwd_shift_32
175 176 177 178 179
static const int8_t fwd_stage_range_row_dct_16x32[8] = {
  5, 6, 7, 8, 8, 8, 8, 8
};
static const int8_t fwd_stage_range_row_adst_16x32[10] = { 5, 5, 5, 6, 6,
                                                           7, 7, 8, 8, 8 };
180
static const int8_t fwd_stage_range_row_idx_16x32[1] = { 7 };
181 182
static const int8_t fwd_cos_bit_row_dct_16x32[8] = { 12, 12, 12, 11,
                                                     11, 11, 11, 11 };
183
static const int8_t fwd_cos_bit_row_adst_16x32[10] = { 12, 12, 12, 12, 12,
184
                                                       12, 11, 11, 11, 11 };
185 186 187

//  ---------------- 32x16 1D constants -----------------------
#define fwd_shift_32x16 fwd_shift_32
188 189 190 191
static const int8_t fwd_stage_range_row_dct_32x16[10] = { 4, 5, 6, 7, 8,
                                                          8, 8, 8, 8, 8 };
static const int8_t fwd_stage_range_row_adst_32x16[12] = { 4, 4, 4, 5, 5, 6,
                                                           6, 7, 7, 8, 8, 8 };
192
static const int8_t fwd_stage_range_row_idx_32x16[1] = { 6 };
193 194
static const int8_t fwd_cos_bit_row_dct_32x16[10] = { 12, 12, 12, 12, 11,
                                                      11, 11, 11, 11, 11 };
195
static const int8_t fwd_cos_bit_row_adst_32x16[12] = { 12, 12, 12, 12, 12, 12,
196
                                                       12, 12, 11, 11, 11, 11 };
197 198 199

//  ---------------- 32x64 1D constants -----------------------
#define fwd_shift_32x64 fwd_shift_64
200 201
static const int8_t fwd_stage_range_row_dct_32x64[10] = { 6,  7,  8,  9,  10,
                                                          10, 10, 10, 10, 10 };
202
static const int8_t fwd_stage_range_row_idx_32x64[1] = { 8 };
203 204
static const int8_t fwd_cos_bit_row_dct_32x64[10] = { 13, 12, 12, 11, 10,
                                                      10, 10, 10, 10, 10 };
205 206 207

//  ---------------- 64x32 1D constants -----------------------
#define fwd_shift_64x32 fwd_shift_64
208 209 210
static const int8_t fwd_stage_range_row_dct_64x32[12] = {
  5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10
};
211
static const int8_t fwd_stage_range_row_idx_64x32[1] = { 8 };
212 213 214 215 216
static const int8_t fwd_cos_bit_row_dct_64x32[12] = { 13, 13, 12, 11, 10, 10,
                                                      10, 10, 10, 10, 10, 10 };

//  ---------------- 4x16 1D constants -----------------------
#define fwd_shift_4x16 fwd_shift_16
217 218
static const int8_t fwd_stage_range_row_dct_4x16[4] = { 4, 5, 5, 5 };
static const int8_t fwd_stage_range_row_adst_4x16[6] = { 4, 4, 4, 5, 5, 5 };
219
static const int8_t fwd_stage_range_row_idx_4x16[1] = { 5 };
220 221
static const int8_t fwd_cos_bit_row_dct_4x16[6] = { 12, 12, 12, 12 };
static const int8_t fwd_cos_bit_row_adst_4x16[6] = { 12, 12, 12, 12, 12, 12 };
222 223 224

//  ---------------- 16x4 1D constants -----------------------
#define fwd_shift_16x4 fwd_shift_16
225 226 227 228 229
static const int8_t fwd_stage_range_row_dct_16x4[8] = {
  2, 3, 4, 5, 5, 5, 5, 5
};
static const int8_t fwd_stage_range_row_adst_16x4[10] = { 2, 2, 2, 3, 3,
                                                          4, 4, 5, 5, 5 };
230
static const int8_t fwd_stage_range_row_idx_16x4[1] = { 4 };
231 232 233 234
static const int8_t fwd_cos_bit_row_dct_16x4[8] = { 12, 12, 12, 12,
                                                    12, 12, 12, 12 };
static const int8_t fwd_cos_bit_row_adst_16x4[10] = { 12, 12, 12, 12, 12,
                                                      12, 12, 12, 12, 12 };
235 236 237

//  ---------------- 8x32 1D constants -----------------------
#define fwd_shift_8x32 fwd_shift_32
238 239 240 241
static const int8_t fwd_stage_range_row_dct_8x32[6] = { 5, 6, 7, 7, 7, 7 };
static const int8_t fwd_stage_range_row_adst_8x32[8] = {
  5, 5, 5, 6, 6, 7, 7, 7
};
242
static const int8_t fwd_stage_range_row_idx_8x32[1] = { 6 };
243 244 245
static const int8_t fwd_cos_bit_row_dct_8x32[6] = { 12, 12, 11, 11, 11, 11 };
static const int8_t fwd_cos_bit_row_adst_8x32[8] = { 12, 12, 12, 12,
                                                     11, 11, 11, 11 };
246 247 248

//  ---------------- 32x8 1D constants -----------------------
#define fwd_shift_32x8 fwd_shift_32
249 250 251 252
static const int8_t fwd_stage_range_row_dct_32x8[10] = { 3, 4, 5, 6, 7,
                                                         7, 7, 7, 7, 7 };
static const int8_t fwd_stage_range_row_adst_32x8[12] = { 3, 3, 3, 4, 4, 5,
                                                          5, 6, 6, 7, 7, 7 };
253
static const int8_t fwd_stage_range_row_idx_32x8[1] = { 5 };
254 255
static const int8_t fwd_cos_bit_row_dct_32x8[10] = { 12, 12, 12, 12, 11,
                                                     11, 11, 11, 11, 11 };
256
static const int8_t fwd_cos_bit_row_adst_32x8[12] = { 12, 12, 12, 12, 12, 12,
257
                                                      12, 11, 11, 11, 11, 11 };
258 259 260

//  ---------------- 16x64 1D constants -----------------------
#define fwd_shift_16x64 fwd_shift_64
261 262 263
static const int8_t fwd_stage_range_row_dct_16x64[8] = {
  6, 7, 8, 9, 9, 9, 9, 9
};
264
static const int8_t fwd_stage_range_row_idx_16x64[1] = { 8 };
265 266
static const int8_t fwd_cos_bit_row_dct_16x64[8] = { 12, 11, 10, 10,
                                                     10, 10, 10, 10 };
267 268 269

//  ---------------- 64x16 1D constants -----------------------
#define fwd_shift_64x16 fwd_shift_64
270 271
static const int8_t fwd_stage_range_row_dct_64x16[12] = { 4, 5, 6, 7, 8, 9,
                                                          9, 9, 9, 9, 9, 9 };
272
static const int8_t fwd_stage_range_row_idx_64x16[1] = { 7 };
273 274
static const int8_t fwd_cos_bit_row_dct_64x16[12] = { 13, 13, 12, 11, 11, 11,
                                                      11, 11, 11, 11, 11, 11 };
275 276

//
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428
//  ---------------- row config fwd_dct_4 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_4 = {
  4,  // .txfm_size
  4,  // .stage_num
  // 0,  // .log_scale
  fwd_shift_4,                // .shift
  fwd_stage_range_row_dct_4,  // .stage_range
  fwd_cos_bit_row_dct_4,      // .cos_bit
  TXFM_TYPE_DCT4              // .txfm_type
};

//  ---------------- row config fwd_dct_8 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_8 = {
  8,  // .txfm_size
  6,  // .stage_num
  // 0,  // .log_scale
  fwd_shift_8,                // .shift
  fwd_stage_range_row_dct_8,  // .stage_range
  fwd_cos_bit_row_dct_8,      // .cos_bit_
  TXFM_TYPE_DCT8              // .txfm_type
};
//  ---------------- row config fwd_dct_16 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_16 = {
  16,  // .txfm_size
  8,   // .stage_num
  // 0,  // .log_scale
  fwd_shift_16,                // .shift
  fwd_stage_range_row_dct_16,  // .stage_range
  fwd_cos_bit_row_dct_16,      // .cos_bit
  TXFM_TYPE_DCT16              // .txfm_type
};

//  ---------------- row config fwd_dct_32 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_32 = {
  32,  // .txfm_size
  10,  // .stage_num
  // 1,  // .log_scale
  fwd_shift_32,                // .shift
  fwd_stage_range_row_dct_32,  // .stage_range
  fwd_cos_bit_row_dct_32,      // .cos_bit_row
  TXFM_TYPE_DCT32              // .txfm_type
};

//  ---------------- row config fwd_dct_64 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_64 = {
  64,                          // .txfm_size
  12,                          // .stage_num
  fwd_shift_64,                // .shift
  fwd_stage_range_row_dct_64,  // .stage_range
  fwd_cos_bit_row_dct_64,      // .cos_bit
  TXFM_TYPE_DCT64,             // .txfm_type_col
};

//  ---------------- row config fwd_adst_4 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_4 = {
  4,  // .txfm_size
  6,  // .stage_num
  // 0,  // .log_scale
  fwd_shift_4,                 // .shift
  fwd_stage_range_row_adst_4,  // .stage_range
  fwd_cos_bit_row_adst_4,      // .cos_bit
  TXFM_TYPE_ADST4,             // .txfm_type
};

//  ---------------- row config fwd_adst_8 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_8 = {
  8,  // .txfm_size
  8,  // .stage_num
  // 0,  // .log_scale
  fwd_shift_8,                 // .shift
  fwd_stage_range_row_adst_8,  // .stage_range
  fwd_cos_bit_row_adst_8,      // .cos_bit
  TXFM_TYPE_ADST8,             // .txfm_type_col
};

//  ---------------- row config fwd_adst_16 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_16 = {
  16,  // .txfm_size
  10,  // .stage_num
  // 0,  // .log_scale
  fwd_shift_16,                 // .shift
  fwd_stage_range_row_adst_16,  // .stage_range
  fwd_cos_bit_row_adst_16,      // .cos_bit
  TXFM_TYPE_ADST16,             // .txfm_type
};

//  ---------------- row config fwd_adst_32 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_32 = {
  32,  // .txfm_size
  12,  // .stage_num
  // 1,  // .log_scale
  fwd_shift_32,                 // .shift
  fwd_stage_range_row_adst_32,  // .stage_range
  fwd_cos_bit_row_adst_32,      // .cos_bit
  TXFM_TYPE_ADST32,             // .txfm_type
};

//  ---------------- col config fwd_dct_4 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_dct_4 = {
  4,  // .txfm_size
  4,  // .stage_num
  // 0,  // .log_scale
  fwd_shift_4,                // .shift
  fwd_stage_range_col_dct_4,  // .stage_range
  fwd_cos_bit_col_dct_4,      // .cos_bit
  TXFM_TYPE_DCT4              // .txfm_type
};

//  ---------------- col config fwd_dct_8 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_dct_8 = {
  8,  // .txfm_size
  6,  // .stage_num
  // 0,  // .log_scale
  fwd_shift_8,                // .shift
  fwd_stage_range_col_dct_8,  // .stage_range
  fwd_cos_bit_col_dct_8,      // .cos_bit_
  TXFM_TYPE_DCT8              // .txfm_type
};
//  ---------------- col config fwd_dct_16 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_dct_16 = {
  16,  // .txfm_size
  8,   // .stage_num
  // 0,  // .log_scale
  fwd_shift_16,                // .shift
  fwd_stage_range_col_dct_16,  // .stage_range
  fwd_cos_bit_col_dct_16,      // .cos_bit
  TXFM_TYPE_DCT16              // .txfm_type
};

//  ---------------- col config fwd_dct_32 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_dct_32 = {
  32,  // .txfm_size
  10,  // .stage_num
  // 1,  // .log_scale
  fwd_shift_32,                // .shift
  fwd_stage_range_col_dct_32,  // .stage_range
  fwd_cos_bit_col_dct_32,      // .cos_bit_col
  TXFM_TYPE_DCT32              // .txfm_type
};

//  ---------------- col config fwd_dct_64 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_dct_64 = {
  64,                          // .txfm_size
  12,                          // .stage_num
  fwd_shift_64,                // .shift
  fwd_stage_range_col_dct_64,  // .stage_range
  fwd_cos_bit_col_dct_64,      // .cos_bit
  TXFM_TYPE_DCT64,             // .txfm_type_col
};

//  ---------------- col config fwd_adst_4 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_adst_4 = {
429 430
  4,                           // .txfm_size
  6,                           // .stage_num
431 432 433 434 435 436 437 438
  fwd_shift_4,                 // .shift
  fwd_stage_range_col_adst_4,  // .stage_range
  fwd_cos_bit_col_adst_4,      // .cos_bit
  TXFM_TYPE_ADST4,             // .txfm_type
};

//  ---------------- col config fwd_adst_8 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_adst_8 = {
439 440
  8,                           // .txfm_size
  8,                           // .stage_num
441 442 443 444 445 446 447 448
  fwd_shift_8,                 // .shift
  fwd_stage_range_col_adst_8,  // .stage_range
  fwd_cos_bit_col_adst_8,      // .cos_bit
  TXFM_TYPE_ADST8,             // .txfm_type_col
};

//  ---------------- col config fwd_adst_16 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_adst_16 = {
449 450
  16,                           // .txfm_size
  10,                           // .stage_num
451 452 453 454 455 456 457 458
  fwd_shift_16,                 // .shift
  fwd_stage_range_col_adst_16,  // .stage_range
  fwd_cos_bit_col_adst_16,      // .cos_bit
  TXFM_TYPE_ADST16,             // .txfm_type
};

//  ---------------- col config fwd_adst_32 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_adst_32 = {
459 460
  32,                           // .txfm_size
  12,                           // .stage_num
461 462 463 464 465
  fwd_shift_32,                 // .shift
  fwd_stage_range_col_adst_32,  // .stage_range
  fwd_cos_bit_col_adst_32,      // .cos_bit
  TXFM_TYPE_ADST32,             // .txfm_type
};
466

467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514
//  ---------------- col config fwd_identity_4 ----------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_identity_4 = {
  4,                          // .txfm_size
  1,                          // .stage_num
  fwd_shift_4,                // .shift
  fwd_stage_range_col_idx_4,  // .stage_range
  NULL,                       // .cos_bit
  TXFM_TYPE_IDENTITY4,        // .txfm_type
};

//  ---------------- row config fwd_identity_4 ----------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_4 = {
  4,                          // .txfm_size
  1,                          // .stage_num
  fwd_shift_4,                // .shift
  fwd_stage_range_row_idx_4,  // .stage_range
  NULL,                       // .cos_bit
  TXFM_TYPE_IDENTITY4,        // .txfm_type
};

//  ---------------- col config fwd_identity_8 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_identity_8 = {
  8,                          // .txfm_size
  1,                          // .stage_num
  fwd_shift_8,                // .shift
  fwd_stage_range_col_idx_8,  // .stage_range
  NULL,                       // .cos_bit
  TXFM_TYPE_IDENTITY8,        // .txfm_type
};

//  ---------------- row config fwd_identity_8 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_8 = {
  8,                          // .txfm_size
  1,                          // .stage_num
  fwd_shift_8,                // .shift
  fwd_stage_range_row_idx_8,  // .stage_range
  NULL,                       // .cos_bit
  TXFM_TYPE_IDENTITY8,        // .txfm_type
};

//  ---------------- col config fwd_identity_16 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_identity_16 = {
  16,                          // .txfm_size
  1,                           // .stage_num
  fwd_shift_16,                // .shift
  fwd_stage_range_col_idx_16,  // .stage_range
  NULL,                        // .cos_bit
  TXFM_TYPE_IDENTITY16,        // .txfm_type
515 516
};

517 518 519 520 521 522 523 524
//  ---------------- row config fwd_identity_16 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_16 = {
  16,                          // .txfm_size
  1,                           // .stage_num
  fwd_shift_16,                // .shift
  fwd_stage_range_row_idx_16,  // .stage_range
  NULL,                        // .cos_bit
  TXFM_TYPE_IDENTITY16,        // .txfm_type
525 526
};

527 528 529 530 531 532 533 534
//  ---------------- col config fwd_identity_32 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_identity_32 = {
  32,                          // .txfm_size
  1,                           // .stage_num
  fwd_shift_32,                // .shift
  fwd_stage_range_col_idx_32,  // .stage_range
  NULL,                        // .cos_bit
  TXFM_TYPE_IDENTITY32,        // .txfm_type
535 536
};

537 538 539 540 541 542 543 544
//  ---------------- row config fwd_identity_32 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_32 = {
  32,                          // .txfm_size
  1,                           // .stage_num
  fwd_shift_32,                // .shift
  fwd_stage_range_row_idx_32,  // .stage_range
  NULL,                        // .cos_bit
  TXFM_TYPE_IDENTITY32,        // .txfm_type
545
};
546 547

#if CONFIG_TX64X64
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565
//  ---------------- col config fwd_identity_64 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_col_cfg_identity_64 = {
  64,                          // .txfm_size
  1,                           // .stage_num
  fwd_shift_64,                // .shift
  fwd_stage_range_col_idx_64,  // .stage_range
  NULL,                        // .cos_bit
  TXFM_TYPE_IDENTITY64,        // .txfm_type
};

//  ---------------- row config fwd_identity_64 ----------------
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_64 = {
  64,                          // .txfm_size
  1,                           // .stage_num
  fwd_shift_64,                // .shift
  fwd_stage_range_row_idx_64,  // .stage_range
  NULL,                        // .cos_bit
  TXFM_TYPE_IDENTITY64,        // .txfm_type
566 567
};
#endif  // CONFIG_TX64X64
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_4x8 = {
  4,                            // .txfm_size
  4,                            // .stage_num
  fwd_shift_4x8,                // .shift
  fwd_stage_range_row_dct_4x8,  // .stage_range
  fwd_cos_bit_row_dct_4x8,      // .cos_bit
  TXFM_TYPE_DCT4                // .txfm_type
};

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_4x8 = {
  4,                             // .txfm_size
  6,                             // .stage_num
  fwd_shift_4x8,                 // .shift
  fwd_stage_range_row_adst_4x8,  // .stage_range
  fwd_cos_bit_row_adst_4x8,      // .cos_bit
  TXFM_TYPE_ADST4                // .txfm_type
};

587 588 589 590 591 592 593 594 595
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_4x8 = {
  4,                            // .txfm_size
  1,                            // .stage_num
  fwd_shift_4x8,                // .shift
  fwd_stage_range_row_idx_4x8,  // .stage_range
  NULL,                         // .cos_bit
  TXFM_TYPE_IDENTITY4           // .txfm_type
};

596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_8x4 = {
  8,                            // .txfm_size
  6,                            // .stage_num
  fwd_shift_8x4,                // .shift
  fwd_stage_range_row_dct_8x4,  // .stage_range
  fwd_cos_bit_row_dct_8x4,      // .cos_bit
  TXFM_TYPE_DCT8                // .txfm_type
};

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_8x4 = {
  8,                             // .txfm_size
  8,                             // .stage_num
  fwd_shift_8x4,                 // .shift
  fwd_stage_range_row_adst_8x4,  // .stage_range
  fwd_cos_bit_row_adst_8x4,      // .cos_bit
  TXFM_TYPE_ADST8                // .txfm_type
};

614 615 616 617 618 619 620 621 622
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_8x4 = {
  8,                            // .txfm_size
  1,                            // .stage_num
  fwd_shift_8x4,                // .shift
  fwd_stage_range_row_idx_8x4,  // .stage_range
  NULL,                         // .cos_bit
  TXFM_TYPE_IDENTITY8           // .txfm_type
};

623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_8x16 = {
  8,                             // .txfm_size
  6,                             // .stage_num
  fwd_shift_8x16,                // .shift
  fwd_stage_range_row_dct_8x16,  // .stage_range
  fwd_cos_bit_row_dct_8x16,      // .cos_bit
  TXFM_TYPE_DCT8                 // .txfm_type
};

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_8x16 = {
  8,                              // .txfm_size
  8,                              // .stage_num
  fwd_shift_8x16,                 // .shift
  fwd_stage_range_row_adst_8x16,  // .stage_range
  fwd_cos_bit_row_adst_8x16,      // .cos_bit
  TXFM_TYPE_ADST8                 // .txfm_type
};

641 642 643 644 645 646 647 648 649
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_8x16 = {
  8,                             // .txfm_size
  1,                             // .stage_num
  fwd_shift_8x16,                // .shift
  fwd_stage_range_row_idx_8x16,  // .stage_range
  NULL,                          // .cos_bit
  TXFM_TYPE_IDENTITY8            // .txfm_type
};

650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_16x8 = {
  16,                            // .txfm_size
  8,                             // .stage_num
  fwd_shift_16x8,                // .shift
  fwd_stage_range_row_dct_16x8,  // .stage_range
  fwd_cos_bit_row_dct_16x8,      // .cos_bit
  TXFM_TYPE_DCT16                // .txfm_type
};

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_16x8 = {
  16,                             // .txfm_size
  10,                             // .stage_num
  fwd_shift_16x8,                 // .shift
  fwd_stage_range_row_adst_16x8,  // .stage_range
  fwd_cos_bit_row_adst_16x8,      // .cos_bit
  TXFM_TYPE_ADST16                // .txfm_type
};

668 669 670 671 672 673 674 675 676
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_16x8 = {
  16,                            // .txfm_size
  1,                             // .stage_num
  fwd_shift_16x8,                // .shift
  fwd_stage_range_row_idx_16x8,  // .stage_range
  NULL,                          // .cos_bit
  TXFM_TYPE_IDENTITY16           // .txfm_type
};

677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_16x32 = {
  16,                             // .txfm_size
  8,                              // .stage_num
  fwd_shift_16x32,                // .shift
  fwd_stage_range_row_dct_16x32,  // .stage_range
  fwd_cos_bit_row_dct_16x32,      // .cos_bit
  TXFM_TYPE_DCT16                 // .txfm_type
};

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_16x32 = {
  16,                              // .txfm_size
  10,                              // .stage_num
  fwd_shift_16x32,                 // .shift
  fwd_stage_range_row_adst_16x32,  // .stage_range
  fwd_cos_bit_row_adst_16x32,      // .cos_bit
  TXFM_TYPE_ADST16                 // .txfm_type
};

695 696 697 698 699 700 701 702 703
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_16x32 = {
  16,                             // .txfm_size
  1,                              // .stage_num
  fwd_shift_16x32,                // .shift
  fwd_stage_range_row_idx_16x32,  // .stage_range
  NULL,                           // .cos_bit
  TXFM_TYPE_IDENTITY16            // .txfm_type
};

704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_32x16 = {
  32,                             // .txfm_size
  10,                             // .stage_num
  fwd_shift_32x16,                // .shift
  fwd_stage_range_row_dct_32x16,  // .stage_range
  fwd_cos_bit_row_dct_32x16,      // .cos_bit
  TXFM_TYPE_DCT32                 // .txfm_type
};

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_32x16 = {
  32,                              // .txfm_size
  12,                              // .stage_num
  fwd_shift_32x16,                 // .shift
  fwd_stage_range_row_adst_32x16,  // .stage_range
  fwd_cos_bit_row_adst_32x16,      // .cos_bit
  TXFM_TYPE_ADST32                 // .txfm_type
};

722 723 724 725 726 727 728 729 730
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_32x16 = {
  32,                             // .txfm_size
  1,                              // .stage_num
  fwd_shift_32x16,                // .shift
  fwd_stage_range_row_idx_32x16,  // .stage_range
  NULL,                           // .cos_bit
  TXFM_TYPE_IDENTITY32            // .txfm_type
};

731 732 733 734 735 736 737 738 739 740
#if CONFIG_TX64X64
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_32x64 = {
  32,                             // .txfm_size
  10,                             // .stage_num
  fwd_shift_32x64,                // .shift
  fwd_stage_range_row_dct_32x64,  // .stage_range
  fwd_cos_bit_row_dct_32x64,      // .cos_bit
  TXFM_TYPE_DCT32                 // .txfm_type
};

741 742 743 744 745 746 747 748 749
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_32x64 = {
  32,                             // .txfm_size
  1,                              // .stage_num
  fwd_shift_32x64,                // .shift
  fwd_stage_range_row_idx_32x64,  // .stage_range
  NULL,                           // .cos_bit
  TXFM_TYPE_IDENTITY32            // .txfm_type
};

750 751 752 753 754 755 756 757
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_64x32 = {
  64,                             // .txfm_size
  12,                             // .stage_num
  fwd_shift_64x32,                // .shift
  fwd_stage_range_row_dct_64x32,  // .stage_range
  fwd_cos_bit_row_dct_64x32,      // .cos_bit
  TXFM_TYPE_DCT64                 // .txfm_type
};
758 759 760 761 762 763 764 765 766

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_64x32 = {
  64,                             // .txfm_size
  1,                              // .stage_num
  fwd_shift_64x32,                // .shift
  fwd_stage_range_row_idx_64x32,  // .stage_range
  NULL,                           // .cos_bit
  TXFM_TYPE_IDENTITY64            // .txfm_type
};
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786
#endif  // CONFIG_TX64X64

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_4x16 = {
  4,                             // .txfm_size
  4,                             // .stage_num
  fwd_shift_4x16,                // .shift
  fwd_stage_range_row_dct_4x16,  // .stage_range
  fwd_cos_bit_row_dct_4x16,      // .cos_bit
  TXFM_TYPE_DCT4                 // .txfm_type
};

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_4x16 = {
  4,                              // .txfm_size
  6,                              // .stage_num
  fwd_shift_4x16,                 // .shift
  fwd_stage_range_row_adst_4x16,  // .stage_range
  fwd_cos_bit_row_adst_4x16,      // .cos_bit
  TXFM_TYPE_ADST4                 // .txfm_type
};

787 788 789 790 791 792 793 794 795
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_4x16 = {
  4,                             // .txfm_size
  1,                             // .stage_num
  fwd_shift_4x16,                // .shift
  fwd_stage_range_row_idx_4x16,  // .stage_range
  NULL,                          // .cos_bit
  TXFM_TYPE_IDENTITY4            // .txfm_type
};

796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_16x4 = {
  16,                            // .txfm_size
  8,                             // .stage_num
  fwd_shift_16x4,                // .shift
  fwd_stage_range_row_dct_16x4,  // .stage_range
  fwd_cos_bit_row_dct_16x4,      // .cos_bit
  TXFM_TYPE_DCT16                // .txfm_type
};

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_16x4 = {
  16,                             // .txfm_size
  10,                             // .stage_num
  fwd_shift_16x4,                 // .shift
  fwd_stage_range_row_adst_16x4,  // .stage_range
  fwd_cos_bit_row_adst_16x4,      // .cos_bit
  TXFM_TYPE_ADST16                // .txfm_type
};

814 815 816 817 818 819 820 821 822
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_16x4 = {
  16,                            // .txfm_size
  1,                             // .stage_num
  fwd_shift_16x4,                // .shift
  fwd_stage_range_row_idx_16x4,  // .stage_range
  NULL,                          // .cos_bit
  TXFM_TYPE_IDENTITY16           // .txfm_type
};

823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_8x32 = {
  8,                             // .txfm_size
  6,                             // .stage_num
  fwd_shift_8x32,                // .shift
  fwd_stage_range_row_dct_8x32,  // .stage_range
  fwd_cos_bit_row_dct_8x32,      // .cos_bit
  TXFM_TYPE_DCT8                 // .txfm_type
};

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_8x32 = {
  8,                              // .txfm_size
  8,                              // .stage_num
  fwd_shift_8x32,                 // .shift
  fwd_stage_range_row_adst_8x32,  // .stage_range
  fwd_cos_bit_row_adst_8x32,      // .cos_bit
  TXFM_TYPE_ADST8                 // .txfm_type
};

841 842 843 844 845 846 847 848 849
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_8x32 = {
  8,                             // .txfm_size
  1,                             // .stage_num
  fwd_shift_8x32,                // .shift
  fwd_stage_range_row_idx_8x32,  // .stage_range
  NULL,                          // .cos_bit
  TXFM_TYPE_IDENTITY8            // .txfm_type
};

850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_32x8 = {
  32,                            // .txfm_size
  10,                            // .stage_num
  fwd_shift_32x8,                // .shift
  fwd_stage_range_row_dct_32x8,  // .stage_range
  fwd_cos_bit_row_dct_32x8,      // .cos_bit
  TXFM_TYPE_DCT32                // .txfm_type
};

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_adst_32x8 = {
  32,                             // .txfm_size
  12,                             // .stage_num
  fwd_shift_32x8,                 // .shift
  fwd_stage_range_row_adst_32x8,  // .stage_range
  fwd_cos_bit_row_adst_32x8,      // .cos_bit
  TXFM_TYPE_ADST32                // .txfm_type
};

868 869 870 871 872 873 874 875 876
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_32x8 = {
  32,                            // .txfm_size
  1,                             // .stage_num
  fwd_shift_32x8,                // .shift
  fwd_stage_range_row_idx_32x8,  // .stage_range
  NULL,                          // .cos_bit
  TXFM_TYPE_IDENTITY32           // .txfm_type
};

877 878 879 880 881 882 883 884 885 886
#if CONFIG_TX64X64
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_16x64 = {
  16,                             // .txfm_size
  8,                              // .stage_num
  fwd_shift_16x64,                // .shift
  fwd_stage_range_row_dct_16x64,  // .stage_range
  fwd_cos_bit_row_dct_16x64,      // .cos_bit
  TXFM_TYPE_DCT16                 // .txfm_type
};

887 888 889 890 891 892 893 894 895
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_16x64 = {
  16,                             // .txfm_size
  1,                              // .stage_num
  fwd_shift_16x64,                // .shift
  fwd_stage_range_row_idx_16x64,  // .stage_range
  NULL,                           // .cos_bit
  TXFM_TYPE_IDENTITY16            // .txfm_type
};

896 897 898 899 900 901 902 903
static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_dct_64x16 = {
  64,                             // .txfm_size
  12,                             // .stage_num
  fwd_shift_64x16,                // .shift
  fwd_stage_range_row_dct_64x16,  // .stage_range
  fwd_cos_bit_row_dct_64x16,      // .cos_bit
  TXFM_TYPE_DCT64                 // .txfm_type
};
904 905 906 907 908 909 910 911 912

static const TXFM_1D_CFG fwd_txfm_1d_row_cfg_identity_64x16 = {
  64,                             // .txfm_size
  1,                              // .stage_num
  fwd_shift_64x16,                // .shift
  fwd_stage_range_row_idx_64x16,  // .stage_range
  NULL,                           // .cos_bit
  TXFM_TYPE_IDENTITY64            // .txfm_type
};
913
#endif  // CONFIG_TX64X64
914
#endif  // AV1_FWD_TXFM2D_CFG_H_