00001 /* 00002 * AC-3 tables 00003 * Copyright (c) 2000, 2001, 2002 Fabrice Bellard 00004 * 00005 * This file is part of FFmpeg. 00006 * 00007 * FFmpeg is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * FFmpeg is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with FFmpeg; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00020 */ 00021 00022 #ifndef AVCODEC_AC3TAB_H 00023 #define AVCODEC_AC3TAB_H 00024 00025 #include "libavutil/common.h" 00026 #include "ac3.h" 00027 00028 #if CONFIG_HARDCODED_TABLES 00029 # define HCONST const 00030 #else 00031 # define HCONST 00032 #endif 00033 00034 extern const uint16_t ff_ac3_frame_size_tab[38][3]; 00035 extern const uint8_t ff_ac3_channels_tab[8]; 00036 extern const uint16_t avpriv_ac3_channel_layout_tab[8]; 00037 extern const uint8_t ff_ac3_enc_channel_map[8][2][6]; 00038 extern const uint8_t ff_ac3_dec_channel_map[8][2][6]; 00039 extern const uint16_t ff_ac3_sample_rate_tab[3]; 00040 extern const uint16_t ff_ac3_bitrate_tab[19]; 00041 extern const uint8_t ff_ac3_rematrix_band_tab[5]; 00042 extern const uint8_t ff_eac3_default_cpl_band_struct[18]; 00043 extern const int16_t ff_ac3_window[AC3_WINDOW_SIZE/2]; 00044 extern const uint8_t ff_ac3_log_add_tab[260]; 00045 extern const uint16_t ff_ac3_hearing_threshold_tab[AC3_CRITICAL_BANDS][3]; 00046 extern const uint8_t ff_ac3_bap_tab[64]; 00047 extern const uint8_t ff_ac3_slow_decay_tab[4]; 00048 extern const uint8_t ff_ac3_fast_decay_tab[4]; 00049 extern const uint16_t ff_ac3_slow_gain_tab[4]; 00050 extern const uint16_t ff_ac3_db_per_bit_tab[4]; 00051 extern const int16_t ff_ac3_floor_tab[8]; 00052 extern const uint16_t ff_ac3_fast_gain_tab[8]; 00053 extern const uint16_t ff_eac3_default_chmap[8]; 00054 extern const uint8_t ff_ac3_band_start_tab[AC3_CRITICAL_BANDS+1]; 00055 extern HCONST uint8_t ff_ac3_bin_to_band_tab[253]; 00056 00062 enum CustomChannelMapLocation{ 00063 AC3_CHMAP_L= 1<<(15-0), 00064 AC3_CHMAP_C= 1<<(15-1), 00065 AC3_CHMAP_R= 1<<(15-2), 00066 AC3_CHMAP_L_SUR= 1<<(15-3), 00067 AC3_CHMAP_R_SUR = 1<<(15-4), 00068 AC3_CHMAP_C_SUR= 1<<(15-7), 00069 AC3_CHMAP_LFE = 1<<(15-15) 00070 }; 00071 00072 #endif /* AVCODEC_AC3TAB_H */