FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
avresample-test.c File Reference
#include <stdint.h>
#include <stdio.h>
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/lfg.h"
#include "libavutil/libm.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "avresample.h"

Go to the source code of this file.

Macros

#define PUT_FUNC(name, fmt, type, expr)
 
#define PUT_SAMPLE   put_sample(data, sample_fmt, channels, k, ch, v);
 

Functions

static double dbl_rand (AVLFG *lfg)
 
 PUT_FUNC (u8, AV_SAMPLE_FMT_U8, uint8_t, av_clip_uint8(lrint(v_dbl *(1<< 7))+128))
 
static void audiogen (AVLFG *rnd, 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 PUT_FUNC (   name,
  fmt,
  type,
  expr 
)
Value:
static void put_sample_ ## name(void **data, enum AVSampleFormat sample_fmt,\
int channels, int sample, int ch, \
double v_dbl) \
{ \
type v = expr; \
type **out = (type **)data; \
out[ch][sample] = v; \
out[0][sample * channels + ch] = v; \
}
ptrdiff_t const GLvoid * data
Definition: opengl_enc.c:101
#define sample
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
Check if the sample format is planar.
Definition: samplefmt.c:110
FILE * out
Definition: movenc-test.c:54
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
GLint GLenum type
Definition: opengl_enc.c:105
if(ret< 0)
Definition: vf_mcdeint.c:282
const char * name
Definition: opengl_enc.c:103

Definition at line 40 of file avresample-test.c.

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

Referenced by audiogen().

Function Documentation

static double dbl_rand ( AVLFG lfg)
static

Definition at line 35 of file avresample-test.c.

Referenced by audiogen().

PUT_FUNC ( u8  ,
AV_SAMPLE_FMT_U8  ,
uint8_t  ,
av_clip_uint8(lrint(v_dbl *(1<< 7))+128)   
)

Definition at line 53 of file avresample-test.c.

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

Definition at line 81 of file avresample-test.c.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 188 of file avresample-test.c.

Variable Documentation

enum AVSampleFormat formats[]
static
const int rates[]
static
Initial value:
= {
48000,
44100,
16000
}

Definition at line 175 of file avresample-test.c.

Referenced by get_wb_bitrate_mode(), query_formats(), and test_av_parse_video_rate().

const uint64_t layouts[]
static
Initial value:
= {
}
#define AV_CH_LAYOUT_7POINT1
#define AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_5POINT1
#define AV_CH_LAYOUT_MONO

Definition at line 181 of file avresample-test.c.