FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
utils.c File Reference
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Macros

#define SCALEBITS   8
 
#define ONE_HALF   (1 << (SCALEBITS - 1))
 
#define FIX(x)   ((int) ((x) * (1 << SCALEBITS) + 0.5))
 
#define err_if(expr)
 
#define DEFAULT_WIDTH   352
 
#define DEFAULT_HEIGHT   288
 
#define DEFAULT_NB_PICT   50
 

Functions

static void rgb24_to_yuv420p (unsigned char *lum, unsigned char *cb, unsigned char *cr, const unsigned char *src, int width, int height)
 
static void pgmyuv_save (const char *filename, int w, int h, const unsigned char *rgb_tab)
 
static void put_pixel (int x, int y, int r, int g, int b)
 

Variables

static unsigned char * rgb_tab
 
static int width
 
static int height
 
static int wrap
 

Macro Definition Documentation

#define SCALEBITS   8

Definition at line 26 of file utils.c.

Referenced by rgb24_to_yuv420p().

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

Definition at line 27 of file utils.c.

Referenced by rgb24_to_yuv420p().

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

Definition at line 28 of file utils.c.

Referenced by rgb24_to_yuv420p().

#define err_if (   expr)
Value:
do { \
if (expr) { \
fprintf(stderr, "%s\n", strerror(errno)); \
exit(1); \
} \
} while (0)
if(ret< 0)
Definition: vf_mcdeint.c:282

Definition at line 30 of file utils.c.

Referenced by pgmyuv_save().

#define DEFAULT_WIDTH   352

Definition at line 102 of file utils.c.

Referenced by main(), and print_help().

#define DEFAULT_HEIGHT   288

Definition at line 103 of file utils.c.

Referenced by main(), and print_help().

#define DEFAULT_NB_PICT   50

Definition at line 104 of file utils.c.

Referenced by main().

Function Documentation

static void rgb24_to_yuv420p ( unsigned char *  lum,
unsigned char *  cb,
unsigned char *  cr,
const unsigned char *  src,
int  width,
int  height 
)
static

Definition at line 37 of file utils.c.

Referenced by pgmyuv_save().

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

Definition at line 106 of file utils.c.

Referenced by main().

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

Definition at line 160 of file utils.c.

Referenced by gen_image().

Variable Documentation

unsigned char* rgb_tab
static

Definition at line 157 of file utils.c.

Referenced by main(), and put_pixel().

int width
static

Definition at line 158 of file utils.c.

Referenced by ff_set_dimensions(), put_pixel(), and rgb24_to_yuv420p().

int height
static

Definition at line 158 of file utils.c.

Referenced by ff_color_frame(), ff_set_dimensions(), put_pixel(), and rgb24_to_yuv420p().

int wrap
static

Definition at line 158 of file utils.c.

Referenced by put_pixel(), and rgb24_to_yuv420p().