FFmpeg
dstdec.c
Go to the documentation of this file.
1 /*
2  * Direct Stream Transfer (DST) decoder
3  * Copyright (c) 2014 Peter Ross <pross@xvid.org>
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 /**
23  * @file
24  * Direct Stream Transfer (DST) decoder
25  * ISO/IEC 14496-3 Part 3 Subpart 10: Technical description of lossless coding of oversampled audio
26  */
27 
28 #include "libavutil/intreadwrite.h"
29 #include "libavutil/mem_internal.h"
30 #include "libavutil/reverse.h"
31 #include "codec_internal.h"
32 #include "decode.h"
33 #include "get_bits.h"
34 #include "avcodec.h"
35 #include "golomb.h"
36 #include "dsd.h"
37 
38 #define DST_MAX_CHANNELS 6
39 #define DST_MAX_ELEMENTS (2 * DST_MAX_CHANNELS)
40 
41 #define DSD_FS44(sample_rate) (sample_rate * 8LL / 44100)
42 
43 #define DST_SAMPLES_PER_FRAME(sample_rate) (588 * DSD_FS44(sample_rate))
44 
45 static const int8_t fsets_code_pred_coeff[3][3] = {
46  { -8 },
47  { -16, 8 },
48  { -9, -5, 6 },
49 };
50 
51 static const int8_t probs_code_pred_coeff[3][3] = {
52  { -8 },
53  { -16, 8 },
54  { -24, 24, -8 },
55 };
56 
57 typedef struct ArithCoder {
58  unsigned int a;
59  unsigned int c;
60 } ArithCoder;
61 
62 typedef struct Table {
63  unsigned int elements;
64  unsigned int length[DST_MAX_ELEMENTS];
66 } Table;
67 
68 typedef struct DSTContext {
69  AVClass *class;
70 
75  DECLARE_ALIGNED(16, int16_t, filter)[DST_MAX_ELEMENTS][16][256];
77 } DSTContext;
78 
80 {
81  DSTContext *s = avctx->priv_data;
82  int i;
83 
84  if (avctx->ch_layout.nb_channels > DST_MAX_CHANNELS) {
85  avpriv_request_sample(avctx, "Channel count %d", avctx->ch_layout.nb_channels);
86  return AVERROR_PATCHWELCOME;
87  }
88 
89  // the sample rate is only allowed to be 64,128,256 * 44100 by ISO/IEC 14496-3:2005(E)
90  // We are a bit more tolerant here, but this check is needed to bound the size and duration
91  if (avctx->sample_rate > 512 * 44100)
92  return AVERROR_INVALIDDATA;
93 
94 
95  if (DST_SAMPLES_PER_FRAME(avctx->sample_rate) & 7) {
96  return AVERROR_PATCHWELCOME;
97  }
98 
100 
101  for (i = 0; i < avctx->ch_layout.nb_channels; i++)
102  memset(s->dsdctx[i].buf, 0x69, sizeof(s->dsdctx[i].buf));
103 
105 
106  return 0;
107 }
108 
109 static int read_map(GetBitContext *gb, Table *t, unsigned int map[DST_MAX_CHANNELS], int channels)
110 {
111  int ch;
112  t->elements = 1;
113  map[0] = 0;
114  if (!get_bits1(gb)) {
115  for (ch = 1; ch < channels; ch++) {
116  int bits = av_log2(t->elements) + 1;
117  map[ch] = get_bits(gb, bits);
118  if (map[ch] == t->elements) {
119  t->elements++;
120  if (t->elements >= DST_MAX_ELEMENTS)
121  return AVERROR_INVALIDDATA;
122  } else if (map[ch] > t->elements) {
123  return AVERROR_INVALIDDATA;
124  }
125  }
126  } else {
127  memset(map, 0, sizeof(*map) * DST_MAX_CHANNELS);
128  }
129  return 0;
130 }
131 
132 static av_always_inline int get_sr_golomb_dst(GetBitContext *gb, unsigned int k)
133 {
134  int v = get_ur_golomb_jpegls(gb, k, get_bits_left(gb), 0);
135  if (v && get_bits1(gb))
136  v = -v;
137  return v;
138 }
139 
140 static void read_uncoded_coeff(GetBitContext *gb, int *dst, unsigned int elements,
141  int coeff_bits, int is_signed, int offset)
142 {
143  int i;
144 
145  for (i = 0; i < elements; i++) {
146  dst[i] = (is_signed ? get_sbits(gb, coeff_bits) : get_bits(gb, coeff_bits)) + offset;
147  }
148 }
149 
150 static int read_table(GetBitContext *gb, Table *t, const int8_t code_pred_coeff[3][3],
151  int length_bits, int coeff_bits, int is_signed, int offset)
152 {
153  unsigned int i, j, k;
154  for (i = 0; i < t->elements; i++) {
155  t->length[i] = get_bits(gb, length_bits) + 1;
156  if (!get_bits1(gb)) {
157  read_uncoded_coeff(gb, t->coeff[i], t->length[i], coeff_bits, is_signed, offset);
158  } else {
159  int method = get_bits(gb, 2), lsb_size;
160  if (method == 3)
161  return AVERROR_INVALIDDATA;
162 
163  read_uncoded_coeff(gb, t->coeff[i], method + 1, coeff_bits, is_signed, offset);
164 
165  lsb_size = get_bits(gb, 3);
166  for (j = method + 1; j < t->length[i]; j++) {
167  int c, x = 0;
168  for (k = 0; k < method + 1; k++)
169  x += code_pred_coeff[method][k] * (unsigned)t->coeff[i][j - k - 1];
170  c = get_sr_golomb_dst(gb, lsb_size);
171  if (x >= 0)
172  c -= (x + 4) / 8;
173  else
174  c += (-x + 3) / 8;
175  if (!is_signed) {
176  if (c < offset || c >= offset + (1<<coeff_bits))
177  return AVERROR_INVALIDDATA;
178  }
179  t->coeff[i][j] = c;
180  }
181  }
182  }
183  return 0;
184 }
185 
186 static void ac_init(ArithCoder *ac, GetBitContext *gb)
187 {
188  ac->a = 4095;
189  ac->c = get_bits(gb, 12);
190 }
191 
192 static av_always_inline void ac_get(ArithCoder *ac, GetBitContext *gb, int p, int *e)
193 {
194  unsigned int k = (ac->a >> 8) | ((ac->a >> 7) & 1);
195  unsigned int q = k * p;
196  unsigned int a_q = ac->a - q;
197 
198  *e = ac->c < a_q;
199  if (*e) {
200  ac->a = a_q;
201  } else {
202  ac->a = q;
203  ac->c -= a_q;
204  }
205 
206  if (ac->a < 2048) {
207  int n = 11 - av_log2(ac->a);
208  ac->a <<= n;
209  ac->c = (ac->c << n) | get_bits(gb, n);
210  }
211 }
212 
213 static uint8_t prob_dst_x_bit(int c)
214 {
215  return (ff_reverse[c & 127] >> 1) + 1;
216 }
217 
218 static int build_filter(int16_t table[DST_MAX_ELEMENTS][16][256], const Table *fsets)
219 {
220  int i, j, k, l;
221 
222  for (i = 0; i < fsets->elements; i++) {
223  int length = fsets->length[i];
224 
225  for (j = 0; j < 16; j++) {
226  int total = av_clip(length - j * 8, 0, 8);
227 
228  for (k = 0; k < 256; k++) {
229  int64_t v = 0;
230 
231  for (l = 0; l < total; l++)
232  v += (((k >> l) & 1) * 2 - 1) * fsets->coeff[i][j * 8 + l];
233  if ((int16_t)v != v)
234  return AVERROR_INVALIDDATA;
235  table[i][j][k] = v;
236  }
237  }
238  }
239  return 0;
240 }
241 
243  int *got_frame_ptr, AVPacket *avpkt)
244 {
245  unsigned samples_per_frame = DST_SAMPLES_PER_FRAME(avctx->sample_rate);
246  unsigned map_ch_to_felem[DST_MAX_CHANNELS];
247  unsigned map_ch_to_pelem[DST_MAX_CHANNELS];
248  unsigned i, ch, same_map, dst_x_bit;
249  unsigned half_prob[DST_MAX_CHANNELS];
250  const int channels = avctx->ch_layout.nb_channels;
251  DSTContext *s = avctx->priv_data;
252  GetBitContext *gb = &s->gb;
253  ArithCoder *ac = &s->ac;
254  uint8_t *dsd;
255  float *pcm;
256  int ret;
257 
258  if (avpkt->size <= 1)
259  return AVERROR_INVALIDDATA;
260 
261  frame->nb_samples = samples_per_frame / 8;
262  if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
263  return ret;
264  dsd = frame->data[0];
265  pcm = (float *)frame->data[0];
266 
267  if ((ret = init_get_bits8(gb, avpkt->data, avpkt->size)) < 0)
268  return ret;
269 
270  if (!get_bits1(gb)) {
271  skip_bits1(gb);
272  if (get_bits(gb, 6))
273  return AVERROR_INVALIDDATA;
274  memcpy(frame->data[0], avpkt->data + 1, FFMIN(avpkt->size - 1, frame->nb_samples * channels));
275  goto dsd;
276  }
277 
278  /* Segmentation (10.4, 10.5, 10.6) */
279 
280  if (!get_bits1(gb)) {
281  avpriv_request_sample(avctx, "Not Same Segmentation");
282  return AVERROR_PATCHWELCOME;
283  }
284 
285  if (!get_bits1(gb)) {
286  avpriv_request_sample(avctx, "Not Same Segmentation For All Channels");
287  return AVERROR_PATCHWELCOME;
288  }
289 
290  if (!get_bits1(gb)) {
291  avpriv_request_sample(avctx, "Not End Of Channel Segmentation");
292  return AVERROR_PATCHWELCOME;
293  }
294 
295  /* Mapping (10.7, 10.8, 10.9) */
296 
297  same_map = get_bits1(gb);
298 
299  if ((ret = read_map(gb, &s->fsets, map_ch_to_felem, channels)) < 0)
300  return ret;
301 
302  if (same_map) {
303  s->probs.elements = s->fsets.elements;
304  memcpy(map_ch_to_pelem, map_ch_to_felem, sizeof(map_ch_to_felem));
305  } else {
306  avpriv_request_sample(avctx, "Not Same Mapping");
307  if ((ret = read_map(gb, &s->probs, map_ch_to_pelem, channels)) < 0)
308  return ret;
309  }
310 
311  /* Half Probability (10.10) */
312 
313  for (ch = 0; ch < channels; ch++)
314  half_prob[ch] = get_bits1(gb);
315 
316  /* Filter Coef Sets (10.12) */
317 
318  ret = read_table(gb, &s->fsets, fsets_code_pred_coeff, 7, 9, 1, 0);
319  if (ret < 0)
320  return ret;
321 
322  /* Probability Tables (10.13) */
323 
324  ret = read_table(gb, &s->probs, probs_code_pred_coeff, 6, 7, 0, 1);
325  if (ret < 0)
326  return ret;
327 
328  /* Arithmetic Coded Data (10.11) */
329 
330  if (get_bits1(gb))
331  return AVERROR_INVALIDDATA;
332  ac_init(ac, gb);
333 
334  ret = build_filter(s->filter, &s->fsets);
335  if (ret < 0)
336  return ret;
337 
338  memset(s->status, 0xAA, sizeof(s->status));
339  memset(dsd, 0, frame->nb_samples * 4 * channels);
340 
341  ac_get(ac, gb, prob_dst_x_bit(s->fsets.coeff[0][0]), &dst_x_bit);
342 
343  for (i = 0; i < samples_per_frame; i++) {
344  for (ch = 0; ch < channels; ch++) {
345  const unsigned felem = map_ch_to_felem[ch];
346  int16_t (*filter)[256] = s->filter[felem];
347  uint8_t *status = s->status[ch];
348  int prob, residual, v;
349 
350 #define F(x) filter[(x)][status[(x)]]
351  const int16_t predict = F( 0) + F( 1) + F( 2) + F( 3) +
352  F( 4) + F( 5) + F( 6) + F( 7) +
353  F( 8) + F( 9) + F(10) + F(11) +
354  F(12) + F(13) + F(14) + F(15);
355 #undef F
356 
357  if (!half_prob[ch] || i >= s->fsets.length[felem]) {
358  unsigned pelem = map_ch_to_pelem[ch];
359  unsigned index = FFABS(predict) >> 3;
360  prob = s->probs.coeff[pelem][FFMIN(index, s->probs.length[pelem] - 1)];
361  } else {
362  prob = 128;
363  }
364 
365  ac_get(ac, gb, prob, &residual);
366  v = ((predict >> 15) ^ residual) & 1;
367  dsd[((i >> 3) * channels + ch) << 2] |= v << (7 - (i & 0x7 ));
368 
369  AV_WL64A(status + 8, (AV_RL64A(status + 8) << 1) | ((AV_RL64A(status) >> 63) & 1));
370  AV_WL64A(status, (AV_RL64A(status) << 1) | v);
371  }
372  }
373 
374 dsd:
375  for (i = 0; i < channels; i++) {
376  ff_dsd2pcm_translate(&s->dsdctx[i], frame->nb_samples, 0,
377  frame->data[0] + i * 4,
378  channels * 4, pcm + i, channels);
379  }
380 
381  *got_frame_ptr = 1;
382 
383  return avpkt->size;
384 }
385 
387  .p.name = "dst",
388  CODEC_LONG_NAME("DST (Digital Stream Transfer)"),
389  .p.type = AVMEDIA_TYPE_AUDIO,
390  .p.id = AV_CODEC_ID_DST,
391  .priv_data_size = sizeof(DSTContext),
392  .init = decode_init,
394  .p.capabilities = AV_CODEC_CAP_DR1,
395  .p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLT,
397 };
ac_get
static av_always_inline void ac_get(ArithCoder *ac, GetBitContext *gb, int p, int *e)
Definition: dstdec.c:192
av_clip
#define av_clip
Definition: common.h:98
get_bits_left
static int get_bits_left(GetBitContext *gb)
Definition: get_bits.h:694
DSTContext::status
uint8_t status[DST_MAX_CHANNELS][16]
Definition: dstdec.c:74
mem_internal.h
DSTContext::ac
ArithCoder ac
Definition: dstdec.c:72
elements
static const ElemCat * elements[ELEMENT_COUNT]
Definition: signature.h:566
AVCodecContext::sample_rate
int sample_rate
samples per second
Definition: avcodec.h:1050
DSTContext::fsets
Table fsets
Definition: dstdec.c:73
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:340
AVPacket::data
uint8_t * data
Definition: packet.h:522
ff_reverse
const uint8_t ff_reverse[256]
Definition: reverse.c:23
table
static const uint16_t table[]
Definition: prosumer.c:205
read_table
static int read_table(GetBitContext *gb, Table *t, const int8_t code_pred_coeff[3][3], int length_bits, int coeff_bits, int is_signed, int offset)
Definition: dstdec.c:150
FFCodec
Definition: codec_internal.h:127
F
#define F(x)
reverse.h
filter
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
Definition: filter_design.txt:228
AVChannelLayout::nb_channels
int nb_channels
Number of channels in this layout.
Definition: channel_layout.h:313
dsd.h
AVFrame::data
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: frame.h:361
decode_frame
static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Definition: dstdec.c:242
golomb.h
exp golomb vlc stuff
get_bits
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
Definition: get_bits.h:335
FFCodec::p
AVCodec p
The public AVCodec.
Definition: codec_internal.h:131
AVCodecContext::ch_layout
AVChannelLayout ch_layout
Audio channel layout.
Definition: avcodec.h:1065
ac_init
static void ac_init(ArithCoder *ac, GetBitContext *gb)
Definition: dstdec.c:186
GetBitContext
Definition: get_bits.h:108
read_map
static int read_map(GetBitContext *gb, Table *t, unsigned int map[DST_MAX_CHANNELS], int channels)
Definition: dstdec.c:109
get_ur_golomb_jpegls
static int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit, int esc_len)
read unsigned golomb rice code (jpegls).
Definition: golomb.h:428
av_cold
#define av_cold
Definition: attributes.h:90
init_get_bits8
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
Definition: get_bits.h:545
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
intreadwrite.h
s
#define s(width, name)
Definition: cbs_vp9.c:198
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: dstdec.c:79
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
bits
uint8_t bits
Definition: vp3data.h:128
get_sbits
static int get_sbits(GetBitContext *s, int n)
Definition: get_bits.h:320
channels
channels
Definition: aptx.h:31
decode.h
get_bits.h
ArithCoder
Definition: dstdec.c:57
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
frame
static AVFrame * frame
Definition: demux_decode.c:54
FFABS
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
Definition: common.h:72
if
if(ret)
Definition: filter_design.txt:179
AV_WL64A
#define AV_WL64A(p, v)
Definition: intreadwrite.h:555
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
AV_CODEC_ID_DST
@ AV_CODEC_ID_DST
Definition: codec_id.h:521
AVERROR_PATCHWELCOME
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
Definition: error.h:64
DSTContext::gb
GetBitContext gb
Definition: dstdec.c:71
get_bits1
static unsigned int get_bits1(GetBitContext *s)
Definition: get_bits.h:388
DSTContext::filter
int16_t filter[DST_MAX_ELEMENTS][16][256]
Definition: dstdec.c:75
fsets_code_pred_coeff
static const int8_t fsets_code_pred_coeff[3][3]
Definition: dstdec.c:45
index
int index
Definition: gxfenc.c:89
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
ff_init_dsd_data
av_cold void ff_init_dsd_data(void)
Definition: dsd.c:89
ff_get_buffer
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
Definition: decode.c:1568
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
ArithCoder::c
unsigned int c
Definition: dstdec.c:59
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
AVPacket::size
int size
Definition: packet.h:523
codec_internal.h
DECLARE_ALIGNED
#define DECLARE_ALIGNED(n, t, v)
Definition: mem_internal.h:109
AVCodecContext::sample_fmt
enum AVSampleFormat sample_fmt
audio sample format
Definition: avcodec.h:1057
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
probs_code_pred_coeff
static const int8_t probs_code_pred_coeff[3][3]
Definition: dstdec.c:51
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
skip_bits1
static void skip_bits1(GetBitContext *s)
Definition: get_bits.h:413
DSTContext::dsdctx
DSDContext dsdctx[DST_MAX_CHANNELS]
Definition: dstdec.c:76
prob_dst_x_bit
static uint8_t prob_dst_x_bit(int c)
Definition: dstdec.c:213
AVFrame::nb_samples
int nb_samples
number of audio samples (per channel) described by this frame
Definition: frame.h:420
DSTContext::probs
Table probs
Definition: dstdec.c:73
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:255
get_sr_golomb_dst
static av_always_inline int get_sr_golomb_dst(GetBitContext *gb, unsigned int k)
Definition: dstdec.c:132
build_filter
static int build_filter(int16_t table[DST_MAX_ELEMENTS][16][256], const Table *fsets)
Definition: dstdec.c:218
predict
static av_always_inline void predict(PredictorState *ps, float *coef, int output_enable)
Definition: aacdec.c:176
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
av_always_inline
#define av_always_inline
Definition: attributes.h:49
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
AVCodec::name
const char * name
Name of the codec implementation.
Definition: codec.h:194
DSDContext
Per-channel buffer.
Definition: dsd.h:41
read_uncoded_coeff
static void read_uncoded_coeff(GetBitContext *gb, int *dst, unsigned int elements, int coeff_bits, int is_signed, int offset)
Definition: dstdec.c:140
DST_MAX_CHANNELS
#define DST_MAX_CHANNELS
Definition: dstdec.c:38
avcodec.h
DSTContext
Definition: dstdec.c:68
ff_dsd2pcm_translate
void ff_dsd2pcm_translate(DSDContext *s, size_t samples, int lsbf, const uint8_t *src, ptrdiff_t src_stride, float *dst, ptrdiff_t dst_stride)
Definition: dsd.c:95
ret
ret
Definition: filter_design.txt:187
prob
#define prob(name, subs,...)
Definition: cbs_vp9.c:325
Table::length
unsigned int length[DST_MAX_ELEMENTS]
Definition: dstdec.c:64
AVCodecContext
main external API structure.
Definition: avcodec.h:445
status
ov_status_e status
Definition: dnn_backend_openvino.c:120
AV_RL64A
#define AV_RL64A(p)
Definition: intreadwrite.h:552
avpriv_request_sample
#define avpriv_request_sample(...)
Definition: tableprint_vlc.h:36
map
const VDPAUPixFmtMap * map
Definition: hwcontext_vdpau.c:71
AVPacket
This structure stores compressed data.
Definition: packet.h:499
AVCodecContext::priv_data
void * priv_data
Definition: avcodec.h:472
ff_dst_decoder
const FFCodec ff_dst_decoder
Definition: dstdec.c:386
ArithCoder::a
unsigned int a
Definition: dstdec.c:58
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
Table::coeff
int coeff[DST_MAX_ELEMENTS][128]
Definition: dstdec.c:65
Table
Definition: dstdec.c:62
DST_MAX_ELEMENTS
#define DST_MAX_ELEMENTS
Definition: dstdec.c:39
av_log2
int av_log2(unsigned v)
Definition: intmath.c:26
AV_SAMPLE_FMT_FLT
@ AV_SAMPLE_FMT_FLT
float
Definition: samplefmt.h:60
DST_SAMPLES_PER_FRAME
#define DST_SAMPLES_PER_FRAME(sample_rate)
Definition: dstdec.c:43
Table::elements
unsigned int elements
Definition: dstdec.c:63