1cabdff1aSopenharmony_ci/* 2cabdff1aSopenharmony_ci * AAC decoder data 3cabdff1aSopenharmony_ci * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org ) 4cabdff1aSopenharmony_ci * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com ) 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 * AAC decoder data 26cabdff1aSopenharmony_ci * @author Oded Shimon ( ods15 ods15 dyndns org ) 27cabdff1aSopenharmony_ci * @author Maxim Gavrilov ( maxim.gavrilov gmail com ) 28cabdff1aSopenharmony_ci */ 29cabdff1aSopenharmony_ci 30cabdff1aSopenharmony_ci#ifndef AVCODEC_AACDECTAB_H 31cabdff1aSopenharmony_ci#define AVCODEC_AACDECTAB_H 32cabdff1aSopenharmony_ci 33cabdff1aSopenharmony_ci#include "libavutil/channel_layout.h" 34cabdff1aSopenharmony_ci#include "aac.h" 35cabdff1aSopenharmony_ci 36cabdff1aSopenharmony_ci#include <stdint.h> 37cabdff1aSopenharmony_ci 38cabdff1aSopenharmony_cistatic const int8_t tags_per_config[16] = { 0, 1, 1, 2, 3, 3, 4, 5, 0, 0, 0, 5, 5, 16, 5, 0 }; 39cabdff1aSopenharmony_ci 40cabdff1aSopenharmony_cistatic const uint8_t aac_channel_layout_map[16][16][3] = { 41cabdff1aSopenharmony_ci { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, }, 42cabdff1aSopenharmony_ci { { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, }, 43cabdff1aSopenharmony_ci { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, }, 44cabdff1aSopenharmony_ci { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_SCE, 1, AAC_CHANNEL_BACK }, }, 45cabdff1aSopenharmony_ci { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_BACK }, }, 46cabdff1aSopenharmony_ci { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_BACK }, { TYPE_LFE, 0, AAC_CHANNEL_LFE }, }, 47cabdff1aSopenharmony_ci { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_FRONT }, { TYPE_CPE, 2, AAC_CHANNEL_BACK }, { TYPE_LFE, 0, AAC_CHANNEL_LFE }, }, 48cabdff1aSopenharmony_ci { { 0, } }, 49cabdff1aSopenharmony_ci { { 0, } }, 50cabdff1aSopenharmony_ci { { 0, } }, 51cabdff1aSopenharmony_ci { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_BACK }, { TYPE_SCE, 1, AAC_CHANNEL_BACK }, { TYPE_LFE, 0, AAC_CHANNEL_LFE }, }, 52cabdff1aSopenharmony_ci { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_SIDE }, { TYPE_CPE, 2, AAC_CHANNEL_BACK }, { TYPE_LFE, 0, AAC_CHANNEL_LFE }, }, 53cabdff1aSopenharmony_ci { 54cabdff1aSopenharmony_ci { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, // SCE1 = FC, 55cabdff1aSopenharmony_ci { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, // CPE1 = FLc and FRc, 56cabdff1aSopenharmony_ci { TYPE_CPE, 1, AAC_CHANNEL_FRONT }, // CPE2 = FL and FR, 57cabdff1aSopenharmony_ci { TYPE_CPE, 2, AAC_CHANNEL_SIDE }, // CPE3 = SiL and SiR, 58cabdff1aSopenharmony_ci { TYPE_CPE, 3, AAC_CHANNEL_BACK }, // CPE4 = BL and BR, 59cabdff1aSopenharmony_ci { TYPE_SCE, 1, AAC_CHANNEL_BACK }, // SCE2 = BC, 60cabdff1aSopenharmony_ci { TYPE_LFE, 0, AAC_CHANNEL_LFE }, // LFE1 = LFE1, 61cabdff1aSopenharmony_ci { TYPE_LFE, 1, AAC_CHANNEL_LFE }, // LFE2 = LFE2, 62cabdff1aSopenharmony_ci { TYPE_SCE, 2, AAC_CHANNEL_FRONT }, // SCE3 = TpFC, 63cabdff1aSopenharmony_ci { TYPE_CPE, 4, AAC_CHANNEL_FRONT }, // CPE5 = TpFL and TpFR, 64cabdff1aSopenharmony_ci { TYPE_CPE, 5, AAC_CHANNEL_SIDE }, // CPE6 = TpSiL and TpSiR, 65cabdff1aSopenharmony_ci { TYPE_SCE, 3, AAC_CHANNEL_FRONT }, // SCE4 = TpC, 66cabdff1aSopenharmony_ci { TYPE_CPE, 6, AAC_CHANNEL_BACK }, // CPE7 = TpBL and TpBR, 67cabdff1aSopenharmony_ci { TYPE_SCE, 4, AAC_CHANNEL_BACK }, // SCE5 = TpBC, 68cabdff1aSopenharmony_ci { TYPE_SCE, 5, AAC_CHANNEL_FRONT }, // SCE6 = BtFC, 69cabdff1aSopenharmony_ci { TYPE_CPE, 7, AAC_CHANNEL_FRONT }, // CPE8 = BtFL and BtFR 70cabdff1aSopenharmony_ci }, 71cabdff1aSopenharmony_ci { { 0, } }, 72cabdff1aSopenharmony_ci /* TODO: Add 7+1 TOP configuration */ 73cabdff1aSopenharmony_ci}; 74cabdff1aSopenharmony_ci 75cabdff1aSopenharmony_ci#if FF_API_OLD_CHANNEL_LAYOUT 76cabdff1aSopenharmony_cistatic const uint64_t aac_channel_layout[16] = { 77cabdff1aSopenharmony_ci AV_CH_LAYOUT_MONO, 78cabdff1aSopenharmony_ci AV_CH_LAYOUT_STEREO, 79cabdff1aSopenharmony_ci AV_CH_LAYOUT_SURROUND, 80cabdff1aSopenharmony_ci AV_CH_LAYOUT_4POINT0, 81cabdff1aSopenharmony_ci AV_CH_LAYOUT_5POINT0_BACK, 82cabdff1aSopenharmony_ci AV_CH_LAYOUT_5POINT1_BACK, 83cabdff1aSopenharmony_ci AV_CH_LAYOUT_7POINT1_WIDE_BACK, 84cabdff1aSopenharmony_ci 0, 85cabdff1aSopenharmony_ci 0, 86cabdff1aSopenharmony_ci 0, 87cabdff1aSopenharmony_ci AV_CH_LAYOUT_6POINT1_BACK, 88cabdff1aSopenharmony_ci AV_CH_LAYOUT_7POINT1, 89cabdff1aSopenharmony_ci AV_CH_LAYOUT_22POINT2, 90cabdff1aSopenharmony_ci 0, 91cabdff1aSopenharmony_ci /* AV_CH_LAYOUT_7POINT1_TOP, */ 92cabdff1aSopenharmony_ci}; 93cabdff1aSopenharmony_ci#endif 94cabdff1aSopenharmony_ci 95cabdff1aSopenharmony_cistatic const AVChannelLayout aac_ch_layout[16] = { 96cabdff1aSopenharmony_ci AV_CHANNEL_LAYOUT_MONO, 97cabdff1aSopenharmony_ci AV_CHANNEL_LAYOUT_STEREO, 98cabdff1aSopenharmony_ci AV_CHANNEL_LAYOUT_SURROUND, 99cabdff1aSopenharmony_ci AV_CHANNEL_LAYOUT_4POINT0, 100cabdff1aSopenharmony_ci AV_CHANNEL_LAYOUT_5POINT0_BACK, 101cabdff1aSopenharmony_ci AV_CHANNEL_LAYOUT_5POINT1_BACK, 102cabdff1aSopenharmony_ci AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK, 103cabdff1aSopenharmony_ci { 0 }, 104cabdff1aSopenharmony_ci { 0 }, 105cabdff1aSopenharmony_ci { 0 }, 106cabdff1aSopenharmony_ci AV_CHANNEL_LAYOUT_6POINT1_BACK, 107cabdff1aSopenharmony_ci AV_CHANNEL_LAYOUT_7POINT1, 108cabdff1aSopenharmony_ci AV_CHANNEL_LAYOUT_22POINT2, 109cabdff1aSopenharmony_ci { 0 }, 110cabdff1aSopenharmony_ci /* AV_CHANNEL_LAYOUT_7POINT1_TOP, */ 111cabdff1aSopenharmony_ci}; 112cabdff1aSopenharmony_ci 113cabdff1aSopenharmony_ci#endif /* AVCODEC_AACDECTAB_H */ 114