29 #define DCA_CORE_EXTS (DCA_EXT_XCH | DCA_EXT_XXCH | DCA_EXT_X96)
57 return av_popcount(mask) +
76 for (i = 0; i < channels; i++) {
77 int mix_map_mask =
get_bits(gb, out_ch);
78 int num_coeffs = av_popcount(mix_map_mask);
91 int embedded_stereo = 0;
94 int extensions_mask = 0;
128 int spkr_mask_size = 16;
137 spkr_mask_size = (
get_bits(&s->
gb, 2) + 1) << 2;
143 for (i = 0; i < spkr_remap_sets; i++) {
148 for (i = 0; i < spkr_remap_sets; i++) {
149 int num_dec_ch_remaps =
get_bits(&s->
gb, 5) + 1;
153 for (j = 0; j < num_spkrs[i]; j++) {
155 int num_dec_ch = av_popcount(remap_dec_ch_mask);
165 if (drc_code_present)
171 if (drc_code_present && embedded_stereo)
236 "DTS extensions detection mismatch (%d, %d)\n",
252 int active_ss_mask[8];
267 hdrsize =
get_bits(&s->
gb, 8 + 4 * blownup) + 1;
282 if (num_audiop > 1) {
284 "Multiple DTS-HD audio presentations");
290 if (num_assets > 1) {
296 for (i = 0; i < num_audiop; i++)
297 active_ss_mask[i] =
get_bits(&s->
gb, ss_index + 1);
299 for (i = 0; i < num_audiop; i++)
300 for (j = 0; j <= ss_index; j++)
301 if (active_ss_mask[i] & (1 << j))
306 int mix_out_mask_size;
309 mix_out_mask_size = (
get_bits(&s->
gb, 2) + 1) << 2;
313 int mix_out_mask =
get_bits(&s->
gb, mix_out_mask_size);
321 for (i = 0; i < num_assets; i++)
324 for (i = 0; i < num_assets; i++) {
330 if (start_pos + hdrsize * 8 > j)
333 for (i = 0; i < num_assets; i++) {
336 end_pos = start_pos + asset_size[i] * 8;
351 "DTS-XLL: ignoring XLL extension\n");
355 "DTS-XLL: decoding XLL extension\n");
362 "DTS-ExSS: unknown marker = 0x%08x\n", mkr);
369 "DTS-ExSS: Processed asset too long.\n");
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int ff_dca_xll_decode_header(DCAContext *s)
lossless extension in ExSS
static void dca_exss_skip_mix_coeffs(GetBitContext *gb, int channels, int out_ch)
Skip mixing coefficients of a single mix out configuration (HD)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_WARNING
Something somehow does not look correct.
int mix_config_num_ch[4]
number of channels in each mix out configuration
static void skip_bits_long(GetBitContext *s, int n)
static int dca_exss_parse_asset_header(DCAContext *s)
Parse extension substream asset header (HD)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
static int get_bits_count(const GetBitContext *s)
bitstream reader API header.
static int get_bits_left(GetBitContext *gb)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static const uint16_t mask[17]
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
static int dca_exss_mask2count(int mask)
Return the number of channels in an ExSS speaker mask (HD)
int mix_metadata
mixing metadata present
int ff_dca_xbr_parse_frame(DCAContext *s)
low bitrate component in ExSS
#define FF_PROFILE_DTS_HD_HRA
XXCh channels extension in ExSS.
int ff_dca_xll_decode_navi(DCAContext *s, int asset_end)
int core_ext_mask
present extensions in the core substream
static unsigned int get_bits1(GetBitContext *s)
int exss_ext_mask
Non-core extensions.
static void skip_bits(GetBitContext *s, int n)
extended bitrate extension in ExSS
void ff_dca_exss_parse_header(DCAContext *s)
Parse extension substream header (HD)
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
int ff_dca_xxch_decode_frame(DCAContext *s)
int num_mix_configs
number of mix out configurations
common internal and external API header
#define FF_PROFILE_DTS_HD_MA
int static_fields
static fields present
XXCh channels extension in core substream.