vhook/fish.c File Reference

#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdarg.h>
#include <string.h>
#include <time.h>
#include <stdio.h>
#include <dirent.h>
#include "libavformat/avformat.h"
#include "libavformat/framehook.h"
#include "libavcodec/dsputil.h"
#include "libswscale/swscale.h"

Go to the source code of this file.

Data Structures

struct  HSV
struct  ContextInfo
 Context info for this vhook - stores the pipe and image buffers. More...

Defines

#define SCALEBITS   10
#define ONE_HALF   (1 << (SCALEBITS - 1))
#define FIX(x)   ((int) ((x) * (1<<SCALEBITS) + 0.5))
#define YUV_TO_RGB1_CCIR(cb1, cr1)
#define YUV_TO_RGB2_CCIR(r, g, b, y1)

Functions

static void dorange (const char *s, int *first, int *second, int maxval)
void Release (void *ctx)
int Configure (void **ctxp, int argc, char *argv[])
static void get_hsv (HSV *hsv, int r, int g, int b)
void Process (void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, int height, int64_t pts)

Variables

static int sws_flags = SWS_BICUBIC


Define Documentation

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

Definition at line 57 of file fish.c.

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

Definition at line 56 of file fish.c.

#define SCALEBITS   10

Definition at line 55 of file fish.c.

#define YUV_TO_RGB1_CCIR ( cb1,
cr1   ) 

Value:

{\
    cb = (cb1) - 128;\
    cr = (cr1) - 128;\
    r_add = FIX(1.40200*255.0/224.0) * cr + ONE_HALF;\
    g_add = - FIX(0.34414*255.0/224.0) * cb - FIX(0.71414*255.0/224.0) * cr + \
                    ONE_HALF;\
    b_add = FIX(1.77200*255.0/224.0) * cb + ONE_HALF;\
}

Definition at line 59 of file fish.c.

#define YUV_TO_RGB2_CCIR ( r,
g,
b,
y1   ) 

Value:

{\
    yt = ((y1) - 16) * FIX(255.0/219.0);\
    r = cm[(yt + r_add) >> SCALEBITS];\
    g = cm[(yt + g_add) >> SCALEBITS];\
    b = cm[(yt + b_add) >> SCALEBITS];\
}

Definition at line 69 of file fish.c.


Function Documentation

int Configure ( void **  ctxp,
int  argc,
char *  argv[] 
)

Definition at line 120 of file fish.c.

static void dorange ( const char *  s,
int *  first,
int *  second,
int  maxval 
) [static]

Definition at line 100 of file fish.c.

Referenced by Configure().

static void get_hsv ( HSV hsv,
int  r,
int  g,
int  b 
) [static]

Definition at line 192 of file fish.c.

Referenced by Process().

void Process ( void *  ctx,
AVPicture picture,
enum PixelFormat  pix_fmt,
int  width,
int  height,
int64_t  pts 
)

Definition at line 231 of file fish.c.

void Release ( void *  ctx  ) 

Definition at line 109 of file fish.c.


Variable Documentation

int sws_flags = SWS_BICUBIC [static]

Definition at line 53 of file fish.c.


Generated on Fri Oct 26 02:35:46 2012 for FFmpeg by  doxygen 1.5.8