FFmpeg
Data Structures | Functions | Variables
hcadec.c File Reference
#include "libavutil/crc.h"
#include "libavutil/float_dsp.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/tx.h"
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
#include "hca_data.h"

Go to the source code of this file.

Data Structures

struct  ChannelContext
 
struct  HCAContext
 

Functions

static void ath_init1 (uint8_t *ath, int sample_rate)
 
static int ath_init (uint8_t *ath, int type, int sample_rate)
 
static unsigned ceil2 (unsigned a, unsigned b)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static void run_imdct (HCAContext *c, ChannelContext *ch, int index, float *out)
 
static void apply_intensity_stereo (HCAContext *s, ChannelContext *ch1, ChannelContext *ch2, int index, unsigned band_count, unsigned base_band_count, unsigned stereo_band_count)
 
static void reconstruct_hfr (HCAContext *s, ChannelContext *ch, unsigned hfr_group_count, unsigned bands_per_hfr_group, unsigned start_band, unsigned total_band_count)
 
static void dequantize_coefficients (HCAContext *c, ChannelContext *ch)
 
static void unpack (HCAContext *c, ChannelContext *ch, unsigned hfr_group_count, int packed_noise_level, const uint8_t *ath)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 
static av_cold int decode_close (AVCodecContext *avctx)
 

Variables

AVCodec ff_hca_decoder
 

Function Documentation

static void ath_init1 ( uint8_t ath,
int  sample_rate 
)
static

Definition at line 65 of file hcadec.c.

Referenced by ath_init().

static int ath_init ( uint8_t ath,
int  type,
int  sample_rate 
)
static

Definition at line 83 of file hcadec.c.

Referenced by decode_init().

static unsigned ceil2 ( unsigned  a,
unsigned  b 
)
inlinestatic

Definition at line 99 of file hcadec.c.

Referenced by decode_init().

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 104 of file hcadec.c.

static void run_imdct ( HCAContext c,
ChannelContext ch,
int  index,
float *  out 
)
static

Definition at line 252 of file hcadec.c.

Referenced by decode_frame().

static void apply_intensity_stereo ( HCAContext s,
ChannelContext ch1,
ChannelContext ch2,
int  index,
unsigned  band_count,
unsigned  base_band_count,
unsigned  stereo_band_count 
)
static

Definition at line 262 of file hcadec.c.

Referenced by decode_frame().

static void reconstruct_hfr ( HCAContext s,
ChannelContext ch,
unsigned  hfr_group_count,
unsigned  bands_per_hfr_group,
unsigned  start_band,
unsigned  total_band_count 
)
static

Definition at line 280 of file hcadec.c.

Referenced by decode_frame().

static void dequantize_coefficients ( HCAContext c,
ChannelContext ch 
)
static

Definition at line 297 of file hcadec.c.

Referenced by decode_frame().

static void unpack ( HCAContext c,
ChannelContext ch,
unsigned  hfr_group_count,
int  packed_noise_level,
const uint8_t ath 
)
static

Definition at line 323 of file hcadec.c.

Referenced by decode_frame().

static int decode_frame ( AVCodecContext avctx,
void data,
int got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 383 of file hcadec.c.

static av_cold int decode_close ( AVCodecContext avctx)
static

Definition at line 432 of file hcadec.c.

Variable Documentation

AVCodec ff_hca_decoder
Initial value:
= {
.name = "hca",
.long_name = NULL_IF_CONFIG_SMALL("CRI HCA"),
.priv_data_size = sizeof(HCAContext),
.close = decode_close,
.capabilities = AV_CODEC_CAP_DR1,
}
float, planar
Definition: samplefmt.h:69
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold int decode_init(AVCodecContext *avctx)
Definition: hcadec.c:104
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
static av_cold int decode_close(AVCodecContext *avctx)
Definition: hcadec.c:432
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: hcadec.c:383
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:701
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:405

Definition at line 442 of file hcadec.c.