Libav
|
#include <math.h>
#include <stddef.h>
#include <stdio.h>
#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/float_dsp.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "avcodec.h"
#include "dca.h"
#include "dca_syncwords.h"
#include "dcadata.h"
#include "dcadsp.h"
#include "dcahuff.h"
#include "fft.h"
#include "fmtconvert.h"
#include "get_bits.h"
#include "internal.h"
#include "mathops.h"
#include "profiles.h"
#include "put_bits.h"
#include "synth_filter.h"
Go to the source code of this file.
Data Structures | |
struct | BitAlloc |
Bit allocation. More... | |
Macros | |
#define | DCA_DOLBY 101 /* FIXME */ |
#define | DCA_CHANNEL_BITS 6 |
#define | DCA_CHANNEL_MASK 0x3F |
#define | DCA_LFE 0x80 |
#define | HEADER_SIZE 14 |
#define | DCA_NSYNCAUX 0x9A1105A0 |
#define | MIX_REAR1(samples, s1, rs, coef) |
#define | MIX_REAR2(samples, s1, s2, rs, coef) |
#define | MIX_FRONT3(samples, coef) |
#define | DOWNMIX_TO_STEREO(op1, op2) |
Enumerations | |
enum | DCAMode { DCA_MONO = 0, DCA_CHANNEL, DCA_STEREO, DCA_STEREO_SUMDIFF, DCA_STEREO_TOTAL, DCA_3F, DCA_2F1R, DCA_3F1R, DCA_2F2R, DCA_3F2R, DCA_4F2R } |
Functions | |
static av_always_inline int | get_bitalloc (GetBitContext *gb, BitAlloc *ba, int idx) |
static av_cold void | dca_init_vlcs (void) |
static void | get_array (GetBitContext *gb, int *dst, int len, int bits) |
static int | dca_parse_audio_coding_header (DCAContext *s, int base_channel) |
static int | dca_parse_frame_header (DCAContext *s) |
static int | get_scale (GetBitContext *gb, int level, int value, int log2range) |
static int | dca_subframe_header (DCAContext *s, int base_channel, int block_index) |
static void | qmf_32_subbands (DCAContext *s, int chans, float samples_in[DCA_SUBBANDS][SAMPLES_PER_SUBBAND], float *samples_out, float scale) |
static QMF64_table * | qmf64_precompute (void) |
static void | qmf_64_subbands (DCAContext *s, int chans, float samples_in[DCA_SUBBANDS_X96K][SAMPLES_PER_SUBBAND], float *samples_out, float scale) |
static void | lfe_interpolation_fir (DCAContext *s, const float *samples_in, float *samples_out) |
static void | dca_downmix (float **samples, int srcfmt, int lfe_present, float coef[DCA_PRIM_CHANNELS_MAX+1][2], const int8_t *channel_mapping) |
static int | decode_blockcode (int code, int levels, int32_t *values) |
static int | decode_blockcodes (int code1, int code2, int levels, int32_t *values) |
static int | dca_subsubframe (DCAContext *s, int base_channel, int block_index) |
static int | dca_filter_channels (DCAContext *s, int block_index, int upsample) |
static int | dca_subframe_footer (DCAContext *s, int base_channel) |
static int | dca_decode_block (DCAContext *s, int base_channel, int block_index) |
Decode a dca frame block. More... | |
static float | dca_dmix_code (unsigned code) |
static int | scan_for_extensions (AVCodecContext *avctx) |
static int | set_channel_layout (AVCodecContext *avctx, int channels, int num_core_channels) |
static int | dca_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt) |
Main frame decoding function FIXME add arguments. More... | |
static av_cold int | dca_decode_init (AVCodecContext *avctx) |
DCA initialization. More... | |
static av_cold int | dca_decode_end (AVCodecContext *avctx) |
Variables | |
static const int | dca_ext_audio_descr_mask [] |
static const uint64_t | dca_core_channel_layout [] |
static BitAlloc | dca_bitalloc_index |
indexes for samples VLC select More... | |
static BitAlloc | dca_tmode |
transition mode VLCs More... | |
static BitAlloc | dca_scalefactor |
scalefactor VLCs More... | |
static BitAlloc | dca_smpl_bitalloc [11] |
samples VLCs More... | |
static const uint8_t | abits_sizes [7] = { 7, 10, 12, 13, 15, 17, 19 } |
static const uint8_t | abits_levels [7] = { 3, 5, 7, 9, 13, 17, 25 } |
static const AVOption | options [] |
static const AVClass | dca_decoder_class |
AVCodec | ff_dca_decoder |
#define DCA_CHANNEL_MASK 0x3F |
Definition at line 135 of file dcadec.c.
Referenced by set_channel_layout().
#define DCA_LFE 0x80 |
Definition at line 137 of file dcadec.c.
Referenced by dca_decode_frame(), and dca_parse_frame_header().
#define DCA_NSYNCAUX 0x9A1105A0 |
Definition at line 141 of file dcadec.c.
Referenced by dca_subframe_footer().
#define MIX_REAR1 | ( | samples, | |
s1, | |||
rs, | |||
coef | |||
) |
Definition at line 679 of file dcadec.c.
Referenced by dca_downmix().
#define MIX_REAR2 | ( | samples, | |
s1, | |||
s2, | |||
rs, | |||
coef | |||
) |
Definition at line 683 of file dcadec.c.
Referenced by dca_downmix().
#define MIX_FRONT3 | ( | samples, | |
coef | |||
) |
#define DOWNMIX_TO_STEREO | ( | op1, | |
op2 | |||
) |
Definition at line 694 of file dcadec.c.
Referenced by dca_downmix().
enum DCAMode |
|
static |
Definition at line 156 of file dcadec.c.
Referenced by dca_subframe_header(), dca_subsubframe(), and get_scale().
Definition at line 163 of file dcadec.c.
Referenced by dca_decode_init().
|
inlinestatic |
Definition at line 218 of file dcadec.c.
Referenced by dca_parse_audio_coding_header().
|
static |
Definition at line 224 of file dcadec.c.
Referenced by dca_parse_frame_header(), and scan_for_extensions().
|
static |
Definition at line 284 of file dcadec.c.
Referenced by dca_decode_frame().
|
inlinestatic |
Definition at line 347 of file dcadec.c.
Referenced by dca_subframe_header().
|
static |
Definition at line 364 of file dcadec.c.
Referenced by dca_decode_block().
|
static |
Definition at line 544 of file dcadec.c.
Referenced by dca_filter_channels().
|
static |
Definition at line 567 of file dcadec.c.
Referenced by dca_filter_channels().
|
static |
Definition at line 593 of file dcadec.c.
Referenced by dca_filter_channels().
|
static |
Definition at line 644 of file dcadec.c.
Referenced by dca_filter_channels().
|
static |
Definition at line 700 of file dcadec.c.
Referenced by dca_filter_channels().
|
static |
Definition at line 764 of file dcadec.c.
Referenced by decode_blockcodes().
|
static |
Definition at line 778 of file dcadec.c.
Referenced by dca_subsubframe().
|
static |
Definition at line 788 of file dcadec.c.
Referenced by dca_decode_block().
|
static |
Definition at line 935 of file dcadec.c.
Referenced by dca_decode_frame().
|
static |
Definition at line 1010 of file dcadec.c.
Referenced by dca_decode_block().
|
static |
Decode a dca frame block.
s | pointer to the DCAContext |
Definition at line 1119 of file dcadec.c.
Referenced by dca_decode_frame(), and scan_for_extensions().
|
static |
Definition at line 1155 of file dcadec.c.
Referenced by set_channel_layout().
|
static |
Definition at line 1162 of file dcadec.c.
Referenced by dca_decode_frame().
|
static |
Definition at line 1264 of file dcadec.c.
Referenced by dca_decode_frame().
|
static |
|
static |
DCA initialization.
avctx | pointer to the AVCodecContext |
|
static |
|
static |
Definition at line 75 of file dcadec.c.
Referenced by dca_decode_frame().
|
static |
Definition at line 95 of file dcadec.c.
Referenced by set_channel_layout().
|
static |
|
static |
Definition at line 785 of file dcadec.c.
Referenced by dca_subsubframe().
|
static |
Definition at line 786 of file dcadec.c.
Referenced by dca_subsubframe().
|
static |
|
static |
AVCodec ff_dca_decoder |