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

◆ ath_init1()

static void ath_init1 ( uint8_t ath,
int  sample_rate 
)
static

Definition at line 65 of file hcadec.c.

Referenced by ath_init().

◆ 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().

◆ ceil2()

static unsigned ceil2 ( unsigned  a,
unsigned  b 
)
inlinestatic

Definition at line 99 of file hcadec.c.

Referenced by decode_init().

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 104 of file hcadec.c.

◆ run_imdct()

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

Definition at line 256 of file hcadec.c.

Referenced by decode_frame().

◆ apply_intensity_stereo()

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 266 of file hcadec.c.

Referenced by decode_frame().

◆ reconstruct_hfr()

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 284 of file hcadec.c.

Referenced by decode_frame().

◆ dequantize_coefficients()

static void dequantize_coefficients ( HCAContext c,
ChannelContext ch 
)
static

Definition at line 301 of file hcadec.c.

Referenced by decode_frame().

◆ unpack()

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

Definition at line 327 of file hcadec.c.

Referenced by decode_frame().

◆ decode_frame()

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

Definition at line 387 of file hcadec.c.

◆ decode_close()

static av_cold int decode_close ( AVCodecContext avctx)
static

Definition at line 436 of file hcadec.c.

Variable Documentation

◆ ff_hca_decoder

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,
}

Definition at line 446 of file hcadec.c.

AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:69
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:716
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: hcadec.c:104
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:50
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
decode_close
static av_cold int decode_close(AVCodecContext *avctx)
Definition: hcadec.c:436
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
HCAContext
Definition: hcadec.c:42
decode_frame
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: hcadec.c:387
AV_CODEC_ID_HCA
@ AV_CODEC_ID_HCA
Definition: codec_id.h:504