MythTV  master
Macros | Functions | Variables
filters.cpp File Reference
#include <array>
#include <cinttypes>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include "filters.h"
#include "goom_tools.h"
#include "graphic.h"
#include "visualisations/goom/zoom_filters.h"
#include "altivec.h"
Include dependency graph for filters.cpp:

Go to the source code of this file.

Macros

#define USE_ASM
 
#define USE_ASM
 

Functions

void c_zoom (unsigned int *expix1, unsigned int *expix2, unsigned int prevX, unsigned int prevY, const signed int *brutS, const signed int *brutD)
 
static void select_zoom_filter (void)
 
const void ppc_zoom (unsigned int *frompixmap, unsigned int *topixmap, unsigned int sizex, unsigned int sizey, unsigned int *brutS, unsigned int *brutD, unsigned int buffratio, GoomCoefficients &precalCoef)
 
static int ShiftRight (int x, int s)
 
void generatePrecalCoef (void)
 
void calculatePXandPY (int x, int y, int *px, int *py)
 
void setPixelRGB (Uint *buffer, Uint x, Uint y, Color c)
 
void setPixelRGB_ (Uint *buffer, Uint x, Color c)
 
void getPixelRGB (const Uint *buffer, Uint x, Uint y, Color *c)
 
void getPixelRGB_ (const Uint *buffer, Uint x, Color *c)
 
void setAsmUse (int useIt)
 
int getAsmUse (void)
 
void zoomFilterFastRGB (Uint *pix1, Uint *pix2, ZoomFilterData *zf, Uint resx, Uint resy, int switchIncr, float switchMult)
 
void pointFilter (Uint *pix1, Color c, float t1, float t2, float t3, float t4, Uint cycle)
 

Variables

static constexpr int8_t EFFECT_DISTORS { 4 }
 
static constexpr int8_t EFFECT_DISTORS_SL { 2 }
 
volatile guint32 resolx
 
volatile guint32 c_resoly
 
static int zf_use_xmmx = 0
 
static int zf_use_mmx = 0
 
guint32 mmx_zoom_size
 
unsigned int useAltivec
 
unsigned int * coeffs = nullptr
 
unsigned int * freecoeffs = nullptr
 
signed int * brutS = nullptr
 
signed int * freebrutS = nullptr
 
signed int * brutD = nullptr
 
signed int * freebrutD = nullptr
 
signed int * brutT = nullptr
 
signed int * freebrutT = nullptr
 
guint32expix1 = nullptr
 
guint32expix2 = nullptr
 
guint32 zoom_width
 
unsigned int prevX = 0
 
unsigned int prevY = 0
 
static std::array< int, 0x10000 > sintable
 
static int vitesse = 127
 
static char theMode = AMULETTE_MODE
 
static bool waveEffect = false
 
static bool hypercosEffect = false
 
static int vPlaneEffect = 0
 
static int hPlaneEffect = 0
 
static char noisify = 2
 
static int middleX
 
static int middleY
 
int buffratio = 0
 modif by jeko : fixedpoint : buffration = (16:16) (donc 0<=buffration<=2^16) More...
 
static constexpr uint8_t BUFFPOINTNB { 16 }
 
static constexpr int32_t BUFFPOINTMASK { 0xffff }
 
static constexpr int8_t sqrtperte { 16 }
 
static constexpr int8_t PERTEMASK { 0xf }
 
static constexpr uint8_t PERTEDEC { 4 }
 
static int * firedec = nullptr
 
GoomCoefficients precalCoef = {}
 modif d'optim by Jeko : precalcul des 4 coefs r├ęsultant des 2 pos More...
 
static int use_asm = 1
 

Macro Definition Documentation

◆ USE_ASM [1/2]

#define USE_ASM

Definition at line 30 of file filters.cpp.

◆ USE_ASM [2/2]

#define USE_ASM

Definition at line 30 of file filters.cpp.

Function Documentation

◆ c_zoom()

void c_zoom ( unsigned int *  expix1,
unsigned int *  expix2,
unsigned int  prevX,
unsigned int  prevY,
const signed int *  brutS,
const signed int *  brutD 
)

Definition at line 402 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ select_zoom_filter()

static void select_zoom_filter ( void  )
static

Definition at line 49 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ ppc_zoom()

const void ppc_zoom ( unsigned int *  frompixmap,
unsigned int *  topixmap,
unsigned int  sizex,
unsigned int  sizey,
unsigned int *  brutS,
unsigned int *  brutD,
unsigned int  buffratio,
GoomCoefficients precalCoef 
)

Referenced by zoomFilterFastRGB().

◆ ShiftRight()

static int ShiftRight ( int  x,
int  s 
)
inlinestatic

Definition at line 142 of file filters.cpp.

Referenced by calculatePXandPY().

◆ generatePrecalCoef()

void generatePrecalCoef ( void  )

Definition at line 156 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ calculatePXandPY()

void calculatePXandPY ( int  x,
int  y,
int *  px,
int *  py 
)

Definition at line 202 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ setPixelRGB()

void setPixelRGB ( Uint buffer,
Uint  x,
Uint  y,
Color  c 
)

Definition at line 326 of file filters.cpp.

Referenced by pointFilter().

◆ setPixelRGB_()

void setPixelRGB_ ( Uint buffer,
Uint  x,
Color  c 
)

Definition at line 342 of file filters.cpp.

Referenced by c_zoom().

◆ getPixelRGB()

void getPixelRGB ( const Uint buffer,
Uint  x,
Uint  y,
Color c 
)
inline

Definition at line 357 of file filters.cpp.

◆ getPixelRGB_()

void getPixelRGB_ ( const Uint buffer,
Uint  x,
Color c 
)

Definition at line 375 of file filters.cpp.

Referenced by c_zoom().

◆ setAsmUse()

void setAsmUse ( int  useIt)

Definition at line 479 of file filters.cpp.

◆ getAsmUse()

int getAsmUse ( void  )

Definition at line 485 of file filters.cpp.

◆ zoomFilterFastRGB()

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

Definition at line 493 of file filters.cpp.

Referenced by goom_update().

◆ pointFilter()

void pointFilter ( Uint pix1,
Color  c,
float  t1,
float  t2,
float  t3,
float  t4,
Uint  cycle 
)

Definition at line 725 of file filters.cpp.

Referenced by goom_update().

Variable Documentation

◆ EFFECT_DISTORS

constexpr int8_t EFFECT_DISTORS { 4 }
staticconstexpr

Definition at line 33 of file filters.cpp.

Referenced by calculatePXandPY().

◆ EFFECT_DISTORS_SL

constexpr int8_t EFFECT_DISTORS_SL { 2 }
staticconstexpr

Definition at line 34 of file filters.cpp.

Referenced by calculatePXandPY().

◆ resolx

volatile guint32 resolx

Definition at line 56 of file goom_core.cpp.

Referenced by getPixelRGB(), getPixelRGB_(), pointFilter(), setPixelRGB(), and setPixelRGB_().

◆ c_resoly

volatile guint32 c_resoly

◆ zf_use_xmmx

int zf_use_xmmx = 0
static

Definition at line 46 of file filters.cpp.

Referenced by select_zoom_filter(), and zoomFilterFastRGB().

◆ zf_use_mmx

int zf_use_mmx = 0
static

Definition at line 47 of file filters.cpp.

Referenced by select_zoom_filter(), and zoomFilterFastRGB().

◆ mmx_zoom_size

guint32 mmx_zoom_size

Definition at line 80 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ useAltivec

unsigned int useAltivec

◆ coeffs

unsigned int* coeffs = nullptr

Definition at line 97 of file filters.cpp.

Referenced by zoom_filter_mmx().

◆ freecoeffs

unsigned int * freecoeffs = nullptr

Definition at line 97 of file filters.cpp.

◆ brutS

signed int* brutS = nullptr

Definition at line 99 of file filters.cpp.

Referenced by zoom_filter_mmx(), zoom_filter_xmmx(), and zoomFilterFastRGB().

◆ freebrutS

signed int * freebrutS = nullptr

Definition at line 99 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ brutD

signed int* brutD = nullptr

Definition at line 100 of file filters.cpp.

Referenced by zoom_filter_mmx(), zoom_filter_xmmx(), and zoomFilterFastRGB().

◆ freebrutD

signed int * freebrutD = nullptr

Definition at line 100 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ brutT

signed int* brutT = nullptr

Definition at line 101 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ freebrutT

signed int * freebrutT = nullptr

Definition at line 101 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ expix1

guint32* expix1 = nullptr

Definition at line 104 of file filters.cpp.

Referenced by zoom_filter_mmx(), zoom_filter_xmmx(), and zoomFilterFastRGB().

◆ expix2

guint32* expix2 = nullptr

Definition at line 105 of file filters.cpp.

Referenced by zoom_filter_mmx(), zoom_filter_xmmx(), and zoomFilterFastRGB().

◆ zoom_width

guint32 zoom_width

Definition at line 108 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ prevX

unsigned int prevX = 0

Definition at line 110 of file filters.cpp.

Referenced by zoom_filter_mmx(), zoom_filter_xmmx(), and zoomFilterFastRGB().

◆ prevY

unsigned int prevY = 0

◆ sintable

std::array<int,0x10000> sintable
static

Definition at line 112 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ vitesse

int vitesse = 127
static

Definition at line 113 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ theMode

char theMode = AMULETTE_MODE
static

Definition at line 114 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ waveEffect

bool waveEffect = false
static

Definition at line 115 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ hypercosEffect

bool hypercosEffect = false
static

Definition at line 116 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ vPlaneEffect

int vPlaneEffect = 0
static

Definition at line 117 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ hPlaneEffect

int hPlaneEffect = 0
static

Definition at line 118 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ noisify

char noisify = 2
static

Definition at line 119 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ middleX

int middleX
static

Definition at line 120 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ middleY

int middleY
static

Definition at line 120 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ buffratio

int buffratio = 0

modif by jeko : fixedpoint : buffration = (16:16) (donc 0<=buffration<=2^16)

Definition at line 126 of file filters.cpp.

Referenced by c_zoom(), zoom_filter_mmx(), zoom_filter_xmmx(), and zoomFilterFastRGB().

◆ BUFFPOINTNB

constexpr uint8_t BUFFPOINTNB { 16 }
staticconstexpr

Definition at line 128 of file filters.cpp.

Referenced by c_zoom(), and zoomFilterFastRGB().

◆ BUFFPOINTMASK

constexpr int32_t BUFFPOINTMASK { 0xffff }
staticconstexpr

Definition at line 129 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ sqrtperte

constexpr int8_t sqrtperte { 16 }
staticconstexpr

Definition at line 132 of file filters.cpp.

Referenced by generatePrecalCoef(), and zoomFilterFastRGB().

◆ PERTEMASK

constexpr int8_t PERTEMASK { 0xf }
staticconstexpr

Definition at line 134 of file filters.cpp.

Referenced by c_zoom().

◆ PERTEDEC

constexpr uint8_t PERTEDEC { 4 }
staticconstexpr

Definition at line 136 of file filters.cpp.

Referenced by c_zoom().

◆ firedec

int* firedec = nullptr
static

Definition at line 138 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ precalCoef

GoomCoefficients precalCoef = {}

modif d'optim by Jeko : precalcul des 4 coefs r├ęsultant des 2 pos

Definition at line 145 of file filters.cpp.

Referenced by c_zoom(), generatePrecalCoef(), zoom_filter_mmx(), zoom_filter_xmmx(), and zoomFilterFastRGB().

◆ use_asm

int use_asm = 1
static

Definition at line 477 of file filters.cpp.

Referenced by getAsmUse(), and setAsmUse().