51 int *tab_offset,
VLC *out_vlc)
57 for (
int b = 1;
b <= 12;
b++) {
58 for (i = *cb++; i > 0; i--) {
64 max_len = bits[index - 1];
72 *tab_offset += 1 << max_len;
78 int i, tab_offset = 0;
82 for (
int i = 0; i < 4; i++) {
84 &tab_offset, &wl_vlc_tabs[i]);
86 &tab_offset, &ct_vlc_tabs[i]);
90 for (
int i = 0; i < 8; i++)
92 &tab_offset, &sf_vlc_tabs[i]);
96 for (i = 0; i < 112; i++) {
99 &xlats, &tab_offset, &spec_vlc_tabs[i]);
106 for (i = 0; i < 11; i++)
108 &tab_offset, &gain_vlc_tabs[i]);
112 for (i = 0; i < 7; i++)
114 &tab_offset, &tone_vlc_tabs[i]);
136 "Invalid number of transmitted units!\n");
161 const int8_t *weights_tab =
168 "WL index out of range: pos=%d, val=%d!\n",
197 "SF index out of range: pos=%d, val=%d!\n",
215 int *dst,
int num_values)
220 dst[0] = dst[1] = dst[2] = start_val;
221 for (i = 3; i < num_values; i++)
226 #define UNPACK_SF_VQ_SHAPE(gb, dst, num_vals) \ 227 start_val = get_bits((gb), 6); \ 228 unpack_vq_shape(start_val, &atrac3p_sf_shapes[get_bits((gb), 6)][0], \ 262 vlc_tab = &wl_vlc_tabs[
get_bits(gb, 2)];
278 "WL mode 1: invalid position!\n");
285 for (i = 0; i <
pos; i++)
298 vlc_tab = &wl_vlc_tabs[
get_bits(gb, 2)];
309 vlc_tab = &wl_vlc_tabs[
get_bits(gb, 1)];
326 vlc_tab->
bits, 1)) & 7;
329 vlc_tab->
bits, 1)) & 7;
335 vlc_tab->
bits, 1)) & 7;
345 vlc_tab = &wl_vlc_tabs[
get_bits(gb, 2)];
390 int i, weight_idx = 0,
delta,
diff, num_long_vals,
391 delta_bits, min_val, vlc_sel, start_val;
403 vlc_tab = &sf_vlc_tabs[
get_bits(gb, 2)];
411 if (weight_idx == 3) {
418 for (i = 0; i < num_long_vals; i++)
432 "SF mode 1: invalid parameters!\n");
437 for (i = 0; i < num_long_vals; i++)
449 vlc_tab = &sf_vlc_tabs[
get_bits(gb, 2)];
460 vlc_tab = &sf_vlc_tabs[
get_bits(gb, 2) + 4];
479 vlc_tab = &sf_vlc_tabs[vlc_sel];
481 if (weight_idx == 3) {
482 vlc_tab = &sf_vlc_tabs[vlc_sel + 4];
486 diff = (
get_bits(gb, 4) + 56) & 0x3F;
507 if (weight_idx && weight_idx < 3)
527 for (ch_num = 0; ch_num < num_channels; ch_num++) {
563 for (ch_num = 0; ch_num < num_channels; ch_num++) {
591 "Invalid number of code table indexes: %d!\n", num_coded_vals);
594 return num_coded_vals;
599 #define DEC_CT_IDX_COMMON(OP) \ 600 num_vals = get_num_ct_values(gb, ctx, avctx); \ 604 for (i = 0; i < num_vals; i++) { \ 605 if (chan->qu_wordlen[i]) { \ 606 chan->qu_tab_idx[i] = OP; \ 607 } else if (ch_num && ref_chan->qu_wordlen[i]) \ 609 chan->qu_tab_idx[i] = get_bits1(gb); \ 612 #define CODING_DIRECT get_bits(gb, num_bits) 614 #define CODING_VLC get_vlc2(gb, vlc_tab->table, vlc_tab->bits, 1) 616 #define CODING_VLC_DELTA \ 618 : (pred + get_vlc2(gb, delta_vlc->table, \ 619 delta_vlc->bits, 1)) & mask; \ 620 pred = chan->qu_tab_idx[i] 622 #define CODING_VLC_DIFF \ 623 (ref_chan->qu_tab_idx[i] + \ 624 get_vlc2(gb, vlc_tab->table, vlc_tab->bits, 1)) & mask 638 int i, num_vals, num_bits,
pred;
640 VLC *vlc_tab, *delta_vlc;
658 vlc_tab = &ct_vlc_tabs[1];
659 delta_vlc = &ct_vlc_tabs[2];
698 for (ch_num = 0; ch_num < num_channels; ch_num++) {
722 VLC *vlc_tab, int16_t *
out,
const int num_specs)
731 for (pos = 0; pos < num_specs;) {
733 for (j = 0; j < group_size; j++) {
736 for (i = 0; i < num_coeffs; i++) {
748 pos += group_size * num_coeffs;
763 int i, ch_num,
qu, wordlen, codetab, tab_index, num_specs;
767 for (ch_num = 0; ch_num < num_channels; ch_num++) {
785 tab_index = (chan->
table_type * 8 + codetab) * 7 + wordlen - 1;
789 &chan->
spectrum[ff_atrac3p_qu_to_spec_pos[qu]],
793 memcpy(&chan->
spectrum[ff_atrac3p_qu_to_spec_pos[qu]],
796 sizeof(chan->
spectrum[ff_atrac3p_qu_to_spec_pos[qu]]));
807 for (i = 0; i < num_specs; i++)
830 memset(out, 0, num_flags);
835 for (i = 0; i < num_flags; i++)
838 memset(out, 1, num_flags);
856 for (ch_num = 0; ch_num < num_channels; ch_num++)
871 int ch_num,
int coded_subbands)
873 int i,
delta, delta_bits, min_val;
879 for (i = 0; i < coded_subbands; i++)
883 for (i = 0; i < coded_subbands; i++)
886 gain_vlc_tabs[0].
bits, 1);
890 for (i = 0; i < coded_subbands; i++) {
891 delta =
get_vlc2(gb, gain_vlc_tabs[1].table,
892 gain_vlc_tabs[1].bits, 1);
898 get_vlc2(gb, gain_vlc_tabs[0].table,
899 gain_vlc_tabs[0].bits, 1);
901 for (i = 1; i < coded_subbands; i++) {
902 delta =
get_vlc2(gb, gain_vlc_tabs[1].table,
903 gain_vlc_tabs[1].bits, 1);
911 for (i = 0; i < coded_subbands; i++)
918 for (i = 0; i < coded_subbands; i++) {
958 gain_vlc_tabs[2].
bits, 1);
961 delta =
get_vlc2(gb, gain_vlc_tabs[3].table,
962 gain_vlc_tabs[3].bits, 1);
977 int ch_num,
int coded_subbands)
985 for (sb = 0; sb < coded_subbands; sb++)
991 for (sb = 0; sb < coded_subbands; sb++)
994 gain_vlc_tabs[5].
bits, 1);
1000 for (sb = 0; sb < coded_subbands; sb++)
1006 for (sb = 0; sb < coded_subbands; sb++)
1018 for (sb = 1; sb < coded_subbands; sb++)
1021 gain_vlc_tabs[4].
bits, 1);
1030 for (sb = 0; sb < coded_subbands; sb++)
1037 for (sb = 0; sb < coded_subbands; sb++)
1063 if (!pos || dst->
loc_code[pos - 1] < 15)
1065 else if (dst->
loc_code[pos - 1] >= 30)
1096 : &gain_vlc_tabs[9];
1114 int ch_num,
int coded_subbands,
1117 int sb,
i,
delta, delta_bits, min_val,
pred, more_than_ref;
1125 for (sb = 0; sb < coded_subbands; sb++)
1131 for (sb = 0; sb < coded_subbands; sb++) {
1139 gain_vlc_tabs[10].
bits, 1);
1147 if (more_than_ref) {
1149 get_vlc2(gb, gain_vlc_tabs[9].table,
1150 gain_vlc_tabs[9].bits, 1);
1159 tab = more_than_ref ? &gain_vlc_tabs[7]
1160 : &gain_vlc_tabs[10];
1170 for (sb = 0; sb < coded_subbands; sb++)
1175 for (sb = 0; sb < coded_subbands; sb++) {
1191 for (sb = 1; sb < coded_subbands; sb++) {
1199 gain_vlc_tabs[6].
bits, 1);
1209 2 + more_than_ref + 6];
1221 for (sb = 0; sb < coded_subbands; sb++)
1233 for (sb = 0; sb < coded_subbands; sb++)
1242 for (sb = 0; sb < coded_subbands; sb++) {
1248 "Invalid gain location: ch=%d, sb=%d, pos=%d, val=%d\n",
1270 int ch_num, coded_subbands, sb,
ret;
1272 for (ch_num = 0; ch_num < num_channels; ch_num++) {
1277 coded_subbands =
get_bits(gb, 4) + 1;
1288 if (coded_subbands > 0) {
1311 int ch_num,
int band_has_tones[])
1319 if (!band_has_tones[sb])
1330 if (!band_has_tones[sb])
1352 int ch_num,
int band_has_tones[],
1363 if (band_has_tones[sb])
1368 if (band_has_tones[sb])
1371 tone_vlc_tabs[1].
bits, 1);
1375 if (band_has_tones[sb]) {
1376 delta =
get_vlc2(gb, tone_vlc_tabs[2].table,
1377 tone_vlc_tabs[2].bits, 1);
1384 if (band_has_tones[sb])
1391 if (band_has_tones[sb]) {
1394 "Too many tones: %d (max. 48), frame: %d!\n",
1416 int ch_num,
int band_has_tones[])
1425 if (!band_has_tones[sb] || !dst[sb].num_wavs)
1430 if (dst[sb].num_wavs)
1432 for (i = dst[sb].num_wavs - 2; i >= 0 ; i--) {
1433 nbits =
av_log2(iwav[i+1].freq_index) + 1;
1437 for (i = 0; i < dst[sb].
num_wavs; i++) {
1438 if (!i || iwav[i - 1].freq_index < 512)
1441 nbits =
av_log2(1023 - iwav[i - 1].freq_index) + 1;
1443 1024 - (1 << nbits);
1450 if (!band_has_tones[sb] || !dst[sb].num_wavs)
1454 for (i = 0; i < dst[sb].
num_wavs; i++) {
1456 tone_vlc_tabs[6].
bits, 1);
1458 pred = (i < ref[sb].
num_wavs) ? iwav[i].freq_index :
1459 (ref[sb].num_wavs ? iwav[ref[sb].num_wavs - 1].freq_index : 0);
1476 int ch_num,
int band_has_tones[])
1480 int refwaves[48] = { 0 };
1486 if (!band_has_tones[sb] || !dst[sb].num_wavs)
1490 for (j = 0; j < dst[sb].
num_wavs; j++) {
1491 for (i = 0, fi = 0, maxdiff = 1024; i < ref[sb].
num_wavs; i++) {
1492 diff =
FFABS(wsrc[j].freq_index - wref[i].freq_index);
1493 if (diff < maxdiff) {
1501 else if (j < ref[sb].num_wavs)
1502 refwaves[dst[sb].start_index + j] = j + ref[sb].
start_index;
1504 refwaves[dst[sb].start_index + j] = -1;
1514 if (!band_has_tones[sb] || !dst[sb].num_wavs)
1517 for (i = 0; i < dst[sb].
num_wavs; i++)
1525 if (!band_has_tones[sb] || !dst[sb].num_wavs)
1528 for (i = 0; i < dst[sb].
num_wavs; i++)
1531 tone_vlc_tabs[3].
bits, 1) + 20;
1534 get_vlc2(gb, tone_vlc_tabs[4].table,
1535 tone_vlc_tabs[4].bits, 1) + 24;
1540 if (!band_has_tones[sb] || !dst[sb].num_wavs)
1542 for (i = 0; i < dst[sb].
num_wavs; i++) {
1544 tone_vlc_tabs[5].
bits, 1);
1554 if (!band_has_tones[sb])
1556 for (i = 0; i < dst[sb].
num_wavs; i++)
1576 int ch_num,
int band_has_tones[])
1583 if (!band_has_tones[sb])
1586 for (i = 0; i < dst[sb].
num_wavs; i++)
1587 wparam[i].phase_index =
get_bits(gb, 5);
1604 int band_has_tones[16];
1606 for (ch_num = 0; ch_num < num_channels; ch_num++)
1624 tone_vlc_tabs[0].
bits, 1) + 1;
1626 if (num_channels == 2) {
1634 for (ch_num = 0; ch_num < num_channels; ch_num++) {
1648 if (num_channels == 2) {
1671 "Invalid number of quantization units: %d!\n",
1695 if (num_channels == 2) {
static void unpack_vq_shape(int start_val, const int8_t *shape_vec, int *dst, int num_values)
Unpack vector quantization tables.
static int get_num_ct_values(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, AVCodecContext *avctx)
Decode number of code table values.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static void decode_tones_phase(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[])
Decode phase information for each subband of a channel.
uint8_t bits
number of bits a single coefficient occupy
Atrac3pWaveParam waves[48]
const uint16_t ff_atrac3p_qu_to_spec_pos[33]
Map quant unit number to its position in the spectrum.
static int decode_gainc_loc_codes(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int coded_subbands, AVCodecContext *avctx)
Decode location code for each gain control point.
uint8_t is_signed
1 - values in that table are signed ones, otherwise - absolute ones
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static const Atrac3pSpecCodeTab atrac3p_spectra_tabs[112]
static int decode_code_table_indexes(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
Decode code table indexes for each channel.
int num_tone_bands
number of PQF bands with tones
int num_coded_subbands
number of subbands with coded spectrum
int table_type
table type: 0 - tone?, 1- noise?
static const uint8_t atrac3p_gain_cbs[][12]
#define FF_ARRAY_ELEMS(a)
int num_wavs
number of sine waves in the group
int used_quant_units
number of quant units with coded spectrum
static const uint8_t atrac3p_ct_cbs[][12]
VLC tables for code table indexes.
static const uint8_t atrac3p_sf_xlats[]
int lev_code[7]
level at corresponding control point
uint8_t negate_coeffs[ATRAC3P_SUBBANDS]
1 - subband-wise IMDCT coefficients negation
#define ATRAC3P_SUBBANDS
Global unit sizes.
static VLC_TYPE tables_data[154276][2]
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static double cb(void *priv, double x, double y)
static void gainc_level_mode3s(AtracGainInfo *dst, AtracGainInfo *ref)
Implements coding mode 3 (slave) for gain compensation levels.
int16_t spectrum[2048]
decoded IMDCT spectrum
int stop_pos
stop position expressed in n*4 samples
static void decode_window_shape(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels)
Decode mdct window shape flags for all channels.
static int decode_gainc_levels(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int coded_subbands)
Decode level code for each gain control point.
static const uint8_t atrac3p_wl_cbs[][12]
VLC tables for wordlen.
int ff_atrac3p_decode_channel_unit(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
Decode bitstream data of a channel unit.
uint8_t num_coeffs
1 - map index to a single value, > 1 - map index to a vector of values
Parameters of a single sine wave.
Atrac3pWaveEnvelope pend_env
pending envelope from the previous frame
static const int atrac3p_subband_to_num_powgrps[16]
Map subband number to number of power compensation groups.
int qu_sf_idx[32]
array of scale factor indexes for each quant unit
bitstream reader API header.
static av_cold void build_canonical_huff(const uint8_t *cb, const uint8_t **xlat, int *tab_offset, VLC *out_vlc)
Generate canonical VLC table from given descriptor.
static void decode_spectrum(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
Decode huffman-coded IMDCT spectrum for all channels.
int tones_index
total sum of tones in this unit
int loc_code[7]
location of gain control points
uint8_t invert_phase[ATRAC3P_SUBBANDS]
1 - subband-wise phase inversion
uint8_t * wnd_shape
IMDCT window shape for current frame.
int noise_level_index
global noise level index
static const uint16_t table[]
static const uint8_t atrac3p_qu_to_subband[32]
Map quant unit number to subband number.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static const uint16_t mask[17]
static const int8_t atrac3p_sf_weights[2][32]
static void decode_tones_envelope(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[])
Decode envelope for all tones of a channel.
Tables for spectrum coding.
Parameters of a group of sine waves.
int noise_table_index
global noise RNG table index
static VLC wl_vlc_tabs[4]
simple assert() macros that are a bit more flexible than ISO C assert().
static VLC tone_vlc_tabs[7]
int qu_wordlen[32]
array of word lengths for each quant unit
static void gainc_level_mode1m(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, AtracGainInfo *dst)
Implements coding mode 1 (master) for gain compensation levels.
int amplitude_mode
1 - low range, 0 - high range
#define ATRAC3P_POWER_COMP_OFF
Global constants.
static int decode_band_numwavs(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[], AVCodecContext *avctx)
Decode number of tones for each subband of a channel.
static int get_subband_flags(GetBitContext *gb, uint8_t *out, int num_flags)
Retrieve specified amount of flag bits from the input bitstream.
static int decode_quant_wordlen(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
Decode word length information for each channel.
uint8_t group_size
number of coefficients grouped together
static void decode_qu_spectra(GetBitContext *gb, const Atrac3pSpecCodeTab *tab, VLC *vlc_tab, int16_t *out, const int num_specs)
Decode huffman-coded spectral lines for a given quant unit.
static const uint8_t atrac3p_qu_num_to_seg[32]
Ungroup table for word length segments.
static VLC ct_vlc_tabs[4]
Atrac3pWavesData * tones_info
#define DEC_CT_IDX_COMMON(OP)
int use_full_table
1 - full table list, 0 - restricted one
static const uint8_t atrac3p_ct_restricted_to_full[2][7][4]
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
int num_gain_subbands
number of subbands with gain control data
uint8_t swap_channels[ATRAC3P_SUBBANDS]
1 - perform subband-wise channel swapping
uint8_t tone_sharing[ATRAC3P_SUBBANDS]
1 - subband-wise tone sharing flags
static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE(*table)[2], int bits, int max_depth)
Parse a vlc code.
int num_coded_vals
number of transmitted quant unit values
av_cold void ff_atrac3p_init_vlcs(void)
Initialize VLC tables for bitstream parsing.
static VLC sf_vlc_tabs[8]
static int decode_gainc_data(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
Decode gain control data for all channels.
static const float pred[4]
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
int start_index
start index into global tones table for that subband
int freq_index
wave frequency index
Gain control parameters for one subband.
Libavcodec external API header.
static void gainc_loc_mode1(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, AtracGainInfo *dst)
Implements coding mode 1 for gain compensation locations.
main external API structure.
static const uint8_t atrac3p_spectra_xlats[]
static const int8_t atrac3p_wl_weights[6][32]
int amp_sf
quantized amplitude scale factor
Sound channel parameters.
static unsigned int get_bits1(GetBitContext *s)
int ff_init_vlc_from_lengths(VLC *vlc_arg, int nb_bits, int nb_codes, const int8_t *lens, int lens_wrap, const void *symbols, int symbols_wrap, int symbols_size, int offset, int flags, void *logctx)
Build VLC decoding tables suitable for use with get_vlc2()
static const uint8_t atrac3p_gain_xlats[]
#define UNPACK_SF_VQ_SHAPE(gb, dst, num_vals)
static int decode_channel_code_tab(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, AVCodecContext *avctx)
Decode code table indexes for each quant unit of a channel.
static int subtract_sf_weights(Atrac3pChanUnitCtx *ctx, Atrac3pChanParams *chan, int wtab_idx, AVCodecContext *avctx)
Subtract weighting coefficients from decoded scalefactors.
static av_const int sign_extend(int val, unsigned bits)
static const uint8_t atrac3p_tone_xlats[]
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
static int decode_channel_wordlen(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, AVCodecContext *avctx)
Decode word length for each quantization unit of a channel.
static int decode_channel_sf_idx(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, AVCodecContext *avctx)
Decode scale factor indexes for each quant unit of a channel.
int num_points
number of gain control points
static int num_coded_units(GetBitContext *gb, Atrac3pChanParams *chan, Atrac3pChanUnitCtx *ctx, AVCodecContext *avctx)
Decode number of coded quantization units.
int has_start_point
indicates start point within the GHA window
static int ref[MAX_W *MAX_W]
AtracGainInfo * gain_data
gain control data for next frame
static void decode_tones_frequency(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[])
Decode frequency information for each subband of a channel.
int has_stop_point
indicates stop point within the GHA window
#define INIT_VLC_USE_NEW_STATIC
static VLC spec_vlc_tabs[112]
Atrac3pWaveSynthParams * waves_info
int qu_tab_idx[32]
array of code table indexes for each quant unit
int noise_present
1 - global noise info present
static av_always_inline int diff(const uint32_t a, const uint32_t b)
static const int8_t atrac3p_wl_shapes[8][16][9]
3D base shape tables.
VLC_TYPE(* table)[2]
code, bits
Atrac3pChanParams channels[2]
static int decode_scale_factors(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
Decode scale factor indexes for each channel.
static const uint8_t atrac3p_tone_cbs[][12]
static const uint8_t atrac3p_sf_cbs[][12]
VLC tables for scale factor indexes.
int start_pos
start position expressed in n*4 samples
static const struct twinvq_data tab
and forward the result(frame or status change) to the corresponding input.If nothing is possible
static int decode_tones_info(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int num_channels, AVCodecContext *avctx)
Decode tones info for all channels.
int frame_number
Frame counter, set by libavcodec.
static void gainc_loc_mode0(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, AtracGainInfo *dst, int pos)
Implements coding mode 0 for gain compensation locations.
#define FFSWAP(type, a, b)
int tones_present
1 - tones info present
static int decode_gainc_npoints(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int coded_subbands)
Decode number of gain control points.
static const uint8_t atrac3p_wl_ct_xlats[]
uint8_t tone_master[ATRAC3P_SUBBANDS]
1 - subband-wise tone channel swapping
static double val(void *priv, double ch)
static const int8_t atrac3p_spectra_cbs[][12]
Tables for spectrum coding.
mode
Use these values in ebur128_init (or'ed).
Global structures, constants and data for ATRAC3+ decoder.
static VLC gain_vlc_tabs[11]
static int add_wordlen_weights(Atrac3pChanUnitCtx *ctx, Atrac3pChanParams *chan, int wtab_idx, AVCodecContext *avctx)
Add weighting coefficients to the decoded word-length information.
static av_always_inline int get_bitsz(GetBitContext *s, int n)
Read 0-25 bits.
static void decode_tones_amplitude(GetBitContext *gb, Atrac3pChanUnitCtx *ctx, int ch_num, int band_has_tones[])
Decode amplitude information for each subband of a channel.
uint8_t power_levs[5]
power compensation levels