|
FFmpeg
|
AMR wideband data and definitions. More...
#include <stdint.h>#include <stddef.h>Go to the source code of this file.
Data Structures | |
| struct | AMRWBSubFrame |
| struct | AMRWBFrame |
Macros | |
| #define | LP_ORDER 16 |
| linear predictive coding filter order | |
| #define | LP_ORDER_16k 20 |
| lpc filter order at 16kHz | |
| #define | HB_FIR_SIZE 30 |
| amount of past data needed by HB filters | |
| #define | UPS_FIR_SIZE 12 |
| upsampling filter size | |
| #define | UPS_MEM_SIZE (2 * UPS_FIR_SIZE) |
| #define | MIN_ISF_SPACING (128.0 / 32768.0) |
| minimum isf gap | |
| #define | PRED_FACTOR (1.0 / 3.0) |
| #define | MIN_ENERGY -14.0 |
| initial innovation energy (dB) | |
| #define | ENERGY_MEAN 30.0 |
| mean innovation energy (dB) in all modes | |
| #define | PREEMPH_FAC 0.68 |
| factor used to de-emphasize synthesis | |
| #define | DTX_HIST_SIZE 8 |
| frames kept for comfort noise parameter averaging | |
| #define | DTX_MAX_EMPTY_THRESH 50 |
| frames without SID update before muting | |
| #define | DTX_ELAPSED_FRAMES_THRESH 30 |
| frames before a DTX hangover is assumed | |
| #define | DTX_HANG_CONST 7 |
| DTX hangover length in frames. | |
| #define | ISF_DITH_GAP (448.0 / 32768.0) |
| minimum ISF gap used by comfort noise dithering | |
| #define | ISF_DITH_FAC_LOW (256.0 / 32768.0) |
| lowest ISF dithering factor | |
| #define | ISF_DITH_FAC_STEP (2.0 / 32768.0) |
| ISF dithering factor increment. | |
| #define | CN_DITH_GAIN_FAC (150.0 / 512.0) |
| energy dithering factor | |
| #define | CN_LOG_EN_INIT (3500.0 / 512.0) |
| initial comfort noise log2 energy | |
| #define | CN_LOG_EN_HIST_INIT ((3500 >> 3) / 128.0) |
| initial value of the energy history | |
| #define | CN_LOG_EN_MUTE_STEP (1.0 / 8.0) |
| log2 energy decrease per muted frame (-3/8 dB) | |
| #define | CN_NOISE_SEED_INIT 21845 |
| initial seed of the comfort noise generator | |
| #define | AMRWB_SFR_SIZE 64 |
| samples per subframe at 12.8 kHz | |
| #define | AMRWB_SFR_SIZE_16k 80 |
| samples per subframe at 16 kHz | |
| #define | AMRWB_P_DELAY_MAX 231 |
| maximum pitch delay value | |
| #define | AMRWB_P_DELAY_MIN 34 |
| #define | AMR_BIT(field) |
| The index of a frame parameter. | |
| #define | AMR_OF(frame_num, variable) |
| The index of a subframe-specific parameter. | |
Enumerations | |
| enum | Mode { MODE_6k60 = 0 , MODE_8k85 , MODE_12k65 , MODE_14k25 , MODE_15k85 , MODE_18k25 , MODE_19k85 , MODE_23k05 , MODE_23k85 , MODE_SID , SP_LOST = 14 , NO_DATA } |
Variables | |
| static const uint16_t | order_MODE_6k60 [] |
| static const uint16_t | order_MODE_8k85 [] |
| static const uint16_t | order_MODE_12k65 [] |
| static const uint16_t | order_MODE_14k25 [] |
| static const uint16_t | order_MODE_15k85 [] |
| static const uint16_t | order_MODE_18k25 [] |
| static const uint16_t | order_MODE_19k85 [] |
| static const uint16_t | order_MODE_23k05 [] |
| static const uint16_t | order_MODE_23k85 [] |
| static const uint16_t *const | amr_bit_orderings_by_mode [] |
| Reordering array addresses for each mode. | |
| static const int16_t | dico1_isf [256][9] |
| Indexed tables for retrieval of quantized ISF vectors in Q15. | |
| static const int16_t | dico2_isf [256][7] |
| static const int16_t | dico21_isf [64][3] |
| static const int16_t | dico22_isf [128][3] |
| static const int16_t | dico23_isf [128][3] |
| static const int16_t | dico24_isf [32][3] |
| static const int16_t | dico25_isf [32][4] |
| static const int16_t | dico21_isf_36b [128][5] |
| static const int16_t | dico22_isf_36b [128][4] |
| static const int16_t | dico23_isf_36b [64][7] |
| static const int16_t | isf_mean [LP_ORDER] |
| Means of ISF vectors in Q15. | |
| static const int16_t | isf_init [LP_ORDER] |
| Initialization tables for the processed ISF vector in Q15. | |
| static const int16_t | mean_isf_noise [16] |
| Means of ISF vectors for background noise in Q15. | |
| static const int16_t | dico1_isf_noise [64][2] |
| Indexed tables for retrieval of quantized background noise ISF vectors in Q15 (split-by-5 VQ: 2+3+3+4+4 entries per set of indices) | |
| static const int16_t | dico2_isf_noise [64][3] |
| static const int16_t | dico3_isf_noise [64][3] |
| static const int16_t | dico4_isf_noise [32][4] |
| static const int16_t | dico5_isf_noise [32][4] |
| static const float | isfp_inter [4] = { 0.45, 0.8, 0.96, 1.0 } |
| ISF/ISP interpolation coefficients for each subframe. | |
| static const float | ac_inter [65] |
| Coefficients for FIR interpolation of excitation vector at pitch lag resulting the adaptive codebook vector. | |
| static const uint8_t | pulses_nb_per_mode_tr [][4] |
| [i][j] is the number of pulses present in track j at mode i | |
| static const int16_t | qua_gain_6b [64][2] |
| Tables for decoding quantized gains { pitch (Q14), fixed factor (Q11) }. | |
| static const int16_t | qua_gain_7b [128][2] |
| static const float | energy_pred_fac [4] = { 0.2, 0.3, 0.4, 0.5 } |
| 4-tap moving average prediction coefficients in reverse order | |
| static const float | ir_filter_str [64] |
| impulse response filter tables converted to float from Q15 used for anti-sparseness processing | |
| static const float | ir_filter_mid [64] |
| static const float *const | ir_filters_lookup [2] |
| static const float | hpf_zeros [2] = { -2.0, 1.0 } |
| High-pass filters coefficients for 31 Hz and 400 Hz cutoff. | |
| static const float | hpf_31_poles [2] = { -1.978881836, 0.979125977 } |
| static const float | hpf_31_gain = 0.989501953 |
| static const float | hpf_400_poles [2] = { -1.787109375, 0.864257812 } |
| static const float | hpf_400_gain = 0.893554687 |
| static const float | upsample_fir [4][24] |
| Interpolation coefficients for 5/4 signal upsampling Table from the reference source was reordered for efficiency. | |
| static const uint16_t | qua_hb_gain [16] |
| High band quantized gains for 23k85 in Q14. | |
| static const float | bpf_6_7_coef [31] |
| High-band post-processing FIR filters coefficients from Q15. | |
| static const float | lpf_7_coef [31] |
| static const uint16_t | cf_sizes_wb [] |
| Core frame sizes in each mode. | |
AMR wideband data and definitions.
Definition in file amrwbdata.h.
| #define LP_ORDER 16 |
linear predictive coding filter order
Definition at line 33 of file amrwbdata.h.
Referenced by amrwb_decode_frame(), amrwb_decode_init(), auto_correlation(), cn_dithering(), cn_frame(), decode_isf_noise(), decode_pitch_vector(), dtx_activity_update(), dtx_dec(), extrapolate_isf(), hb_synthesis(), interpolate_isp(), isf_add_mean_and_past(), stability_factor(), subframe_output(), synthesis(), and update_sub_state().
| #define LP_ORDER_16k 20 |
lpc filter order at 16kHz
Definition at line 34 of file amrwbdata.h.
Referenced by extrapolate_isf(), hb_synthesis(), subframe_output(), and update_sub_state().
| #define HB_FIR_SIZE 30 |
amount of past data needed by HB filters
Definition at line 35 of file amrwbdata.h.
Referenced by hb_fir_filter().
| #define UPS_FIR_SIZE 12 |
upsampling filter size
Definition at line 36 of file amrwbdata.h.
Referenced by subframe_output(), and upsample_5_4().
| #define UPS_MEM_SIZE (2 * UPS_FIR_SIZE) |
Definition at line 37 of file amrwbdata.h.
Referenced by subframe_output(), update_sub_state(), and upsample_5_4().
| #define MIN_ISF_SPACING (128.0 / 32768.0) |
minimum isf gap
Definition at line 39 of file amrwbdata.h.
Referenced by amrwb_decode_frame(), cn_dithering(), cn_frame(), and decode_isf_noise().
| #define PRED_FACTOR (1.0 / 3.0) |
Definition at line 40 of file amrwbdata.h.
Referenced by isf_add_mean_and_past().
| #define MIN_ENERGY -14.0 |
initial innovation energy (dB)
Definition at line 41 of file amrwbdata.h.
| #define ENERGY_MEAN 30.0 |
mean innovation energy (dB) in all modes
Definition at line 42 of file amrwbdata.h.
Referenced by amrwb_decode_frame().
| #define PREEMPH_FAC 0.68 |
factor used to de-emphasize synthesis
Definition at line 43 of file amrwbdata.h.
Referenced by subframe_output().
| #define DTX_HIST_SIZE 8 |
frames kept for comfort noise parameter averaging
Definition at line 46 of file amrwbdata.h.
| #define DTX_MAX_EMPTY_THRESH 50 |
frames without SID update before muting
Definition at line 47 of file amrwbdata.h.
| #define DTX_ELAPSED_FRAMES_THRESH 30 |
frames before a DTX hangover is assumed
Definition at line 48 of file amrwbdata.h.
| #define DTX_HANG_CONST 7 |
DTX hangover length in frames.
Definition at line 49 of file amrwbdata.h.
| #define ISF_DITH_GAP (448.0 / 32768.0) |
minimum ISF gap used by comfort noise dithering
Definition at line 50 of file amrwbdata.h.
Referenced by cn_dithering().
| #define ISF_DITH_FAC_LOW (256.0 / 32768.0) |
lowest ISF dithering factor
Definition at line 51 of file amrwbdata.h.
Referenced by cn_dithering().
| #define ISF_DITH_FAC_STEP (2.0 / 32768.0) |
ISF dithering factor increment.
Definition at line 52 of file amrwbdata.h.
Referenced by cn_dithering().
| #define CN_DITH_GAIN_FAC (150.0 / 512.0) |
| #define CN_LOG_EN_INIT (3500.0 / 512.0) |
initial comfort noise log2 energy
Definition at line 54 of file amrwbdata.h.
Referenced by amrwb_decode_init().
| #define CN_LOG_EN_HIST_INIT ((3500 >> 3) / 128.0) |
initial value of the energy history
Definition at line 55 of file amrwbdata.h.
Referenced by amrwb_decode_init().
| #define CN_LOG_EN_MUTE_STEP (1.0 / 8.0) |
log2 energy decrease per muted frame (-3/8 dB)
Definition at line 56 of file amrwbdata.h.
Referenced by dtx_dec().
| #define CN_NOISE_SEED_INIT 21845 |
initial seed of the comfort noise generator
Definition at line 57 of file amrwbdata.h.
Referenced by amrwb_decode_init().
| #define AMRWB_SFR_SIZE 64 |
samples per subframe at 12.8 kHz
Definition at line 59 of file amrwbdata.h.
Referenced by amrwb_decode_frame(), anti_sparseness(), cn_frame(), de_emphasis(), decode_fixed_vector(), decode_pitch_vector(), dtx_activity_update(), dtx_dec(), find_hb_gain(), pitch_enhancer(), pitch_sharpening(), scaled_hb_excitation(), subframe_output(), synthesis(), update_sub_state(), and voice_factor().
| #define AMRWB_SFR_SIZE_16k 80 |
samples per subframe at 16 kHz
Definition at line 60 of file amrwbdata.h.
Referenced by amrwb_decode_frame(), cn_frame(), hb_fir_filter(), hb_synthesis(), scaled_hb_excitation(), subframe_output(), and update_sub_state().
| #define AMRWB_P_DELAY_MAX 231 |
maximum pitch delay value
Definition at line 61 of file amrwbdata.h.
Referenced by amrwb_decode_init(), decode_pitch_lag_high(), decode_pitch_lag_low(), and update_sub_state().
| #define AMRWB_P_DELAY_MIN 34 |
Definition at line 62 of file amrwbdata.h.
Referenced by decode_pitch_lag_high(), and decode_pitch_lag_low().
| #define AMR_BIT | ( | field | ) |
The index of a frame parameter.
Definition at line 99 of file amrwbdata.h.
| #define AMR_OF | ( | frame_num, | |
| variable ) |
The index of a subframe-specific parameter.
Definition at line 101 of file amrwbdata.h.
| enum Mode |
Definition at line 65 of file amrwbdata.h.
|
static |
Definition at line 113 of file amrwbdata.h.
|
static |
Definition at line 139 of file amrwbdata.h.
|
static |
Definition at line 175 of file amrwbdata.h.
|
static |
Definition at line 233 of file amrwbdata.h.
|
static |
Definition at line 291 of file amrwbdata.h.
|
static |
Definition at line 349 of file amrwbdata.h.
|
static |
Definition at line 423 of file amrwbdata.h.
|
static |
Definition at line 505 of file amrwbdata.h.
|
static |
Definition at line 595 of file amrwbdata.h.
|
static |
Reordering array addresses for each mode.
Definition at line 690 of file amrwbdata.h.
Referenced by amrwb_decode_frame().
|
static |
Indexed tables for retrieval of quantized ISF vectors in Q15.
Definition at line 706 of file amrwbdata.h.
Referenced by decode_isf_indices_36b(), and decode_isf_indices_46b().
|
static |
Definition at line 965 of file amrwbdata.h.
Referenced by decode_isf_indices_36b(), and decode_isf_indices_46b().
|
static |
Definition at line 1224 of file amrwbdata.h.
Referenced by decode_isf_indices_46b().
|
static |
Definition at line 1259 of file amrwbdata.h.
Referenced by decode_isf_indices_46b().
|
static |
Definition at line 1326 of file amrwbdata.h.
Referenced by decode_isf_indices_46b().
|
static |
Definition at line 1393 of file amrwbdata.h.
Referenced by decode_isf_indices_46b().
|
static |
Definition at line 1412 of file amrwbdata.h.
Referenced by decode_isf_indices_46b().
|
static |
Definition at line 1431 of file amrwbdata.h.
Referenced by decode_isf_indices_36b().
|
static |
Definition at line 1498 of file amrwbdata.h.
Referenced by decode_isf_indices_36b().
|
static |
Definition at line 1565 of file amrwbdata.h.
Referenced by decode_isf_indices_36b().
|
static |
Means of ISF vectors in Q15.
Definition at line 1633 of file amrwbdata.h.
Referenced by isf_add_mean_and_past().
|
static |
Initialization tables for the processed ISF vector in Q15.
Definition at line 1639 of file amrwbdata.h.
Referenced by amrwb_decode_init().
|
static |
Means of ISF vectors for background noise in Q15.
Definition at line 1649 of file amrwbdata.h.
Referenced by decode_isf_noise().
|
static |
Indexed tables for retrieval of quantized background noise ISF vectors in Q15 (split-by-5 VQ: 2+3+3+4+4 entries per set of indices)
Definition at line 1659 of file amrwbdata.h.
Referenced by decode_isf_noise().
|
static |
Definition at line 1726 of file amrwbdata.h.
Referenced by decode_isf_noise().
|
static |
Definition at line 1793 of file amrwbdata.h.
Referenced by decode_isf_noise().
|
static |
Definition at line 1860 of file amrwbdata.h.
Referenced by decode_isf_noise().
|
static |
Definition at line 1895 of file amrwbdata.h.
Referenced by decode_isf_noise().
|
static |
ISF/ISP interpolation coefficients for each subframe.
Definition at line 1931 of file amrwbdata.h.
Referenced by hb_synthesis(), and interpolate_isp().
|
static |
Coefficients for FIR interpolation of excitation vector at pitch lag resulting the adaptive codebook vector.
Definition at line 1935 of file amrwbdata.h.
Referenced by decode_pitch_vector().
|
static |
[i][j] is the number of pulses present in track j at mode i
Definition at line 1956 of file amrwbdata.h.
Referenced by decode_fixed_vector().
|
static |
Tables for decoding quantized gains { pitch (Q14), fixed factor (Q11) }.
Definition at line 1963 of file amrwbdata.h.
Referenced by decode_gains().
|
static |
Definition at line 1998 of file amrwbdata.h.
Referenced by decode_gains().
|
static |
4-tap moving average prediction coefficients in reverse order
Definition at line 2066 of file amrwbdata.h.
|
static |
impulse response filter tables converted to float from Q15 used for anti-sparseness processing
Definition at line 2070 of file amrwbdata.h.
|
static |
Definition at line 2089 of file amrwbdata.h.
|
static |
Definition at line 2108 of file amrwbdata.h.
|
static |
High-pass filters coefficients for 31 Hz and 400 Hz cutoff.
Definition at line 2113 of file amrwbdata.h.
Referenced by subframe_output().
|
static |
Definition at line 2114 of file amrwbdata.h.
Referenced by subframe_output().
|
static |
Definition at line 2115 of file amrwbdata.h.
Referenced by subframe_output().
|
static |
Definition at line 2117 of file amrwbdata.h.
Referenced by subframe_output().
|
static |
Definition at line 2118 of file amrwbdata.h.
Referenced by subframe_output().
|
static |
Interpolation coefficients for 5/4 signal upsampling Table from the reference source was reordered for efficiency.
Definition at line 2122 of file amrwbdata.h.
Referenced by upsample_5_4().
|
static |
High band quantized gains for 23k85 in Q14.
Definition at line 2150 of file amrwbdata.h.
Referenced by find_hb_gain().
|
static |
High-band post-processing FIR filters coefficients from Q15.
Definition at line 2156 of file amrwbdata.h.
Referenced by subframe_output().
|
static |
Definition at line 2170 of file amrwbdata.h.
Referenced by subframe_output().
|
static |
Core frame sizes in each mode.
Definition at line 2185 of file amrwbdata.h.
Referenced by amrwb_decode_frame().