Go to the documentation of this file.
21 #ifndef AVCODEC_DCA_XLL_H
22 #define AVCODEC_DCA_XLL_H
32 #define DCA_XLL_CHSETS_MAX 3
33 #define DCA_XLL_CHANNELS_MAX 8
34 #define DCA_XLL_BANDS_MAX 2
35 #define DCA_XLL_ADAPT_PRED_ORDER_MAX 16
36 #define DCA_XLL_DECI_HISTORY_MAX 8
37 #define DCA_XLL_DMIX_SCALES_MAX ((DCA_XLL_CHSETS_MAX - 1) * DCA_XLL_CHANNELS_MAX)
38 #define DCA_XLL_DMIX_COEFFS_MAX (DCA_XLL_DMIX_SCALES_MAX * DCA_XLL_CHANNELS_MAX)
39 #define DCA_XLL_PBR_BUFFER_MAX (240 << 10)
40 #define DCA_XLL_SAMPLE_BUFFERS_MAX 3
int ch_remap[DCA_XLL_CHANNELS_MAX]
Channel to speaker map.
int nchannels
Total number of channels in a hierarchy.
int nabits
Number of bits to read bit allocation coding parameter.
#define DCA_XLL_DECI_HISTORY_MAX
int adapt_pred_order[DCA_XLL_CHANNELS_MAX]
Adaptive predictor order.
int bit_width_adjust[DCA_XLL_CHANNELS_MAX]
Number of bits discarded by authoring.
int seg_common
Segment type.
int hd_stream_id
Previous DTS-HD stream ID for detecting changes.
This structure describes decoded (raw) audio or video data.
int dmix_embedded
Downmix performed by encoder in frequency band.
av_cold void ff_dca_xll_flush(DCAXllDecoder *s)
int fixed_pred_order[DCA_XLL_CHANNELS_MAX]
Fixed predictor order.
int rice_code_flag[DCA_XLL_CHANNELS_MAX]
Rice coding flag.
int scalable_lsbs
MSB/LSB split flag.
int x_syncword_present
Syncword for extension data at end of frame (DTS:X) is present.
int band_crc_present
Presence of CRC16 within each frequency band.
int32_t * lsb_sample_buffer[DCA_XLL_CHANNELS_MAX]
LSB sample buffer pointers or NULL.
int pbr_delay
Delay in frames before decoding buffered data.
av_cold void ff_dca_xll_close(DCAXllDecoder *s)
int hier_ofs
Number of preceding channels in a hierarchy (M)
unsigned int sample_size[DCA_XLL_SAMPLE_BUFFERS_MAX]
int orig_order[DCA_XLL_CHANNELS_MAX]
Original channel order.
int dmix_coeff[DCA_XLL_DMIX_COEFFS_MAX]
Downmixing coefficients.
int ff_dca_xll_parse(DCAXllDecoder *s, const uint8_t *data, DCAExssAsset *asset)
int frame_size
Number of bytes in a lossless frame.
int nchannels
Number of channels in the channel set (N)
int highest_pred_order
Highest adaptive predictor order.
int seg_size_nbits
Number of bits used to read segment size.
#define DCA_XLL_ADAPT_PRED_ORDER_MAX
uint8_t * pbr_buffer
Peak bit rate (PBR) smoothing buffer.
int decor_enabled
Pairwise channel decorrelation flag.
int storage_bit_res
Storage bit resolution (16 or 24)
#define DCA_XLL_DMIX_COEFFS_MAX
int dmix_type
Primary channel set downmix type.
int dmix_embedded
Downmix already performed by encoder.
int ch_mask_nbits
Number of bits used to read channel mask.
int pbr_length
Length in bytes of data currently buffered.
int x_imax_syncword_present
Syncword for extension data at end of frame (DTS:X IMAX) is present.
int nactivechsets
Number of active channel sets to decode.
int nframesamples_log2
log2(nframesamples)
#define DCA_XLL_SAMPLE_BUFFERS_MAX
int adapt_refl_coeff[DCA_XLL_CHANNELS_MAX][DCA_XLL_ADAPT_PRED_ORDER_MAX]
Adaptive predictor reflection coefficients.
int lsb_section_size
Size of LSB section in any segment.
int32_t * sample_buffer[DCA_XLL_SAMPLE_BUFFERS_MAX]
int nframesegs
Number of segments per frame.
#define DECLARE_ALIGNED(n, t, v)
DCAXllChSet chset[DCA_XLL_CHSETS_MAX]
Channel sets.
#define DCA_XLL_BANDS_MAX
int bitalloc_hybrid_linear[DCA_XLL_CHANNELS_MAX]
Binary code length for isolated samples.
#define DCA_XLL_DMIX_SCALES_MAX
int residual_encode
Residual encoding mask (0 - residual, 1 - full channel)
int nchsets
Number of channels sets per frame.
int bitalloc_part_b[DCA_XLL_CHANNELS_MAX]
Coding parameter for part B of segment.
int dmix_coeffs_present
Downmix coefficients present in stream.
#define DCA_XLL_CHANNELS_MAX
int32_t * msb_sample_buffer[DCA_XLL_CHANNELS_MAX]
MSB sample buffer pointers.
int pcm_bit_res
PCM bit resolution (variable)
int32_t deci_history[DCA_XLL_CHANNELS_MAX][DCA_XLL_DECI_HISTORY_MAX]
Decimator history for frequency band 1.
int nfreqbands
Highest number of frequency bands.
int dmix_scale_inv[DCA_XLL_DMIX_SCALES_MAX]
Inverse downmixing scales.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
int nfreqbands
Number of frequency bands (1 or 2)
DCAXllBand bands[DCA_XLL_BANDS_MAX]
Frequency bands.
#define DCA_XLL_CHSETS_MAX
int nsegsamples
Samples in segment per one frequency band.
main external API structure.
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.
int decor_coeff[DCA_XLL_CHANNELS_MAX/2]
Pairwise channel coefficients.
int freq
Original sampling frequency (max. 96000 Hz)
int nsegsamples_log2
log2(nsegsamples)
int nscalablelsbs[DCA_XLL_CHANNELS_MAX]
Number of bits to represent the samples in LSB part.
int ff_dca_xll_filter_frame(DCAXllDecoder *s, AVFrame *frame)
int32_t * output_samples[DCA_SPEAKER_COUNT]
int ch_mask
Channel mask for set.
int hier_chset
Whether the channel set is part of a hierarchy.
int fixed_lsb_width
Fixed LSB width.
int nsamples_part_a[DCA_XLL_CHANNELS_MAX]
Number of samples in part A of segment.
int primary_chset
Primary channel set flag.
int nreschsets
Number of channel sets that have residual encoded channels.
int nframesamples
Samples in frame per one frequency band.