|
FFmpeg
|
Dithered Audio Sample Quantization. More...
#include <math.h>#include <stdint.h>#include "libavutil/attributes.h"#include "libavutil/common.h"#include "libavutil/lfg.h"#include "libavutil/mem.h"#include "libavutil/samplefmt.h"#include "audio_convert.h"#include "dither.h"#include "internal.h"Classes | |
| struct | DitherState |
| struct | DitherContext |
Macros | |
| #define | MUTE_THRESHOLD_SEC 0.000333 |
| #define | S16_SCALE 32753.0f |
| #define | LFG_SCALE (1.0f / (2.0f * INT32_MAX)) |
| #define | SQRT_1_6 0.40824829046386301723f |
Typedefs | |
| typedef struct DitherState | DitherState |
Functions | |
| int | ff_convert_dither (DitherContext *c, AudioData *dst, AudioData *src) |
| Convert audio sample format with dithering. More... | |
| void | ff_dither_free (DitherContext **cp) |
| Free a DitherContext. More... | |
| DitherContext * | ff_dither_alloc (AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) |
| Allocate and initialize a DitherContext. More... | |
Dithered Audio Sample Quantization.
Converts from dbl, flt, or s32 to s16 using dithering.
| int ff_convert_dither | ( | DitherContext * | c, |
| AudioData * | dst, | ||
| AudioData * | src | ||
| ) |
Convert audio sample format with dithering.
| c | DitherContext |
| dst | destination audio data |
| src | source audio data |
| DitherContext* ff_dither_alloc | ( | AVAudioResampleContext * | avr, |
| enum AVSampleFormat | out_fmt, | ||
| enum AVSampleFormat | in_fmt, | ||
| int | channels, | ||
| int | sample_rate, | ||
| int | apply_map | ||
| ) |
Allocate and initialize a DitherContext.
The parameters in the AVAudioResampleContext are used to initialize the DitherContext.
| avr | AVAudioResampleContext |
| void ff_dither_free | ( | DitherContext ** | c | ) |
Free a DitherContext.
| c | DitherContext |
1.8.12