FFmpeg
Loading...
Searching...
No Matches
soxr_resample.c File Reference

audio resampling with soxr More...

#include "libavutil/log.h"
#include "swresample_internal.h"
#include <soxr.h>

Go to the source code of this file.

Functions

static struct ResampleContextcreate (struct ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff, enum AVSampleFormat format, enum SwrFilterType filter_type, double kaiser_beta, double precision, int cheby, int exact_rational)
 
static void destroy (struct ResampleContext **c)
 
static int flush (struct SwrContext *s)
 
static int process (struct ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed)
 
static int64_t get_delay (struct SwrContext *s, int64_t base)
 
static int invert_initial_buffer (struct ResampleContext *c, AudioData *dst, const AudioData *src, int in_count, int *out_idx, int *out_sz)
 
static int64_t get_out_samples (struct SwrContext *s, int in_samples)
 

Variables

const struct Resampler swri_soxr_resampler
 

Detailed Description

audio resampling with soxr

Definition in file soxr_resample.c.

Function Documentation

◆ create()

static struct ResampleContext * create ( struct ResampleContext * c,
int out_rate,
int in_rate,
int filter_size,
int phase_shift,
int linear,
double cutoff,
enum AVSampleFormat format,
enum SwrFilterType filter_type,
double kaiser_beta,
double precision,
int cheby,
int exact_rational )
static

Definition at line 32 of file soxr_resample.c.

Referenced by ff_vdpau_common_init().

◆ destroy()

static void destroy ( struct ResampleContext ** c)
static

Definition at line 64 of file soxr_resample.c.

Referenced by ff_vdpau_common_uninit().

◆ flush()

static int flush ( struct SwrContext * s)
static

Definition at line 69 of file soxr_resample.c.

◆ process()

static int process ( struct ResampleContext * c,
AudioData * dst,
int dst_size,
AudioData * src,
int src_size,
int * consumed )
static

Definition at line 84 of file soxr_resample.c.

◆ get_delay()

static int64_t get_delay ( struct SwrContext * s,
int64_t base )
static

Definition at line 99 of file soxr_resample.c.

◆ invert_initial_buffer()

static int invert_initial_buffer ( struct ResampleContext * c,
AudioData * dst,
const AudioData * src,
int in_count,
int * out_idx,
int * out_sz )
static

Definition at line 111 of file soxr_resample.c.

◆ get_out_samples()

static int64_t get_out_samples ( struct SwrContext * s,
int in_samples )
static

Definition at line 116 of file soxr_resample.c.

Variable Documentation

◆ swri_soxr_resampler

const struct Resampler swri_soxr_resampler
Initial value:
= {
.init = create,
.free = destroy,
.multiple_resample = process,
.flush = flush,
.get_delay = get_delay,
.invert_initial_buffer = invert_initial_buffer,
.get_out_samples = get_out_samples,
}
void(* flush)(AVBSFContext *ctx)
Definition dts2pts.c:610
static int64_t get_delay(struct SwrContext *s, int64_t base)
Definition resample.c:408
static int invert_initial_buffer(ResampleContext *c, AudioData *dst, const AudioData *src, int in_count, int *out_idx, int *out_sz)
Definition resample.c:457
static int64_t get_out_samples(struct SwrContext *s, int in_samples)
Definition resample.c:418
static struct ResampleContext * create(struct ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff, enum AVSampleFormat format, enum SwrFilterType filter_type, double kaiser_beta, double precision, int cheby, int exact_rational)
static void destroy(struct ResampleContext **c)
static void process(NormalizeContext *s, AVFrame *in, AVFrame *out)

Definition at line 126 of file soxr_resample.c.

Referenced by swr_init().