xine-lib 1.2.13-20230125hg15249
|
#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) |
#define BUFFPOINTMASK 0xffff |
Referenced by zoomFilterFastRGB().
#define BUFFPOINTNB 16 |
Referenced by c_zoom(), makeZoomBufferStripe(), and zoomFilterFastRGB().
#define BUFFPOINTNBF 16.0f |
Referenced by makeZoomBufferStripe().
#define PERTEDEC 4 |
Referenced by c_zoom().
#define PERTEMASK 0xf |
Referenced by c_zoom().
#define sqrtperte 16 |
Referenced by generatePrecalCoef().
typedef struct _ZOOM_FILTER_FX_WRAPPER_DATA ZoomFilterFXWrapperData |
|
static |
References Color::b, BUFFPOINTNB, getPixelRGB_(), PERTEDEC, PERTEMASK, Color::r, setPixelRGB_(), Color::v, and _PIXEL::val.
Referenced by zoom_filter_c().
|
static |
References sqrtperte.
Referenced by zoomFilterVisualFXWrapper_init().
|
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().
|
inlinestatic |
References Color::b, _PIXEL::b, _PIXEL::channels, _PIXEL::g, Color::r, _PIXEL::r, _PLUGIN_INFO::screen, Color::v, and _PLUGIN_INFO::_SIZE_TYPE::width.
|
static |
References _ZOOM_FILTER_FX_WRAPPER_DATA::brutT, BUFFPOINTNB, BUFFPOINTNBF, _ZOOM_FILTER_FX_WRAPPER_DATA::interlace_start, _ZOOM_FILTER_FX_WRAPPER_DATA::middleX, _ZOOM_FILTER_FX_WRAPPER_DATA::middleY, _ZOOM_FILTER_FX_WRAPPER_DATA::prevX, _ZOOM_FILTER_FX_WRAPPER_DATA::prevY, v2g::x, v2g::y, and zoomVector().
Referenced by zoomFilterFastRGB().
void pointFilter | ( | PluginInfo * | goomInfo, |
Pixel * | pix1, | ||
Color | c, | ||
float | t1, | ||
float | t2, | ||
float | t3, | ||
float | t4, | ||
Uint | cycle ) |
References _PLUGIN_INFO::_SIZE_TYPE::height, _PLUGIN_INFO::screen, setPixelRGB(), WHITE, and _PLUGIN_INFO::_SIZE_TYPE::width.
Referenced by goom_update().
|
inlinestatic |
References Color::b, _PIXEL::b, _PIXEL::channels, _PIXEL::g, Color::r, _PIXEL::r, _PLUGIN_INFO::screen, Color::v, and _PLUGIN_INFO::_SIZE_TYPE::width.
Referenced by pointFilter().
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().
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().
|
static |
Referenced by zoomFilterVisualFXWrapper_create().
VisualFX zoomFilterVisualFXWrapper_create | ( | void | ) |
References _VISUAL_FX::init, zoomFilterVisualFXWrapper_apply(), zoomFilterVisualFXWrapper_free(), and zoomFilterVisualFXWrapper_init().
Referenced by goom_init().
|
static |
References _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::params, and _PARAMETERS::params.
Referenced by zoomFilterVisualFXWrapper_create().
|
static |
modif by jeko : fixedpoint : buffration = (16:16) (donc 0<=buffration<=2^16)
modif d'optim by Jeko : precalcul des 4 coefs resultant des 2 pos
References _ZOOM_FILTER_FX_WRAPPER_DATA::brutD, _ZOOM_FILTER_FX_WRAPPER_DATA::brutS, _ZOOM_FILTER_FX_WRAPPER_DATA::brutT, _ZOOM_FILTER_FX_WRAPPER_DATA::buffratio, _ZOOM_FILTER_FX_WRAPPER_DATA::coeffs, _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, _ZOOM_FILTER_FX_WRAPPER_DATA::freecoeffs, _VISUAL_FX::fx_data, _ZOOM_FILTER_FX_WRAPPER_DATA::general_speed, generatePrecalCoef(), _ZOOM_FILTER_FX_WRAPPER_DATA::hPlaneEffect, _ZOOM_FILTER_FX_WRAPPER_DATA::hypercosEffect, _ZOOM_FILTER_FX_WRAPPER_DATA::interlace_start, _ZOOM_FILTER_FX_WRAPPER_DATA::mustInitBuffers, _ZOOM_FILTER_FX_WRAPPER_DATA::noisify, _ZOOM_FILTER_FX_WRAPPER_DATA::params, _PARAMETERS::params, _VISUAL_FX::params, plugin_parameters, _ZOOM_FILTER_FX_WRAPPER_DATA::precalCoef, _ZOOM_FILTER_FX_WRAPPER_DATA::prevX, _ZOOM_FILTER_FX_WRAPPER_DATA::prevY, _ZOOM_FILTER_FX_WRAPPER_DATA::reverse, secure_b_param, _ZOOM_FILTER_FX_WRAPPER_DATA::theMode, _ZOOM_FILTER_FX_WRAPPER_DATA::vPlaneEffect, _ZOOM_FILTER_FX_WRAPPER_DATA::wave, _ZOOM_FILTER_FX_WRAPPER_DATA::waveEffect, and _ZOOM_FILTER_FX_WRAPPER_DATA::wavesp.
Referenced by zoomFilterVisualFXWrapper_create().
|
inlinestatic |
References AMULETTE_MODE, CRYSTAL_BALL_MODE, _ZOOM_FILTER_FX_WRAPPER_DATA::general_speed, _ZOOM_FILTER_FX_WRAPPER_DATA::hPlaneEffect, _ZOOM_FILTER_FX_WRAPPER_DATA::hypercosEffect, _ZOOM_FILTER_FX_WRAPPER_DATA::noisify, SCRUNCH_MODE, SPEEDWAY_MODE, _ZOOM_FILTER_FX_WRAPPER_DATA::theMode, _ZOOM_FILTER_FX_WRAPPER_DATA::vPlaneEffect, WAVE_MODE, v2g::x, and v2g::y.
Referenced by makeZoomBufferStripe().