32#ifndef AVCODEC_AAC_AACDEC_FIXED_COUPLING_H
33#define AVCODEC_AAC_AACDEC_FIXED_COUPLING_H
48 int *dest = target->coeffs_fixed;
49 const int *
src = cce->ch[0].coeffs_fixed;
50 int g,
i, group, k, idx = 0;
53 "Dependent coupling is not supported together with LTP\n");
58 if (cce->ch[0].band_type[idx] !=
ZERO_BT) {
59 const int gain = cce->coup.gain[
index][idx];
64 shift = (-gain-1024) >> 3;
68 shift = (gain-1024) >> 3;
73 }
else if (
shift < 0) {
77 for (group = 0; group < ics->
group_len[
g]; group++) {
86 for (group = 0; group < ics->
group_len[
g]; group++) {
90 dest[group * 128 + k] +=
tmp * (1U <<
shift);
111 const int gain = cce->coup.gain[
index][0];
112 const int *
src = cce->ch[0].output_fixed;
113 unsigned int *dest = target->output_fixed;
114 const int len = 1024 << (ac->oc[1].m4ac.sbr == 1);
117 shift = (gain-1024) >> 3;
120 }
else if (
shift < 0) {
124 for (
i = 0;
i <
len;
i++) {
130 for (
i = 0;
i <
len;
i++) {
@ ZERO_BT
Scalefactors and spectral data are all zero.
AAC decoder definitions and structures.
static const int cce_scale_fixed[8]
static void AAC_RENAME apply_dependent_coupling(AACDecContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
Apply dependent channel coupling (applied before IMDCT).
static void AAC_RENAME apply_independent_coupling(AACDecContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
Apply independent channel coupling (applied after IMDCT).
#define i(width, name, range_min, range_max)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static const int offsets[]
static int shift(int a, int b)
static av_always_inline av_const double round(double x)
@ AOT_AAC_LTP
Y Long Term Prediction.
main AAC decoding context
channel element - generic struct for SCE/CPE/CCE/LFE
Individual Channel Stream.
uint8_t max_sfb
number of scalefactor bands per group
const uint16_t * swb_offset
table of offsets to the lowest spectral coefficient of a scalefactor band, sfb, for a particular wind...
Single Channel Element - used for both SCE and LFE elements.