FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
SwrContext Struct Reference

#include <swresample_internal.h>

Data Fields

const AVClassav_class
 AVClass used for AVOption and av_log()
 
int log_level_offset
 logging level offset
 
voidlog_ctx
 parent logging context
 
enum AVSampleFormat in_sample_fmt
 input sample format
 
enum AVSampleFormat int_sample_fmt
 internal sample format (AV_SAMPLE_FMT_FLTP or AV_SAMPLE_FMT_S16P)
 
enum AVSampleFormat out_sample_fmt
 output sample format
 
int64_t in_ch_layout
 input channel layout
 
int64_t out_ch_layout
 output channel layout
 
int in_sample_rate
 input sample rate
 
int out_sample_rate
 output sample rate
 
int flags
 miscellaneous flags such as SWR_FLAG_RESAMPLE
 
float slev
 surround mixing level
 
float clev
 center mixing level
 
float lfe_mix_level
 LFE mixing level.
 
float rematrix_volume
 rematrixing volume coefficient
 
float rematrix_maxval
 maximum value for rematrixing output
 
enum AVMatrixEncoding matrix_encoding
 matrixed stereo encoding
 
const int * channel_map
 channel index (or -1 if muted channel) map
 
int used_ch_count
 number of used input channels (mapped channel count if channel_map, otherwise in.ch_count)
 
enum SwrEngine engine
 
struct DitherContext dither
 
int filter_size
 length of each FIR filter in the resampling filterbank relative to the cutoff frequency
 
int phase_shift
 log2 of the number of entries in the resampling polyphase filterbank
 
int linear_interp
 if 1 then the resampling FIR filter will be linearly interpolated
 
double cutoff
 resampling cutoff frequency (swr: 6dB point; soxr: 0dB point).
 
enum SwrFilterType filter_type
 swr resampling filter type
 
int kaiser_beta
 swr beta value for Kaiser window (only applicable if filter_type == AV_FILTER_TYPE_KAISER)
 
double precision
 soxr resampling precision (in bits)
 
int cheby
 soxr: if 1 then passband rolloff will be none (Chebyshev) & irrational ratio approximation precision will be higher
 
float min_compensation
 swr minimum below which no compensation will happen
 
float min_hard_compensation
 swr minimum below which no silence inject / sample drop will happen
 
float soft_compensation_duration
 swr duration over which soft compensation is applied
 
float max_soft_compensation
 swr maximum soft compensation in seconds over soft_compensation_duration
 
float async
 swr simple 1 parameter async, similar to ffmpegs -async
 
int64_t firstpts_in_samples
 swr first pts in samples
 
int resample_first
 1 if resampling must come first, 0 if rematrixing
 
int rematrix
 flag to indicate if rematrixing is needed (basically if input and output layouts mismatch)
 
int rematrix_custom
 flag to indicate that a custom matrix has been defined
 
AudioData in
 input audio data
 
AudioData postin
 post-input audio data: used for rematrix/resample
 
AudioData midbuf
 intermediate audio data (postin/preout)
 
AudioData preout
 pre-output audio data: used for rematrix/resample
 
AudioData out
 converted output audio data
 
AudioData in_buffer
 cached audio data (convert and resample purpose)
 
AudioData silence
 temporary with silence
 
AudioData drop_temp
 temporary used to discard output
 
int in_buffer_index
 cached buffer position
 
int in_buffer_count
 cached buffer length
 
int resample_in_constraint
 1 if the input end was reach before the output end, 0 otherwise
 
int flushed
 1 if data is to be flushed and no further input is expected
 
int64_t outpts
 output PTS
 
int64_t firstpts
 first PTS
 
int drop_output
 number of output samples to drop
 
struct AudioConvertin_convert
 input conversion context
 
struct AudioConvertout_convert
 output conversion context
 
struct AudioConvertfull_convert
 full conversion context (single conversion for input and output)
 
struct ResampleContextresample
 resampling context
 
struct Resampler const * resampler
 resampler virtual function table
 
float matrix [SWR_CH_MAX][SWR_CH_MAX]
 floating point rematrixing coefficients
 
uint8_tnative_matrix
 
uint8_tnative_one
 
uint8_tnative_simd_one
 
uint8_tnative_simd_matrix
 
int32_t matrix32 [SWR_CH_MAX][SWR_CH_MAX]
 17.15 fixed point rematrixing coefficients
 
uint8_t matrix_ch [SWR_CH_MAX][SWR_CH_MAX+1]
 Lists of input channels per output channel that have non zero rematrixing coefficients.
 
mix_1_1_func_typemix_1_1_f
 
mix_1_1_func_typemix_1_1_simd
 
mix_2_1_func_typemix_2_1_f
 
mix_2_1_func_typemix_2_1_simd
 
mix_any_func_typemix_any_f
 

Detailed Description

Examples:
muxing.c, resampling_audio.c, and transcode_aac.c.

Definition at line 69 of file swresample_internal.h.

Field Documentation

const AVClass* SwrContext::av_class

AVClass used for AVOption and av_log()

Definition at line 70 of file swresample_internal.h.

Referenced by swr_alloc().

int SwrContext::log_level_offset

logging level offset

Definition at line 71 of file swresample_internal.h.

Referenced by swr_alloc_set_opts().

void* SwrContext::log_ctx

parent logging context

Definition at line 72 of file swresample_internal.h.

Referenced by swr_alloc_set_opts().

enum AVSampleFormat SwrContext::in_sample_fmt

input sample format

Definition at line 73 of file swresample_internal.h.

Referenced by main(), and swr_init().

enum AVSampleFormat SwrContext::int_sample_fmt

internal sample format (AV_SAMPLE_FMT_FLTP or AV_SAMPLE_FMT_S16P)

Definition at line 74 of file swresample_internal.h.

Referenced by auto_matrix(), swr_convert_internal(), swr_init(), and swri_rematrix().

enum AVSampleFormat SwrContext::out_sample_fmt

output sample format

Definition at line 75 of file swresample_internal.h.

Referenced by auto_matrix(), swr_convert_internal(), and swr_init().

int64_t SwrContext::in_ch_layout

input channel layout

Definition at line 76 of file swresample_internal.h.

Referenced by auto_matrix(), swr_init(), swr_set_matrix(), and swri_rematrix_init().

int64_t SwrContext::out_ch_layout

output channel layout

Definition at line 77 of file swresample_internal.h.

Referenced by auto_matrix(), swr_alloc_set_opts(), swr_init(), swr_set_matrix(), swri_rematrix(), and swri_rematrix_init().

int SwrContext::in_sample_rate

input sample rate

Definition at line 78 of file swresample_internal.h.

Referenced by get_delay(), swr_convert(), swr_get_delay(), swr_init(), and swr_next_pts().

int SwrContext::out_sample_rate

output sample rate

Definition at line 79 of file swresample_internal.h.

Referenced by get_delay(), swr_init(), swr_next_pts(), and swri_dither_init().

int SwrContext::flags

miscellaneous flags such as SWR_FLAG_RESAMPLE

Definition at line 80 of file swresample_internal.h.

Referenced by swr_init(), and swr_set_compensation().

float SwrContext::slev

surround mixing level

Definition at line 81 of file swresample_internal.h.

Referenced by auto_matrix().

float SwrContext::clev

center mixing level

Definition at line 82 of file swresample_internal.h.

Referenced by auto_matrix().

float SwrContext::lfe_mix_level

LFE mixing level.

Definition at line 83 of file swresample_internal.h.

Referenced by auto_matrix().

float SwrContext::rematrix_volume

rematrixing volume coefficient

Definition at line 84 of file swresample_internal.h.

Referenced by auto_matrix(), and swr_init().

float SwrContext::rematrix_maxval

maximum value for rematrixing output

Definition at line 85 of file swresample_internal.h.

Referenced by auto_matrix().

enum AVMatrixEncoding SwrContext::matrix_encoding

matrixed stereo encoding

Definition at line 86 of file swresample_internal.h.

Referenced by auto_matrix().

const int* SwrContext::channel_map

channel index (or -1 if muted channel) map

Definition at line 87 of file swresample_internal.h.

Referenced by swr_convert_internal(), swr_init(), and swr_set_channel_mapping().

int SwrContext::used_ch_count

number of used input channels (mapped channel count if channel_map, otherwise in.ch_count)

Definition at line 88 of file swresample_internal.h.

Referenced by swr_convert_internal(), and swr_init().

enum SwrEngine SwrContext::engine

Definition at line 89 of file swresample_internal.h.

Referenced by resample(), and swr_init().

struct DitherContext SwrContext::dither
int SwrContext::filter_size

length of each FIR filter in the resampling filterbank relative to the cutoff frequency

Definition at line 93 of file swresample_internal.h.

Referenced by swr_init().

int SwrContext::phase_shift

log2 of the number of entries in the resampling polyphase filterbank

Definition at line 94 of file swresample_internal.h.

Referenced by swr_init().

int SwrContext::linear_interp

if 1 then the resampling FIR filter will be linearly interpolated

Definition at line 95 of file swresample_internal.h.

Referenced by swr_init().

double SwrContext::cutoff

resampling cutoff frequency (swr: 6dB point; soxr: 0dB point).

1.0 corresponds to half the output sample rate

Definition at line 96 of file swresample_internal.h.

Referenced by swr_init().

enum SwrFilterType SwrContext::filter_type

swr resampling filter type

Definition at line 97 of file swresample_internal.h.

Referenced by swr_init().

int SwrContext::kaiser_beta

swr beta value for Kaiser window (only applicable if filter_type == AV_FILTER_TYPE_KAISER)

Definition at line 98 of file swresample_internal.h.

Referenced by swr_init().

double SwrContext::precision

soxr resampling precision (in bits)

Definition at line 99 of file swresample_internal.h.

Referenced by swr_init().

int SwrContext::cheby

soxr: if 1 then passband rolloff will be none (Chebyshev) & irrational ratio approximation precision will be higher

Definition at line 100 of file swresample_internal.h.

Referenced by swr_init().

float SwrContext::min_compensation

swr minimum below which no compensation will happen

Definition at line 102 of file swresample_internal.h.

Referenced by swr_init(), and swr_next_pts().

float SwrContext::min_hard_compensation

swr minimum below which no silence inject / sample drop will happen

Definition at line 103 of file swresample_internal.h.

Referenced by swr_next_pts().

float SwrContext::soft_compensation_duration

swr duration over which soft compensation is applied

Definition at line 104 of file swresample_internal.h.

Referenced by swr_next_pts().

float SwrContext::max_soft_compensation

swr maximum soft compensation in seconds over soft_compensation_duration

Definition at line 105 of file swresample_internal.h.

Referenced by swr_init(), and swr_next_pts().

float SwrContext::async

swr simple 1 parameter async, similar to ffmpegs -async

Definition at line 106 of file swresample_internal.h.

Referenced by swr_init().

int64_t SwrContext::firstpts_in_samples

swr first pts in samples

Definition at line 107 of file swresample_internal.h.

Referenced by swr_init().

int SwrContext::resample_first

1 if resampling must come first, 0 if rematrixing

Definition at line 109 of file swresample_internal.h.

Referenced by swr_convert_internal(), and swr_init().

int SwrContext::rematrix

flag to indicate if rematrixing is needed (basically if input and output layouts mismatch)

Definition at line 110 of file swresample_internal.h.

Referenced by swr_convert_internal(), and swr_init().

int SwrContext::rematrix_custom

flag to indicate that a custom matrix has been defined

Definition at line 111 of file swresample_internal.h.

Referenced by swr_init(), swr_set_matrix(), and swri_rematrix_init().

AudioData SwrContext::in

input audio data

Definition at line 113 of file swresample_internal.h.

Referenced by clear_context(), swr_convert(), swr_convert_internal(), and swr_init().

AudioData SwrContext::postin

post-input audio data: used for rematrix/resample

Definition at line 114 of file swresample_internal.h.

Referenced by clear_context(), swr_convert_internal(), and swr_init().

AudioData SwrContext::midbuf

intermediate audio data (postin/preout)

Definition at line 115 of file swresample_internal.h.

Referenced by clear_context(), swr_convert_internal(), swr_init(), and swri_rematrix_init().

AudioData SwrContext::preout

pre-output audio data: used for rematrix/resample

Definition at line 116 of file swresample_internal.h.

Referenced by clear_context(), swr_convert_internal(), swr_init(), and swri_dither_init().

AudioData SwrContext::out

converted output audio data

Definition at line 117 of file swresample_internal.h.

Referenced by clear_context(), swr_convert(), swr_convert_internal(), and swr_init().

AudioData SwrContext::in_buffer

cached audio data (convert and resample purpose)

Definition at line 118 of file swresample_internal.h.

Referenced by clear_context(), resample(), resample_flush(), swr_convert(), swr_init(), and swr_is_initialized().

AudioData SwrContext::silence

temporary with silence

Definition at line 119 of file swresample_internal.h.

Referenced by clear_context(), swr_init(), and swr_inject_silence().

AudioData SwrContext::drop_temp

temporary used to discard output

Definition at line 120 of file swresample_internal.h.

Referenced by clear_context(), swr_convert(), and swr_init().

int SwrContext::in_buffer_index

cached buffer position

Definition at line 121 of file swresample_internal.h.

Referenced by clear_context(), resample(), resample_flush(), and swr_convert().

int SwrContext::in_buffer_count

cached buffer length

Definition at line 122 of file swresample_internal.h.

Referenced by clear_context(), get_delay(), resample(), resample_flush(), swr_convert(), and swr_get_delay().

int SwrContext::resample_in_constraint

1 if the input end was reach before the output end, 0 otherwise

Definition at line 123 of file swresample_internal.h.

Referenced by clear_context(), resample(), and swr_convert().

int SwrContext::flushed

1 if data is to be flushed and no further input is expected

Definition at line 124 of file swresample_internal.h.

Referenced by clear_context(), resample(), and swr_convert().

int64_t SwrContext::outpts

output PTS

Definition at line 125 of file swresample_internal.h.

Referenced by filter_frame(), swr_convert(), swr_init(), and swr_next_pts().

int64_t SwrContext::firstpts

first PTS

Definition at line 126 of file swresample_internal.h.

Referenced by swr_init(), and swr_next_pts().

int SwrContext::drop_output

number of output samples to drop

Definition at line 127 of file swresample_internal.h.

Referenced by swr_convert(), swr_drop_output(), and swr_next_pts().

struct AudioConvert* SwrContext::in_convert

input conversion context

Definition at line 129 of file swresample_internal.h.

Referenced by clear_context(), swr_convert_internal(), swr_init(), swr_set_channel_mapping(), and swr_set_matrix().

struct AudioConvert* SwrContext::out_convert

output conversion context

Definition at line 130 of file swresample_internal.h.

Referenced by clear_context(), swr_convert_internal(), and swr_init().

struct AudioConvert* SwrContext::full_convert

full conversion context (single conversion for input and output)

Definition at line 131 of file swresample_internal.h.

Referenced by clear_context(), swr_convert_internal(), and swr_init().

struct ResampleContext* SwrContext::resample
struct Resampler const* SwrContext::resampler

resampler virtual function table

Definition at line 133 of file swresample_internal.h.

Referenced by resample(), swr_convert(), swr_free(), swr_get_delay(), swr_init(), and swr_set_compensation().

float SwrContext::matrix[SWR_CH_MAX][SWR_CH_MAX]

floating point rematrixing coefficients

Definition at line 135 of file swresample_internal.h.

Referenced by auto_matrix(), swr_set_matrix(), swri_rematrix(), and swri_rematrix_init().

uint8_t* SwrContext::native_matrix

Definition at line 136 of file swresample_internal.h.

Referenced by swri_rematrix(), swri_rematrix_free(), and swri_rematrix_init().

uint8_t* SwrContext::native_one
uint8_t* SwrContext::native_simd_one

Definition at line 138 of file swresample_internal.h.

Referenced by swr_convert_internal(), and swri_rematrix_free().

uint8_t* SwrContext::native_simd_matrix

Definition at line 139 of file swresample_internal.h.

Referenced by swri_rematrix(), and swri_rematrix_free().

int32_t SwrContext::matrix32[SWR_CH_MAX][SWR_CH_MAX]

17.15 fixed point rematrixing coefficients

Definition at line 140 of file swresample_internal.h.

Referenced by swri_rematrix(), and swri_rematrix_init().

uint8_t SwrContext::matrix_ch[SWR_CH_MAX][SWR_CH_MAX+1]

Lists of input channels per output channel that have non zero rematrixing coefficients.

Definition at line 141 of file swresample_internal.h.

Referenced by swri_rematrix(), and swri_rematrix_init().

mix_1_1_func_type* SwrContext::mix_1_1_f

Definition at line 142 of file swresample_internal.h.

Referenced by swri_rematrix(), and swri_rematrix_init().

mix_1_1_func_type* SwrContext::mix_1_1_simd

Definition at line 143 of file swresample_internal.h.

Referenced by swri_rematrix().

mix_2_1_func_type* SwrContext::mix_2_1_f

Definition at line 145 of file swresample_internal.h.

Referenced by swr_convert_internal(), swri_rematrix(), and swri_rematrix_init().

mix_2_1_func_type* SwrContext::mix_2_1_simd

Definition at line 146 of file swresample_internal.h.

Referenced by swr_convert_internal(), and swri_rematrix().

mix_any_func_type* SwrContext::mix_any_f

Definition at line 148 of file swresample_internal.h.

Referenced by swri_rematrix(), and swri_rematrix_init().


The documentation for this struct was generated from the following file: