|
FFmpeg
|
#include "config_components.h"#include <stdio.h>#include <stddef.h>#include <math.h>#include <string.h>#include "libavutil/channel_layout.h"#include "libavutil/crc.h"#include "libavutil/downmix_info.h"#include "libavutil/intmath.h"#include "libavutil/mem.h"#include "libavutil/opt.h"#include "libavutil/thread.h"#include "bswapdsp.h"#include "ac3_parser_internal.h"#include "ac3dec.h"#include "ac3dec_data.h"#include "ac3defs.h"#include "decode.h"#include "kbdwin.h"Go to the source code of this file.
Data Structures | |
| struct | mant_groups |
| Grouped mantissas for 3-level 5-level and 11-level quantization. More... | |
Functions | |
| static av_cold void | ac3_float_tables_init (void) |
| static void | ac3_downmix (AVCodecContext *avctx) |
| static av_cold int | ac3_decode_init (AVCodecContext *avctx) |
| AVCodec initialization. More... | |
| static av_cold void | ac3_decode_flush (AVCodecContext *avctx) |
| static int | parse_frame_header (AC3DecodeContext *s) |
| Common function to parse AC-3 or E-AC-3 frame header. More... | |
| static int | set_downmix_coeffs (AC3DecodeContext *s) |
| Set stereo downmixing coefficients based on frame header info. More... | |
| static int | decode_exponents (AC3DecodeContext *s, GetBitContext *gbc, int exp_strategy, int ngrps, uint8_t absexp, int8_t *dexps) |
| Decode the grouped exponents according to exponent strategy. More... | |
| static void | calc_transform_coeffs_cpl (AC3DecodeContext *s) |
| Generate transform coefficients for each coupled channel in the coupling range using the coupling coefficients and coupling coordinates. More... | |
| static void | ac3_decode_transform_coeffs_ch (AC3DecodeContext *s, int ch_index, mant_groups *m) |
| Decode the transform coefficients for a particular channel reference: Section 7.3 Quantization and Decoding of Mantissas. More... | |
| static void | remove_dithering (AC3DecodeContext *s) |
| Remove random dithering from coupling range coefficients with zero-bit mantissas for coupled channels which do not use dithering. More... | |
| static void | decode_transform_coeffs_ch (AC3DecodeContext *s, int blk, int ch, mant_groups *m) |
| static void | decode_transform_coeffs (AC3DecodeContext *s, int blk) |
| Decode the transform coefficients. More... | |
| static void | do_rematrixing (AC3DecodeContext *s) |
| Stereo rematrixing. More... | |
| static void | do_imdct (AC3DecodeContext *s, int channels, int offset) |
| Inverse MDCT Transform. More... | |
| static void | ac3_upmix_delay (AC3DecodeContext *s) |
| Upmix delay samples from stereo to original channel layout. More... | |
| static void | decode_band_structure (GetBitContext *gbc, int blk, int eac3, int ecpl, int start_subband, int end_subband, const uint8_t *default_band_struct, int *num_bands, uint8_t *band_sizes, uint8_t *band_struct, int band_struct_size) |
| Decode band structure for coupling, spectral extension, or enhanced coupling. More... | |
| static int | spx_strategy (AC3DecodeContext *s, int blk) |
| static void | spx_coordinates (AC3DecodeContext *s) |
| static int | coupling_strategy (AC3DecodeContext *s, int blk, uint8_t *bit_alloc_stages) |
| static int | coupling_coordinates (AC3DecodeContext *s, int blk) |
| static int | decode_audio_block (AC3DecodeContext *s, int blk, int offset) |
| Decode a single audio block from the AC-3 bitstream. More... | |
| static int | ac3_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt) |
| Decode a single AC-3 frame. More... | |
| static av_cold int | ac3_decode_end (AVCodecContext *avctx) |
| Uninitialize the AC-3 decoder. More... | |
Variables | |
| static float | dynamic_range_tab [256] |
| dynamic range table. More... | |
| float | ff_ac3_heavy_dynamic_range_tab [256] |
|
static |
Definition at line 57 of file ac3dec.c.
Referenced by ac3_decode_init().
|
static |
Definition at line 76 of file ac3dec.c.
Referenced by ac3_decode_frame(), and ac3_decode_init().
|
static |
|
static |
|
static |
Common function to parse AC-3 or E-AC-3 frame header.
Definition at line 162 of file ac3dec.c.
Referenced by ac3_decode_frame().
|
static |
Set stereo downmixing coefficients based on frame header info.
reference: Section 7.8.2 Downmixing Into Two Channels
Definition at line 247 of file ac3dec.c.
Referenced by ac3_decode_frame().
|
static |
Decode the grouped exponents according to exponent strategy.
reference: Section 7.1.3 Exponent Decoding
Definition at line 309 of file ac3dec.c.
Referenced by decode_audio_block().
|
static |
Generate transform coefficients for each coupled channel in the coupling range using the coupling coefficients and coupling coordinates.
reference: Section 7.4.3 Coupling Coordinate Format
Definition at line 353 of file ac3dec.c.
Referenced by decode_transform_coeffs().
|
static |
Decode the transform coefficients for a particular channel reference: Section 7.3 Quantization and Decoding of Mantissas.
Definition at line 394 of file ac3dec.c.
Referenced by decode_transform_coeffs_ch().
|
static |
Remove random dithering from coupling range coefficients with zero-bit mantissas for coupled channels which do not use dithering.
reference: Section 7.3.4 Dither for Zero Bit Mantissas (bap=0)
Definition at line 475 of file ac3dec.c.
Referenced by decode_transform_coeffs().
|
inlinestatic |
Definition at line 488 of file ac3dec.c.
Referenced by decode_transform_coeffs().
|
inlinestatic |
Decode the transform coefficients.
Definition at line 508 of file ac3dec.c.
Referenced by decode_audio_block().
|
static |
Stereo rematrixing.
reference: Section 7.5.4 Rematrixing : Decoding Technique
Definition at line 544 of file ac3dec.c.
Referenced by decode_audio_block().
|
inlinestatic |
Inverse MDCT Transform.
Convert frequency domain coefficients to time-domain audio samples. reference: Section 7.9.4 Transformation Equations
Definition at line 568 of file ac3dec.c.
Referenced by decode_audio_block().
|
static |
Upmix delay samples from stereo to original channel layout.
Definition at line 606 of file ac3dec.c.
Referenced by decode_audio_block().
|
static |
Decode band structure for coupling, spectral extension, or enhanced coupling.
The band structure defines how many subbands are in each band. For each subband in the range, 1 means it is combined with the previous band, and 0 means that it starts a new band.
| [in] | gbc | bit reader context |
| [in] | blk | block number |
| [in] | eac3 | flag to indicate E-AC-3 |
| [in] | ecpl | flag to indicate enhanced coupling |
| [in] | start_subband | subband number for start of range |
| [in] | end_subband | subband number for end of range |
| [in] | default_band_struct | default band structure table |
| [out] | num_bands | number of bands (optionally NULL) |
| [out] | band_sizes | array containing the number of bins in each band (optionally NULL) |
| [in,out] | band_struct | current band structure |
Definition at line 648 of file ac3dec.c.
Referenced by coupling_strategy(), and spx_strategy().
|
inlinestatic |
Definition at line 697 of file ac3dec.c.
Referenced by decode_audio_block().
|
inlinestatic |
Definition at line 756 of file ac3dec.c.
Referenced by decode_audio_block().
|
inlinestatic |
Definition at line 834 of file ac3dec.c.
Referenced by decode_audio_block().
|
inlinestatic |
Definition at line 904 of file ac3dec.c.
Referenced by decode_audio_block().
|
static |
Decode a single audio block from the AC-3 bitstream.
Definition at line 950 of file ac3dec.c.
Referenced by ac3_decode_frame().
|
static |
|
static |
|
static |
dynamic range table.
converts codes to scale factors.
Definition at line 51 of file ac3dec.c.
Referenced by ac3_float_tables_init().
| float ff_ac3_heavy_dynamic_range_tab[256] |
Definition at line 52 of file ac3dec.c.
Referenced by ac3_float_tables_init().
1.8.17