1cabdff1aSopenharmony_ci/*
2cabdff1aSopenharmony_ci * ATRAC 1 compatible decoder data
3cabdff1aSopenharmony_ci * Copyright (c) 2009 Maxim Poliakovski
4cabdff1aSopenharmony_ci * Copyright (c) 2009 Benjamin Larsson
5cabdff1aSopenharmony_ci *
6cabdff1aSopenharmony_ci * This file is part of FFmpeg.
7cabdff1aSopenharmony_ci *
8cabdff1aSopenharmony_ci * FFmpeg is free software; you can redistribute it and/or
9cabdff1aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public
10cabdff1aSopenharmony_ci * License as published by the Free Software Foundation; either
11cabdff1aSopenharmony_ci * version 2.1 of the License, or (at your option) any later version.
12cabdff1aSopenharmony_ci *
13cabdff1aSopenharmony_ci * FFmpeg is distributed in the hope that it will be useful,
14cabdff1aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of
15cabdff1aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16cabdff1aSopenharmony_ci * Lesser General Public License for more details.
17cabdff1aSopenharmony_ci *
18cabdff1aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public
19cabdff1aSopenharmony_ci * License along with FFmpeg; if not, write to the Free Software
20cabdff1aSopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21cabdff1aSopenharmony_ci */
22cabdff1aSopenharmony_ci
23cabdff1aSopenharmony_ci/**
24cabdff1aSopenharmony_ci * @file
25cabdff1aSopenharmony_ci * ATRAC1 compatible decoder data
26cabdff1aSopenharmony_ci */
27cabdff1aSopenharmony_ci
28cabdff1aSopenharmony_ci#ifndef AVCODEC_ATRAC1DATA_H
29cabdff1aSopenharmony_ci#define AVCODEC_ATRAC1DATA_H
30cabdff1aSopenharmony_ci
31cabdff1aSopenharmony_ci#include <stdint.h>
32cabdff1aSopenharmony_ci
33cabdff1aSopenharmony_cistatic const uint8_t bfu_amount_tab1[8] = {20,  28,  32,  36, 40, 44, 48, 52};
34cabdff1aSopenharmony_cistatic const uint8_t bfu_amount_tab2[4] = { 0, 112, 176, 208};
35cabdff1aSopenharmony_cistatic const uint8_t bfu_amount_tab3[8] = { 0,  24,  36,  48, 72, 108, 132, 156};
36cabdff1aSopenharmony_ci
37cabdff1aSopenharmony_ci/** number of BFUs in each QMF band */
38cabdff1aSopenharmony_cistatic const uint8_t bfu_bands_t[4]  = {0, 20, 36, 52};
39cabdff1aSopenharmony_ci
40cabdff1aSopenharmony_ci/** number of spectral lines in each BFU
41cabdff1aSopenharmony_ci *  block floating unit = group of spectral frequencies having the
42cabdff1aSopenharmony_ci *  same quantization parameters like word length and scale factor
43cabdff1aSopenharmony_ci */
44cabdff1aSopenharmony_cistatic const uint8_t specs_per_bfu[52] = {
45cabdff1aSopenharmony_ci     8,  8,  8,  8,  4,  4,  4,  4,  8,  8,  8,  8,  6,  6,  6,  6, 6, 6, 6, 6, // low band
46cabdff1aSopenharmony_ci     6,  6,  6,  6,  7,  7,  7,  7,  9,  9,  9,  9, 10, 10, 10, 10,             // middle band
47cabdff1aSopenharmony_ci    12, 12, 12, 12, 12, 12, 12, 12, 20, 20, 20, 20, 20, 20, 20, 20              // high band
48cabdff1aSopenharmony_ci};
49cabdff1aSopenharmony_ci
50cabdff1aSopenharmony_ci/** start position of each BFU in the MDCT spectrum for the long mode */
51cabdff1aSopenharmony_cistatic const uint16_t bfu_start_long[52] = {
52cabdff1aSopenharmony_ci      0,   8,  16,  24,  32,  36,  40,  44,  48,  56,  64,  72,  80,  86,  92,  98, 104, 110, 116, 122,
53cabdff1aSopenharmony_ci    128, 134, 140, 146, 152, 159, 166, 173, 180, 189, 198, 207, 216, 226, 236, 246,
54cabdff1aSopenharmony_ci    256, 268, 280, 292, 304, 316, 328, 340, 352, 372, 392, 412, 432, 452, 472, 492,
55cabdff1aSopenharmony_ci};
56cabdff1aSopenharmony_ci
57cabdff1aSopenharmony_ci/** start position of each BFU in the MDCT spectrum for the short mode */
58cabdff1aSopenharmony_cistatic const uint16_t bfu_start_short[52] = {
59cabdff1aSopenharmony_ci      0,  32,  64,  96,   8,  40,  72, 104,  12,  44,  76, 108,  20,  52,  84, 116, 26, 58, 90, 122,
60cabdff1aSopenharmony_ci    128, 160, 192, 224, 134, 166, 198, 230, 141, 173, 205, 237, 150, 182, 214, 246,
61cabdff1aSopenharmony_ci    256, 288, 320, 352, 384, 416, 448, 480, 268, 300, 332, 364, 396, 428, 460, 492
62cabdff1aSopenharmony_ci};
63cabdff1aSopenharmony_ci
64cabdff1aSopenharmony_ci#endif /* AVCODEC_ATRAC1DATA_H */
65