21 #ifndef AVCODEC_DCA_XLL_H
22 #define AVCODEC_DCA_XLL_H
34 #define DCA_XLL_CHSETS_MAX 3
35 #define DCA_XLL_CHANNELS_MAX 8
36 #define DCA_XLL_BANDS_MAX 2
37 #define DCA_XLL_ADAPT_PRED_ORDER_MAX 16
38 #define DCA_XLL_DECI_HISTORY_MAX 8
39 #define DCA_XLL_DMIX_SCALES_MAX ((DCA_XLL_CHSETS_MAX - 1) * DCA_XLL_CHANNELS_MAX)
40 #define DCA_XLL_DMIX_COEFFS_MAX (DCA_XLL_DMIX_SCALES_MAX * DCA_XLL_CHANNELS_MAX)
41 #define DCA_XLL_PBR_BUFFER_MAX (240 << 10)
42 #define DCA_XLL_SAMPLE_BUFFERS_MAX 3
int adapt_pred_order[DCA_XLL_CHANNELS_MAX]
Adaptive predictor order.
int frame_size
Number of bytes in a lossless frame.
av_cold void ff_dca_xll_flush(DCAXllDecoder *s)
#define DCA_XLL_CHSETS_MAX
This structure describes decoded (raw) audio or video data.
int primary_chset
Primary channel set flag.
ptrdiff_t const GLvoid * data
int pbr_delay
Delay in frames before decoding buffered data.
Memory handling functions.
int nchannels
Number of channels in the channel set (N)
av_cold void ff_dca_xll_close(DCAXllDecoder *s)
int pbr_length
Length in bytes of data currently buffered.
int freq
Original sampling frequency (max. 96000 Hz)
int dmix_scale[DCA_XLL_DMIX_SCALES_MAX]
Downmixing scales.
int bitalloc_part_a[DCA_XLL_CHANNELS_MAX]
Coding parameter for part A of segment.
DCAXllBand bands[DCA_XLL_BANDS_MAX]
Frequency bands.
int rice_code_flag[DCA_XLL_CHANNELS_MAX]
Rice coding flag.
int band_crc_present
Presence of CRC16 within each frequency band.
int highest_pred_order
Highest adaptive predictor order.
int32_t * sample_buffer[DCA_XLL_SAMPLE_BUFFERS_MAX]
#define DCA_XLL_DMIX_COEFFS_MAX
int dmix_coeffs_present
Downmix coefficients present in stream.
int nfreqbands
Highest number of frequency bands.
#define DCA_XLL_SAMPLE_BUFFERS_MAX
int ch_remap[DCA_XLL_CHANNELS_MAX]
Channel to speaker map.
int fixed_lsb_width
Fixed LSB width.
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
int fixed_pred_order[DCA_XLL_CHANNELS_MAX]
Fixed predictor order.
int nfreqbands
Number of frequency bands (1 or 2)
int ff_dca_xll_parse(DCAXllDecoder *s, uint8_t *data, DCAExssAsset *asset)
bitstream reader API header.
int32_t * lsb_sample_buffer[DCA_XLL_CHANNELS_MAX]
LSB sample buffer pointers or NULL.
int adapt_refl_coeff[DCA_XLL_CHANNELS_MAX][DCA_XLL_ADAPT_PRED_ORDER_MAX]
Adaptive predictor reflection coefficients.
int orig_order[DCA_XLL_CHANNELS_MAX]
Original channel order.
#define DCA_XLL_DMIX_SCALES_MAX
int scalable_lsbs
MSB/LSB split flag.
int nsegsamples_log2
log2(nsegsamples)
int pcm_bit_res
PCM bit resolution (variable)
int hier_chset
Whether the channel set is part of a hierarchy.
int32_t * output_samples[DCA_SPEAKER_COUNT]
int decor_enabled
Pairwise channel decorrelation flag.
int hier_ofs
Number of preceding channels in a hierarchy (M)
int nchannels
Total number of channels in a hierarchy.
#define DCA_XLL_BANDS_MAX
int seg_size_nbits
Number of bits used to read segment size.
int dmix_type
Primary channel set downmix type.
int nframesamples
Samples in frame per one frequency band.
int nabits
Number of bits to read bit allocation coding parameter.
#define DCA_XLL_ADAPT_PRED_ORDER_MAX
int nsegsamples
Samples in segment per one frequency band.
int dmix_scale_inv[DCA_XLL_DMIX_SCALES_MAX]
Inverse downmixing scales.
int residual_encode
Residual encoding mask (0 - residual, 1 - full channel)
int bitalloc_hybrid_linear[DCA_XLL_CHANNELS_MAX]
Binary code length for isolated samples.
Libavcodec external API header.
int hd_stream_id
Previous DTS-HD stream ID for detecting changes.
main external API structure.
int lsb_section_size
Size of LSB section in any segment.
unsigned int sample_size[DCA_XLL_SAMPLE_BUFFERS_MAX]
int nreschsets
Number of channel sets that have residual encoded channels.
int nframesegs
Number of segments per frame.
int ch_mask
Channel mask for set.
int32_t * msb_sample_buffer[DCA_XLL_CHANNELS_MAX]
MSB sample buffer pointers.
int nsamples_part_a[DCA_XLL_CHANNELS_MAX]
Number of samples in part A of segment.
int ff_dca_xll_filter_frame(DCAXllDecoder *s, AVFrame *frame)
#define DCA_XLL_DECI_HISTORY_MAX
common internal api header.
common internal and external API header
int dmix_embedded
Downmix already performed by encoder.
int dmix_coeff[DCA_XLL_DMIX_COEFFS_MAX]
Downmixing coefficients.
int storage_bit_res
Storage bit resolution (16 or 24)
DCAXllChSet chset[DCA_XLL_CHSETS_MAX]
Channel sets.
int32_t deci_history[DCA_XLL_CHANNELS_MAX][DCA_XLL_DECI_HISTORY_MAX]
Decimator history for frequency band 1.
uint8_t * pbr_buffer
Peak bit rate (PBR) smoothing buffer.
int seg_common
Segment type.
int ch_mask_nbits
Number of bits used to read channel mask.
#define DCA_XLL_CHANNELS_MAX
int bit_width_adjust[DCA_XLL_CHANNELS_MAX]
Number of bits discarded by authoring.
int nframesamples_log2
log2(nframesamples)
int nscalablelsbs[DCA_XLL_CHANNELS_MAX]
Number of bits to represent the samples in LSB part.
int nchsets
Number of channels sets per frame.
int dmix_embedded
Downmix performed by encoder in frequency band.
int decor_coeff[DCA_XLL_CHANNELS_MAX/2]
Pairwise channel coefficients.
int nactivechsets
Number of active channel sets to decode.
int bitalloc_part_b[DCA_XLL_CHANNELS_MAX]
Coding parameter for part B of segment.