| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Common code between the AC-3 and E-AC-3 decoders | 2 * Common code between the AC-3 and E-AC-3 decoders |
| 3 * Copyright (c) 2007 Bartlomiej Wolowiec <bartek.wolowiec@gmail.com> | 3 * Copyright (c) 2007 Bartlomiej Wolowiec <bartek.wolowiec@gmail.com> |
| 4 * | 4 * |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * Common code between the AC-3 and E-AC-3 decoders. | 24 * Common code between the AC-3 and E-AC-3 decoders. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #ifndef AVCODEC_AC3DEC_H | 27 #ifndef AVCODEC_AC3DEC_H |
| 28 #define AVCODEC_AC3DEC_H | 28 #define AVCODEC_AC3DEC_H |
| 29 | 29 |
| 30 #include "libavutil/lfg.h" | 30 #include "libavutil/lfg.h" |
| 31 #include "ac3.h" | 31 #include "ac3.h" |
| 32 #include "get_bits.h" | 32 #include "get_bits.h" |
| 33 #include "dsputil.h" | 33 #include "dsputil.h" |
| 34 #include "fft.h" |
| 34 | 35 |
| 35 /* override ac3.h to include coupling channel */ | 36 /* override ac3.h to include coupling channel */ |
| 36 #undef AC3_MAX_CHANNELS | 37 #undef AC3_MAX_CHANNELS |
| 37 #define AC3_MAX_CHANNELS 7 | 38 #define AC3_MAX_CHANNELS 7 |
| 38 #define CPL_CH 0 | 39 #define CPL_CH 0 |
| 39 | 40 |
| 40 #define AC3_OUTPUT_LFEON 8 | 41 #define AC3_OUTPUT_LFEON 8 |
| 41 | 42 |
| 42 #define AC3_MAX_COEFS 256 | 43 #define AC3_MAX_COEFS 256 |
| 43 #define AC3_BLOCK_SIZE 256 | 44 #define AC3_BLOCK_SIZE 256 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 FFTContext imdct_256; ///< for 256 sample IMDCT | 151 FFTContext imdct_256; ///< for 256 sample IMDCT |
| 151 ///@} | 152 ///@} |
| 152 | 153 |
| 153 ///@defgroup opt optimization | 154 ///@defgroup opt optimization |
| 154 DSPContext dsp; ///< for optimization | 155 DSPContext dsp; ///< for optimization |
| 155 float add_bias; ///< offset for float_to_int16 conve
rsion | 156 float add_bias; ///< offset for float_to_int16 conve
rsion |
| 156 float mul_bias; ///< scaling for float_to_int16 conv
ersion | 157 float mul_bias; ///< scaling for float_to_int16 conv
ersion |
| 157 ///@} | 158 ///@} |
| 158 | 159 |
| 159 ///@defgroup arrays aligned arrays | 160 ///@defgroup arrays aligned arrays |
| 160 DECLARE_ALIGNED_16(int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS];
///> fixed-point transform coefficients | 161 DECLARE_ALIGNED(16, int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS];
///> fixed-point transform coefficients |
| 161 DECLARE_ALIGNED_16(float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]
; ///< transform coefficients | 162 DECLARE_ALIGNED(16, float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS
]; ///< transform coefficients |
| 162 DECLARE_ALIGNED_16(float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE];
///< delay - added to the next block | 163 DECLARE_ALIGNED(16, float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE];
///< delay - added to the next block |
| 163 DECLARE_ALIGNED_16(float, window)[AC3_BLOCK_SIZE];
///< window coefficients | 164 DECLARE_ALIGNED(16, float, window)[AC3_BLOCK_SIZE];
///< window coefficients |
| 164 DECLARE_ALIGNED_16(float, tmp_output)[AC3_BLOCK_SIZE];
///< temporary storage for output before windowing | 165 DECLARE_ALIGNED(16, float, tmp_output)[AC3_BLOCK_SIZE];
///< temporary storage for output before windowing |
| 165 DECLARE_ALIGNED_16(float, output)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE];
///< output after imdct transform and windowing | 166 DECLARE_ALIGNED(16, float, output)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE];
///< output after imdct transform and windowing |
| 166 ///@} | 167 ///@} |
| 167 } AC3DecodeContext; | 168 } AC3DecodeContext; |
| 168 | 169 |
| 169 /** | 170 /** |
| 170 * Parse the E-AC-3 frame header. | 171 * Parse the E-AC-3 frame header. |
| 171 * This parses both the bit stream info and audio frame header. | 172 * This parses both the bit stream info and audio frame header. |
| 172 */ | 173 */ |
| 173 int ff_eac3_parse_header(AC3DecodeContext *s); | 174 int ff_eac3_parse_header(AC3DecodeContext *s); |
| 174 | 175 |
| 175 /** | 176 /** |
| 176 * Decode mantissas in a single channel for the entire frame. | 177 * Decode mantissas in a single channel for the entire frame. |
| 177 * This is used when AHT mode is enabled. | 178 * This is used when AHT mode is enabled. |
| 178 */ | 179 */ |
| 179 void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch); | 180 void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch); |
| 180 | 181 |
| 182 void ff_ac3_downmix_c(float (*samples)[256], float (*matrix)[2], |
| 183 int out_ch, int in_ch, int len); |
| 184 |
| 181 #endif /* AVCODEC_AC3DEC_H */ | 185 #endif /* AVCODEC_AC3DEC_H */ |
| OLD | NEW |