World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
libswresample

Audio resampling, sample format conversion and mixing library. Подробнее...

Файлы

файл  swresample.h
 

Определения типов

typedef struct SwrContext SwrContext
 

Функции

const AVClassswr_get_class (void)
 

Option constants

These constants are used for the AVOptions interface for lswr.

enum  SwrDitherType {
  SWR_DITHER_NONE = 0, SWR_DITHER_RECTANGULAR, SWR_DITHER_TRIANGULAR, SWR_DITHER_TRIANGULAR_HIGHPASS,
  SWR_DITHER_NS = 64, SWR_DITHER_NS_LIPSHITZ, SWR_DITHER_NS_F_WEIGHTED, SWR_DITHER_NS_MODIFIED_E_WEIGHTED,
  SWR_DITHER_NS_IMPROVED_E_WEIGHTED, SWR_DITHER_NS_SHIBATA, SWR_DITHER_NS_LOW_SHIBATA, SWR_DITHER_NS_HIGH_SHIBATA,
  SWR_DITHER_NB
}
 
enum  SwrEngine { SWR_ENGINE_SWR, SWR_ENGINE_SOXR, SWR_ENGINE_NB }
 
enum  SwrFilterType { SWR_FILTER_TYPE_CUBIC, SWR_FILTER_TYPE_BLACKMAN_NUTTALL, SWR_FILTER_TYPE_KAISER }
 

SwrContext constructor functions

struct SwrContextswr_alloc (void)
 
int swr_init (struct SwrContext *s)
 
int swr_is_initialized (struct SwrContext *s)
 
struct SwrContextswr_alloc_set_opts (struct SwrContext *s, int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate, int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate, int log_offset, void *log_ctx)
 

SwrContext destructor functions

void swr_free (struct SwrContext **s)
 
void swr_close (struct SwrContext *s)
 

Core conversion functions

int swr_convert (struct SwrContext *s, uint8_t **out, int out_count, const uint8_t **in, int in_count)
 
int64_t swr_next_pts (struct SwrContext *s, int64_t pts)
 

Low-level option setting functions

These functons provide a means to set low-level options that is not possible with the AVOption API.

int swr_set_compensation (struct SwrContext *s, int sample_delta, int compensation_distance)
 
int swr_set_channel_mapping (struct SwrContext *s, const int *channel_map)
 
int swr_build_matrix (uint64_t in_layout, uint64_t out_layout, double center_mix_level, double surround_mix_level, double lfe_mix_level, double rematrix_maxval, double rematrix_volume, double *matrix, int stride, enum AVMatrixEncoding matrix_encoding, void *log_ctx)
 
int swr_set_matrix (struct SwrContext *s, const double *matrix, int stride)
 

Sample handling functions

int swr_drop_output (struct SwrContext *s, int count)
 
int swr_inject_silence (struct SwrContext *s, int count)
 
int64_t swr_get_delay (struct SwrContext *s, int64_t base)
 
int swr_get_out_samples (struct SwrContext *s, int in_samples)
 

Configuration accessors

unsigned swresample_version (void)
 
const char * swresample_configuration (void)
 
const char * swresample_license (void)
 

AVFrame based API

int swr_convert_frame (SwrContext *swr, AVFrame *output, const AVFrame *input)
 
int swr_config_frame (SwrContext *swr, const AVFrame *out, const AVFrame *in)
 

Подробное описание

Audio resampling, sample format conversion and mixing library.

Interaction with lswr is done through SwrContext, which is allocated with swr_alloc() or swr_alloc_set_opts(). It is opaque, so all parameters must be set with the AVOptions API.

The first thing you will need to do in order to use lswr is to allocate SwrContext. This can be done with swr_alloc() or swr_alloc_set_opts(). If you are using the former, you must set options through the AVOptions API. The latter function provides the same feature, but it allows you to set some common options in the same statement.

For example the following code will setup conversion from planar float sample format to interleaved signed 16-bit integer, downsampling from 48kHz to 44.1kHz and downmixing from 5.1 channels to stereo (using the default mixing matrix). This is using the swr_alloc() function.

av_opt_set_channel_layout(swr, "in_channel_layout", AV_CH_LAYOUT_5POINT1, 0);
av_opt_set_channel_layout(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0);
av_opt_set_int(swr, "in_sample_rate", 48000, 0);
av_opt_set_int(swr, "out_sample_rate", 44100, 0);
av_opt_set_sample_fmt(swr, "in_sample_fmt", AV_SAMPLE_FMT_FLTP, 0);
av_opt_set_sample_fmt(swr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);

The same job can be done using swr_alloc_set_opts() as well:

SwrContext *swr = swr_alloc_set_opts(NULL, // we're allocating a new context
AV_CH_LAYOUT_STEREO, // out_ch_layout
AV_SAMPLE_FMT_S16, // out_sample_fmt
44100, // out_sample_rate
AV_CH_LAYOUT_5POINT1, // in_ch_layout
AV_SAMPLE_FMT_FLTP, // in_sample_fmt
48000, // in_sample_rate
0, // log_offset
NULL); // log_ctx

Once all values have been set, it must be initialized with swr_init(). If you need to change the conversion parameters, you can change the parameters using AVOptions, as described above in the first example; or by using swr_alloc_set_opts(), but with the first argument the allocated context. You must then call swr_init() again.

The conversion itself is done by repeatedly calling swr_convert(). Note that the samples may get buffered in swr if you provide insufficient output space or if sample rate conversion is done, which requires "future" samples. Samples that do not require future input can be retrieved at any time by using swr_convert() (in_count can be set to 0). At the end of conversion the resampling buffer can be flushed by calling swr_convert() with NULL in and 0 in_count.

The samples used in the conversion process can be managed with the libavutil samples manipulation API, including av_samples_alloc() function used in the following example.

The delay between input and output, can at any time be found by using swr_get_delay().

The following code demonstrates the conversion loop assuming the parameters from above and caller-defined functions get_input() and handle_output():

int in_samples;
while (get_input(&input, &in_samples)) {
uint8_t *output;
int out_samples = av_rescale_rnd(swr_get_delay(swr, 48000) +
in_samples, 44100, 48000, AV_ROUND_UP);
av_samples_alloc(&output, NULL, 2, out_samples,
out_samples = swr_convert(swr, &output, out_samples,
input, in_samples);
handle_output(output, out_samples);
av_freep(&output);
}

When the conversion is finished, the conversion context and everything associated with it must be freed with swr_free(). A swr_close() function is also available, but it exists mainly for compatibility with libavresample, and is not required to be called.

There will be no memory leak if the data is not completely flushed before swr_free().

Типы

◆ SwrContext

typedef struct SwrContext SwrContext

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

The libswresample context. Unlike libavcodec and libavformat, this structure is opaque. This means that if you would like to set options, you must use the AVOptions API and cannot directly set values to members of the structure.

См. определение в файле swresample.h строка 182

Перечисления

◆ SwrDitherType

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Dithering algorithms

Элементы перечислений
SWR_DITHER_NONE 
SWR_DITHER_RECTANGULAR 
SWR_DITHER_TRIANGULAR 
SWR_DITHER_TRIANGULAR_HIGHPASS 
SWR_DITHER_NS 

not part of API/ABI

SWR_DITHER_NS_LIPSHITZ 
SWR_DITHER_NS_F_WEIGHTED 
SWR_DITHER_NS_MODIFIED_E_WEIGHTED 
SWR_DITHER_NS_IMPROVED_E_WEIGHTED 
SWR_DITHER_NS_SHIBATA 
SWR_DITHER_NS_LOW_SHIBATA 
SWR_DITHER_NS_HIGH_SHIBATA 
SWR_DITHER_NB 

not part of API/ABI

См. определение в файле swresample.h строка 141

◆ SwrEngine

enum SwrEngine

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Resampling Engines

Элементы перечислений
SWR_ENGINE_SWR 

SW Resampler

SWR_ENGINE_SOXR 

SoX Resampler

SWR_ENGINE_NB 

not part of API/ABI

См. определение в файле swresample.h строка 159

159  {
162  SWR_ENGINE_NB,
163 };

◆ SwrFilterType

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Resampling Filter Types

Элементы перечислений
SWR_FILTER_TYPE_CUBIC 

Cubic

SWR_FILTER_TYPE_BLACKMAN_NUTTALL 

Blackman Nuttall windowed sinc

SWR_FILTER_TYPE_KAISER 

Kaiser windowed sinc

См. определение в файле swresample.h строка 166

Функции

◆ swr_get_class()

const AVClass* swr_get_class ( void  )

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Get the AVClass for SwrContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options.

См. также
av_opt_find().
Возвращает
the AVClass of SwrContext

◆ swr_alloc()

struct SwrContext* swr_alloc ( void  )

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Allocate SwrContext.

If you use this function you will need to set the parameters (manually or with swr_alloc_set_opts()) before calling swr_init().

См. также
swr_alloc_set_opts(), swr_init(), swr_free()
Возвращает
NULL on error, allocated context otherwise

◆ swr_init()

int swr_init ( struct SwrContext s)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Initialize context after user parameters have been set.

Заметки
The context must be configured using the AVOption API.
См. также
av_opt_set_int()
av_opt_set_dict()
Аргументы
[in,out]sSwr context to initialize
Возвращает
AVERROR error code in case of failure.

Используется в AVAudioStream::open() и AudioBaseDataSource::Open().

+ Граф вызова функции:

◆ swr_is_initialized()

int swr_is_initialized ( struct SwrContext s)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Check whether an swr context has been initialized or not.

Аргументы
[in]sSwr context to check
См. также
swr_init()
Возвращает
positive if it has been initialized, 0 if not initialized

◆ swr_alloc_set_opts()

struct SwrContext* swr_alloc_set_opts ( struct SwrContext s,
int64_t  out_ch_layout,
enum AVSampleFormat  out_sample_fmt,
int  out_sample_rate,
int64_t  in_ch_layout,
enum AVSampleFormat  in_sample_fmt,
int  in_sample_rate,
int  log_offset,
void log_ctx 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Allocate SwrContext if needed and set/reset common parameters.

This function does not require s to be allocated with swr_alloc(). On the other hand, swr_alloc() can use swr_alloc_set_opts() to set the parameters on the allocated context.

Аргументы
sexisting Swr context if available, or NULL if not
out_ch_layoutoutput channel layout (AV_CH_LAYOUT_*)
out_sample_fmtoutput sample format (AV_SAMPLE_FMT_*).
out_sample_rateoutput sample rate (frequency in Hz)
in_ch_layoutinput channel layout (AV_CH_LAYOUT_*)
in_sample_fmtinput sample format (AV_SAMPLE_FMT_*).
in_sample_rateinput sample rate (frequency in Hz)
log_offsetlogging level offset
log_ctxparent logging context, can be NULL
См. также
swr_init(), swr_free()
Возвращает
NULL on error, allocated context otherwise

Используется в AVAudioStream::open() и AudioBaseDataSource::Open().

+ Граф вызова функции:

◆ swr_free()

void swr_free ( struct SwrContext **  s)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Free the given SwrContext and set the pointer to NULL.

Аргументы
[in]sa pointer to a pointer to Swr context

Используется в AudioBaseDataSource::Close() и AVAudioStream::open().

+ Граф вызова функции:

◆ swr_close()

void swr_close ( struct SwrContext s)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Closes the context so that swr_is_initialized() returns 0.

The context can be brought back to life by running swr_init(), swr_init() can also be used without swr_close(). This function is mainly provided for simplifying the usecase where one tries to support libavresample and libswresample.

Аргументы
[in,out]sSwr context to be closed

◆ swr_convert()

int swr_convert ( struct SwrContext s,
uint8_t **  out,
int  out_count,
const uint8_t **  in,
int  in_count 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Convert audio.

in and in_count can be set to 0 to flush the last few samples out at the end.

If more input is provided than output space, then the input will be buffered. You can avoid this buffering by using swr_get_out_samples() to retrieve an upper bound on the required number of output samples for the given number of input samples. Conversion will run directly without copying whenever possible.

Аргументы
sallocated Swr context, with parameters set
outoutput buffers, only the first one need be set in case of packed audio
out_countamount of space available for output in samples per channel
ininput buffers, only the first one need to be set in case of packed audio
in_countnumber of input samples available in one channel
Возвращает
number of samples output per channel, negative value on error

Используется в AVAudioStream::decode_frame() и AudioBaseDataSource::GetNextBuffer().

+ Граф вызова функции:

◆ swr_next_pts()

int64_t swr_next_pts ( struct SwrContext s,
int64_t  pts 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Convert the next timestamp from input to output timestamps are in 1/(in_sample_rate * out_sample_rate) units.

Заметки
There are 2 slightly differently behaving modes.
  • When automatic timestamp compensation is not used, (min_compensation >= FLT_MAX) in this case timestamps will be passed through with delays compensated
  • When automatic timestamp compensation is used, (min_compensation < FLT_MAX) in this case the output timestamps will match output sample numbers. See ffmpeg-resampler(1) for the two modes of compensation.
Аргументы
s[in]initialized Swr context
pts[in]timestamp for the next input sample, INT64_MIN if unknown
См. также
swr_set_compensation(), swr_drop_output(), and swr_inject_silence() are function used internally for timestamp compensation.
Возвращает
the output timestamp for the next output sample

◆ swr_set_compensation()

int swr_set_compensation ( struct SwrContext s,
int  sample_delta,
int  compensation_distance 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Activate resampling compensation ("soft" compensation). This function is internally called when needed in swr_next_pts().

Аргументы
[in,out]sallocated Swr context. If it is not initialized, or SWR_FLAG_RESAMPLE is not set, swr_init() is called with the flag set.
[in]sample_deltadelta in PTS per sample
[in]compensation_distancenumber of samples to compensate for
Возвращает
>= 0 on success, AVERROR error codes if:
  • s is NULL,
  • compensation_distance is less than 0,
  • compensation_distance is 0 but sample_delta is not,
  • compensation unsupported by resampler, or
  • swr_init() fails when called.

◆ swr_set_channel_mapping()

int swr_set_channel_mapping ( struct SwrContext s,
const int *  channel_map 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Set a customized input channel mapping.

Аргументы
[in,out]sallocated Swr context, not yet initialized
[in]channel_mapcustomized input channel mapping (array of channel indexes, -1 for a muted channel)
Возвращает
>= 0 on success, or AVERROR error code in case of failure.

◆ swr_build_matrix()

int swr_build_matrix ( uint64_t  in_layout,
uint64_t  out_layout,
double  center_mix_level,
double  surround_mix_level,
double  lfe_mix_level,
double  rematrix_maxval,
double  rematrix_volume,
double *  matrix,
int  stride,
enum AVMatrixEncoding  matrix_encoding,
void log_ctx 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Generate a channel mixing matrix.

This function is the one used internally by libswresample for building the default mixing matrix. It is made public just as a utility function for building custom matrices.

Аргументы
in_layoutinput channel layout
out_layoutoutput channel layout
center_mix_levelmix level for the center channel
surround_mix_levelmix level for the surround channel(s)
lfe_mix_levelmix level for the low-frequency effects channel
rematrix_maxvalif 1.0, coefficients will be normalized to prevent overflow. if INT_MAX, coefficients will not be normalized.
[out]matrixmixing coefficients; matrix[i + stride * o] is the weight of input channel i in output channel o.
stridedistance between adjacent input channels in the matrix array
matrix_encodingmatrixed stereo downmix mode (e.g. dplii)
log_ctxparent logging context, can be NULL
Возвращает
0 on success, negative AVERROR code on failure

◆ swr_set_matrix()

int swr_set_matrix ( struct SwrContext s,
const double *  matrix,
int  stride 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Set a customized remix matrix.

Аргументы
sallocated Swr context, not yet initialized
matrixremix coefficients; matrix[i + stride * o] is the weight of input channel i in output channel o
strideoffset between lines of the matrix
Возвращает
>= 0 on success, or AVERROR error code in case of failure.

◆ swr_drop_output()

int swr_drop_output ( struct SwrContext s,
int  count 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Drops the specified number of output samples.

This function, along with swr_inject_silence(), is called by swr_next_pts() if needed for "hard" compensation.

Аргументы
sallocated Swr context
countnumber of samples to be dropped
Возвращает
>= 0 on success, or a negative AVERROR code on failure

◆ swr_inject_silence()

int swr_inject_silence ( struct SwrContext s,
int  count 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Injects the specified number of silence samples.

This function, along with swr_drop_output(), is called by swr_next_pts() if needed for "hard" compensation.

Аргументы
sallocated Swr context
countnumber of samples to be dropped
Возвращает
>= 0 on success, or a negative AVERROR code on failure

◆ swr_get_delay()

int64_t swr_get_delay ( struct SwrContext s,
int64_t  base 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Gets the delay the next input sample will experience relative to the next output sample.

Swresample can buffer data if more input has been provided than available output space, also converting between sample rates needs a delay. This function returns the sum of all such delays. The exact delay is not necessarily an integer value in either input or output sample rate. Especially when downsampling by a large value, the output sample rate may be a poor choice to represent the delay, similarly for upsampling and the input sample rate.

Аргументы
sswr context
basetimebase in which the returned delay will be:
  • if it's set to 1 the returned delay is in seconds
  • if it's set to 1000 the returned delay is in milliseconds
  • if it's set to the input sample rate then the returned delay is in input samples
  • if it's set to the output sample rate then the returned delay is in output samples
  • if it's the least common multiple of in_sample_rate and out_sample_rate then an exact rounding-free delay will be returned
Возвращает
the delay in 1 / base units.

◆ swr_get_out_samples()

int swr_get_out_samples ( struct SwrContext s,
int  in_samples 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Find an upper bound on the number of samples that the next swr_convert call will output, if called with in_samples of input samples. This depends on the internal state, and anything changing the internal state (like further swr_convert() calls) will may change the number of samples swr_get_out_samples() returns for the same number of input samples.

Аргументы
in_samplesnumber of input samples.
Заметки
any call to swr_inject_silence(), swr_convert(), swr_next_pts() or swr_set_compensation() invalidates this limit
it is recommended to pass the correct available buffer size to all functions like swr_convert() even if swr_get_out_samples() indicates that less would be used.
Возвращает
an upper bound on the number of samples that the next swr_convert will output or a negative value to indicate an error

◆ swresample_version()

unsigned swresample_version ( void  )

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Return the LIBSWRESAMPLE_VERSION_INT constant.

This is useful to check if the build-time libswresample has the same version as the run-time one.

Возвращает
the unsigned int-typed version

◆ swresample_configuration()

const char* swresample_configuration ( void  )

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Return the swr build-time configuration.

Возвращает
the build-time ./configure flags

◆ swresample_license()

const char* swresample_license ( void  )

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Return the swr license.

Возвращает
the license of libswresample, determined at build-time

◆ swr_convert_frame()

int swr_convert_frame ( SwrContext swr,
AVFrame output,
const AVFrame input 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Convert the samples in the input AVFrame and write them to the output AVFrame.

Input and output AVFrames must have channel_layout, sample_rate and format set.

If the output AVFrame does not have the data pointers allocated the nb_samples field will be set using av_frame_get_buffer() is called to allocate the frame.

The output AVFrame can be NULL or have fewer allocated samples than required. In this case, any remaining samples not written to the output will be added to an internal FIFO buffer, to be returned at the next call to this function or to swr_convert().

If converting sample rate, there may be data remaining in the internal resampling delay buffer. swr_get_delay() tells the number of remaining samples. To get this data as output, call this function or swr_convert() with NULL input.

If the SwrContext configuration does not match the output and input AVFrame settings the conversion does not take place and depending on which AVFrame is not matching AVERROR_OUTPUT_CHANGED, AVERROR_INPUT_CHANGED or the result of a bitwise-OR of them is returned.

См. также
swr_delay()
swr_convert()
swr_get_delay()
Аргументы
swraudio resample context
outputoutput AVFrame
inputinput AVFrame
Возвращает
0 on success, AVERROR on failure or nonmatching configuration.

◆ swr_config_frame()

int swr_config_frame ( SwrContext swr,
const AVFrame out,
const AVFrame in 
)

#include <C:/git/world-of-might-and-magic/lib/win32/x86/ffmpeg-4.2.2/include/libswresample/swresample.h>

Configure or reconfigure the SwrContext using the information provided by the AVFrames.

The original resampling context is reset even on failure. The function calls swr_close() internally if the context is open.

См. также
swr_close();
Аргументы
swraudio resample context
outputoutput AVFrame
inputinput AVFrame
Возвращает
0 on success, AVERROR on failure.
SWR_DITHER_TRIANGULAR_HIGHPASS
@ SWR_DITHER_TRIANGULAR_HIGHPASS
Definition: swresample.h:145
AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:69
SWR_DITHER_NS_LOW_SHIBATA
@ SWR_DITHER_NS_LOW_SHIBATA
Definition: swresample.h:153
SWR_DITHER_NS_IMPROVED_E_WEIGHTED
@ SWR_DITHER_NS_IMPROVED_E_WEIGHTED
Definition: swresample.h:151
SWR_DITHER_NS_MODIFIED_E_WEIGHTED
@ SWR_DITHER_NS_MODIFIED_E_WEIGHTED
Definition: swresample.h:150
SWR_ENGINE_SOXR
@ SWR_ENGINE_SOXR
Definition: swresample.h:161
SWR_FILTER_TYPE_BLACKMAN_NUTTALL
@ SWR_FILTER_TYPE_BLACKMAN_NUTTALL
Definition: swresample.h:168
av_samples_alloc
int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels, int nb_samples, enum AVSampleFormat sample_fmt, int align)
input
GLenum GLenum GLenum input
Definition: SDL_opengl_glext.h:9377
AV_ROUND_UP
@ AV_ROUND_UP
Round toward +infinity.
Definition: mathematics.h:83
SWR_FILTER_TYPE_KAISER
@ SWR_FILTER_TYPE_KAISER
Definition: swresample.h:169
swr_get_delay
int64_t swr_get_delay(struct SwrContext *s, int64_t base)
SWR_DITHER_NB
@ SWR_DITHER_NB
not part of API/ABI
Definition: swresample.h:155
av_freep
void av_freep(void *ptr)
swr_alloc
struct SwrContext * swr_alloc(void)
SWR_DITHER_NS
@ SWR_DITHER_NS
not part of API/ABI
Definition: swresample.h:147
SWR_ENGINE_NB
@ SWR_ENGINE_NB
not part of API/ABI
Definition: swresample.h:162
swr_alloc_set_opts
struct SwrContext * swr_alloc_set_opts(struct SwrContext *s, int64_t out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate, int64_t in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate, int log_offset, void *log_ctx)
av_opt_set_int
int av_opt_set_int(void *obj, const char *name, int64_t val, int search_flags)
SWR_DITHER_NONE
@ SWR_DITHER_NONE
Definition: swresample.h:142
SWR_DITHER_TRIANGULAR
@ SWR_DITHER_TRIANGULAR
Definition: swresample.h:144
av_rescale_rnd
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd) av_const
av_opt_set_channel_layout
int av_opt_set_channel_layout(void *obj, const char *name, int64_t ch_layout, int search_flags)
SwrContext
struct SwrContext SwrContext
Definition: swresample.h:182
SWR_FILTER_TYPE_CUBIC
@ SWR_FILTER_TYPE_CUBIC
Definition: swresample.h:167
swr_convert
int swr_convert(struct SwrContext *s, uint8_t **out, int out_count, const uint8_t **in, int in_count)
SWR_ENGINE_SWR
@ SWR_ENGINE_SWR
Definition: swresample.h:160
uint8_t
unsigned __int8 uint8_t
Definition: SDL_config.h:35
AV_SAMPLE_FMT_S16
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition: samplefmt.h:61
SWR_DITHER_NS_SHIBATA
@ SWR_DITHER_NS_SHIBATA
Definition: swresample.h:152
SWR_DITHER_NS_HIGH_SHIBATA
@ SWR_DITHER_NS_HIGH_SHIBATA
Definition: swresample.h:154
SWR_DITHER_NS_LIPSHITZ
@ SWR_DITHER_NS_LIPSHITZ
Definition: swresample.h:148
SWR_DITHER_NS_F_WEIGHTED
@ SWR_DITHER_NS_F_WEIGHTED
Definition: swresample.h:149
av_opt_set_sample_fmt
int av_opt_set_sample_fmt(void *obj, const char *name, enum AVSampleFormat fmt, int search_flags)
SWR_DITHER_RECTANGULAR
@ SWR_DITHER_RECTANGULAR
Definition: swresample.h:143