FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
swresample.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libswresample/swresample.h"
#include <time.h>

Go to the source code of this file.

Macros

#define SAMPLES   1000
 
#define SWR_CH_MAX   32
 
#define ASSERT_LEVEL   2
 
#define PUT_SAMPLE   set(data, ch, k, channels, sample_fmt, v);
 
#define uint_rand(x)   ((x) = (x) * 1664525 + 1013904223)
 
#define dbl_rand(x)   (uint_rand(x)*2.0 / (double)UINT_MAX - 1)
 

Functions

static double get (uint8_t *a[], int ch, int index, int ch_count, enum AVSampleFormat f)
 
static void set (uint8_t *a[], int ch, int index, int ch_count, enum AVSampleFormat f, double v)
 
static void shift (uint8_t *a[], int index, int ch_count, enum AVSampleFormat f)
 
static void setup_array (uint8_t *out[SWR_CH_MAX], uint8_t *in, enum AVSampleFormat format, int samples)
 
static int cmp (const void *a, const void *b)
 
static void audiogen (void *data, enum AVSampleFormat sample_fmt, int channels, int sample_rate, int nb_samples)
 
int main (int argc, char **argv)
 

Variables

static enum AVSampleFormat formats []
 
static const int rates []
 
static const uint64_t layouts []
 

Macro Definition Documentation

#define SAMPLES   1000

Definition at line 33 of file swresample.c.

Referenced by main().

#define SWR_CH_MAX   32
#define ASSERT_LEVEL   2

Definition at line 37 of file swresample.c.

#define PUT_SAMPLE   set(data, ch, k, channels, sample_fmt, v);

Referenced by audiogen().

#define uint_rand (   x)    ((x) = (x) * 1664525 + 1013904223)

Referenced by audiogen(), and main().

#define dbl_rand (   x)    (uint_rand(x)*2.0 / (double)UINT_MAX - 1)

Referenced by audiogen().

Function Documentation

static double get ( uint8_t a[],
int  ch,
int  index,
int  ch_count,
enum AVSampleFormat  f 
)
static

Definition at line 39 of file swresample.c.

static void set ( uint8_t a[],
int  ch,
int  index,
int  ch_count,
enum AVSampleFormat  f,
double  v 
)
static

Definition at line 59 of file swresample.c.

Referenced by decode_channel(), main(), and output_mpd().

static void shift ( uint8_t a[],
int  index,
int  ch_count,
enum AVSampleFormat  f 
)
static

Definition at line 78 of file swresample.c.

Referenced by main().

static void setup_array ( uint8_t out[SWR_CH_MAX],
uint8_t in,
enum AVSampleFormat  format,
int  samples 
)
static

Definition at line 129 of file swresample.c.

Referenced by main().

static int cmp ( const void a,
const void b 
)
static

Definition at line 142 of file swresample.c.

Referenced by main().

static void audiogen ( void data,
enum AVSampleFormat  sample_fmt,
int  channels,
int  sample_rate,
int  nb_samples 
)
static

Definition at line 146 of file swresample.c.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 225 of file swresample.c.

Variable Documentation

enum AVSampleFormat formats[]
static
Initial value:

Definition at line 90 of file swresample.c.

const int rates[]
static
Initial value:
= {
8000,
11025,
16000,
22050,
32000,
48000,
}

Definition at line 103 of file swresample.c.

Referenced by main().

const uint64_t layouts[]
static
Initial value:
={
}
#define AV_CH_LAYOUT_7POINT1
#define AV_CH_LAYOUT_SURROUND
#define AV_CH_LAYOUT_4POINT0
#define AV_CH_LAYOUT_7POINT0
#define AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_5POINT0
#define AV_CH_LAYOUT_5POINT1
#define AV_CH_LAYOUT_QUAD
#define AV_CH_LAYOUT_2_1
#define AV_CH_LAYOUT_2_2
#define AV_CH_LAYOUT_5POINT1_BACK
#define AV_CH_LAYOUT_5POINT0_BACK
#define AV_CH_LAYOUT_7POINT1_WIDE
#define AV_CH_LAYOUT_MONO

Definition at line 112 of file swresample.c.

Referenced by main().