FFmpeg  4.4.5
hcadec.c
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #include "libavutil/crc.h"
20 #include "libavutil/float_dsp.h"
21 #include "libavutil/intreadwrite.h"
22 #include "libavutil/mem_internal.h"
23 #include "libavutil/tx.h"
24 
25 #include "avcodec.h"
26 #include "get_bits.h"
27 #include "internal.h"
28 #include "hca_data.h"
29 
30 typedef struct ChannelContext {
31  float base[128];
32  DECLARE_ALIGNED(32, float, imdct_in)[128];
33  DECLARE_ALIGNED(32, float, imdct_out)[128];
34  DECLARE_ALIGNED(32, float, imdct_prev)[128];
35  int8_t scale_factors[128];
36  uint8_t scale[128];
37  int8_t intensity[8];
38  int8_t *hfr_scale;
39  unsigned count;
40  int chan_type;
42 
43 typedef struct HCAContext {
45 
46  const AVCRC *crc_table;
47 
49 
50  uint8_t ath[128];
51 
52  int ath_type;
53  unsigned hfr_group_count;
60 
64 } HCAContext;
65 
66 static void ath_init1(uint8_t *ath, int sample_rate)
67 {
68  unsigned int index;
69  unsigned int acc = 0;
70 
71  for (int i = 0; i < 128; i++) {
72  acc += sample_rate;
73  index = acc >> 13;
74 
75  if (index >= 654) {
76  memset(ath+i, 0xFF, (128 - i));
77  break;
78  }
79 
81  }
82 }
83 
84 static int ath_init(uint8_t *ath, int type, int sample_rate)
85 {
86  switch (type) {
87  case 0:
88  /* nothing to do */
89  break;
90  case 1:
92  break;
93  default:
94  return AVERROR_INVALIDDATA;
95  }
96 
97  return 0;
98 }
99 
100 static inline unsigned ceil2(unsigned a, unsigned b)
101 {
102  return (b > 0) ? (a / b + ((a % b) ? 1 : 0)) : 0;
103 }
104 
106 {
107  HCAContext *c = avctx->priv_data;
108  GetBitContext *gb = &c->gb;
109  int8_t r[16] = { 0 };
110  float scale = 1.f / 8.f;
111  unsigned b, chunk;
112  int version, ret;
113  unsigned hfr_group_count;
114 
116  c->crc_table = av_crc_get_table(AV_CRC_16_ANSI);
117 
118  if (avctx->channels <= 0 || avctx->channels > 16)
119  return AVERROR(EINVAL);
120 
121  ret = init_get_bits8(gb, avctx->extradata, avctx->extradata_size);
122  if (ret < 0)
123  return ret;
124  skip_bits_long(gb, 32);
125  version = get_bits(gb, 16);
126  skip_bits_long(gb, 16);
127 
128  c->ath_type = version >= 0x200 ? 0 : 1;
129 
130  if (get_bits_long(gb, 32) != MKBETAG('f', 'm', 't', 0))
131  return AVERROR_INVALIDDATA;
132  skip_bits_long(gb, 32);
133  skip_bits_long(gb, 32);
134  skip_bits_long(gb, 32);
135 
136  chunk = get_bits_long(gb, 32);
137  if (chunk == MKBETAG('c', 'o', 'm', 'p')) {
138  skip_bits_long(gb, 16);
139  skip_bits_long(gb, 8);
140  skip_bits_long(gb, 8);
141  c->track_count = get_bits(gb, 8);
142  c->channel_config = get_bits(gb, 8);
143  c->total_band_count = get_bits(gb, 8);
144  c->base_band_count = get_bits(gb, 8);
145  c->stereo_band_count = get_bits(gb, 8);
146  c->bands_per_hfr_group = get_bits(gb, 8);
147  } else if (chunk == MKBETAG('d', 'e', 'c', 0)) {
148  skip_bits_long(gb, 16);
149  skip_bits_long(gb, 8);
150  skip_bits_long(gb, 8);
151  c->total_band_count = get_bits(gb, 8) + 1;
152  c->base_band_count = get_bits(gb, 8) + 1;
153  c->track_count = get_bits(gb, 4);
154  c->channel_config = get_bits(gb, 4);
155  if (!get_bits(gb, 8))
156  c->base_band_count = c->total_band_count;
157  c->stereo_band_count = c->total_band_count - c->base_band_count;
158  c->bands_per_hfr_group = 0;
159  } else
160  return AVERROR_INVALIDDATA;
161 
162  if (c->total_band_count > FF_ARRAY_ELEMS(c->ch->imdct_in))
163  return AVERROR_INVALIDDATA;
164 
165 
166  while (get_bits_left(gb) >= 32) {
167  chunk = get_bits_long(gb, 32);
168  if (chunk == MKBETAG('v', 'b', 'r', 0)) {
169  skip_bits_long(gb, 16);
170  skip_bits_long(gb, 16);
171  } else if (chunk == MKBETAG('a', 't', 'h', 0)) {
172  c->ath_type = get_bits(gb, 16);
173  } else if (chunk == MKBETAG('r', 'v', 'a', 0)) {
174  skip_bits_long(gb, 32);
175  } else if (chunk == MKBETAG('c', 'o', 'm', 'm')) {
176  skip_bits_long(gb, get_bits(gb, 8) * 8);
177  } else if (chunk == MKBETAG('c', 'i', 'p', 'h')) {
178  skip_bits_long(gb, 16);
179  } else if (chunk == MKBETAG('l', 'o', 'o', 'p')) {
180  skip_bits_long(gb, 32);
181  skip_bits_long(gb, 32);
182  skip_bits_long(gb, 16);
183  skip_bits_long(gb, 16);
184  } else if (chunk == MKBETAG('p', 'a', 'd', 0)) {
185  break;
186  } else {
187  break;
188  }
189  }
190 
191  ret = ath_init(c->ath, c->ath_type, avctx->sample_rate);
192  if (ret < 0)
193  return ret;
194 
195  if (!c->track_count)
196  c->track_count = 1;
197 
198  b = avctx->channels / c->track_count;
199  if (c->stereo_band_count && b > 1) {
200  int8_t *x = r;
201 
202  for (int i = 0; i < c->track_count; i++, x+=b) {
203  switch (b) {
204  case 2:
205  case 3:
206  x[0] = 1;
207  x[1] = 2;
208  break;
209  case 4:
210  x[0]=1; x[1] = 2;
211  if (c->channel_config == 0) {
212  x[2]=1;
213  x[3]=2;
214  }
215  break;
216  case 5:
217  x[0]=1; x[1] = 2;
218  if (c->channel_config <= 2) {
219  x[3]=1;
220  x[4]=2;
221  }
222  break;
223  case 6:
224  case 7:
225  x[0] = 1; x[1] = 2; x[4] = 1; x[5] = 2;
226  break;
227  case 8:
228  x[0] = 1; x[1] = 2; x[4] = 1; x[5] = 2; x[6] = 1; x[7] = 2;
229  break;
230  }
231  }
232  }
233 
234  if (c->total_band_count < c->base_band_count)
235  return AVERROR_INVALIDDATA;
236 
237  hfr_group_count = ceil2(c->total_band_count - (c->base_band_count + c->stereo_band_count),
238  c->bands_per_hfr_group);
239 
240  if (c->base_band_count + c->stereo_band_count + (uint64_t)hfr_group_count > 128ULL)
241  return AVERROR_INVALIDDATA;
242  c->hfr_group_count = hfr_group_count;
243 
244  for (int i = 0; i < avctx->channels; i++) {
245  c->ch[i].chan_type = r[i];
246  c->ch[i].count = c->base_band_count + ((r[i] != 2) ? c->stereo_band_count : 0);
247  c->ch[i].hfr_scale = &c->ch[i].scale_factors[c->base_band_count + c->stereo_band_count];
248  if (c->ch[i].count > 128)
249  return AVERROR_INVALIDDATA;
250  }
251 
253  if (!c->fdsp)
254  return AVERROR(ENOMEM);
255 
256  return av_tx_init(&c->tx_ctx, &c->tx_fn, AV_TX_FLOAT_MDCT, 1, 128, &scale, 0);
257 }
258 
259 static void run_imdct(HCAContext *c, ChannelContext *ch, int index, float *out)
260 {
261  c->tx_fn(c->tx_ctx, ch->imdct_out, ch->imdct_in, sizeof(float));
262 
263  c->fdsp->vector_fmul_window(out, ch->imdct_prev + (128 >> 1),
264  ch->imdct_out, window, 128 >> 1);
265 
266  memcpy(ch->imdct_prev, ch->imdct_out, 128 * sizeof(float));
267 }
268 
270  int index, unsigned band_count, unsigned base_band_count,
271  unsigned stereo_band_count)
272 {
273  float ratio_l = intensity_ratio_table[ch2->intensity[index]];
274  float ratio_r = ratio_l - 2.0f;
275  float *c1 = &ch1->imdct_in[base_band_count];
276  float *c2 = &ch2->imdct_in[base_band_count];
277 
278  if (ch1->chan_type != 1 || !stereo_band_count)
279  return;
280 
281  for (int i = 0; i < band_count; i++) {
282  *(c2++) = *c1 * ratio_r;
283  *(c1++) *= ratio_l;
284  }
285 }
286 
288  unsigned hfr_group_count,
289  unsigned bands_per_hfr_group,
290  unsigned start_band, unsigned total_band_count)
291 {
292  if (ch->chan_type == 2 || !bands_per_hfr_group)
293  return;
294 
295  for (int i = 0, k = start_band, l = start_band - 1; i < hfr_group_count; i++){
296  for (int j = 0; j < bands_per_hfr_group && k < total_band_count && l >= 0; j++, k++, l--){
298  av_clip_intp2(ch->hfr_scale[i] - ch->scale_factors[l], 6) ] * ch->imdct_in[l];
299  }
300  }
301 
302  ch->imdct_in[127] = 0;
303 }
304 
306 {
307  GetBitContext *gb = &c->gb;
308 
309  for (int i = 0; i < ch->count; i++) {
310  unsigned scale = ch->scale[i];
311  int nb_bits = max_bits_table[scale];
312  int value = get_bitsz(gb, nb_bits);
313  float factor;
314 
315  if (scale > 7) {
316  value = (1 - ((value & 1) << 1)) * (value >> 1);
317  if (!value)
318  skip_bits_long(gb, -1);
319  factor = value;
320  } else {
321  value += scale << 4;
322  skip_bits_long(gb, quant_spectrum_bits[value] - nb_bits);
324  }
325  ch->imdct_in[i] = factor * ch->base[i];
326  }
327 
328  memset(ch->imdct_in + ch->count, 0, sizeof(ch->imdct_in) - ch->count * sizeof(ch->imdct_in[0]));
329 }
330 
331 static void unpack(HCAContext *c, ChannelContext *ch,
332  unsigned hfr_group_count,
333  int packed_noise_level,
334  const uint8_t *ath)
335 {
336  GetBitContext *gb = &c->gb;
337  int delta_bits = get_bits(gb, 3);
338 
339  if (delta_bits > 5) {
340  for (int i = 0; i < ch->count; i++)
341  ch->scale_factors[i] = get_bits(gb, 6);
342  } else if (delta_bits) {
343  int factor = get_bits(gb, 6);
344  int max_value = (1 << delta_bits) - 1;
345  int half_max = max_value >> 1;
346 
347  ch->scale_factors[0] = factor;
348  for (int i = 1; i < ch->count; i++){
349  int delta = get_bits(gb, delta_bits);
350 
351  if (delta == max_value) {
352  factor = get_bits(gb, 6);
353  } else {
354  factor += delta - half_max;
355  }
357 
358  ch->scale_factors[i] = factor;
359  }
360  } else {
361  memset(ch->scale_factors, 0, 128);
362  }
363 
364  if (ch->chan_type == 2){
365  ch->intensity[0] = get_bits(gb, 4);
366  if (ch->intensity[0] < 15) {
367  for (int i = 1; i < 8; i++)
368  ch->intensity[i] = get_bits(gb, 4);
369  }
370  } else {
371  for (int i = 0; i < hfr_group_count; i++)
372  ch->hfr_scale[i] = get_bits(gb, 6);
373  }
374 
375  for (int i = 0; i < ch->count; i++) {
376  int scale = ch->scale_factors[i];
377 
378  if (scale) {
379  scale = c->ath[i] + ((packed_noise_level + i) >> 8) - ((scale * 5) >> 1) + 2;
380  scale = scale_table[av_clip(scale, 0, 58)];
381  }
382  ch->scale[i] = scale;
383  }
384 
385  memset(ch->scale + ch->count, 0, sizeof(ch->scale) - ch->count);
386 
387  for (int i = 0; i < ch->count; i++)
389 }
390 
391 static int decode_frame(AVCodecContext *avctx, void *data,
392  int *got_frame_ptr, AVPacket *avpkt)
393 {
394  AVFrame *frame = data;
395  HCAContext *c = avctx->priv_data;
396  int ch, ret, packed_noise_level;
397  GetBitContext *gb = &c->gb;
398  float **samples;
399 
400  if (avctx->err_recognition & AV_EF_CRCCHECK) {
401  if (av_crc(c->crc_table, 0, avpkt->data, avpkt->size))
402  return AVERROR_INVALIDDATA;
403  }
404 
405  if ((ret = init_get_bits8(gb, avpkt->data, avpkt->size)) < 0)
406  return ret;
407 
408  if (get_bits(gb, 16) != 0xFFFF)
409  return AVERROR_INVALIDDATA;
410 
411  frame->nb_samples = 1024;
412  if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
413  return ret;
414  samples = (float **)frame->extended_data;
415 
416  packed_noise_level = (get_bits(gb, 9) << 8) - get_bits(gb, 7);
417 
418  for (ch = 0; ch < avctx->channels; ch++)
419  unpack(c, &c->ch[ch], c->hfr_group_count, packed_noise_level, c->ath);
420 
421  for (int i = 0; i < 8; i++) {
422  for (ch = 0; ch < avctx->channels; ch++)
423  dequantize_coefficients(c, &c->ch[ch]);
424  for (ch = 0; ch < avctx->channels; ch++)
425  reconstruct_hfr(c, &c->ch[ch], c->hfr_group_count, c->bands_per_hfr_group,
426  c->stereo_band_count + c->base_band_count, c->total_band_count);
427  for (ch = 0; ch < avctx->channels - 1; ch++)
428  apply_intensity_stereo(c, &c->ch[ch], &c->ch[ch+1], i,
429  c->total_band_count - c->base_band_count,
430  c->base_band_count, c->stereo_band_count);
431  for (ch = 0; ch < avctx->channels; ch++)
432  run_imdct(c, &c->ch[ch], i, samples[ch] + i * 128);
433  }
434 
435  *got_frame_ptr = 1;
436 
437  return avpkt->size;
438 }
439 
441 {
442  HCAContext *c = avctx->priv_data;
443 
444  av_freep(&c->fdsp);
445  av_tx_uninit(&c->tx_ctx);
446 
447  return 0;
448 }
449 
451  .name = "hca",
452  .long_name = NULL_IF_CONFIG_SMALL("CRI HCA"),
453  .type = AVMEDIA_TYPE_AUDIO,
454  .id = AV_CODEC_ID_HCA,
455  .priv_data_size = sizeof(HCAContext),
456  .init = decode_init,
457  .decode = decode_frame,
458  .close = decode_close,
459  .capabilities = AV_CODEC_CAP_DR1,
460  .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
462 };
static av_cold float ath(float f, float add)
Calculate ATH value for given frequency.
Definition: aacpsy.c:292
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:925
#define av_cold
Definition: attributes.h:88
uint8_t
Libavcodec external API header.
#define AV_EF_CRCCHECK
Verify checksums embedded in the bitstream (could be of either encoded or decoded data,...
Definition: avcodec.h:1653
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
#define s(width, name)
Definition: cbs_vp9.c:257
#define av_clip_intp2
Definition: common.h:143
#define MKBETAG(a, b, c, d)
Definition: common.h:479
#define av_clip
Definition: common.h:122
#define av_clip_uintp2
Definition: common.h:146
Public header for CRC hash function implementation.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
Definition: decode.c:1900
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
static AVFrame * frame
double value
Definition: eval.c:98
sample_rate
static SDL_Window * window
Definition: ffplay.c:366
bitstream reader API header.
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
Definition: get_bits.h:546
static int get_bits_left(GetBitContext *gb)
Definition: get_bits.h:849
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
Definition: get_bits.h:291
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
Definition: get_bits.h:677
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
Definition: get_bits.h:379
static av_always_inline int get_bitsz(GetBitContext *s, int n)
Read 0-25 bits.
Definition: get_bits.h:415
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
Definition: avcodec.h:333
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
@ AV_CODEC_ID_HCA
Definition: codec_id.h:518
const AVCRC * av_crc_get_table(AVCRCId crc_id)
Get an initialized standard CRC table.
Definition: crc.c:374
uint32_t AVCRC
Definition: crc.h:47
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length)
Calculate the CRC of a block.
Definition: crc.c:392
@ AV_CRC_16_ANSI
Definition: crc.h:51
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:59
#define AVERROR(e)
Definition: error.h:43
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
Definition: mem.h:117
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:69
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
int index
Definition: gxfenc.c:89
static const int8_t quant_spectrum_value[]
Definition: hca_data.h:41
static const float quant_step_size[]
Definition: hca_data.h:125
static const uint8_t max_bits_table[]
Definition: hca_data.h:25
static const int scale_conv_bias
Definition: hca_data.h:111
static const uint8_t quant_spectrum_bits[]
Definition: hca_data.h:29
static const float scale_conversion_table[]
Definition: hca_data.h:91
static const uint8_t scale_table[]
Definition: hca_data.h:53
static const uint8_t ath_base_curve[656]
Definition: hca_data.h:131
static const float intensity_ratio_table[]
Definition: hca_data.h:85
static const float dequantizer_scaling_table[]
Definition: hca_data.h:113
static void dequantize_coefficients(HCAContext *c, ChannelContext *ch)
Definition: hcadec.c:305
static void unpack(HCAContext *c, ChannelContext *ch, unsigned hfr_group_count, int packed_noise_level, const uint8_t *ath)
Definition: hcadec.c:331
static void ath_init1(uint8_t *ath, int sample_rate)
Definition: hcadec.c:66
static void run_imdct(HCAContext *c, ChannelContext *ch, int index, float *out)
Definition: hcadec.c:259
static av_cold int decode_close(AVCodecContext *avctx)
Definition: hcadec.c:440
AVCodec ff_hca_decoder
Definition: hcadec.c:450
static av_cold int decode_init(AVCodecContext *avctx)
Definition: hcadec.c:105
static unsigned ceil2(unsigned a, unsigned b)
Definition: hcadec.c:100
static void apply_intensity_stereo(HCAContext *s, ChannelContext *ch1, ChannelContext *ch2, int index, unsigned band_count, unsigned base_band_count, unsigned stereo_band_count)
Definition: hcadec.c:269
static int ath_init(uint8_t *ath, int type, int sample_rate)
Definition: hcadec.c:84
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: hcadec.c:391
static void reconstruct_hfr(HCAContext *s, ChannelContext *ch, unsigned hfr_group_count, unsigned bands_per_hfr_group, unsigned start_band, unsigned total_band_count)
Definition: hcadec.c:287
cl_device_type type
int i
Definition: input.c:407
av_cold AVFloatDSPContext * avpriv_float_dsp_alloc(int bit_exact)
Allocate a float DSP context.
Definition: float_dsp.c:135
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
version
Definition: libkvazaar.c:326
static const uint64_t c2
Definition: murmur3.c:52
static const uint64_t c1
Definition: murmur3.c:51
const char data[16]
Definition: mxf.c:142
#define FF_ARRAY_ELEMS(a)
main external API structure.
Definition: avcodec.h:536
enum AVSampleFormat sample_fmt
audio sample format
Definition: avcodec.h:1204
int sample_rate
samples per second
Definition: avcodec.h:1196
int flags
AV_CODEC_FLAG_*.
Definition: avcodec.h:616
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
Definition: avcodec.h:637
int channels
number of audio channels
Definition: avcodec.h:1197
int extradata_size
Definition: avcodec.h:638
void * priv_data
Definition: avcodec.h:563
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
Definition: avcodec.h:1645
AVCodec.
Definition: codec.h:197
const char * name
Name of the codec implementation.
Definition: codec.h:204
This structure describes decoded (raw) audio or video data.
Definition: frame.h:318
int nb_samples
number of audio samples (per channel) described by this frame
Definition: frame.h:384
uint8_t ** extended_data
pointers to the data planes/channels.
Definition: frame.h:365
This structure stores compressed data.
Definition: packet.h:346
int size
Definition: packet.h:370
uint8_t * data
Definition: packet.h:369
int chan_type
Definition: hcadec.c:40
int8_t scale_factors[128]
Definition: hcadec.c:35
int8_t intensity[8]
Definition: hcadec.c:37
float base[128]
Definition: hcadec.c:31
uint8_t scale[128]
Definition: hcadec.c:36
int8_t * hfr_scale
Definition: hcadec.c:38
float imdct_prev[128]
Definition: hcadec.c:34
float imdct_out[128]
Definition: hcadec.c:33
unsigned count
Definition: hcadec.c:39
float imdct_in[128]
Definition: hcadec.c:32
AVTXContext * tx_ctx
Definition: hcadec.c:62
uint8_t total_band_count
Definition: hcadec.c:56
uint8_t channel_config
Definition: hcadec.c:55
unsigned hfr_group_count
Definition: hcadec.c:53
ChannelContext ch[16]
Definition: hcadec.c:48
uint8_t base_band_count
Definition: hcadec.c:57
AVFloatDSPContext * fdsp
Definition: hcadec.c:63
uint8_t ath[128]
Definition: hcadec.c:50
uint8_t bands_per_hfr_group
Definition: hcadec.c:59
uint8_t stereo_band_count
Definition: hcadec.c:58
GetBitContext gb
Definition: hcadec.c:44
uint8_t track_count
Definition: hcadec.c:54
const AVCRC * crc_table
Definition: hcadec.c:46
int ath_type
Definition: hcadec.c:52
av_tx_fn tx_fn
Definition: hcadec.c:61
#define av_freep(p)
FILE * out
Definition: movenc.c:54
av_cold void av_tx_uninit(AVTXContext **ctx)
Frees a context and sets ctx to NULL, does nothing when ctx == NULL.
Definition: tx.c:146
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...
Definition: tx.c:160
@ AV_TX_FLOAT_MDCT
Standard MDCT with sample data type of float and a scale type of float.
Definition: tx.h:58
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
Definition: tx.h:99
const char * b
Definition: vf_curves.c:118
const char * r
Definition: vf_curves.c:116
static const int factor[16]
Definition: vf_pp7.c:77
float delta
static double c[64]
int acc
Definition: yuv2rgb.c:555