libavfilter/libmpcodecs/vf_noise.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include "config.h"
#include "mp_msg.h"
#include "cpudetect.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"
#include "libvo/fastmemcpy.h"
#include "libavutil/mem.h"

Go to the source code of this file.

Data Structures

struct  FilterParam
struct  vf_priv_s

Defines

#define MAX_NOISE   4096
#define MAX_SHIFT   1024
#define MAX_RES   (MAX_NOISE-MAX_SHIFT)
#define RAND_N(range)   ((int) ((double)range*rand()/(RAND_MAX+1.0)))

Functions

static void lineNoise_C (uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift)
static void lineNoiseAvg_C (uint8_t *dst, uint8_t *src, int len, int8_t **shift)
static int8_t * initNoise (FilterParam *fp)
static void lineNoise_MMX (uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift)
static void lineNoiseAvg_MMX (uint8_t *dst, uint8_t *src, int len, int8_t **shift)
static void noise (uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int width, int height, FilterParam *fp)
static int config (struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt)
static void get_image (struct vf_instance *vf, mp_image_t *mpi)
static int put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
static void uninit (struct vf_instance *vf)
static int query_format (struct vf_instance *vf, unsigned int fmt)
static void parse (FilterParam *fp, char *args)
static int vf_open (vf_instance_t *vf, char *args)

Variables

static void(* lineNoise )(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift) = lineNoise_C
static void(* lineNoiseAvg )(uint8_t *dst, uint8_t *src, int len, int8_t **shift) = lineNoiseAvg_C
static int nonTempRandShift_init
static int nonTempRandShift [MAX_RES]
static int patt [4]
static const unsigned int fmt_list []
const vf_info_t vf_info_noise


Define Documentation

#define MAX_NOISE   4096

Definition at line 41 of file vf_noise.c.

Referenced by initNoise().

#define MAX_RES   (MAX_NOISE-MAX_SHIFT)

Definition at line 43 of file vf_noise.c.

Referenced by initNoise().

#define MAX_SHIFT   1024

Definition at line 42 of file vf_noise.c.

Referenced by initNoise(), and noise().

#define RAND_N ( range   )     ((int) ((double)range*rand()/(RAND_MAX+1.0)))

Definition at line 78 of file vf_noise.c.

Referenced by initNoise().


Function Documentation

static int config ( struct vf_instance vf,
int  width,
int  height,
int  d_width,
int  d_height,
unsigned int  flags,
unsigned int  outfmt 
) [static]

Definition at line 316 of file vf_noise.c.

static void get_image ( struct vf_instance vf,
mp_image_t mpi 
) [static]

Definition at line 323 of file vf_noise.c.

static int8_t* initNoise ( FilterParam fp  )  [static]

Definition at line 79 of file vf_noise.c.

Referenced by parse().

static void lineNoise_C ( uint8_t dst,
uint8_t src,
int8_t *  noise,
int  len,
int  shift 
) [inline, static]

Definition at line 206 of file vf_noise.c.

Referenced by lineNoise_MMX().

static void lineNoise_MMX ( uint8_t dst,
uint8_t src,
int8_t *  noise,
int  len,
int  shift 
) [inline, static]

Definition at line 150 of file vf_noise.c.

Referenced by vf_open().

static void lineNoiseAvg_C ( uint8_t dst,
uint8_t src,
int  len,
int8_t **  shift 
) [inline, static]

Definition at line 262 of file vf_noise.c.

Referenced by lineNoiseAvg_MMX().

static void lineNoiseAvg_MMX ( uint8_t dst,
uint8_t src,
int  len,
int8_t **  shift 
) [inline, static]

Definition at line 221 of file vf_noise.c.

Referenced by vf_open().

static void noise ( uint8_t dst,
uint8_t src,
int  dstStride,
int  srcStride,
int  width,
int  height,
FilterParam fp 
) [static]

Definition at line 275 of file vf_noise.c.

static void parse ( FilterParam fp,
char *  args 
) [static]

Definition at line 396 of file vf_noise.c.

static int put_image ( struct vf_instance vf,
mp_image_t mpi,
double  pts 
) [static]

Definition at line 341 of file vf_noise.c.

static int query_format ( struct vf_instance vf,
unsigned int  fmt 
) [static]

Definition at line 385 of file vf_noise.c.

static void uninit ( struct vf_instance vf  )  [static]

Definition at line 370 of file vf_noise.c.

static int vf_open ( vf_instance_t vf,
char *  args 
) [static]

Definition at line 427 of file vf_noise.c.


Variable Documentation

const unsigned int fmt_list[] [static]

Initial value:

Definition at line 420 of file vf_noise.c.

Referenced by vf_open().

void(* lineNoise)(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift) = lineNoise_C [static]

Referenced by noise(), and vf_open().

void(* lineNoiseAvg)(uint8_t *dst, uint8_t *src, int len, int8_t **shift) = lineNoiseAvg_C [static]

Referenced by noise(), and vf_open().

int nonTempRandShift[MAX_RES] [static]

Definition at line 72 of file vf_noise.c.

Referenced by initNoise(), and noise().

Definition at line 71 of file vf_noise.c.

Referenced by initNoise().

int patt[4] [static]

Initial value:

 {
    -1,0,1,0
}

Definition at line 74 of file vf_noise.c.

Referenced by initNoise().

Initial value:

 {
    "noise generator",
    "noise",
    "Michael Niedermayer",
    "",
    vf_open,
    NULL
}

Definition at line 465 of file vf_noise.c.


Generated on Fri Oct 26 02:50:09 2012 for FFmpeg by  doxygen 1.5.8