43#define BITSTREAM_READER_LE
54#define QDM2_LIST_ADD(list, size, packet) \
57 list[size - 1].next = &list[size]; \
59 list[size].packet = packet; \
60 list[size].next = NULL; \
65#define QDM2_SB_USED(sub_sampling) (((sub_sampling) >= 2) ? 30 : 8 << (sub_sampling))
67#define FIX_NOISE_IDX(noise_idx) \
68 if ((noise_idx) >= 3840) \
69 (noise_idx) -= 3840; \
71#define SB_DITHERING_NOISE(sb,noise_idx) (noise_table[(noise_idx)++] * sb_noise_attenuation[(sb)])
73#define SAMPLES_NEEDED \
74 av_log (NULL,AV_LOG_INFO,"This file triggers some untested code. Please contact the developers.\n");
76#define SAMPLES_NEEDED_2(why) \
77 av_log (NULL,AV_LOG_INFO,"This file triggers some missing code. Please contact the developers.\nPosition: %s\n",why);
79#define QDM2_MAX_FRAME_SIZE 512
198 0, 5, 1, 5, 5, 5, 5, 5, 2, 5, 5, 5, 5, 5, 5, 5, 3, 5, 5, 5, 5, 5, 4
221 if ((
value & ~3) > 0)
249 for (
i = 0;
i < length;
i++)
252 return (uint16_t)(
value & 0xffff);
266 if (sub_packet->
type == 0) {
267 sub_packet->
size = 0;
272 if (sub_packet->
type & 0x80) {
273 sub_packet->
size <<= 8;
275 sub_packet->
type &= 0x7f;
278 if (sub_packet->
type == 0x7f)
299 while (list && list->
packet) {
315 int i, j, n, ch, sum;
320 for (
i = 0;
i < n;
i++) {
323 for (j = 0; j < 8; j++)
330 for (j = 0; j < 8; j++)
352 for (j = 0; j < 64; j++) {
379 for (j = 0; j < 64; ) {
380 if (coding_method[ch][sb][j] < 8)
382 if ((coding_method[ch][sb][j] - 8) > 22) {
386 switch (
switchtable[coding_method[ch][sb][j] - 8]) {
410 for (k = 0; k <
run; k++) {
412 int sbjk = sb + (j + k) / 64;
417 if (coding_method[ch][sbjk][(j + k) % 64] > coding_method[ch][sb][j]) {
421 memset(&coding_method[ch][sb][j + k], case_val,
423 memset(&coding_method[ch][sb][j + k], case_val,
444 int i, sb, ch, sb_used;
448 for (sb = 0; sb < 30; sb++)
449 for (
i = 0;
i < 8;
i++) {
463 for (sb = 0; sb < sb_used; sb++)
465 for (
i = 0;
i < 64;
i++) {
474 for (sb = 0; sb < sb_used; sb++) {
475 if ((sb >= 4) && (sb <= 23)) {
477 for (
i = 0;
i < 64;
i++) {
491 for (
i = 0;
i < 64;
i++) {
503 for (
i = 0;
i < 64;
i++) {
535 int c,
int superblocktype_2_3,
541 int add1, add2, add3, add4;
545 if (!superblocktype_2_3) {
550 for (ch = 0; ch < nb_channels; ch++) {
551 for (sb = 0; sb < 30; sb++) {
552 for (j = 1; j < 63; j++) {
553 add1 = tone_level_idx[ch][sb][j] - 10;
556 add2 = add3 = add4 = 0;
572 tmp = tone_level_idx[ch][sb][j + 1] * 2 - add4 - add3 - add2 - add1;
575 tone_level_idx_temp[ch][sb][j + 1] =
tmp & 0xff;
577 tone_level_idx_temp[ch][sb][0] = tone_level_idx_temp[ch][sb][1];
581 for (ch = 0; ch < nb_channels; ch++)
582 for (sb = 0; sb < 30; sb++)
583 for (j = 0; j < 64; j++)
584 acc += tone_level_idx_temp[ch][sb][j];
586 multres = 0x66666667LL * (acc * 10);
587 esp_40 = (multres >> 32) / 8 + ((multres & 0xffffffff) >> 31);
588 for (ch = 0; ch < nb_channels; ch++)
589 for (sb = 0; sb < 30; sb++)
590 for (j = 0; j < 64; j++) {
591 comp = tone_level_idx_temp[ch][sb][j]* esp_40 * 10;
622 coding_method[ch][sb][j] = ((
tmp & 0xfffa) + 30 )& 0xff;
624 for (sb = 0; sb < 30; sb++)
626 for (ch = 0; ch < nb_channels; ch++)
627 for (sb = 0; sb < 30; sb++)
628 for (j = 0; j < 64; j++)
630 if (coding_method[ch][sb][j] < 10)
631 coding_method[ch][sb][j] = 10;
634 if (coding_method[ch][sb][j] < 16)
635 coding_method[ch][sb][j] = 16;
637 if (coding_method[ch][sb][j] < 30)
638 coding_method[ch][sb][j] = 30;
643 for (ch = 0; ch < nb_channels; ch++)
644 for (sb = 0; sb < 30; sb++)
645 for (j = 0; j < 64; j++)
664 int length,
int sb_min,
int sb_max)
667 int joined_stereo, zero_encoding;
669 float type34_div = 0;
670 float type34_predictor;
672 int sign_bits[16] = {0};
676 for (sb=sb_min; sb < sb_max; sb++) {
685 for (sb = sb_min; sb < sb_max; sb++) {
697 for (j = 0; j < 16; j++)
700 for (j = 0; j < 64; j++)
718 type34_predictor = 0.0;
721 for (j = 0; j < 128; ) {
726 for (k = 0; k < 5; k++) {
727 if ((j + 2 * k) >= 128)
738 for (k = 0; k < 5; k++)
741 for (k = 0; k < 5; k++)
744 for (k = 0; k < 10; k++)
756 f -=
noise_samples[((sb + 1) * (j +5 * ch + 1)) & 127] * 9.0 / 40.0;
767 for (k = 0; k < 5; k++) {
779 for (k = 0; k < 5; k++)
783 for (k = 0; k < 5; k++)
797 for (k = 0; k < 3; k++)
800 for (k = 0; k < 3; k++)
825 type34_predictor = samples[0];
834 type34_predictor = samples[0];
849 for (k = 0; k <
run && j + k < 128; k++) {
851 q->
tone_level[0][sb][(j + k) / 2] * samples[k];
853 if (sign_bits[(j + k) / 8])
855 q->
tone_level[1][sb][(j + k) / 2] * -samples[k];
858 q->
tone_level[1][sb][(j + k) / 2] * samples[k];
862 for (k = 0; k <
run; k++)
893 quantized_coeffs[0] =
level;
895 for (
i = 0;
i < 7; ) {
907 for (k = 1; k <=
run; k++)
943 for (sb = 0; sb < n; sb++)
945 for (j = 0; j < 8; j++) {
949 for (k=0; k < 8; k++) {
955 for (k=0; k < 8; k++)
962 for (sb = 0; sb < n; sb++)
970 for (j = 0; j < 8; j++)
976 for (sb = 0; sb < n; sb++)
978 for (j = 0; j < 8; j++) {
1004 for (
i = 1;
i < n;
i++)
1009 for (j = 0; j < (8 - 1); ) {
1016 for (k = 1; k <=
run; k++)
1025 for (
i = 0;
i < 8;
i++)
1064 int ret, length = 0;
1138 if (nodes[0] && nodes[1] && nodes[2])
1147 if (nodes[0] && nodes[1] && nodes[3])
1164 int i, packet_bytes, sub_packet_size, sub_packets_D;
1166 unsigned int next_index = 0;
1212 for (
i = 0;
i < 6;
i++)
1216 for (
i = 0; packet_bytes > 0;
i++) {
1236 if (next_index >=
header.size)
1244 sub_packet_size = ((packet->
size > 0xff) ? 1 : 0) + packet->
size + 2;
1246 if (packet->
type == 0)
1249 if (sub_packet_size > packet_bytes) {
1250 if (packet->
type != 10 && packet->
type != 11 && packet->
type != 12)
1252 packet->
size += packet_bytes - sub_packet_size;
1255 packet_bytes -= sub_packet_size;
1261 if (packet->
type == 8) {
1264 }
else if (packet->
type >= 9 && packet->
type <= 12) {
1267 }
else if (packet->
type == 13) {
1268 for (j = 0; j < 6; j++)
1270 }
else if (packet->
type == 14) {
1271 for (j = 0; j < 6; j++)
1273 }
else if (packet->
type == 15) {
1276 }
else if (packet->
type >= 16 && packet->
type < 48 &&
1310 ((sub_packet >= 16) ? (sub_packet - 16) : sub_packet);
1322 int local_int_4, local_int_8, stereo_phase, local_int_10;
1323 int local_int_14, stereo_exp, local_int_20, local_int_28;
1337 if(local_int_4 < q->group_size)
1343 local_int_4 += local_int_10;
1344 local_int_28 += (1 << local_int_8);
1346 local_int_4 += 8 * local_int_10;
1347 local_int_28 += (8 << local_int_8);
1352 if (local_int_10 <= 2) {
1357 while (
offset >= (local_int_10 - 1)) {
1358 offset += (1 - (local_int_10 - 1));
1359 local_int_4 += local_int_10;
1360 local_int_28 += (1 << local_int_8);
1367 local_int_14 = (
offset >> local_int_8);
1390 if (stereo_phase < 0)
1395 int sub_packet = (local_int_20 + local_int_28);
1405 stereo_exp, stereo_phase);
1423 for (
i = 0;
i < 5;
i++)
1446 (packet->
type < 16 || packet->
type >= 48 ||
1467 }
else if (
type == 31) {
1468 for (j = 0; j < 4; j++)
1470 }
else if (
type == 46) {
1471 for (j = 0; j < 6; j++)
1473 for (j = 0; j < 4; j++)
1479 for (
i = 0, j = -1;
i < 5;
i++)
1496 const double iscale = 2.0 *
M_PI / 512.0;
1518 for (
i = 0;
i < 2;
i++) {
1524 for (
i = 0;
i < 4;
i++) {
1540 const double iscale = 0.25 *
M_PI;
1542 for (ch = 0; ch < q->
channels; ch++) {
1574 for (
i = 0;
i < 4;
i++)
1635 int i, k, ch, sb_used, sub_sampling, dither_state = 0;
1640 for (ch = 0; ch < q->
channels; ch++)
1641 for (
i = 0;
i < 8;
i++)
1642 for (k = sb_used; k <
SBLIMIT; k++)
1646 float *samples_ptr = q->
samples + ch;
1648 for (
i = 0;
i < 8;
i++) {
1661 for (ch = 0; ch < q->
channels; ch++)
1686 float scale = 1.0f / 2.0f;
1731 if (bytestream2_peek_be64u(&gb) == (((uint64_t)
MKBETAG(
'f',
'r',
'm',
'a') << 32) |
1732 (uint64_t)
MKBETAG(
'Q',
'D',
'M',
'2')))
1744 size = bytestream2_get_be32u(&gb);
1753 if (bytestream2_get_be32u(&gb) !=
MKBETAG(
'Q',
'D',
'C',
'A')) {
1760 s->nb_channels =
s->channels = bytestream2_get_be32u(&gb);
1769 avctx->
bit_rate = bytestream2_get_be32u(&gb);
1770 s->group_size = bytestream2_get_be32u(&gb);
1771 s->fft_size = bytestream2_get_be32u(&gb);
1772 s->checksum_size = bytestream2_get_be32u(&gb);
1773 if (
s->checksum_size >= 1U << 28 ||
s->checksum_size <= 1) {
1778 s->fft_order =
av_log2(
s->fft_size) + 1;
1781 if ((
s->fft_order < 7) || (
s->fft_order > 9)) {
1787 s->group_order =
av_log2(
s->group_size) + 1;
1788 s->frame_size =
s->group_size / 16;
1793 s->sub_sampling =
s->fft_order - 7;
1794 s->frequency_range = 255 / (1 << (2 -
s->sub_sampling));
1801 switch ((
s->sub_sampling * 2 +
s->channels - 1)) {
1802 case 0:
tmp = 40;
break;
1803 case 1:
tmp = 48;
break;
1804 case 2:
tmp = 56;
break;
1805 case 3:
tmp = 72;
break;
1806 case 4:
tmp = 80;
break;
1807 case 5:
tmp = 100;
break;
1808 default:
tmp=
s->sub_sampling;
break;
1815 s->cm_table_select = tmp_val;
1818 s->coeff_per_sb_select = 0;
1820 s->coeff_per_sb_select = 1;
1822 s->coeff_per_sb_select = 2;
1824 if (
s->fft_size != (1 << (
s->fft_order - 1))) {
1888 for (ch = 0; ch < q->
channels; ch++) {
1919 int *got_frame_ptr,
AVPacket *avpkt)
1921 const uint8_t *buf = avpkt->
data;
1922 int buf_size = avpkt->
size;
1929 if(buf_size < s->checksum_size)
1935 frame->nb_samples = 16 *
s->frame_size;
1940 for (
i = 0;
i < 16;
i++) {
1943 out +=
s->channels *
s->frame_size;
1948 return s->checksum_size;
const FFCodec ff_qdm2_decoder
static av_cold void close(AVCodecParserContext *s)
Libavcodec external API header.
static av_always_inline void bytestream2_skipu(GetByteContext *g, unsigned int size)
static av_always_inline int bytestream2_get_bytes_left(const GetByteContext *g)
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
#define i(width, name, range_min, range_max)
Public libavutil channel layout APIs header.
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
int(* init)(AVBSFContext *ctx)
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
channel
Use these values when setting the channel map with ebur128_set_channel().
static const uint8_t frame_size[4]
bitstream reader API header.
static av_always_inline int get_vlc2(GetBitContext *s, const VLCElem *table, int bits, int max_depth)
Parse a vlc code.
static int get_bits_left(GetBitContext *gb)
static unsigned int get_bits1(GetBitContext *s)
static void skip_bits(GetBitContext *s, int n)
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
static int get_bits_count(const GetBitContext *s)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels)
Get the default channel layout for a given number of channels.
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
@ AV_SAMPLE_FMT_S16
signed 16 bits
static void scale(int *out, const int *in, const int w, const int h, const int shift)
static const uint8_t dequant_table[64]
Macro definitions for various function/variable attributes.
#define av_builtin_constant_p
static int ff_thread_once(char *control, void(*routine)(void))
#define MKBETAG(a, b, c, d)
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
mpeg audio declarations for both encoder and decoder.
av_cold void ff_mpadsp_init(MPADSPContext *s)
float ff_mpa_synth_window_float[]
void ff_mpa_synth_init_float(void)
void ff_mpa_synth_filter_float(MPADSPContext *s, float *synth_buf_ptr, int *synth_buf_offset, float *window, int *dither_state, float *samples, ptrdiff_t incr, float *sb_samples)
static int qdm2_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
static int fill_coding_method_array(sb_int8_array tone_level_idx, sb_int8_array tone_level_idx_temp, sb_int8_array coding_method, int nb_channels, int c, int superblocktype_2_3, int cm_table_select)
Related to synthesis filter Called by process_subpacket_11 c is built with data from subpacket 11 Mos...
static uint16_t qdm2_packet_checksum(const uint8_t *data, int length, int value)
QDM2 checksum.
static int process_subpacket_9(QDM2Context *q, QDM2SubPNode *node)
Process subpacket 9, init quantized_coeffs with data from it.
#define QDM2_SB_USED(sub_sampling)
static int fix_coding_method_array(int sb, int channels, sb_int8_array coding_method)
Called while processing data from subpackets 11 and 12.
#define SB_DITHERING_NOISE(sb, noise_idx)
static void qdm2_calculate_fft(QDM2Context *q, int channel, int sub_packet)
#define SAMPLES_NEEDED_2(why)
#define QDM2_LIST_ADD(list, size, packet)
static int qdm2_fft_decode_tones(QDM2Context *q, int duration, GetBitContext *gb, int b)
static QDM2SubPNode * qdm2_search_subpacket_type_in_list(QDM2SubPNode *list, int type)
Return node pointer to first packet of requested type in list.
static void average_quantized_coeffs(QDM2Context *q)
Replace 8 elements with their average value.
#define FIX_NOISE_IDX(noise_idx)
static av_cold void qdm2_init_static_data(void)
Init static data (does not depend on specific file)
static int init_quantized_coeffs_elem0(int8_t *quantized_coeffs, GetBitContext *gb)
Init the first element of a channel in quantized_coeffs with data from packet 10 (quantized_coeffs[ch...
static int qdm2_get_vlc(GetBitContext *gb, const VLC *vlc, int flag, int depth)
static int qdm2_decode_super_block(QDM2Context *q)
Decode superblock, fill packet lists.
static av_cold int qdm2_decode_init(AVCodecContext *avctx)
Init parameters from codec extradata.
#define QDM2_MAX_FRAME_SIZE
static const int switchtable[23]
static void qdm2_fft_init_coefficient(QDM2Context *q, int sub_packet, int offset, int duration, int channel, int exp, int phase)
int8_t sb_int8_array[2][30][64]
static void fill_tone_level_array(QDM2Context *q, int flag)
Related to synthesis filter Called by process_subpacket_10.
static int qdm2_decode_fft_packets(QDM2Context *q)
static int process_synthesis_subpackets(QDM2Context *q, QDM2SubPNode *list)
Process new subpackets for synthesis filter.
static int qdm2_get_se_vlc(const VLC *vlc, GetBitContext *gb, int depth)
static void qdm2_synthesis_filter(QDM2Context *q, int index)
static int init_tone_level_dequantization(QDM2Context *q, GetBitContext *gb)
Related to synthesis filter, process data from packet 10 Init part of quantized_coeffs via function i...
static int process_subpacket_12(QDM2Context *q, QDM2SubPNode *node)
Process subpacket 12.
static void qdm2_fft_generate_tone(QDM2Context *q, FFTTone *tone)
static int process_subpacket_11(QDM2Context *q, QDM2SubPNode *node)
Process subpacket 11.
static void qdm2_decode_sub_packet_header(GetBitContext *gb, QDM2SubPacket *sub_packet)
Fill a QDM2SubPacket structure with packet type, size, and data pointer.
static int process_subpacket_10(QDM2Context *q, QDM2SubPNode *node)
Process subpacket 10 if not null, else.
static void qdm2_fft_tone_synthesizer(QDM2Context *q, int sub_packet)
static int synthfilt_build_sb_samples(QDM2Context *q, GetBitContext *gb, int length, int sb_min, int sb_max)
Called by process_subpacket_11 to process more data from subpacket 11 with sb 0-8.
static int build_sb_samples_from_noise(QDM2Context *q, int sb)
Build subband samples with noise weighted by q->tone_level.
static int qdm2_decode(QDM2Context *q, const uint8_t *in, int16_t *out)
static av_cold int qdm2_decode_close(AVCodecContext *avctx)
#define SOFTCLIP_THRESHOLD
static av_cold void init_noise_samples(void)
static uint16_t softclip_table[HARDCLIP_THRESHOLD - SOFTCLIP_THRESHOLD+1]
static float noise_samples[128]
static uint8_t random_dequant_index[256][5]
static VLC fft_stereo_exp_vlc
static VLC fft_stereo_phase_vlc
static VLC vlc_tab_fft_tone_offset[5]
static VLC vlc_tab_type34
static VLC vlc_tab_tone_level_idx_mid
static VLC fft_level_exp_alt_vlc
static VLC vlc_tab_type30
static av_cold void qdm2_init_vlc(void)
static av_cold void rnd_table_init(void)
static uint8_t random_dequant_type24[128][3]
static av_cold void softclip_table_init(void)
static VLC fft_level_exp_vlc
static VLC vlc_tab_tone_level_idx_hi2
#define HARDCLIP_THRESHOLD
static VLC vlc_tab_tone_level_idx_hi1
static const int16_t fft_level_index_table[256]
static const uint8_t fft_subpackets[32]
static const int vlc_stage3_values[60]
static const int fft_cutoff_index_table[4][2]
static const float fft_tone_envelope_table[4][31]
static const int8_t tone_level_idx_offset_table[30][4]
static const uint8_t coeff_per_sb_for_dequant[3][30]
static const uint8_t coeff_per_sb_for_avg[3][30]
static const float fft_tone_sample_table[4][16][5]
static const float type34_delta[10]
static const float type30_dequant[8]
static const float dequant_1bit[2][3]
static const uint8_t last_coeff[3]
static const float fft_tone_level_table[2][64]
static const int8_t coding_method_table[5][30]
static const uint8_t header[24]
#define FF_ARRAY_ELEMS(a)
main external API structure.
AVChannelLayout ch_layout
Audio channel layout.
enum AVSampleFormat sample_fmt
audio sample format
int64_t bit_rate
the average bitrate
int sample_rate
samples per second
uint8_t * extradata
Out-of-band global headers that may be used by some codecs.
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.
int coeff_per_sb_select
selector for "num. of coeffs. per subband" tables. Can be 0, 1, 2
FFTTone fft_tones[1000]
FFT and tones.
int do_synth_filter
used to perform or skip synthesis filter
int8_t tone_level_idx_base[MPA_MAX_CHANNELS][30][8]
int superblocktype_2_3
select fft tables and some algorithm based on superblock type
float output_buffer[QDM2_MAX_FRAME_SIZE *MPA_MAX_CHANNELS *2]
float tone_level[MPA_MAX_CHANNELS][30][64]
Mixed temporary data used in decoding.
int synth_buf_offset[MPA_MAX_CHANNELS]
int8_t tone_level_idx_mid[MPA_MAX_CHANNELS][26][8]
int fft_size
size of FFT, in complex numbers
float synth_buf[MPA_MAX_CHANNELS][512 *2]
QDM2SubPNode sub_packet_list_A[16]
list of all packets
int channels
number of channels
int8_t coding_method[MPA_MAX_CHANNELS][30][64]
float sb_samples[MPA_MAX_CHANNELS][128][SBLIMIT]
int noise_idx
index for dithering noise table
MPADSPContext mpadsp
Synthesis filter.
float samples[MPA_MAX_CHANNELS *MPA_FRAME_SIZE]
const uint8_t * compressed_data
I/O data.
int fft_coefs_min_index[5]
int sub_packets_B
number of packets on 'B' list
int fft_order
order of FFT (actually fftorder+1)
int group_order
Parameters built from header parameters, do not change during playback.
FFTCoefficient fft_coefs[1000]
int8_t tone_level_idx_hi1[MPA_MAX_CHANNELS][3][8][8]
int8_t tone_level_idx_hi2[MPA_MAX_CHANNELS][26]
int frame_size
size of data frame
int8_t tone_level_idx_temp[MPA_MAX_CHANNELS][30][64]
int8_t quantized_coeffs[MPA_MAX_CHANNELS][10][8]
int fft_coefs_max_index[5]
QDM2SubPNode sub_packet_list_D[16]
DCT packets.
int sub_sampling
subsampling: 0=25%, 1=50%, 2=100% */
QDM2SubPNode sub_packet_list_C[16]
packets with errors?
int nb_channels
Parameters from codec header, do not change during playback.
QDM2SubPacket sub_packets[16]
Packets and packet lists.
int cm_table_select
selector for "coding method" tables. Can be 0, 1 (from init: 0-4)
int checksum_size
size of data block, used also for checksum
int has_errors
packet has errors
int8_t tone_level_idx[MPA_MAX_CHANNELS][30][64]
QDM2SubPNode sub_packet_list_B[16]
FFT packets B are on list.
int group_size
size of frame group (16 frames per group)
AVComplexFloat complex[MPA_MAX_CHANNELS][256+1]
AVComplexFloat temp[MPA_MAX_CHANNELS][256]
A node in the subpacket list.
QDM2SubPacket * packet
packet
struct QDM2SubPNode * next
pointer to next packet in the list, NULL if leaf node
const uint8_t * data
pointer to subpacket data (points to input data buffer, it's not a private copy)
unsigned int size
subpacket size
#define avpriv_request_sample(...)
static const struct twinvq_data tab
av_cold void av_tx_uninit(AVTXContext **ctx)
Frees a context and sets *ctx to NULL, does nothing when *ctx == NULL.
av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type, int inv, int len, const void *scale, uint64_t flags)
Initialize a transform context with the given configuration (i)MDCTs with an odd length are currently...
@ AV_TX_FLOAT_RDFT
Real to complex and complex to real DFTs.
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
static av_always_inline int diff(const struct color_info *a, const struct color_info *b, const int trans_thresh)