28 #define DCA_CORE_EXTS (DCA_EXT_XCH | DCA_EXT_XXCH | DCA_EXT_X96)
56 return av_popcount(mask) +
75 for (i = 0; i < channels; i++) {
76 int mix_map_mask =
get_bits(gb, out_ch);
77 int num_coeffs = av_popcount(mix_map_mask);
90 int embedded_stereo = 0;
93 int extensions_mask = 0;
126 int spkr_mask_size = 16;
135 spkr_mask_size = (
get_bits(&s->
gb, 2) + 1) << 2;
141 for (i = 0; i < spkr_remap_sets; i++) {
146 for (i = 0; i < spkr_remap_sets; i++) {
147 int num_dec_ch_remaps =
get_bits(&s->
gb, 5) + 1;
151 for (j = 0; j < num_spkrs[i]; j++) {
153 int num_dec_ch = av_popcount(remap_dec_ch_mask);
163 if (drc_code_present)
169 if (drc_code_present && embedded_stereo)
234 "DTS extensions detection mismatch (%d, %d)\n",
250 int active_ss_mask[8];
265 hdrsize =
get_bits(&s->
gb, 8 + 4 * blownup) + 1;
280 if (num_audiop > 1) {
282 "Multiple DTS-HD audio presentations");
288 if (num_assets > 1) {
294 for (i = 0; i < num_audiop; i++)
295 active_ss_mask[i] =
get_bits(&s->
gb, ss_index + 1);
297 for (i = 0; i < num_audiop; i++)
298 for (j = 0; j <= ss_index; j++)
299 if (active_ss_mask[i] & (1 << j))
304 int mix_out_mask_size;
307 mix_out_mask_size = (
get_bits(&s->
gb, 2) + 1) << 2;
311 int mix_out_mask =
get_bits(&s->
gb, mix_out_mask_size);
319 for (i = 0; i < num_assets; i++)
322 for (i = 0; i < num_assets; i++) {
331 if (start_posn + hdrsize * 8 > j)
334 for (i = 0; i < num_assets; i++) {
339 if (mkr == 0x655e315e) {
341 }
else if (mkr == 0x47004a03) {
346 "DTS-ExSS: unknown marker = 0x%08x\n", mkr);
351 if (start_posn + asset_size[i] * 8 > j)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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)
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 core_ext_mask
present extensions in the core substream
static unsigned int get_bits1(GetBitContext *s)
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.