tests/videogen.c File Reference

#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>

Go to the source code of this file.

Data Structures

struct  VObj

Defines

#define SCALEBITS   8
#define ONE_HALF   (1 << (SCALEBITS - 1))
#define FIX(x)   ((int) ((x) * (1L<<SCALEBITS) + 0.5))
#define DEFAULT_WIDTH   352
#define DEFAULT_HEIGHT   288
#define DEFAULT_NB_PICT   50
#define NOISE_X   10
#define NOISE_Y   30
#define NOISE_W   26
#define FRAC_BITS   8
#define FRAC_ONE   (1 << FRAC_BITS)
#define NB_OBJS   10

Functions

static void rgb24_to_yuv420p (uint8_t *lum, uint8_t *cb, uint8_t *cr, uint8_t *src, int width, int height)
static void pgmyuv_save (const char *filename, int w, int h, unsigned char *rgb_tab)
static void put_pixel (int x, int y, int r, int g, int b)
static unsigned int myrnd (unsigned int *seed_ptr, int n)
static int int_cos (int a)
static void gen_image (int num, int w, int h)
int main (int argc, char **argv)

Variables

unsigned char * rgb_tab
int width
int height
int wrap
VObj objs [NB_OBJS]
unsigned int seed = 1


Define Documentation

#define DEFAULT_HEIGHT   288

Definition at line 97 of file videogen.c.

#define DEFAULT_NB_PICT   50

Definition at line 98 of file videogen.c.

#define DEFAULT_WIDTH   352

Definition at line 96 of file videogen.c.

#define FIX (  )     ((int) ((x) * (1L<<SCALEBITS) + 0.5))

Definition at line 30 of file videogen.c.

#define FRAC_BITS   8

Definition at line 170 of file videogen.c.

#define FRAC_ONE   (1 << FRAC_BITS)

Definition at line 171 of file videogen.c.

#define NB_OBJS   10

Definition at line 190 of file videogen.c.

Referenced by gen_image().

#define NOISE_W   26

Definition at line 168 of file videogen.c.

Referenced by gen_image().

#define NOISE_X   10

Definition at line 166 of file videogen.c.

Referenced by gen_image().

#define NOISE_Y   30

Definition at line 167 of file videogen.c.

Referenced by gen_image().

#define ONE_HALF   (1 << (SCALEBITS - 1))

Definition at line 29 of file videogen.c.

#define SCALEBITS   8

Definition at line 28 of file videogen.c.


Function Documentation

static void gen_image ( int  num,
int  w,
int  h 
) [static]

Definition at line 201 of file videogen.c.

static int int_cos ( int  a  )  [static]

Definition at line 174 of file videogen.c.

int main ( int  argc,
char **  argv 
)

Definition at line 265 of file videogen.c.

static unsigned int myrnd ( unsigned int *  seed_ptr,
int  n 
) [static]

Definition at line 151 of file videogen.c.

static void pgmyuv_save ( const char *  filename,
int  w,
int  h,
unsigned char *  rgb_tab 
) [static]

Definition at line 100 of file videogen.c.

static void put_pixel ( int  x,
int  y,
int  r,
int  g,
int  b 
) [static]

Definition at line 137 of file videogen.c.

static void rgb24_to_yuv420p ( uint8_t *  lum,
uint8_t *  cb,
uint8_t *  cr,
uint8_t *  src,
int  width,
int  height 
) [static]

Definition at line 32 of file videogen.c.


Variable Documentation

int height

Definition at line 135 of file videogen.c.

VObj objs[NB_OBJS]

Definition at line 197 of file videogen.c.

unsigned char* rgb_tab

Definition at line 134 of file videogen.c.

unsigned int seed = 1

int width

Definition at line 135 of file videogen.c.

int wrap

Definition at line 135 of file videogen.c.


Generated on Fri Oct 26 02:36:56 2012 for FFmpeg by  doxygen 1.5.8