swresample_internal.h File Reference
#include "swresample.h"
#include "libavutil/channel_layout.h"
#include "config.h"
Include dependency graph for swresample_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AudioData
 Audio buffer used for intermediate storage between conversion phases. More...
 
struct  DitherContext
 
struct  SwrContext
 
struct  Resampler
 

Macros

#define SQRT3_2   1.22474487139158904909 /* sqrt(3/2) */
 
#define NS_TAPS   20
 

Typedefs

typedef int integer
 
typedef voidmix_1_1_func_type) (void *out, const void *in, void *coeffp, integer index, integer len)
 
typedef voidmix_2_1_func_type) (void *out, const void *in1, const void *in2, void *coeffp, integer index1, integer index2, integer len)
 
typedef voidmix_any_func_type) (uint8_t **out, const uint8_t **in1, void *coeffp, integer len)
 
typedef struct AudioData AudioData
 
typedef struct ResampleContext *(* resample_init_func) (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, int kaiser_beta, double precision, int cheby)
 
typedef void(* resample_free_func) (struct ResampleContext **c)
 
typedef int(* multiple_resample_func) (struct ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed)
 
typedef int(* resample_flush_func) (struct SwrContext *c)
 
typedef int(* set_compensation_func) (struct ResampleContext *c, int sample_delta, int compensation_distance)
 
typedef int64_t(* get_delay_func) (struct SwrContext *s, int64_t base)
 

Functions

int swri_realloc_audio (AudioData *a, int count)
 
int swri_resample_int16 (struct ResampleContext *c, int16_t *dst, const int16_t *src, int *consumed, int src_size, int dst_size, int update_ctx)
 
int swri_resample_int32 (struct ResampleContext *c, int32_t *dst, const int32_t *src, int *consumed, int src_size, int dst_size, int update_ctx)
 
int swri_resample_float (struct ResampleContext *c, float *dst, const float *src, int *consumed, int src_size, int dst_size, int update_ctx)
 
int swri_resample_double (struct ResampleContext *c, double *dst, const double *src, int *consumed, int src_size, int dst_size, int update_ctx)
 
void swri_noise_shaping_int16 (SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count)
 
void swri_noise_shaping_int32 (SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count)
 
void swri_noise_shaping_float (SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count)
 
void swri_noise_shaping_double (SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count)
 
int swri_rematrix_init (SwrContext *s)
 
void swri_rematrix_free (SwrContext *s)
 
int swri_rematrix (SwrContext *s, AudioData *out, AudioData *in, int len, int mustcopy)
 
void swri_rematrix_init_x86 (struct SwrContext *s)
 
void swri_get_dither (SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt)
 
int swri_dither_init (SwrContext *s, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt)
 
void swri_audio_convert_init_arm (struct AudioConvert *ac, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels)
 
void swri_audio_convert_init_x86 (struct AudioConvert *ac, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels)
 

Variables

struct Resampler const swri_resampler
 

Macro Definition Documentation

#define NS_TAPS   20

Definition at line 30 of file swresample_internal.h.

#define SQRT3_2   1.22474487139158904909 /* sqrt(3/2) */

Definition at line 28 of file swresample_internal.h.

Typedef Documentation

typedef struct AudioData AudioData
typedef int64_t(* get_delay_func) (struct SwrContext *s, int64_t base)

Definition at line 157 of file swresample_internal.h.

typedef int integer

Definition at line 35 of file swresample_internal.h.

typedef void( mix_1_1_func_type) (void *out, const void *in, void *coeffp, integer index, integer len)

Definition at line 38 of file swresample_internal.h.

typedef void( mix_2_1_func_type) (void *out, const void *in1, const void *in2, void *coeffp, integer index1, integer index2, integer len)

Definition at line 39 of file swresample_internal.h.

typedef void( mix_any_func_type) (uint8_t **out, const uint8_t **in1, void *coeffp, integer len)

Definition at line 41 of file swresample_internal.h.

typedef int(* multiple_resample_func) (struct ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed)

Definition at line 154 of file swresample_internal.h.

typedef int(* resample_flush_func) (struct SwrContext *c)

Definition at line 155 of file swresample_internal.h.

typedef void(* resample_free_func) (struct ResampleContext **c)

Definition at line 153 of file swresample_internal.h.

typedef struct ResampleContext*(* resample_init_func) (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, int kaiser_beta, double precision, int cheby)

Definition at line 151 of file swresample_internal.h.

typedef int(* set_compensation_func) (struct ResampleContext *c, int sample_delta, int compensation_distance)

Definition at line 156 of file swresample_internal.h.

Function Documentation

void swri_audio_convert_init_arm ( struct AudioConvert ac,
enum AVSampleFormat  out_fmt,
enum AVSampleFormat  in_fmt,
int  channels 
)

Definition at line 48 of file libswresample/arm/audio_convert_init.c.

void swri_audio_convert_init_x86 ( struct AudioConvert ac,
enum AVSampleFormat  out_fmt,
enum AVSampleFormat  in_fmt,
int  channels 
)

Definition at line 33 of file swresample_x86.c.

int swri_dither_init ( SwrContext s,
enum AVSampleFormat  out_fmt,
enum AVSampleFormat  in_fmt 
)

Definition at line 75 of file libswresample/dither.c.

Referenced by swr_init().

void swri_get_dither ( SwrContext s,
void dst,
int  len,
unsigned  seed,
enum AVSampleFormat  noise_fmt 
)

Definition at line 26 of file libswresample/dither.c.

Referenced by swr_convert_internal().

void swri_noise_shaping_double ( SwrContext s,
AudioData dsts,
const AudioData srcs,
const AudioData noises,
int  count 
)

Referenced by swr_convert_internal().

void swri_noise_shaping_float ( SwrContext s,
AudioData dsts,
const AudioData srcs,
const AudioData noises,
int  count 
)

Referenced by swr_convert_internal().

void swri_noise_shaping_int16 ( SwrContext s,
AudioData dsts,
const AudioData srcs,
const AudioData noises,
int  count 
)

Referenced by swr_convert_internal().

void swri_noise_shaping_int32 ( SwrContext s,
AudioData dsts,
const AudioData srcs,
const AudioData noises,
int  count 
)

Referenced by swr_convert_internal().

int swri_realloc_audio ( AudioData a,
int  count 
)
int swri_rematrix ( SwrContext s,
AudioData out,
AudioData in,
int  len,
int  mustcopy 
)

Definition at line 393 of file rematrix.c.

Referenced by swr_convert_internal().

void swri_rematrix_free ( SwrContext s)

Definition at line 387 of file rematrix.c.

Referenced by swr_free(), and swr_init().

int swri_rematrix_init ( SwrContext s)

Definition at line 327 of file rematrix.c.

Referenced by swr_init().

void swri_rematrix_init_x86 ( struct SwrContext s)

Referenced by swri_rematrix_init().

int swri_resample_double ( struct ResampleContext c,
double *  dst,
const double *  src,
int *  consumed,
int  src_size,
int  dst_size,
int  update_ctx 
)

Referenced by multiple_resample().

int swri_resample_float ( struct ResampleContext c,
float *  dst,
const float *  src,
int *  consumed,
int  src_size,
int  dst_size,
int  update_ctx 
)

Referenced by multiple_resample().

int swri_resample_int16 ( struct ResampleContext c,
int16_t *  dst,
const int16_t *  src,
int *  consumed,
int  src_size,
int  dst_size,
int  update_ctx 
)

Referenced by multiple_resample().

int swri_resample_int32 ( struct ResampleContext c,
int32_t dst,
const int32_t src,
int *  consumed,
int  src_size,
int  dst_size,
int  update_ctx 
)

Referenced by multiple_resample().

Variable Documentation

struct Resampler const swri_resampler

Definition at line 365 of file libswresample/resample.c.

Referenced by swr_init().