FFmpeg
Data Structures | Macros | Typedefs | Functions
resample2.c File Reference

audio resampling More...

#include "libavutil/avassert.h"
#include "avcodec.h"
#include "libavutil/common.h"

Go to the source code of this file.

Data Structures

struct   AVResampleContext
 

Macros

#define  FILTER_SHIFT   15
 
#define  FELEM_MAX   INT16_MAX
 
#define  FELEM_MIN   INT16_MIN
 
#define  WINDOW_TYPE   9
 

Typedefs

typedef int16_t  FELEM
 
typedef int32_t  FELEM2
 
typedef int64_t  FELEML
 

Functions

static double  bessel (double x)
  0th order modified bessel function of the first kind. More...
 
static int  build_filter (FELEM *filter, double factor, int tap_count, int phase_count, int scale, int type)
  Build a polyphase filterbank. More...
 
AVResampleContextav_resample_init (int out_rate, int in_rate, int filter_size, int phase_shift, int linear, double cutoff)
  Initialize an audio resampler. More...
 
 
void  av_resample_compensate (AVResampleContext *c, int sample_delta, int compensation_distance)
  Compensate samplerate/timestamp drift. More...
 
int  av_resample (AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx)
  Resample an array of samples using a previously configured context. More...
 

Detailed Description

audio resampling

Author
Michael Niedermayer micha.nosp@m.elni.nosp@m.@gmx..nosp@m.at

Definition in file resample2.c.

Macro Definition Documentation

#define FILTER_SHIFT   15

Definition at line 35 of file resample2.c.

Referenced by av_resample(), av_resample_init(), and build_filter().

#define FELEM_MAX   INT16_MAX

Definition at line 40 of file resample2.c.

Referenced by build_filter().

#define FELEM_MIN   INT16_MIN

Definition at line 41 of file resample2.c.

Referenced by build_filter().

#define WINDOW_TYPE   9

Definition at line 42 of file resample2.c.

Referenced by av_resample_init().

Typedef Documentation

typedef int16_t FELEM

Definition at line 37 of file resample2.c.

typedef int32_t FELEM2

Definition at line 38 of file resample2.c.

typedef int64_t FELEML

Definition at line 39 of file resample2.c.

Function Documentation

static double bessel ( double  x )
static

0th order modified bessel function of the first kind.

Definition at line 80 of file resample2.c.

Referenced by build_filter(), and ff_kbd_window_init().

static int build_filter ( FELEMfilter,
double  factor,
int  tap_count,
int  phase_count,
int  scale,
int  type 
)
static

Build a polyphase filterbank.

Parameters
factor resampling factor
scale wanted sum of coefficients for each filter
type 0->cubic, 1->blackman nuttall windowed sinc, 2..16->kaiser windowed sinc beta=2..16
Returns
0 on success, negative on error

Definition at line 102 of file resample2.c.

Referenced by av_resample_init().


Generated on Fri Jan 12 2018 01:46:09 for FFmpeg by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /