avresample.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com>
3  *
4  * This file is part of Libav.
5  *
6  * Libav is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * Libav is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with Libav; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVRESAMPLE_AVRESAMPLE_H
22 #define AVRESAMPLE_AVRESAMPLE_H
23 
96 #include "libavutil/avutil.h"
98 #include "libavutil/dict.h"
99 #include "libavutil/log.h"
100 
101 #include "libavresample/version.h"
102 
103 #define AVRESAMPLE_MAX_CHANNELS 32
104 
106 
113 };
114 
120 };
121 
129 };
130 
134 unsigned avresample_version(void);
135 
140 const char *avresample_configuration(void);
141 
145 const char *avresample_license(void);
146 
157 const AVClass *avresample_get_class(void);
158 
165 
173 
188 
197 
220 int avresample_build_matrix(uint64_t in_layout, uint64_t out_layout,
221  double center_mix_level, double surround_mix_level,
222  double lfe_mix_level, int normalize, double *matrix,
224 
237 int avresample_get_matrix(AVAudioResampleContext *avr, double *matrix,
238  int stride);
239 
258 int avresample_set_matrix(AVAudioResampleContext *avr, const double *matrix,
259  int stride);
260 
274 int avresample_set_compensation(AVAudioResampleContext *avr, int sample_delta,
275  int compensation_distance);
276 
321  int out_plane_size, int out_samples, uint8_t **input,
322  int in_plane_size, int in_samples);
323 
338 
355 
374 
379 #endif /* AVRESAMPLE_AVRESAMPLE_H */
Kaiser Windowed Sinc.
Definition: avresample.h:119
Do not use dithering.
Definition: avresample.h:123
int avresample_read(AVAudioResampleContext *avr, uint8_t **output, int nb_samples)
Read samples from the output FIFO.
Definition: utils.c:476
external API header
int avresample_set_compensation(AVAudioResampleContext *avr, int sample_delta, int compensation_distance)
Set compensation for resampling.
Definition: resample.c:246
32-bit 17.15 fixed-point
Definition: avresample.h:111
int stride
Definition: mace.c:144
void avresample_free(AVAudioResampleContext **avr)
Free AVAudioResampleContext and associated AVOption values.
Definition: utils.c:202
Triangular Dither with Noise Shaping.
Definition: avresample.h:127
double surround_mix_level
surround mix level
Definition: internal.h:46
const AVClass * avresample_get_class(void)
Get the AVClass for AVAudioResampleContext.
Definition: options.c:96
Rectangular Dither.
Definition: avresample.h:124
Triangular Dither with High Pass.
Definition: avresample.h:126
Public dictionary API.
uint8_t
const char * avresample_license(void)
Return the libavresample license.
Definition: utils.c:488
int avresample_build_matrix(uint64_t in_layout, uint64_t out_layout, double center_mix_level, double surround_mix_level, double lfe_mix_level, int normalize, double *matrix, int stride, enum AVMatrixEncoding matrix_encoding)
Generate a channel mixing matrix.
void avresample_close(AVAudioResampleContext *avr)
Close AVAudioResampleContext.
Definition: utils.c:188
double center_mix_level
center mix level
Definition: internal.h:45
AVResampleFilterType
Resampling Filter Types.
Definition: avresample.h:116
audio channel layout utility functions
int avresample_set_matrix(AVAudioResampleContext *avr, const double *matrix, int stride)
Set channel mixing matrix.
Definition: utils.c:440
Triangular Dither.
Definition: avresample.h:125
int avresample_get_delay(AVAudioResampleContext *avr)
Return the number of samples currently in the resampling delay buffer.
Definition: resample.c:462
int avresample_get_matrix(AVAudioResampleContext *avr, double *matrix, int stride)
Get the current channel mixing matrix.
Definition: utils.c:411
int avresample_available(AVAudioResampleContext *avr)
Return the number of available samples in the output FIFO.
Definition: utils.c:471
out nb_samples
floating-point
Definition: avresample.h:112
const char * avresample_configuration(void)
Return the libavresample build-time configuration.
Definition: utils.c:494
Describe the class of an AVClass context structure.
Definition: log.h:33
Blackman Nuttall Windowed Sinc.
Definition: avresample.h:118
int avresample_convert(AVAudioResampleContext *avr, uint8_t **output, int out_plane_size, int out_samples, uint8_t **input, int in_plane_size, int in_samples)
Convert input samples and write them to the output FIFO.
Definition: utils.c:252
Number of dither types.
Definition: avresample.h:128
AVAudioResampleContext * avresample_alloc_context(void)
Allocate AVAudioResampleContext and set options.
Definition: options.c:82
enum AVMatrixEncoding matrix_encoding
matrixed stereo encoding
Definition: internal.h:77
16-bit 8.8 fixed-point
Definition: avresample.h:110
AVMixCoeffType
Mixing Coefficient Types.
Definition: avresample.h:108
unsigned avresample_version(void)
Return the LIBAVRESAMPLE_VERSION_INT constant.
Definition: utils.c:483
AVMatrixEncoding
double lfe_mix_level
lfe mix level
Definition: internal.h:47
AVResampleDitherMethod
Definition: avresample.h:122
int avresample_open(AVAudioResampleContext *avr)
Initialize AVAudioResampleContext.
Definition: utils.c:32