grain.c File Reference

Include dependency graph for grain.c:


Data Structures

struct  filter_sys_t
 filter_sys_t: chroma method descriptor More...

Defines

#define BANK_SIZE   (64)
#define CFG_PREFIX   "grain-"
#define VARIANCE_MIN   (0.0)
#define VARIANCE_MAX   (10.0)
#define VARIANCE_TEXT   N_("Variance")
#define VARIANCE_LONGTEXT   N_("Variance of the gaussian noise")
#define PERIOD_MIN   1
#define PERIOD_MAX   BANK_SIZE
#define PERIOD_MIN_TEXT   N_("Minimal period")
#define PERIOD_MIN_LONGTEXT   N_("Minimal period of the noise grain in pixel")
#define PERIOD_MAX_TEXT   N_("Maximal period")
#define PERIOD_MAX_LONGTEXT   N_("Maximal period of the noise grain in pixel")
#define BLEND_SIZE   (8)
#define URAND_SEED   (2463534242)

Functions

static int Open (vlc_object_t *)
 Probes and initializes.
static void Close (vlc_object_t *)
 Releases resources.
int vlc_entry__main (module_t *p_module)
const char * vlc_entry_license__main (void)
static uint32_t urand (uint32_t *seed)
static double drand (uint32_t *seed)
static void grand (double *r1, double *r2, uint32_t *seed)
static void BlockBlend (uint8_t *dst, size_t dst_pitch, const uint8_t *src, size_t src_pitch, const int16_t *noise, int w, int h)
static void BlockBlendC (uint8_t *dst, size_t dst_pitch, const uint8_t *src, size_t src_pitch, const int16_t *noise)
static void Scale (int16_t *dst, int16_t *src, int scale)
 Scale the given signed data (on 7 bits + 1 for sign) using scale on 8 bits.
static void PlaneFilter (filter_t *filter, plane_t *dst, const plane_t *src, int16_t *bank, uint32_t *seed)
static picture_tFilter (filter_t *filter, picture_t *src)
static int Generate (int16_t *bank, int h_min, int h_max, int v_min, int v_max)
 Generate a filteried gaussian noise within [-127, 127] range.
static int Callback (vlc_object_t *object, char const *cmd, vlc_value_t oldval, vlc_value_t newval, void *data)

Define Documentation

#define BANK_SIZE   (64)

#define BLEND_SIZE   (8)

Referenced by BlockBlendC(), and PlaneFilter().

#define CFG_PREFIX   "grain-"

#define PERIOD_MAX   BANK_SIZE

#define PERIOD_MAX_LONGTEXT   N_("Maximal period of the noise grain in pixel")

#define PERIOD_MAX_TEXT   N_("Maximal period")

#define PERIOD_MIN   1

#define PERIOD_MIN_LONGTEXT   N_("Minimal period of the noise grain in pixel")

#define PERIOD_MIN_TEXT   N_("Minimal period")

#define URAND_SEED   (2463534242)

Referenced by Generate().

#define VARIANCE_LONGTEXT   N_("Variance of the gaussian noise")

#define VARIANCE_MAX   (10.0)

#define VARIANCE_MIN   (0.0)

#define VARIANCE_TEXT   N_("Variance")


Function Documentation

static void BlockBlend ( uint8_t *  dst,
size_t  dst_pitch,
const uint8_t *  src,
size_t  src_pitch,
const int16_t *  noise,
int  w,
int  h 
) [static]

References BANK_SIZE, and clip_uint8_vlc().

Referenced by BlockBlendC(), and PlaneFilter().

static void BlockBlendC ( uint8_t *  dst,
size_t  dst_pitch,
const uint8_t *  src,
size_t  src_pitch,
const int16_t *  noise 
) [static]

References BLEND_SIZE, and BlockBlend().

static int Callback ( vlc_object_t object,
char const *  cmd,
vlc_value_t  oldval,
vlc_value_t  newval,
void *  data 
) [static]

static void Close ( vlc_object_t p_this  )  [static]

Releases resources.

Close the module.

Destroys the X11 window.

Disconnect from the X server.

Close a SDL video output.

It destroys an OpenGL vout display.

Terminate a vout display created by Open.

It destroyes a Direct3D vout display.

Terminate an output method created by Open.

Release the drawable.

Close a libcaca video output.

Close a aa video output method.

Close the filter.

Terminate a splitter module.

This function closes a clone video splitter module.

Common close function.

Releases allocate resources.

Close: Destructor.

Parameters:
p_this pointer to this filter object
p_this,: the filter object

static double drand ( uint32_t *  seed  )  [static]

References urand().

Referenced by grand().

static picture_t* Filter ( filter_t filter,
picture_t src 
) [static]

static int Generate ( int16_t *  bank,
int  h_min,
int  h_max,
int  v_min,
int  v_max 
) [static]

Generate a filteried gaussian noise within [-127, 127] range.

References __MAX, __MIN, BANK_SIZE, grand(), i, M_PI, URAND_SEED, VLC_ENOMEM, and VLC_SUCCESS.

static void grand ( double *  r1,
double *  r2,
uint32_t *  seed 
) [static]

References drand().

Referenced by Generate().

static int Open ( vlc_object_t p_this  )  [static]

Probes and initializes.

Status of this demuxer: Real Media format -----------------.

Basic chorus/flanger/delay audio filter This implements a variable delay filter for VLC.

Todo:

  • Improve CDDB support (non-blocking, cache, .

Open the module.

Create an X11 window.

Probe the X server.

This function initializes SDL vout method.

It creates an OpenGL vout display.

This function allocates and initialize the DirectX vout display.

It creates a Direct3D vout display.

This function allocates and initializes a FB vout method.

Find the drawable set by libvlc application.

This function initializes libcaca vout method.

This function allocates and initializes a aa vout method.

This function allocates and initializes a Wall splitter module.

Open the filter.

This function allocates and initializes a Clone splitter module.

Open: initialize and create stuff.

Connect to the sftp server and ask for a file.

Parameters:
p_this,: the vlc_object
Returns:
VLC_SUCCESS if everything was fine
Parameters:
p_this 
p_this,: the filter object
Returns:
VLC_SUCCESS or vlc error codes

Todo:
Reinstate meta codec name

static void PlaneFilter ( filter_t filter,
plane_t dst,
const plane_t src,
int16_t *  bank,
uint32_t *  seed 
) [static]

static void Scale ( int16_t *  dst,
int16_t *  src,
int  scale 
) [static]

Scale the given signed data (on 7 bits + 1 for sign) using scale on 8 bits.

References BANK_SIZE.

Referenced by Filter().

static uint32_t urand ( uint32_t *  seed  )  [static]

Referenced by drand(), and PlaneFilter().

int vlc_entry__main ( module_t p_module  ) 

const char* vlc_entry_license__main ( void   ) 


Generated on Tue May 25 08:05:30 2010 for VLC by  doxygen 1.5.6