xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Functions
filters.c File Reference
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <inttypes.h>
#include "goom_filters.h"
#include "goom_graphic.h"
#include "goom_tools.h"
#include "goom_plugin_info.h"
#include "goom_fx.h"
#include "v3d.h"

Data Structures

struct  _ZOOM_FILTER_FX_WRAPPER_DATA
 

Macros

#define BUFFPOINTNB   16
 
#define BUFFPOINTNBF   16.0f
 
#define BUFFPOINTMASK   0xffff
 
#define sqrtperte   16
 
#define PERTEMASK   0xf
 
#define PERTEDEC   4
 

Typedefs

typedef struct _ZOOM_FILTER_FX_WRAPPER_DATA ZoomFilterFXWrapperData
 

Functions

static void setPixelRGB (PluginInfo *goomInfo, Pixel *buffer, Uint x, Uint y, Color c)
 
static void setPixelRGB_ (Pixel *buffer, Uint x, Color c)
 
static void getPixelRGB (PluginInfo *goomInfo, Pixel *buffer, Uint x, Uint y, Color *c)
 
static void getPixelRGB_ (Pixel *buffer, Uint x, Color *c)
 
static void c_zoom (Pixel *expix1, Pixel *expix2, unsigned int prevX, unsigned int prevY, signed int *brutS, signed int *brutD, int buffratio, int precalCoef[16][16])
 
void zoom_filter_c (int sizeX, int sizeY, Pixel *src, Pixel *dest, int *brutS, int *brutD, int buffratio, int precalCoef[16][16])
 
static void generatePrecalCoef (int precalCoef[16][16])
 
static v2g zoomVector (ZoomFilterFXWrapperData *data, float X, float Y)
 
static void makeZoomBufferStripe (ZoomFilterFXWrapperData *data, int INTERLACE_INCR)
 
static void generateTheWaterFXHorizontalDirectionBuffer (PluginInfo *goomInfo, ZoomFilterFXWrapperData *data)
 
void zoomFilterFastRGB (PluginInfo *goomInfo, Pixel *pix1, Pixel *pix2, ZoomFilterData *zf, Uint resx, Uint resy, int switchIncr, float switchMult)
 
static void zoomFilterVisualFXWrapper_init (struct _VISUAL_FX *_this, PluginInfo *info)
 
static void zoomFilterVisualFXWrapper_free (struct _VISUAL_FX *_this)
 
static void zoomFilterVisualFXWrapper_apply (struct _VISUAL_FX *_this, Pixel *src, Pixel *dest, PluginInfo *info)
 
VisualFX zoomFilterVisualFXWrapper_create (void)
 
void pointFilter (PluginInfo *goomInfo, Pixel *pix1, Color c, float t1, float t2, float t3, float t4, Uint cycle)
 

Macro Definition Documentation

◆ BUFFPOINTMASK

#define BUFFPOINTMASK   0xffff

Referenced by zoomFilterFastRGB().

◆ BUFFPOINTNB

#define BUFFPOINTNB   16

◆ BUFFPOINTNBF

#define BUFFPOINTNBF   16.0f

Referenced by makeZoomBufferStripe().

◆ PERTEDEC

#define PERTEDEC   4

Referenced by c_zoom().

◆ PERTEMASK

#define PERTEMASK   0xf

Referenced by c_zoom().

◆ sqrtperte

#define sqrtperte   16

Referenced by generatePrecalCoef().

Typedef Documentation

◆ ZoomFilterFXWrapperData

Function Documentation

◆ c_zoom()

static void c_zoom ( Pixel * expix1,
Pixel * expix2,
unsigned int prevX,
unsigned int prevY,
signed int * brutS,
signed int * brutD,
int buffratio,
int precalCoef[16][16] )
static

◆ generatePrecalCoef()

static void generatePrecalCoef ( int precalCoef[16][16])
static

References sqrtperte.

Referenced by zoomFilterVisualFXWrapper_init().

◆ generateTheWaterFXHorizontalDirectionBuffer()

static void generateTheWaterFXHorizontalDirectionBuffer ( PluginInfo * goomInfo,
ZoomFilterFXWrapperData * data )
static

generate the water fx horizontal direction buffer

References _ZOOM_FILTER_FX_WRAPPER_DATA::firedec, goom_irand(), _PLUGIN_INFO::gRandom, and _ZOOM_FILTER_FX_WRAPPER_DATA::prevY.

Referenced by zoomFilterFastRGB().

◆ getPixelRGB()

static void getPixelRGB ( PluginInfo * goomInfo,
Pixel * buffer,
Uint x,
Uint y,
Color * c )
inlinestatic

◆ getPixelRGB_()

static void getPixelRGB_ ( Pixel * buffer,
Uint x,
Color * c )
inlinestatic

◆ makeZoomBufferStripe()

static void makeZoomBufferStripe ( ZoomFilterFXWrapperData * data,
int INTERLACE_INCR )
static

◆ pointFilter()

void pointFilter ( PluginInfo * goomInfo,
Pixel * pix1,
Color c,
float t1,
float t2,
float t3,
float t4,
Uint cycle )

◆ setPixelRGB()

static void setPixelRGB ( PluginInfo * goomInfo,
Pixel * buffer,
Uint x,
Uint y,
Color c )
inlinestatic

◆ setPixelRGB_()

static void setPixelRGB_ ( Pixel * buffer,
Uint x,
Color c )
inlinestatic

◆ zoom_filter_c()

void zoom_filter_c ( int sizeX,
int sizeY,
Pixel * src,
Pixel * dest,
int * brutS,
int * brutD,
int buffratio,
int precalCoef[16][16] )

References c_zoom().

Referenced by setOptimizedMethods().

◆ zoomFilterFastRGB()

void zoomFilterFastRGB ( PluginInfo * goomInfo,
Pixel * pix1,
Pixel * pix2,
ZoomFilterData * zf,
Uint resx,
Uint resy,
int switchIncr,
float switchMult )

Main work for the dynamic displacement map.

Reads data from pix1, write to pix2.

Useful datas for this FX are stored in ZoomFilterData.

If you think that this is a strange function name, let me say that a long time ago, there has been a slow version and a gray-level only one. Then came these function, fast and workin in RGB colorspace ! nice but it only was applying a zoom to the image. So that is why you have this name, for the nostalgy of the first days of goom when it was just a tiny program writen in Turbo Pascal on my i486...

changement de taille

changement de config

References _ZOOM_FILTER_FX_WRAPPER_DATA::brutD, _ZOOM_FILTER_FX_WRAPPER_DATA::brutS, _ZOOM_FILTER_FX_WRAPPER_DATA::brutT, BUFFPOINTMASK, BUFFPOINTNB, _ZOOM_FILTER_FX_WRAPPER_DATA::buffratio, BVAL, _ZOOM_FILTER_FX_WRAPPER_DATA::enabled_bp, _ZOOM_FILTER_FX_WRAPPER_DATA::firedec, _ZOOM_FILTER_FX_WRAPPER_DATA::freebrutD, _ZOOM_FILTER_FX_WRAPPER_DATA::freebrutS, _ZOOM_FILTER_FX_WRAPPER_DATA::freebrutT, _VISUAL_FX::fx_data, _ZOOM_FILTER_FX_WRAPPER_DATA::general_speed, generateTheWaterFXHorizontalDirectionBuffer(), gint32, _ZOOM_FILTER_FX_WRAPPER_DATA::hPlaneEffect, _ZOOM_FILTER_DATA::hPlaneEffect, _ZOOM_FILTER_FX_WRAPPER_DATA::hypercosEffect, _ZOOM_FILTER_DATA::hypercosEffect, _ZOOM_FILTER_FX_WRAPPER_DATA::interlace_start, makeZoomBufferStripe(), _PLUGIN_INFO::methods, _ZOOM_FILTER_FX_WRAPPER_DATA::middleX, _ZOOM_FILTER_DATA::middleX, _ZOOM_FILTER_FX_WRAPPER_DATA::middleY, _ZOOM_FILTER_DATA::middleY, _ZOOM_FILTER_DATA::mode, _ZOOM_FILTER_FX_WRAPPER_DATA::mustInitBuffers, _ZOOM_FILTER_FX_WRAPPER_DATA::noisify, _ZOOM_FILTER_DATA::noisify, NULL, _ZOOM_FILTER_FX_WRAPPER_DATA::precalCoef, _ZOOM_FILTER_FX_WRAPPER_DATA::prevX, _ZOOM_FILTER_FX_WRAPPER_DATA::prevY, _ZOOM_FILTER_FX_WRAPPER_DATA::reverse, _ZOOM_FILTER_DATA::reverse, _ZOOM_FILTER_FX_WRAPPER_DATA::theMode, _ZOOM_FILTER_DATA::vitesse, _ZOOM_FILTER_FX_WRAPPER_DATA::vPlaneEffect, _ZOOM_FILTER_DATA::vPlaneEffect, _ZOOM_FILTER_FX_WRAPPER_DATA::waveEffect, _ZOOM_FILTER_DATA::waveEffect, _PLUGIN_INFO::zoom_filter, _ZOOM_FILTER_FX_WRAPPER_DATA::zoom_width, and _PLUGIN_INFO::zoomFilter_fx.

Referenced by goom_update().

◆ zoomFilterVisualFXWrapper_apply()

static void zoomFilterVisualFXWrapper_apply ( struct _VISUAL_FX * _this,
Pixel * src,
Pixel * dest,
PluginInfo * info )
static

◆ zoomFilterVisualFXWrapper_create()

VisualFX zoomFilterVisualFXWrapper_create ( void )

◆ zoomFilterVisualFXWrapper_free()

static void zoomFilterVisualFXWrapper_free ( struct _VISUAL_FX * _this)
static

◆ zoomFilterVisualFXWrapper_init()

static void zoomFilterVisualFXWrapper_init ( struct _VISUAL_FX * _this,
PluginInfo * info )
static

◆ zoomVector()

static v2g zoomVector ( ZoomFilterFXWrapperData * data,
float X,
float Y )
inlinestatic