FFmpeg
Data Structures | Functions | Variables
hcadec.c File Reference
#include "libavutil/crc.h"
#include "libavutil/float_dsp.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem_internal.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

const AVCodec ff_hca_decoder
 

Function Documentation

◆ ath_init1()

static void ath_init1 ( uint8_t *  ath,
int  sample_rate 
)
static

Definition at line 66 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 84 of file hcadec.c.

Referenced by decode_init().

◆ ceil2()

static unsigned ceil2 ( unsigned  a,
unsigned  b 
)
inlinestatic

Definition at line 100 of file hcadec.c.

Referenced by decode_init().

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 105 of file hcadec.c.

◆ run_imdct()

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

Definition at line 257 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 267 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 285 of file hcadec.c.

Referenced by decode_frame().

◆ dequantize_coefficients()

static void dequantize_coefficients ( HCAContext c,
ChannelContext ch 
)
static

Definition at line 303 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 329 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 389 of file hcadec.c.

◆ decode_close()

static av_cold int decode_close ( AVCodecContext avctx)
static

Definition at line 438 of file hcadec.c.

Variable Documentation

◆ ff_hca_decoder

const 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 448 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:31
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:948
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:105
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
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:117
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:438
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
HCAContext
Definition: hcadec.c:43
decode_frame
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: hcadec.c:389
AV_CODEC_ID_HCA
@ AV_CODEC_ID_HCA
Definition: codec_id.h:515