3 * Copyright (c) 2015 Rostislav Pehlivanov ( atomnuker gmail com )
5 * This file is part of FFmpeg.
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * FFmpeg 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 GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "aacenctab.h"
24 static const uint8_t swb_size_128_96[] = {
25 4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36
28 static const uint8_t swb_size_128_64[] = {
29 4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36
32 static const uint8_t swb_size_128_48[] = {
33 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16
36 static const uint8_t swb_size_128_24[] = {
37 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 20
40 static const uint8_t swb_size_128_16[] = {
41 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 20
44 static const uint8_t swb_size_128_8[] = {
45 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 12, 16, 20, 20
48 static const uint8_t swb_size_1024_96[] = {
49 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8,
50 12, 12, 12, 12, 12, 16, 16, 24, 28, 36, 44,
51 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
54 static const uint8_t swb_size_1024_64[] = {
55 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8,
56 12, 12, 12, 16, 16, 16, 20, 24, 24, 28, 36,
57 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40
60 static const uint8_t swb_size_1024_48[] = {
61 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8,
62 12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28,
63 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
67 static const uint8_t swb_size_1024_32[] = {
68 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8,
69 12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28,
70 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32
73 static const uint8_t swb_size_1024_24[] = {
74 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
75 12, 12, 12, 12, 16, 16, 16, 20, 20, 24, 24, 28, 28,
76 32, 36, 36, 40, 44, 48, 52, 52, 64, 64, 64, 64, 64
79 static const uint8_t swb_size_1024_16[] = {
80 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
81 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 20, 20, 20, 24, 24, 28, 28,
82 32, 36, 40, 40, 44, 48, 52, 56, 60, 64, 64, 64
85 static const uint8_t swb_size_1024_8[] = {
86 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
87 16, 16, 16, 16, 16, 16, 16, 20, 20, 20, 20, 24, 24, 24, 28, 28,
88 32, 36, 36, 40, 44, 48, 52, 56, 60, 64, 80
91 const uint8_t *ff_aac_swb_size_128[] = {
92 swb_size_128_96, swb_size_128_96, swb_size_128_64,
93 swb_size_128_48, swb_size_128_48, swb_size_128_48,
94 swb_size_128_24, swb_size_128_24, swb_size_128_16,
95 swb_size_128_16, swb_size_128_16, swb_size_128_8,
99 const uint8_t *ff_aac_swb_size_1024[] = {
100 swb_size_1024_96, swb_size_1024_96, swb_size_1024_64,
101 swb_size_1024_48, swb_size_1024_48, swb_size_1024_32,
102 swb_size_1024_24, swb_size_1024_24, swb_size_1024_16,
103 swb_size_1024_16, swb_size_1024_16, swb_size_1024_8,
107 const int ff_aac_swb_size_128_len = FF_ARRAY_ELEMS(ff_aac_swb_size_128);
108 const int ff_aac_swb_size_1024_len = FF_ARRAY_ELEMS(ff_aac_swb_size_1024);