#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/audioconvert.h"
#include "libavutil/opt.h"
#include "swresample.h"
#include "time.h"
Go to the source code of this file.
Defines | |
#define | SAMPLES 1000 |
#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 int *a, const int *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 [] |
uint64_t | layouts [] |
#define ASSERT_LEVEL 2 |
Definition at line 34 of file swresample-test.c.
#define dbl_rand | ( | x | ) | (uint_rand(x)*2.0 / (double)UINT_MAX - 1) |
Referenced by audiogen(), and dbl_rand().
#define SAMPLES 1000 |
#define uint_rand | ( | x | ) | (x = x * 1664525 + 1013904223) |
Referenced by audiogen(), and main().
static void audiogen | ( | void * | data, | |
enum AVSampleFormat | sample_fmt, | |||
int | channels, | |||
int | sample_rate, | |||
int | nb_samples | |||
) | [static] |
Definition at line 143 of file swresample-test.c.
static int cmp | ( | const int * | a, | |
const int * | b | |||
) | [static] |
Definition at line 139 of file swresample-test.c.
static double get | ( | uint8_t * | a[], | |
int | ch, | |||
int | index, | |||
int | ch_count, | |||
enum AVSampleFormat | f | |||
) | [static] |
Definition at line 36 of file swresample-test.c.
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 222 of file swresample-test.c.
static void set | ( | uint8_t * | a[], | |
int | ch, | |||
int | index, | |||
int | ch_count, | |||
enum AVSampleFormat | f, | |||
double | v | |||
) | [static] |
static void setup_array | ( | uint8_t * | out[SWR_CH_MAX], | |
uint8_t * | in, | |||
enum AVSampleFormat | format, | |||
int | samples | |||
) | [static] |
static void shift | ( | uint8_t * | a[], | |
int | index, | |||
int | ch_count, | |||
enum AVSampleFormat | f | |||
) | [static] |
Definition at line 75 of file swresample-test.c.
enum AVSampleFormat formats[] [static] |
Initial value:
{ AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_DBLP, AV_SAMPLE_FMT_DBL, }
Definition at line 87 of file swresample-test.c.
uint64_t layouts[] |
Initial value:
{ AV_CH_LAYOUT_MONO , AV_CH_LAYOUT_STEREO , AV_CH_LAYOUT_2_1 , AV_CH_LAYOUT_SURROUND , AV_CH_LAYOUT_4POINT0 , AV_CH_LAYOUT_2_2 , AV_CH_LAYOUT_QUAD , AV_CH_LAYOUT_5POINT0 , AV_CH_LAYOUT_5POINT1 , AV_CH_LAYOUT_5POINT0_BACK , AV_CH_LAYOUT_5POINT1_BACK , AV_CH_LAYOUT_7POINT0 , AV_CH_LAYOUT_7POINT1 , AV_CH_LAYOUT_7POINT1_WIDE , }
Definition at line 109 of file swresample-test.c.
const int rates[] [static] |
Initial value:
{ 8000, 11025, 16000, 22050, 32000, 48000, }
Definition at line 100 of file swresample-test.c.