FFmpeg
|
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
#include "dcadec.h"
#include "dcadata.h"
#include "dcahuff.h"
#include "dca_syncwords.h"
#include "bytestream.h"
#include "decode.h"
Go to the source code of this file.
Data Structures | |
struct | LBRChunk |
Macros | |
#define | BITSTREAM_READER_LE |
#define | AMP_MAX 56 |
Functions | |
av_cold void | ff_dca_lbr_init_tables (void) |
static int | parse_lfe_24 (DCALbrDecoder *s) |
static int | parse_lfe_16 (DCALbrDecoder *s) |
static int | parse_lfe_chunk (DCALbrDecoder *s, LBRChunk *chunk) |
static int | parse_vlc (GetBitContext *s, const VLC *vlc, int nb_bits, int max_depth) |
static int | parse_tonal (DCALbrDecoder *s, int group) |
static int | parse_tonal_chunk (DCALbrDecoder *s, LBRChunk *chunk) |
static int | parse_tonal_group (DCALbrDecoder *s, LBRChunk *chunk) |
static int | ensure_bits (GetBitContext *s, int n) |
Check point to ensure that enough bits are left. More... | |
static int | parse_scale_factors (DCALbrDecoder *s, uint8_t *scf) |
static int | parse_st_code (GetBitContext *s, int min_v) |
static int | parse_grid_1_chunk (DCALbrDecoder *s, LBRChunk *chunk, int ch1, int ch2) |
static int | parse_grid_1_sec_ch (DCALbrDecoder *s, int ch2) |
static void | parse_grid_3 (DCALbrDecoder *s, int ch1, int ch2, int sb, int flag) |
static float | lbr_rand (DCALbrDecoder *s, int sb) |
static void | parse_ch (DCALbrDecoder *s, int ch, int sb, int quant_level, int flag) |
Parse time samples for one subband, filling truncated samples with randomness. More... | |
static int | parse_ts (DCALbrDecoder *s, int ch1, int ch2, int start_sb, int end_sb, int flag) |
static void | convert_lpc (float *coeff, const int *codes) |
Convert from reflection coefficients to direct form coefficients. More... | |
static int | parse_lpc (DCALbrDecoder *s, int ch1, int ch2, int start_sb, int end_sb) |
static int | parse_high_res_grid (DCALbrDecoder *s, LBRChunk *chunk, int ch1, int ch2) |
static int | parse_grid_2 (DCALbrDecoder *s, int ch1, int ch2, int start_sb, int end_sb, int flag) |
static int | parse_ts1_chunk (DCALbrDecoder *s, LBRChunk *chunk, int ch1, int ch2) |
static int | parse_ts2_chunk (DCALbrDecoder *s, LBRChunk *chunk, int ch1, int ch2) |
static int | init_sample_rate (DCALbrDecoder *s) |
static int | alloc_sample_buffer (DCALbrDecoder *s) |
static int | parse_decoder_init (DCALbrDecoder *s, GetByteContext *gb) |
int | ff_dca_lbr_parse (DCALbrDecoder *s, const uint8_t *data, DCAExssAsset *asset) |
static void | decode_grid (DCALbrDecoder *s, int ch1, int ch2) |
Reconstruct high-frequency resolution grid from first and third grids. More... | |
static void | random_ts (DCALbrDecoder *s, int ch1, int ch2) |
Fill unallocated subbands with randomness. More... | |
static void | predict (float *samples, const float *coeff, int nsamples) |
static void | synth_lpc (DCALbrDecoder *s, int ch1, int ch2, int sb) |
static void | filter_ts (DCALbrDecoder *s, int ch1, int ch2) |
static void | decode_part_stereo (DCALbrDecoder *s, int ch1, int ch2) |
Modulate by interpolated partial stereo coefficients. More... | |
static void | synth_tones (DCALbrDecoder *s, int ch, float *values, int group, int group_sf, int synth_idx) |
Synthesise tones in the given group for the given tonal subframe. More... | |
static void | base_func_synth (DCALbrDecoder *s, int ch, float *values, int sf) |
Synthesise all tones in all groups for the given residual subframe. More... | |
static void | transform_channel (DCALbrDecoder *s, int ch, float *output) |
int | ff_dca_lbr_filter_frame (DCALbrDecoder *s, AVFrame *frame) |
av_cold void | ff_dca_lbr_flush (DCALbrDecoder *s) |
av_cold int | ff_dca_lbr_init (DCALbrDecoder *s) |
av_cold void | ff_dca_lbr_close (DCALbrDecoder *s) |
Variables | |
static const int8_t | channel_reorder_nolfe [7][5] |
static const int8_t | channel_reorder_lfe [7][5] |
static const uint8_t | lfe_index [7] |
static const uint16_t | channel_layouts [7] |
static float | cos_tab [256] |
static const float | lpc_tab [16] |
enum LBRFlags |
enum LBRChunkTypes |
av_cold void ff_dca_lbr_init_tables | ( | void | ) |
Definition at line 135 of file dca_lbr.c.
Referenced by dcadec_init_static().
|
static |
Definition at line 143 of file dca_lbr.c.
Referenced by parse_lfe_chunk().
|
static |
Definition at line 197 of file dca_lbr.c.
Referenced by parse_lfe_chunk().
|
static |
Definition at line 247 of file dca_lbr.c.
Referenced by ff_dca_lbr_parse().
|
inlinestatic |
Definition at line 271 of file dca_lbr.c.
Referenced by parse_grid_1_chunk(), parse_grid_1_sec_ch(), parse_grid_2(), parse_grid_3(), parse_scale_factors(), parse_st_code(), and parse_tonal().
|
static |
Definition at line 281 of file dca_lbr.c.
Referenced by parse_tonal_chunk(), and parse_tonal_group().
|
static |
Definition at line 363 of file dca_lbr.c.
Referenced by ff_dca_lbr_parse().
|
static |
Definition at line 396 of file dca_lbr.c.
Referenced by ff_dca_lbr_parse().
|
static |
Check point to ensure that enough bits are left.
Aborts decoding by skipping to the end of chunk otherwise.
Definition at line 414 of file dca_lbr.c.
Referenced by parse_ch(), parse_grid_1_chunk(), parse_grid_1_sec_ch(), parse_grid_2(), parse_grid_3(), parse_lpc(), parse_scale_factors(), and parse_ts().
|
static |
Definition at line 426 of file dca_lbr.c.
Referenced by parse_grid_1_chunk(), parse_grid_1_sec_ch(), and parse_high_res_grid().
|
static |
Definition at line 496 of file dca_lbr.c.
Referenced by parse_grid_1_chunk().
|
static |
Definition at line 510 of file dca_lbr.c.
Referenced by ff_dca_lbr_parse().
|
static |
Definition at line 578 of file dca_lbr.c.
Referenced by parse_ts2_chunk().
|
static |
Definition at line 604 of file dca_lbr.c.
Referenced by parse_ts().
|
static |
Definition at line 626 of file dca_lbr.c.
Referenced by parse_ch(), and random_ts().
|
static |
Parse time samples for one subband, filling truncated samples with randomness.
Definition at line 635 of file dca_lbr.c.
Referenced by parse_ts().
|
static |
Definition at line 709 of file dca_lbr.c.
Referenced by parse_high_res_grid(), parse_ts1_chunk(), and parse_ts2_chunk().
|
static |
Convert from reflection coefficients to direct form coefficients.
Definition at line 772 of file dca_lbr.c.
Referenced by parse_lpc().
|
static |
Definition at line 788 of file dca_lbr.c.
Referenced by parse_high_res_grid(), and parse_ts1_chunk().
|
static |
Definition at line 809 of file dca_lbr.c.
Referenced by ff_dca_lbr_parse().
|
static |
Definition at line 871 of file dca_lbr.c.
Referenced by parse_ts1_chunk(), and parse_ts2_chunk().
|
static |
Definition at line 913 of file dca_lbr.c.
Referenced by ff_dca_lbr_parse().
|
static |
Definition at line 931 of file dca_lbr.c.
Referenced by ff_dca_lbr_parse().
|
static |
Definition at line 954 of file dca_lbr.c.
Referenced by parse_decoder_init().
|
static |
Definition at line 994 of file dca_lbr.c.
Referenced by parse_decoder_init().
|
static |
Definition at line 1018 of file dca_lbr.c.
Referenced by ff_dca_lbr_parse().
int ff_dca_lbr_parse | ( | DCALbrDecoder * | s, |
const uint8_t * | data, | ||
DCAExssAsset * | asset | ||
) |
Definition at line 1170 of file dca_lbr.c.
Referenced by dcadec_decode_frame().
|
static |
Reconstruct high-frequency resolution grid from first and third grids.
Definition at line 1407 of file dca_lbr.c.
Referenced by ff_dca_lbr_filter_frame().
|
static |
Fill unallocated subbands with randomness.
Definition at line 1444 of file dca_lbr.c.
Referenced by ff_dca_lbr_filter_frame().
Definition at line 1480 of file dca_lbr.c.
Referenced by synth_lpc().
|
static |
Definition at line 1492 of file dca_lbr.c.
Referenced by filter_ts().
|
static |
Definition at line 1514 of file dca_lbr.c.
Referenced by ff_dca_lbr_filter_frame().
|
static |
Modulate by interpolated partial stereo coefficients.
Definition at line 1599 of file dca_lbr.c.
Referenced by ff_dca_lbr_filter_frame().
|
static |
Synthesise tones in the given group for the given tonal subframe.
Definition at line 1625 of file dca_lbr.c.
Referenced by base_func_synth().
|
static |
Synthesise all tones in all groups for the given residual subframe.
Definition at line 1689 of file dca_lbr.c.
Referenced by transform_channel().
|
static |
Definition at line 1703 of file dca_lbr.c.
Referenced by ff_dca_lbr_filter_frame().
int ff_dca_lbr_filter_frame | ( | DCALbrDecoder * | s, |
AVFrame * | frame | ||
) |
Definition at line 1737 of file dca_lbr.c.
Referenced by dcadec_decode_frame().
av_cold void ff_dca_lbr_flush | ( | DCALbrDecoder * | s | ) |
Definition at line 1799 of file dca_lbr.c.
Referenced by dcadec_flush(), and parse_decoder_init().
av_cold int ff_dca_lbr_init | ( | DCALbrDecoder * | s | ) |
Definition at line 1823 of file dca_lbr.c.
Referenced by dcadec_init().
av_cold void ff_dca_lbr_close | ( | DCALbrDecoder * | s | ) |
Definition at line 1832 of file dca_lbr.c.
Referenced by dcadec_close().
|
static |
Definition at line 88 of file dca_lbr.c.
Referenced by encode_init(), and ff_dca_lbr_filter_frame().
|
static |
Definition at line 98 of file dca_lbr.c.
Referenced by encode_init(), and ff_dca_lbr_filter_frame().
|
static |
Definition at line 108 of file dca_lbr.c.
Referenced by ff_dca_lbr_filter_frame(), and lfe_downsample().
|
static |
Definition at line 112 of file dca_lbr.c.
Referenced by aeval_query_formats(), channelmap_query_formats(), ff_add_channel_layout(), ff_channel_layouts_unref(), ff_dca_lbr_filter_frame(), ff_set_common_channel_layouts(), ff_set_common_channel_layouts2(), init_audio(), join_query_formats(), main(), merge_channel_layouts_internal(), pcm_bluray_parse_header(), and query_formats().
|
static |
Definition at line 122 of file dca_lbr.c.
Referenced by eval_lpcenv_or_interp(), ff_dca_lbr_init_tables(), get_cos(), and synth_tones().
|
static |
Definition at line 123 of file dca_lbr.c.
Referenced by convert_lpc().