26 return av_popcount(mask) + av_popcount(mask & 0xae66);
115 int spkr_mask_nbits = 0;
116 int spkr_remap_nsets;
130 spkr_mask_nbits = (
get_bits(&s->
gb, 2) + 1) << 2;
137 if ((spkr_remap_nsets =
get_bits(&s->
gb, 3)) && !spkr_mask_nbits) {
143 for (i = 0; i < spkr_remap_nsets; i++)
146 for (i = 0; i < spkr_remap_nsets; i++) {
150 for (j = 0; j < nspeakers[i]; j++) {
226 for (j = 0; j < nchannels_dmix; j++) {
385 int i, ret,
offset, wide_hdr, header_size;
403 header_size =
get_bits(&s->
gb, 8 + 4 * wide_hdr) + 1;
423 int active_exss_mask[8];
466 spkr_mask_nbits = (
get_bits(&s->
gb, 2) + 1) << 2;
481 offset = header_size;
482 for (i = 0; i < s->
nassets; i++) {
493 for (i = 0; i < s->
nassets; i++) {
static int ff_dca_seek_bits(GetBitContext *s, int p)
int nmixoutchs[4]
Speaker layout mask for mixer output channels.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static void parse_lbr_parameters(DCAExssParser *s, DCAExssAsset *asset)
ptrdiff_t const GLvoid * data
int ff_dca_check_crc(GetBitContext *s, int p1, int p2)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static void skip_bits_long(GetBitContext *s, int n)
int exss_size
Number of bytes of extension substream.
int asset_index
Audio asset identifier.
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
int nmixoutconfigs
Number of mixing configurations.
int exss_index
Extension substream index.
int extension_mask
Coding components used in asset.
static int get_bits_count(const GetBitContext *s)
static int count_chs_for_mask(int mask)
int hd_stream_id
DTS-HD stream ID.
static int get_bits_left(GetBitContext *gb)
int xxch_offset
Offset to XXCH extension from start of substream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int representation_type
Representation type.
static int set_exss_offsets(DCAExssAsset *asset)
static const uint16_t mask[17]
int exss_size_nbits
Number of bits for extension substream size.
int embedded_6ch
Embedded 6 channels flag.
int nassets
Number of audio assets in extension substream.
int lbr_offset
Offset to LBR component from start of substream.
static const uint8_t offset[127][2]
int xbr_offset
Offset to XBR extension from start of substream.
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
int mix_metadata_enabled
Mixing metadata enable flag.
int xll_offset
Offset to XLL data from start of substream.
int coding_mode
Coding mode for the asset.
int xll_delay_nframes
Initial XLL decoding delay in frames.
int static_fields_present
Per stream static fields presence flag.
DCAExssAsset assets[1]
Audio asset descriptors.
int xll_size
Size of XLL data in extension substream.
int one_to_one_map_ch_to_spkr
One to one channel to speaker mapping flag.
int max_sample_rate
Maximum sample rate.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
int core_size
Size of core component in extension substream.
int pcm_bit_res
PCM bit resolution.
int asset_size
Size of encoded asset data.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
int lbr_size
Size of LBR component in extension substream.
#define AV_EF_CAREFUL
consider things that violate the spec, are fast to calculate and have not been seen in the wild as er...
static unsigned int get_bits1(GetBitContext *s)
static void skip_bits1(GetBitContext *s)
static void skip_bits(GetBitContext *s, int n)
int x96_size
Size of X96 extension in extension substream.
int embedded_stereo
Embedded stereo flag.
int spkr_mask_enabled
Speaker mask enabled flag.
int nchannels_total
Total number of channels.
#define AV_EF_CRCCHECK
Verify checksums embedded in the bitstream (could be of either encoded or decoded data...
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
const int32_t ff_dca_sampling_freqs[16]
int xbr_size
Size of XBR extension in extension substream.
int asset_offset
Offset to asset data from start of substream.
int xll_sync_present
XLL sync word present flag.
static void parse_xll_parameters(DCAExssParser *s, DCAExssAsset *asset)
int xxch_size
Size of XXCH extension in extension substream.
int ff_dca_exss_parse(DCAExssParser *s, uint8_t *data, int size)
int x96_offset
Offset to X96 extension from start of substream.
int spkr_mask
Loudspeaker activity mask.
int npresents
Number of defined audio presentations.
int core_offset
Offset to core component from start of substream.
int xll_sync_offset
Number of bytes offset to XLL sync.
static int parse_descriptor(DCAExssParser *s, DCAExssAsset *asset)