FFmpeg
Data Structures | Macros | Typedefs | Functions | Variables
swresample_internal.h File Reference
#include "swresample.h"
#include "libavutil/channel_layout.h"
#include "config.h"

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  Resampler
 
struct  SwrContext
 The libswresample context. More...
 

Macros

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

Typedefs

typedef int integer
 
typedef void() mix_1_1_func_type(void *out, const void *in, void *coeffp, integer index, integer len)
 
typedef void() mix_2_1_func_type(void *out, const void *in1, const void *in2, void *coeffp, integer index1, integer index2, integer len)
 
typedef void() mix_any_func_type(uint8_t **out, const uint8_t **in1, void *coeffp, integer len)
 
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)
 
typedef int(* invert_initial_buffer_func) (struct ResampleContext *c, AudioData *dst, const AudioData *src, int src_size, int *dst_idx, int *dst_count)
 
typedef int64_t(* get_out_samples_func) (struct SwrContext *s, int in_samples)
 

Functions

av_warn_unused_result int swri_realloc_audio (AudioData *a, int count)
 
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)
 
av_warn_unused_result 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)
 
int swri_rematrix_init_x86 (struct SwrContext *s)
 
av_warn_unused_result int swri_get_dither (SwrContext *s, void *dst, int len, unsigned seed, enum AVSampleFormat noise_fmt)
 
av_warn_unused_result int swri_dither_init (SwrContext *s, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt)
 
void swri_audio_convert_init_aarch64 (struct AudioConvert *ac, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels)
 
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
 
struct Resampler const swri_soxr_resampler
 

Macro Definition Documentation

◆ SWR_CH_MAX

#define SWR_CH_MAX   64

Definition at line 28 of file swresample_internal.h.

◆ SQRT3_2

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

Definition at line 30 of file swresample_internal.h.

◆ NS_TAPS

#define NS_TAPS   20

Definition at line 32 of file swresample_internal.h.

Typedef Documentation

◆ integer

typedef int integer

Definition at line 37 of file swresample_internal.h.

◆ mix_1_1_func_type

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

Definition at line 40 of file swresample_internal.h.

◆ mix_2_1_func_type

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 41 of file swresample_internal.h.

◆ mix_any_func_type

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

Definition at line 43 of file swresample_internal.h.

◆ resample_free_func

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

Definition at line 73 of file swresample_internal.h.

◆ multiple_resample_func

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

Definition at line 74 of file swresample_internal.h.

◆ resample_flush_func

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

Definition at line 75 of file swresample_internal.h.

◆ set_compensation_func

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

Definition at line 76 of file swresample_internal.h.

◆ get_delay_func

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

Definition at line 77 of file swresample_internal.h.

◆ invert_initial_buffer_func

typedef int(* invert_initial_buffer_func) (struct ResampleContext *c, AudioData *dst, const AudioData *src, int src_size, int *dst_idx, int *dst_count)

Definition at line 78 of file swresample_internal.h.

◆ get_out_samples_func

typedef int64_t(* get_out_samples_func) (struct SwrContext *s, int in_samples)

Definition at line 79 of file swresample_internal.h.

Function Documentation

◆ swri_realloc_audio()

av_warn_unused_result int swri_realloc_audio ( AudioData a,
int  count 
)

◆ swri_noise_shaping_int16()

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

Referenced by swr_convert_internal().

◆ swri_noise_shaping_int32()

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

Referenced by swr_convert_internal().

◆ swri_noise_shaping_float()

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

Referenced by swr_convert_internal().

◆ swri_noise_shaping_double()

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

Referenced by swr_convert_internal().

◆ swri_rematrix_init()

av_warn_unused_result int swri_rematrix_init ( SwrContext s)

Definition at line 395 of file rematrix.c.

Referenced by swr_init().

◆ swri_rematrix_free()

void swri_rematrix_free ( SwrContext s)

Definition at line 500 of file rematrix.c.

Referenced by clear_context().

◆ swri_rematrix()

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

Definition at line 507 of file rematrix.c.

Referenced by swr_convert_internal().

◆ swri_rematrix_init_x86()

int swri_rematrix_init_x86 ( struct SwrContext s)

Referenced by swri_rematrix_init().

◆ swri_get_dither()

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

Definition at line 26 of file dither.c.

Referenced by swr_convert_internal().

◆ swri_dither_init()

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

Definition at line 79 of file dither.c.

Referenced by swr_init().

◆ swri_audio_convert_init_aarch64()

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

Definition at line 48 of file audio_convert_init.c.

◆ swri_audio_convert_init_arm()

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 audio_convert_init.c.

◆ swri_audio_convert_init_x86()

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

Definition at line 36 of file audio_convert_init.c.

Variable Documentation

◆ swri_resampler

struct Resampler const swri_resampler

Definition at line 613 of file resample.c.

Referenced by swr_init().

◆ swri_soxr_resampler

struct Resampler const swri_soxr_resampler

Definition at line 126 of file soxr_resample.c.

Referenced by swr_init().