64 #define EAC3_SR_CODE_REDUCED 3 69 uint8_t wrapflag[SPX_MAX_BANDS]={1,0,}, num_copy_sections, copy_sizes[SPX_MAX_BANDS];
70 float rms_energy[SPX_MAX_BANDS];
74 bin = s->spx_dst_start_freq;
75 num_copy_sections = 0;
76 for (bnd = 0; bnd < s->num_spx_bands; bnd++) {
78 int bandsize = s->spx_band_sizes[bnd];
79 if (bin + bandsize > s->spx_src_start_freq) {
80 copy_sizes[num_copy_sections++] = bin - s->spx_dst_start_freq;
81 bin = s->spx_dst_start_freq;
84 for (i = 0; i < bandsize; i += copysize) {
85 if (bin == s->spx_src_start_freq) {
86 copy_sizes[num_copy_sections++] = bin - s->spx_dst_start_freq;
87 bin = s->spx_dst_start_freq;
89 copysize =
FFMIN(bandsize - i, s->spx_src_start_freq - bin);
93 copy_sizes[num_copy_sections++] = bin - s->spx_dst_start_freq;
95 for (ch = 1; ch <= s->fbw_channels; ch++) {
96 if (!s->channel_uses_spx[ch])
100 bin = s->spx_src_start_freq;
101 for (i = 0; i < num_copy_sections; i++) {
102 memcpy(&s->transform_coeffs[ch][bin],
103 &s->transform_coeffs[ch][s->spx_dst_start_freq],
105 bin += copy_sizes[i];
109 bin = s->spx_src_start_freq;
110 for (bnd = 0; bnd < s->num_spx_bands; bnd++) {
111 int bandsize = s->spx_band_sizes[bnd];
113 for (i = 0; i < bandsize; i++) {
114 float coeff = s->transform_coeffs[
ch][bin++];
115 accum += coeff *
coeff;
117 rms_energy[bnd] = sqrtf(accum / bandsize);
122 if (s->spx_atten_code[ch] >= 0) {
124 bin = s->spx_src_start_freq - 2;
125 for (bnd = 0; bnd < s->num_spx_bands; bnd++) {
128 coeffs[0] *= atten_tab[0];
129 coeffs[1] *= atten_tab[1];
130 coeffs[2] *= atten_tab[2];
131 coeffs[3] *= atten_tab[1];
132 coeffs[4] *= atten_tab[0];
134 bin += s->spx_band_sizes[bnd];
141 bin = s->spx_src_start_freq;
142 for (bnd = 0; bnd < s->num_spx_bands; bnd++) {
143 float nscale = s->spx_noise_blend[
ch][bnd] * rms_energy[bnd] * (1.0f / INT32_MIN);
144 float sscale = s->spx_signal_blend[
ch][bnd];
147 nscale *= 1.0 / (1<<23);
148 sscale *= 1.0 / (1<<23);
150 for (i = 0; i < s->spx_band_sizes[bnd]; i++) {
152 s->transform_coeffs[
ch][bin] *= sscale;
153 s->transform_coeffs[
ch][bin++] +=
noise;
161 #define COEFF_0 10273905LL 164 #define COEFF_1 11863283LL 167 #define COEFF_2 3070444LL 176 int even0, even1, even2, odd0, odd1, odd2;
178 odd1 = pre_mant[1] - pre_mant[3] - pre_mant[5];
180 even2 = ( pre_mant[2] *
COEFF_0) >> 23;
181 tmp = ( pre_mant[4] *
COEFF_1) >> 23;
182 odd0 = ((pre_mant[1] + pre_mant[5]) *
COEFF_2) >> 23;
184 even0 = pre_mant[0] + (tmp >> 1);
185 even1 = pre_mant[0] -
tmp;
192 odd0 = tmp + pre_mant[1] + pre_mant[3];
193 odd2 = tmp + pre_mant[5] - pre_mant[3];
195 pre_mant[0] = even0 + odd0;
196 pre_mant[1] = even1 + odd1;
197 pre_mant[2] = even2 + odd2;
198 pre_mant[3] = even2 - odd2;
199 pre_mant[4] = even1 - odd1;
200 pre_mant[5] = even0 - odd0;
206 int end_bap, gaq_mode;
211 end_bap = (gaq_mode < 2) ? 12 : 17;
218 for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) {
219 if (s->bap[ch][bin] > 7 && s->bap[ch][bin] < end_bap)
220 gaq_gain[gs++] =
get_bits1(gbc) << (gaq_mode-1);
225 for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) {
226 if (s->bap[ch][bin] > 7 && s->bap[ch][bin] < 17) {
229 if (group_code > 26) {
243 for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) {
244 int hebap = s->bap[
ch][bin];
248 for (blk = 0; blk < 6; blk++) {
249 s->pre_mantissa[
ch][bin][
blk] = (
av_lfg_get(&s->dith_state) & 0x7FFFFF) - 0x400000;
251 }
else if (hebap < 8) {
254 for (blk = 0; blk < 6; blk++) {
261 log_gain = gaq_gain[gs++];
265 gbits = bits - log_gain;
267 for (blk = 0; blk < 6; blk++) {
269 if (log_gain && mant == -(1 << (gbits-1))) {
272 int mbits = bits - (2 - log_gain);
274 mant = ((unsigned)mant) << (23 - (mbits - 1));
277 b = 1 << (23 - log_gain);
283 mant *= (1 << 24 -
bits);
289 s->pre_mantissa[
ch][bin][
blk] = mant;
292 idct6(s->pre_mantissa[ch][bin]);
299 int ac3_exponent_strategy, parse_aht_info, parse_spx_atten_data;
300 int parse_transient_proc_info;
308 if (!s->eac3_frame_dependent_found) {
309 s->eac3_frame_dependent_found = 1;
321 if (s->substreamid) {
323 if (!s->eac3_subsbtreamid_found) {
324 s->eac3_subsbtreamid_found = 1;
341 for (i = 0; i < (s->channel_mode ? 1 : 2); i++) {
342 s->dialog_normalization[i] = -
get_bits(gbc, 5);
343 if (s->dialog_normalization[i] == 0) {
344 s->dialog_normalization[i] = -31;
346 if (s->target_level != 0) {
347 s->level_gain[i] =
powf(2.0f,
348 (
float)(s->target_level - s->dialog_normalization[i])/6.0f);
350 s->compression_exists[i] =
get_bits1(gbc);
351 if (s->compression_exists[i]) {
367 s->preferred_downmix =
get_bits(gbc, 2);
368 if (s->channel_mode & 1) {
370 s->center_mix_level_ltrt =
get_bits(gbc, 3);
371 s->center_mix_level =
get_bits(gbc, 3);
373 if (s->channel_mode & 4) {
375 s->surround_mix_level_ltrt = av_clip(
get_bits(gbc, 3), 3, 7);
376 s->surround_mix_level = av_clip(
get_bits(gbc, 3), 3, 7);
381 if (s->lfe_on && (s->lfe_mix_level_exists =
get_bits1(gbc))) {
382 s->lfe_mix_level =
get_bits(gbc, 5);
387 for (i = 0; i < (s->channel_mode ? 1 : 2); i++) {
401 int mix_data_size = (
get_bits(gbc, 5) + 2) << 3;
408 for (i = 0; i < (s->channel_mode ? 1 : 2); i++) {
420 for (blk = 0; blk < s->num_blocks; blk++) {
421 if (s->num_blocks == 1 ||
get_bits1(gbc)) {
431 s->bitstream_mode =
get_bits(gbc, 3);
434 s->dolby_surround_mode =
get_bits(gbc, 2);
435 s->dolby_headphone_mode =
get_bits(gbc, 2);
438 s->dolby_surround_ex_mode =
get_bits(gbc, 2);
440 for (i = 0; i < (s->channel_mode ? 1 : 2); i++) {
460 (s->num_blocks == 6 ||
get_bits1(gbc))) {
467 for (i = 0; i < addbsil + 1; i++) {
474 if (s->num_blocks == 6) {
480 ac3_exponent_strategy = 1;
484 s->snr_offset_strategy =
get_bits(gbc, 2);
485 parse_transient_proc_info =
get_bits1(gbc);
488 if (!s->block_switch_syntax)
489 memset(s->block_switch, 0,
sizeof(s->block_switch));
492 if (!s->dither_flag_syntax) {
493 for (ch = 1; ch <= s->fbw_channels; ch++)
494 s->dither_flag[ch] = 1;
496 s->dither_flag[
CPL_CH] = s->dither_flag[s->lfe_ch] = 0;
498 s->bit_allocation_syntax =
get_bits1(gbc);
499 if (!s->bit_allocation_syntax) {
515 if (s->channel_mode > 1) {
516 for (blk = 0; blk < s->num_blocks; blk++) {
518 if (s->cpl_strategy_exists[blk]) {
521 s->cpl_in_use[
blk] = s->cpl_in_use[blk-1];
523 num_cpl_blocks += s->cpl_in_use[
blk];
526 memset(s->cpl_in_use, 0,
sizeof(s->cpl_in_use));
530 if (ac3_exponent_strategy) {
532 for (blk = 0; blk < s->num_blocks; blk++) {
533 for (ch = !s->cpl_in_use[blk]; ch <= s->fbw_channels; ch++) {
539 for (ch = !((s->channel_mode > 1) && num_cpl_blocks); ch <= s->fbw_channels; ch++) {
541 for (blk = 0; blk < 6; blk++) {
548 for (blk = 0; blk < s->num_blocks; blk++) {
554 (s->num_blocks == 6 ||
get_bits1(gbc))) {
559 if (parse_aht_info) {
564 s->channel_uses_aht[
CPL_CH]=0;
565 for (ch = (num_cpl_blocks != 6); ch <= s->channels; ch++) {
567 for (blk = 1; blk < 6; blk++) {
568 if ((s->exp_strategy[blk][ch] !=
EXP_REUSE) ||
569 (!ch && s->cpl_strategy_exists[blk])) {
574 s->channel_uses_aht[
ch] = use_aht &&
get_bits1(gbc);
577 memset(s->channel_uses_aht, 0,
sizeof(s->channel_uses_aht));
581 if (!s->snr_offset_strategy) {
582 int csnroffst = (
get_bits(gbc, 6) - 15) << 4;
583 int snroffst = (csnroffst +
get_bits(gbc, 4)) << 2;
584 for (ch = 0; ch <= s->channels; ch++)
585 s->snr_offset[ch] = snroffst;
589 if (parse_transient_proc_info) {
590 for (ch = 1; ch <= s->fbw_channels; ch++) {
599 for (ch = 1; ch <= s->fbw_channels; ch++) {
600 if (parse_spx_atten_data &&
get_bits1(gbc)) {
603 s->spx_atten_code[
ch] = -1;
608 if (s->num_blocks > 1 &&
get_bits1(gbc)) {
613 int block_start_bits = (s->num_blocks-1) * (4 +
av_log2(s->frame_size-2));
619 for (ch = 1; ch <= s->fbw_channels; ch++) {
620 s->first_spx_coords[
ch] = 1;
621 s->first_cpl_coords[
ch] = 1;
623 s->first_cpl_leak = 1;
EAC3GaqMode
gain adaptive quantization mode
static int noise(AVBSFContext *ctx, AVPacket *out)
const uint8_t ff_ac3_slow_decay_tab[4]
const float ff_eac3_spx_atten_tab[32][3]
Table E.25: Spectral Extension Attenuation Table ff_eac3_spx_atten_tab[code][bin]=pow(2.0,(bin+1)*(code+1)/-15.0);.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_WARNING
Something somehow does not look correct.
const uint8_t ff_ac3_ungroup_3_in_5_bits_tab[32][3]
Table used to ungroup 3 values stored in 5 bits.
static int ff_eac3_parse_header(AC3DecodeContext *s)
static void skip_bits_long(GetBitContext *s, int n)
#define avpriv_request_sample(...)
const uint16_t ff_ac3_slow_gain_tab[4]
static int get_sbits(GetBitContext *s, int n)
#define COEFF_0
lrint(M_SQRT2*cos(2*M_PI/12)*(1<<23))
static void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const uint8_t ff_ac3_fast_decay_tab[4]
#define COEFF_2
lrint(M_SQRT2*cos(5*M_PI/12)*(1<<23))
#define EAC3_SR_CODE_REDUCED
static void idct6(int pre_mant[6])
Calculate 6-point IDCT of the pre-mantissas.
#define AC3_HEAVY_RANGE(x)
const int16_t ff_eac3_gaq_remap_1[12]
Table E3.6, Gk=1 No gain (Gk=1) inverse quantization, remapping scale factors ff_eac3_gaq_remap[hebap...
const int16_t ff_eac3_gaq_remap_2_4_a[9][2]
Table E3.6, Gk=2 & Gk=4, A Large mantissa inverse quantization, remapping scale factors ff_eac3_gaq_r...
#define COEFF_1
lrint(M_SQRT2*cos(0*M_PI/12)*(1<<23)) = lrint(M_SQRT2*(1<<23))
const uint8_t ff_eac3_bits_vs_hebap[20]
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define CPL_CH
coupling channel index
Libavcodec external API header.
const int16_t ff_eac3_gaq_remap_2_4_b[9][2]
Table E3.6, Gk=2 & Gk=4, B Large mantissa inverse quantization, negative mantissa remapping offsets f...
static void ff_eac3_apply_spectral_extension(AC3DecodeContext *s)
static unsigned int av_lfg_get(AVLFG *c)
Get the next random unsigned 32-bit number using an ALFG.
static unsigned int get_bits1(GetBitContext *s)
static void skip_bits1(GetBitContext *s)
static void skip_bits(GetBitContext *s, int n)
uint8_t pi<< 24) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_U8,(uint64_t)((*(const uint8_t *) pi - 0x80U))<< 56) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16,(*(const int16_t *) pi >>8)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S16,(uint64_t)(*(const int16_t *) pi)<< 48) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32,(*(const int32_t *) pi >>24)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S32,(uint64_t)(*(const int32_t *) pi)<< 32) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S64,(*(const int64_t *) pi >>56)+0x80) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0f/(INT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0/(INT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_FLT, llrintf(*(const float *) pi *(INT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_DBL, llrint(*(const double *) pi *(INT64_C(1)<< 63))) #define FMT_PAIR_FUNC(out, in) static conv_func_type *const fmt_pair_to_conv_functions[AV_SAMPLE_FMT_NB *AV_SAMPLE_FMT_NB]={ FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S64), };static void cpy1(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, len);} static void cpy2(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 2 *len);} static void cpy4(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 4 *len);} static void cpy8(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 8 *len);} AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, const int *ch_map, int flags) { AudioConvert *ctx;conv_func_type *f=fmt_pair_to_conv_functions[av_get_packed_sample_fmt(out_fmt)+AV_SAMPLE_FMT_NB *av_get_packed_sample_fmt(in_fmt)];if(!f) return NULL;ctx=av_mallocz(sizeof(*ctx));if(!ctx) return NULL;if(channels==1){ in_fmt=av_get_planar_sample_fmt(in_fmt);out_fmt=av_get_planar_sample_fmt(out_fmt);} ctx->channels=channels;ctx->conv_f=f;ctx->ch_map=ch_map;if(in_fmt==AV_SAMPLE_FMT_U8||in_fmt==AV_SAMPLE_FMT_U8P) memset(ctx->silence, 0x80, sizeof(ctx->silence));if(out_fmt==in_fmt &&!ch_map) { switch(av_get_bytes_per_sample(in_fmt)){ case 1:ctx->simd_f=cpy1;break;case 2:ctx->simd_f=cpy2;break;case 4:ctx->simd_f=cpy4;break;case 8:ctx->simd_f=cpy8;break;} } if(HAVE_X86ASM &&HAVE_MMX) swri_audio_convert_init_x86(ctx, out_fmt, in_fmt, channels);if(ARCH_ARM) swri_audio_convert_init_arm(ctx, out_fmt, in_fmt, channels);if(ARCH_AARCH64) swri_audio_convert_init_aarch64(ctx, out_fmt, in_fmt, channels);return ctx;} void swri_audio_convert_free(AudioConvert **ctx) { av_freep(ctx);} int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len) { int ch;int off=0;const int os=(out->planar ? 1 :out->ch_count) *out->bps;unsigned misaligned=0;av_assert0(ctx->channels==out->ch_count);if(ctx->in_simd_align_mask) { int planes=in->planar ? in->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) in->ch[ch];misaligned|=m &ctx->in_simd_align_mask;} if(ctx->out_simd_align_mask) { int planes=out->planar ? out->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) out->ch[ch];misaligned|=m &ctx->out_simd_align_mask;} if(ctx->simd_f &&!ctx->ch_map &&!misaligned){ off=len &~15;av_assert1(off >=0);av_assert1(off<=len);av_assert2(ctx->channels==SWR_CH_MAX||!in->ch[ctx->channels]);if(off >0){ if(out->planar==in->planar){ int planes=out->planar ? out->ch_count :1;for(ch=0;ch< planes;ch++){ ctx->simd_f(out-> ch ch
const int16_t ff_ac3_floor_tab[8]
common internal api header.
const uint8_t ff_eac3_frm_expstr[32][6]
Table E2.14 Frame Exponent Strategy Combinations.
static const int16_t coeffs[]
static const double coeff[2][5]
const int16_t(*const [8] ff_eac3_mantissa_vq)[6]
const uint16_t ff_ac3_db_per_bit_tab[4]
Common code between the AC-3 encoder and decoder.