FFmpeg
Loading...
Searching...
No Matches
dca_xll.c File Reference
#include "avcodec.h"
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "dcadec.h"
#include "dcadata.h"
#include "dcamath.h"
#include "dca_syncwords.h"
#include "decode.h"
#include "unary.h"

Go to the source code of this file.

Macros

#define DCA_XLL_X_HEADER_SIZE   22
 
#define DCA_XLL_X_HEIGHT_FOLD   23170
 
#define DCA_XLL_X_HEIGHT_MASK
 

Functions

static int get_linear (GetBitContext *gb, int n)
 
static int get_rice_un (GetBitContext *gb, int k)
 
static int get_rice (GetBitContext *gb, int k)
 
static void get_array (GetBitContext *gb, int32_t *array, int size, int n)
 
static void get_linear_array (GetBitContext *gb, int32_t *array, int size, int n)
 
static int get_rice_array (GetBitContext *gb, int32_t *array, int size, int k)
 
static int parse_dmix_coeffs (DCAXllDecoder *s, DCAXllChSet *c)
 
static int chs_parse_header (DCAXllDecoder *s, DCAXllChSet *c, DCAExssAsset *asset)
 
static int chs_alloc_msb_band_data (DCAXllDecoder *s, DCAXllChSet *c)
 
static int chs_alloc_lsb_band_data (DCAXllDecoder *s, DCAXllChSet *c)
 
static int chs_parse_band_data (DCAXllDecoder *s, DCAXllChSet *c, int band, int seg, int band_data_end)
 
static av_cold void chs_clear_band_data (DCAXllDecoder *s, DCAXllChSet *c, int band, int seg)
 
static void chs_filter_band_data (DCAXllDecoder *s, DCAXllChSet *c, int band)
 
static int chs_get_lsb_width (DCAXllDecoder *s, DCAXllChSet *c, int band, int ch)
 
static void chs_assemble_msbs_lsbs (DCAXllDecoder *s, DCAXllChSet *c, int band)
 
static int chs_assemble_freq_bands (DCAXllDecoder *s, DCAXllChSet *c)
 
static int parse_common_header (DCAXllDecoder *s)
 
static int is_hier_dmix_chset (DCAXllChSet *c)
 
static DCAXllChSet * find_next_hier_dmix_chset (DCAXllDecoder *s, DCAXllChSet *c)
 
static void prescale_down_mix (DCAXllChSet *c, DCAXllChSet *o)
 
static int parse_sub_headers (DCAXllDecoder *s, DCAExssAsset *asset)
 
static int parse_navi_table (DCAXllDecoder *s)
 
static int parse_band_data (DCAXllDecoder *s)
 
static int parse_x_heights (DCAXllDecoder *s, DCAExssAsset *asset)
 
static int parse_frame (DCAXllDecoder *s, const uint8_t *data, int size, DCAExssAsset *asset)
 
static void clear_pbr (DCAXllDecoder *s)
 
static int copy_to_pbr (DCAXllDecoder *s, const uint8_t *data, int size, int delay)
 
static int parse_frame_no_pbr (DCAXllDecoder *s, const uint8_t *data, int size, DCAExssAsset *asset)
 
static int parse_frame_pbr (DCAXllDecoder *s, const uint8_t *data, int size, DCAExssAsset *asset)
 
int ff_dca_xll_parse (DCAXllDecoder *s, const uint8_t *data, DCAExssAsset *asset)
 
static void undo_down_mix (DCAXllDecoder *s, DCAXllChSet *o, int band)
 
static void scale_down_mix (DCAXllDecoder *s, DCAXllChSet *o, int band)
 
static av_cold void force_lossy_output (DCAXllDecoder *s, DCAXllChSet *c)
 
static int combine_residual_frame (DCAXllDecoder *s, DCAXllChSet *c)
 
int ff_dca_xll_filter_frame (DCAXllDecoder *s, AVFrame *frame)
 
av_cold void ff_dca_xll_flush (DCAXllDecoder *s)
 
av_cold void ff_dca_xll_close (DCAXllDecoder *s)
 

Variables

static const uint8_t x_height_spkr [4]
 

Macro Definition Documentation

◆ DCA_XLL_X_HEADER_SIZE

#define DCA_XLL_X_HEADER_SIZE   22

Definition at line 31 of file dca_xll.c.

Referenced by parse_x_heights().

◆ DCA_XLL_X_HEIGHT_FOLD

#define DCA_XLL_X_HEIGHT_FOLD   23170

Definition at line 32 of file dca_xll.c.

Referenced by ff_dca_xll_filter_frame().

◆ DCA_XLL_X_HEIGHT_MASK

#define DCA_XLL_X_HEIGHT_MASK
Value:
@ DCA_SPEAKER_MASK_Rh
Definition dca.h:106
@ DCA_SPEAKER_MASK_Lh
Definition dca.h:104
@ DCA_SPEAKER_MASK_Lhr
Definition dca.h:114
@ DCA_SPEAKER_MASK_Rhr
Definition dca.h:115

Definition at line 33 of file dca_xll.c.

Referenced by chs_parse_header(), and ff_dca_xll_filter_frame().

Function Documentation

◆ get_linear()

static int get_linear ( GetBitContext * gb,
int n )
static

Definition at line 40 of file dca_xll.c.

Referenced by chs_parse_band_data(), chs_parse_header(), and get_linear_array().

◆ get_rice_un()

static int get_rice_un ( GetBitContext * gb,
int k )
static

Definition at line 46 of file dca_xll.c.

Referenced by get_rice().

◆ get_rice()

static int get_rice ( GetBitContext * gb,
int k )
static

Definition at line 52 of file dca_xll.c.

Referenced by chs_parse_band_data(), and get_rice_array().

◆ get_array()

static void get_array ( GetBitContext * gb,
int32_t * array,
int size,
int n )
static

Definition at line 58 of file dca_xll.c.

Referenced by chs_parse_band_data().

◆ get_linear_array()

static void get_linear_array ( GetBitContext * gb,
int32_t * array,
int size,
int n )
static

Definition at line 66 of file dca_xll.c.

Referenced by chs_parse_band_data().

◆ get_rice_array()

static int get_rice_array ( GetBitContext * gb,
int32_t * array,
int size,
int k )
static

Definition at line 76 of file dca_xll.c.

Referenced by chs_parse_band_data().

◆ parse_dmix_coeffs()

static int parse_dmix_coeffs ( DCAXllDecoder * s,
DCAXllChSet * c )
static

Definition at line 88 of file dca_xll.c.

Referenced by chs_parse_header().

◆ chs_parse_header()

static int chs_parse_header ( DCAXllDecoder * s,
DCAXllChSet * c,
DCAExssAsset * asset )
static

Definition at line 133 of file dca_xll.c.

Referenced by parse_sub_headers(), and parse_x_heights().

◆ chs_alloc_msb_band_data()

static int chs_alloc_msb_band_data ( DCAXllDecoder * s,
DCAXllChSet * c )
static

Definition at line 423 of file dca_xll.c.

Referenced by parse_band_data(), and parse_x_heights().

◆ chs_alloc_lsb_band_data()

static int chs_alloc_lsb_band_data ( DCAXllDecoder * s,
DCAXllChSet * c )
static

Definition at line 446 of file dca_xll.c.

Referenced by parse_band_data(), and parse_x_heights().

◆ chs_parse_band_data()

static int chs_parse_band_data ( DCAXllDecoder * s,
DCAXllChSet * c,
int band,
int seg,
int band_data_end )
static

Definition at line 479 of file dca_xll.c.

Referenced by parse_band_data(), and parse_x_heights().

◆ chs_clear_band_data()

static av_cold void chs_clear_band_data ( DCAXllDecoder * s,
DCAXllChSet * c,
int band,
int seg )
static

Definition at line 640 of file dca_xll.c.

Referenced by force_lossy_output(), and parse_band_data().

◆ chs_filter_band_data()

static void chs_filter_band_data ( DCAXllDecoder * s,
DCAXllChSet * c,
int band )
static

Definition at line 668 of file dca_xll.c.

Referenced by ff_dca_xll_filter_frame().

◆ chs_get_lsb_width()

static int chs_get_lsb_width ( DCAXllDecoder * s,
DCAXllChSet * c,
int band,
int ch )
static

Definition at line 733 of file dca_xll.c.

Referenced by chs_assemble_msbs_lsbs(), and combine_residual_frame().

◆ chs_assemble_msbs_lsbs()

static void chs_assemble_msbs_lsbs ( DCAXllDecoder * s,
DCAXllChSet * c,
int band )
static

Definition at line 748 of file dca_xll.c.

Referenced by ff_dca_xll_filter_frame().

◆ chs_assemble_freq_bands()

static int chs_assemble_freq_bands ( DCAXllDecoder * s,
DCAXllChSet * c )
static

Definition at line 770 of file dca_xll.c.

Referenced by ff_dca_xll_filter_frame().

◆ parse_common_header()

static int parse_common_header ( DCAXllDecoder * s)
static

Definition at line 806 of file dca_xll.c.

Referenced by parse_frame().

◆ is_hier_dmix_chset()

static int is_hier_dmix_chset ( DCAXllChSet * c)
static

◆ find_next_hier_dmix_chset()

static DCAXllChSet * find_next_hier_dmix_chset ( DCAXllDecoder * s,
DCAXllChSet * c )
static

Definition at line 918 of file dca_xll.c.

Referenced by combine_residual_frame(), and parse_sub_headers().

◆ prescale_down_mix()

static void prescale_down_mix ( DCAXllChSet * c,
DCAXllChSet * o )
static

Definition at line 928 of file dca_xll.c.

Referenced by parse_sub_headers().

◆ parse_sub_headers()

static int parse_sub_headers ( DCAXllDecoder * s,
DCAExssAsset * asset )
static

Definition at line 944 of file dca_xll.c.

Referenced by parse_frame().

◆ parse_navi_table()

static int parse_navi_table ( DCAXllDecoder * s)
static

Definition at line 992 of file dca_xll.c.

Referenced by parse_frame().

◆ parse_band_data()

static int parse_band_data ( DCAXllDecoder * s)
static

Definition at line 1043 of file dca_xll.c.

Referenced by parse_frame().

◆ parse_x_heights()

static int parse_x_heights ( DCAXllDecoder * s,
DCAExssAsset * asset )
static

Definition at line 1087 of file dca_xll.c.

Referenced by parse_frame().

◆ parse_frame()

static int parse_frame ( DCAXllDecoder * s,
const uint8_t * data,
int size,
DCAExssAsset * asset )
static

Definition at line 1150 of file dca_xll.c.

Referenced by parse_frame_no_pbr(), and parse_frame_pbr().

◆ clear_pbr()

static void clear_pbr ( DCAXllDecoder * s)
static

Definition at line 1203 of file dca_xll.c.

Referenced by ff_dca_xll_close(), ff_dca_xll_flush(), ff_dca_xll_parse(), and parse_frame_pbr().

◆ copy_to_pbr()

static int copy_to_pbr ( DCAXllDecoder * s,
const uint8_t * data,
int size,
int delay )
static

Definition at line 1209 of file dca_xll.c.

Referenced by parse_frame_no_pbr().

◆ parse_frame_no_pbr()

static int parse_frame_no_pbr ( DCAXllDecoder * s,
const uint8_t * data,
int size,
DCAExssAsset * asset )
static

Definition at line 1224 of file dca_xll.c.

Referenced by ff_dca_xll_parse().

◆ parse_frame_pbr()

static int parse_frame_pbr ( DCAXllDecoder * s,
const uint8_t * data,
int size,
DCAExssAsset * asset )
static

Definition at line 1262 of file dca_xll.c.

Referenced by ff_dca_xll_parse().

◆ ff_dca_xll_parse()

int ff_dca_xll_parse ( DCAXllDecoder * s,
const uint8_t * data,
DCAExssAsset * asset )

Definition at line 1304 of file dca_xll.c.

Referenced by dcadec_decode_frame().

◆ undo_down_mix()

static void undo_down_mix ( DCAXllDecoder * s,
DCAXllChSet * o,
int band )
static

Definition at line 1322 of file dca_xll.c.

Referenced by ff_dca_xll_filter_frame().

◆ scale_down_mix()

static void scale_down_mix ( DCAXllDecoder * s,
DCAXllChSet * o,
int band )
static

Definition at line 1353 of file dca_xll.c.

Referenced by ff_dca_xll_filter_frame().

◆ force_lossy_output()

static av_cold void force_lossy_output ( DCAXllDecoder * s,
DCAXllChSet * c )
static

Definition at line 1381 of file dca_xll.c.

Referenced by ff_dca_xll_filter_frame().

◆ combine_residual_frame()

static int combine_residual_frame ( DCAXllDecoder * s,
DCAXllChSet * c )
static

Definition at line 1398 of file dca_xll.c.

Referenced by ff_dca_xll_filter_frame().

◆ ff_dca_xll_filter_frame()

int ff_dca_xll_filter_frame ( DCAXllDecoder * s,
AVFrame * frame )

Definition at line 1466 of file dca_xll.c.

Referenced by dcadec_decode_frame().

◆ ff_dca_xll_flush()

av_cold void ff_dca_xll_flush ( DCAXllDecoder * s)

Definition at line 1692 of file dca_xll.c.

Referenced by dcadec_flush().

◆ ff_dca_xll_close()

av_cold void ff_dca_xll_close ( DCAXllDecoder * s)

Definition at line 1697 of file dca_xll.c.

Referenced by dcadec_close().

Variable Documentation

◆ x_height_spkr

const uint8_t x_height_spkr[4]
static
Initial value:
= {
}
@ DCA_SPEAKER_Lh
Definition dca.h:81
@ DCA_SPEAKER_Rh
Definition dca.h:81
@ DCA_SPEAKER_Rhr
Definition dca.h:84
@ DCA_SPEAKER_Lhr
Definition dca.h:83

Definition at line 36 of file dca_xll.c.

Referenced by chs_parse_header(), and ff_dca_xll_filter_frame().