tests/rotozoom.c File Reference

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

Go to the source code of this file.

Defines

#define FIXP   (1<<16)
#define MY_PI   205887
#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 W   256
#define H   256

Typedefs

typedef unsigned char UINT8

Functions

static int64_t int_pow (int64_t a, int p)
static int64_t int_sin (int64_t a)
static void rgb24_to_yuv420p (UINT8 *lum, UINT8 *cb, UINT8 *cr, UINT8 *src, int width, int height)
void pgmyuv_save (const char *filename, int w, int h, unsigned char *rgb_tab)
void put_pixel (int x, int y, int r, int g, int b)
static int ipol (uint8_t *src, int x, int y)
void gen_image (int num, int w, int h)
void init_demo (const char *filename)
int main (int argc, char **argv)

Variables

unsigned char * rgb_tab
int width
int height
int wrap
unsigned char tab_r [256 *256]
unsigned char tab_g [256 *256]
unsigned char tab_b [256 *256]
int teta = 0
int h_cos [360]
int h_sin [360]


Define Documentation

#define DEFAULT_HEIGHT   288

Definition at line 121 of file rotozoom.c.

Referenced by main().

#define DEFAULT_NB_PICT   50

Definition at line 122 of file rotozoom.c.

Referenced by main().

#define DEFAULT_WIDTH   352

Definition at line 120 of file rotozoom.c.

Referenced by main().

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

Definition at line 53 of file rotozoom.c.

#define FIXP   (1<<16)

Definition at line 27 of file rotozoom.c.

Referenced by gen_image(), init_demo(), and int_pow().

#define H   256

Definition at line 241 of file rotozoom.c.

#define MY_PI   205887

Definition at line 28 of file rotozoom.c.

Referenced by init_demo(), and int_sin().

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

Definition at line 52 of file rotozoom.c.

#define SCALEBITS   8

Definition at line 51 of file rotozoom.c.

#define W   256

Definition at line 240 of file rotozoom.c.


Typedef Documentation

typedef unsigned char UINT8

Definition at line 54 of file rotozoom.c.


Function Documentation

void gen_image ( int  num,
int  w,
int  h 
)

Definition at line 198 of file rotozoom.c.

Referenced by main().

void init_demo ( const char *  filename  ) 

Definition at line 243 of file rotozoom.c.

Referenced by main().

static int64_t int_pow ( int64_t  a,
int  p 
) [static]

Definition at line 30 of file rotozoom.c.

Referenced by int_sin().

static int64_t int_sin ( int64_t  a  )  [static]

Definition at line 41 of file rotozoom.c.

Referenced by init_demo().

static int ipol ( uint8_t src,
int  x,
int  y 
) [static]

Definition at line 183 of file rotozoom.c.

Referenced by gen_image().

int main ( int  argc,
char **  argv 
)

Definition at line 277 of file rotozoom.c.

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

Definition at line 124 of file rotozoom.c.

Referenced by main().

void put_pixel ( int  x,
int  y,
int  r,
int  g,
int  b 
)

Definition at line 161 of file rotozoom.c.

Referenced by gen_image().

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

Definition at line 56 of file rotozoom.c.

Referenced by pgmyuv_save().


Variable Documentation

int h_cos[360]

Definition at line 180 of file rotozoom.c.

Referenced by gen_image(), and init_demo().

int h_sin[360]

Definition at line 181 of file rotozoom.c.

Referenced by gen_image(), and init_demo().

int height

unsigned char* rgb_tab

Definition at line 158 of file rotozoom.c.

Referenced by main(), and put_pixel().

unsigned char tab_b[256 *256]

Definition at line 177 of file rotozoom.c.

Referenced by gen_image(), and init_demo().

unsigned char tab_g[256 *256]

Definition at line 176 of file rotozoom.c.

Referenced by gen_image(), and init_demo().

unsigned char tab_r[256 *256]

Definition at line 175 of file rotozoom.c.

Referenced by gen_image(), and init_demo().

int teta = 0

Definition at line 179 of file rotozoom.c.

Referenced by gen_image().

int width

Definition at line 159 of file rotozoom.c.

int wrap


Generated on Fri Apr 23 15:12:05 2010 for ffmpeg by  doxygen 1.5.6