FFmpeg
Data Structures | Functions
dither.h File Reference
#include "avresample.h"
#include "audio_data.h"

Go to the source code of this file.

Data Structures

struct  DitherDSPContext
 

Functions

DitherContextff_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...
 
void ff_dither_free (DitherContext **c)
 Free a DitherContext. More...
 
int ff_convert_dither (DitherContext *c, AudioData *dst, AudioData *src)
 Convert audio sample format with dithering. More...
 
void ff_dither_init_x86 (DitherDSPContext *ddsp, enum AVResampleDitherMethod method)
 

Function Documentation

◆ ff_dither_alloc()

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.

Parameters
avrAVAudioResampleContext
Returns
newly-allocated DitherContext

Definition at line 345 of file dither.c.

◆ ff_dither_free()

void ff_dither_free ( DitherContext **  c)

Free a DitherContext.

Parameters
cDitherContext

Definition at line 312 of file dither.c.

Referenced by ff_dither_alloc().

◆ ff_convert_dither()

int ff_convert_dither ( DitherContext c,
AudioData dst,
AudioData src 
)

Convert audio sample format with dithering.

Parameters
cDitherContext
dstdestination audio data
srcsource audio data
Returns
0 if ok, negative AVERROR code on failure

Definition at line 242 of file dither.c.

◆ ff_dither_init_x86()

void ff_dither_init_x86 ( DitherDSPContext ddsp,
enum AVResampleDitherMethod  method 
)

Definition at line 34 of file dither_init.c.

Referenced by dither_init().