mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-02 03:06:28 +02:00
c47c781e83
This commit moves any tables specific to the encoder from aacenc and aaccoder to a separate file called 'aacenctab.c/.h'. This was done as a clean up attempt as the encoder was filled with tables pasted in between functions which made it confusing to follow and track where each table and definition had been used. This commit solves this by simply exporting the smaller tables out to the aacenctab.h while the larger ones are compiled using aacenctab.c and are referenced from the header file. Signed-off-by: Claudio Freire <klaussfreire@gmail.com>
109 lines
3.7 KiB
C
109 lines
3.7 KiB
C
/*
|
|
* AAC encoder data
|
|
* Copyright (c) 2015 Rostislav Pehlivanov ( atomnuker gmail com )
|
|
*
|
|
* This file is part of FFmpeg.
|
|
*
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#include "aacenctab.h"
|
|
|
|
static const uint8_t swb_size_128_96[] = {
|
|
4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36
|
|
};
|
|
|
|
static const uint8_t swb_size_128_64[] = {
|
|
4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 36
|
|
};
|
|
|
|
static const uint8_t swb_size_128_48[] = {
|
|
4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16
|
|
};
|
|
|
|
static const uint8_t swb_size_128_24[] = {
|
|
4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 20
|
|
};
|
|
|
|
static const uint8_t swb_size_128_16[] = {
|
|
4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 20
|
|
};
|
|
|
|
static const uint8_t swb_size_128_8[] = {
|
|
4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 12, 16, 20, 20
|
|
};
|
|
|
|
static const uint8_t swb_size_1024_96[] = {
|
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8,
|
|
12, 12, 12, 12, 12, 16, 16, 24, 28, 36, 44,
|
|
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
|
|
};
|
|
|
|
static const uint8_t swb_size_1024_64[] = {
|
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8,
|
|
12, 12, 12, 16, 16, 16, 20, 24, 24, 28, 36,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40
|
|
};
|
|
|
|
static const uint8_t swb_size_1024_48[] = {
|
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8,
|
|
12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28,
|
|
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
|
96
|
|
};
|
|
|
|
static const uint8_t swb_size_1024_32[] = {
|
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8,
|
|
12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28, 28,
|
|
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32
|
|
};
|
|
|
|
static const uint8_t swb_size_1024_24[] = {
|
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
|
12, 12, 12, 12, 16, 16, 16, 20, 20, 24, 24, 28, 28,
|
|
32, 36, 36, 40, 44, 48, 52, 52, 64, 64, 64, 64, 64
|
|
};
|
|
|
|
static const uint8_t swb_size_1024_16[] = {
|
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
|
12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 20, 20, 20, 24, 24, 28, 28,
|
|
32, 36, 40, 40, 44, 48, 52, 56, 60, 64, 64, 64
|
|
};
|
|
|
|
static const uint8_t swb_size_1024_8[] = {
|
|
12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
|
|
16, 16, 16, 16, 16, 16, 16, 20, 20, 20, 20, 24, 24, 24, 28, 28,
|
|
32, 36, 36, 40, 44, 48, 52, 56, 60, 64, 80
|
|
};
|
|
|
|
const uint8_t *swb_size_128[] = {
|
|
swb_size_128_96, swb_size_128_96, swb_size_128_64,
|
|
swb_size_128_48, swb_size_128_48, swb_size_128_48,
|
|
swb_size_128_24, swb_size_128_24, swb_size_128_16,
|
|
swb_size_128_16, swb_size_128_16, swb_size_128_8,
|
|
swb_size_128_8
|
|
};
|
|
|
|
const uint8_t *swb_size_1024[] = {
|
|
swb_size_1024_96, swb_size_1024_96, swb_size_1024_64,
|
|
swb_size_1024_48, swb_size_1024_48, swb_size_1024_32,
|
|
swb_size_1024_24, swb_size_1024_24, swb_size_1024_16,
|
|
swb_size_1024_16, swb_size_1024_16, swb_size_1024_8,
|
|
swb_size_1024_8
|
|
};
|
|
|
|
const int swb_size_128_len = sizeof(swb_size_128)/sizeof(*swb_size_128);
|
|
const int swb_size_1024_len = sizeof(swb_size_1024)/sizeof(*swb_size_1024);
|