FFmpeg  4.0
Functions | Variables
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

struct Resampler const 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.

Referenced by swscale().

◆ 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

struct Resampler const swri_soxr_resampler
Initial value:
={
}
#define NULL
Definition: coverity.c:32
static int64_t get_out_samples(struct SwrContext *s, int in_samples)
static int64_t get_delay(struct SwrContext *s, int64_t base)
Definition: soxr_resample.c:99
static int process(struct ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed)
Definition: soxr_resample.c:84
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)
Definition: soxr_resample.c:32
static int flush(struct SwrContext *s)
Definition: soxr_resample.c:69
static void destroy(struct ResampleContext **c)
Definition: soxr_resample.c:64
static int invert_initial_buffer(struct ResampleContext *c, AudioData *dst, const AudioData *src, int in_count, int *out_idx, int *out_sz)

Definition at line 126 of file soxr_resample.c.

Referenced by swr_init().