FFmpeg
Typedefs | Functions
dcaadpcm.c File Reference
#include "libavutil/mem.h"
#include "dcaadpcm.h"
#include "dcaenc.h"
#include "dca_core.h"
#include "mathops.h"

Go to the source code of this file.

Typedefs

typedef int32_t premultiplied_coeffs[10]
 

Functions

static int64_t calc_corr (const int32_t *x, int len, int j, int k)
 
static int64_t apply_filter (const int16_t a[DCA_ADPCM_COEFFS], const int64_t corr[15], const int32_t aa[10])
 
static int64_t find_best_filter (const DCAADPCMEncContext *s, const int32_t *in, int len)
 
static int64_t calc_prediction_gain (int pred_vq, const int32_t *in, int32_t *out, int len)
 
int ff_dcaadpcm_subband_analysis (const DCAADPCMEncContext *s, const int32_t *in, int len, int *diff)
 
static void precalc (premultiplied_coeffs *data)
 
int ff_dcaadpcm_do_real (int pred_vq_index, softfloat quant, int32_t scale_factor, int32_t step_size, const int32_t *prev_hist, const int32_t *in, int32_t *next_hist, int32_t *out, int len, int32_t peak)
 
av_cold int ff_dcaadpcm_init (DCAADPCMEncContext *s)
 
av_cold void ff_dcaadpcm_free (DCAADPCMEncContext *s)
 

Typedef Documentation

◆ premultiplied_coeffs

typedef int32_t premultiplied_coeffs[10]

Definition at line 29 of file dcaadpcm.c.

Function Documentation

◆ calc_corr()

static int64_t calc_corr ( const int32_t x,
int  len,
int  j,
int  k 
)
inlinestatic

Definition at line 32 of file dcaadpcm.c.

Referenced by find_best_filter().

◆ apply_filter()

static int64_t apply_filter ( const int16_t  a[DCA_ADPCM_COEFFS],
const int64_t  corr[15],
const int32_t  aa[10] 
)
inlinestatic

Definition at line 41 of file dcaadpcm.c.

Referenced by find_best_filter().

◆ find_best_filter()

static int64_t find_best_filter ( const DCAADPCMEncContext s,
const int32_t in,
int  len 
)
static

Definition at line 80 of file dcaadpcm.c.

Referenced by ff_dcaadpcm_subband_analysis().

◆ calc_prediction_gain()

static int64_t calc_prediction_gain ( int  pred_vq,
const int32_t in,
int32_t out,
int  len 
)
inlinestatic

Definition at line 105 of file dcaadpcm.c.

Referenced by ff_dcaadpcm_subband_analysis().

◆ ff_dcaadpcm_subband_analysis()

int ff_dcaadpcm_subband_analysis ( const DCAADPCMEncContext s,
const int32_t in,
int  len,
int *  diff 
)

Definition at line 126 of file dcaadpcm.c.

Referenced by adpcm_analysis().

◆ precalc()

static void precalc ( premultiplied_coeffs data)
static

Definition at line 165 of file dcaadpcm.c.

Referenced by ff_dcaadpcm_init().

◆ ff_dcaadpcm_do_real()

int ff_dcaadpcm_do_real ( int  pred_vq_index,
softfloat  quant,
int32_t  scale_factor,
int32_t  step_size,
const int32_t prev_hist,
const int32_t in,
int32_t next_hist,
int32_t out,
int  len,
int32_t  peak 
)

Definition at line 184 of file dcaadpcm.c.

Referenced by quantize_adpcm_subband().

◆ ff_dcaadpcm_init()

av_cold int ff_dcaadpcm_init ( DCAADPCMEncContext s)

Definition at line 213 of file dcaadpcm.c.

Referenced by encode_init().

◆ ff_dcaadpcm_free()

av_cold void ff_dcaadpcm_free ( DCAADPCMEncContext s)

Definition at line 226 of file dcaadpcm.c.

Referenced by encode_close().