1cabdff1aSopenharmony_ci/* 2cabdff1aSopenharmony_ci * MPEG Audio common tables 3cabdff1aSopenharmony_ci * copyright (c) 2002 Fabrice Bellard 4cabdff1aSopenharmony_ci * 5cabdff1aSopenharmony_ci * This file is part of FFmpeg. 6cabdff1aSopenharmony_ci * 7cabdff1aSopenharmony_ci * FFmpeg is free software; you can redistribute it and/or 8cabdff1aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public 9cabdff1aSopenharmony_ci * License as published by the Free Software Foundation; either 10cabdff1aSopenharmony_ci * version 2.1 of the License, or (at your option) any later version. 11cabdff1aSopenharmony_ci * 12cabdff1aSopenharmony_ci * FFmpeg is distributed in the hope that it will be useful, 13cabdff1aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 14cabdff1aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15cabdff1aSopenharmony_ci * Lesser General Public License for more details. 16cabdff1aSopenharmony_ci * 17cabdff1aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public 18cabdff1aSopenharmony_ci * License along with FFmpeg; if not, write to the Free Software 19cabdff1aSopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20cabdff1aSopenharmony_ci */ 21cabdff1aSopenharmony_ci 22cabdff1aSopenharmony_ci/** 23cabdff1aSopenharmony_ci * @file 24cabdff1aSopenharmony_ci * mpeg audio layer common tables. 25cabdff1aSopenharmony_ci */ 26cabdff1aSopenharmony_ci 27cabdff1aSopenharmony_ci#ifndef AVCODEC_MPEGAUDIODATA_H 28cabdff1aSopenharmony_ci#define AVCODEC_MPEGAUDIODATA_H 29cabdff1aSopenharmony_ci 30cabdff1aSopenharmony_ci#include <stdint.h> 31cabdff1aSopenharmony_ci 32cabdff1aSopenharmony_ci#include "config.h" 33cabdff1aSopenharmony_ci 34cabdff1aSopenharmony_ci#include "vlc.h" 35cabdff1aSopenharmony_ci 36cabdff1aSopenharmony_ci#define MODE_EXT_MS_STEREO 2 37cabdff1aSopenharmony_ci#define MODE_EXT_I_STEREO 1 38cabdff1aSopenharmony_ci 39cabdff1aSopenharmony_ciextern const uint16_t ff_mpa_bitrate_tab[2][3][15]; 40cabdff1aSopenharmony_ciextern const uint16_t ff_mpa_freq_tab[3]; 41cabdff1aSopenharmony_ciextern const int ff_mpa_sblimit_table[5]; 42cabdff1aSopenharmony_ciextern const int ff_mpa_quant_steps[17]; 43cabdff1aSopenharmony_ciextern const int ff_mpa_quant_bits[17]; 44cabdff1aSopenharmony_ciextern const unsigned char * const ff_mpa_alloc_tables[5]; 45cabdff1aSopenharmony_ci 46cabdff1aSopenharmony_ci#define TABLE_4_3_SIZE ((8191 + 16)*4) 47cabdff1aSopenharmony_ci#if CONFIG_HARDCODED_TABLES 48cabdff1aSopenharmony_ciextern const int8_t ff_table_4_3_exp [TABLE_4_3_SIZE]; 49cabdff1aSopenharmony_ciextern const uint32_t ff_table_4_3_value[TABLE_4_3_SIZE]; 50cabdff1aSopenharmony_ci#else 51cabdff1aSopenharmony_ciextern int8_t ff_table_4_3_exp [TABLE_4_3_SIZE]; 52cabdff1aSopenharmony_ciextern uint32_t ff_table_4_3_value[TABLE_4_3_SIZE]; 53cabdff1aSopenharmony_ci#endif 54cabdff1aSopenharmony_ci 55cabdff1aSopenharmony_ci/* VLCs for decoding layer 3 huffman tables */ 56cabdff1aSopenharmony_ciextern VLC ff_huff_vlc[16]; 57cabdff1aSopenharmony_ciextern VLC ff_huff_quad_vlc[2]; 58cabdff1aSopenharmony_ci 59cabdff1aSopenharmony_ci/* layer3 scale factor size */ 60cabdff1aSopenharmony_ciextern const uint8_t ff_slen_table[2][16]; 61cabdff1aSopenharmony_ci/* number of lsf scale factors for a given size */ 62cabdff1aSopenharmony_ciextern const uint8_t ff_lsf_nsf_table[6][3][4]; 63cabdff1aSopenharmony_ciextern const uint8_t ff_mpa_huff_data[32][2]; 64cabdff1aSopenharmony_ci 65cabdff1aSopenharmony_ci/* band size tables */ 66cabdff1aSopenharmony_ciextern const uint8_t ff_band_size_long[9][22]; 67cabdff1aSopenharmony_ciextern const uint8_t ff_band_size_short[9][13]; 68cabdff1aSopenharmony_ci/* computed from ff_band_size_long */ 69cabdff1aSopenharmony_ciextern uint16_t ff_band_index_long[9][23]; 70cabdff1aSopenharmony_ci 71cabdff1aSopenharmony_ciextern int16_t *const ff_division_tabs[4]; 72cabdff1aSopenharmony_ci 73cabdff1aSopenharmony_ci/* lower 2 bits: modulo 3, higher bits: shift */ 74cabdff1aSopenharmony_ciextern uint16_t ff_scale_factor_modshift[64]; 75cabdff1aSopenharmony_ci 76cabdff1aSopenharmony_ciextern const uint8_t ff_mpa_pretab[2][22]; 77cabdff1aSopenharmony_ci 78cabdff1aSopenharmony_ci/* Initialize tables shared between the fixed and 79cabdff1aSopenharmony_ci * floating point MPEG audio decoders. */ 80cabdff1aSopenharmony_civoid ff_mpegaudiodec_common_init_static(void); 81cabdff1aSopenharmony_ci 82cabdff1aSopenharmony_ci#endif /* AVCODEC_MPEGAUDIODATA_H */ 83