MythTV master
Functions | Variables
filters.cpp File Reference
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include "filters.h"
#include "goom_tools.h"
#include "goomconfig.h"
#include "graphic.h"
#include "zoom_filters.h"
#include "libmythbase/mythconfig.h"
#include "libmythbase/mythrandom.h"
Include dependency graph for filters.cpp:

Go to the source code of this file.

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)
 
static int ShiftRight (int x, int s)
 
void generatePrecalCoef (void)
 
void calculatePXandPY (int x, int y, int *px, int *py)
 
void setPixelRGB (unsigned int *buffer, unsigned int x, unsigned int y, Color c)
 
void setPixelRGB_ (unsigned int *buffer, unsigned int x, Color c)
 
void getPixelRGB (const unsigned int *buffer, unsigned int x, unsigned int y, Color *c)
 
void getPixelRGB_ (const unsigned int *buffer, unsigned int x, Color *c)
 
void zoomFilterFastRGB (unsigned int *pix1, unsigned int *pix2, ZoomFilterData *zf, unsigned int resx, unsigned int resy, int switchIncr, float switchMult)
 
void pointFilter (unsigned int *pix1, Color c, float t1, float t2, float t3, float t4, unsigned int cycle)
 

Variables

static constexpr int8_t EFFECT_DISTORS { 4 }
 
static constexpr int8_t EFFECT_DISTORS_SL { 2 }
 
volatile uint32_t resolx
 
volatile uint32_t c_resoly
 
uint32_t mmx_zoom_size
 
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
 
uint32_t * expix1 = nullptr
 
uint32_t * expix2 = nullptr
 
uint32_t 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 = 1
 
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...
 

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 379 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ calculatePXandPY()

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

Definition at line 184 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ generatePrecalCoef()

void generatePrecalCoef ( void  )

Definition at line 138 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ getPixelRGB()

void getPixelRGB ( const unsigned int *  buffer,
unsigned int  x,
unsigned int  y,
Color c 
)
inline

Definition at line 334 of file filters.cpp.

◆ getPixelRGB_()

void getPixelRGB_ ( const unsigned int *  buffer,
unsigned int  x,
Color c 
)

Definition at line 352 of file filters.cpp.

Referenced by c_zoom().

◆ pointFilter()

void pointFilter ( unsigned int *  pix1,
Color  c,
float  t1,
float  t2,
float  t3,
float  t4,
unsigned int  cycle 
)

Definition at line 673 of file filters.cpp.

Referenced by goom_update().

◆ select_zoom_filter()

static void select_zoom_filter ( void  )
static

Definition at line 66 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ setPixelRGB()

void setPixelRGB ( unsigned int *  buffer,
unsigned int  x,
unsigned int  y,
Color  c 
)

Definition at line 303 of file filters.cpp.

Referenced by pointFilter().

◆ setPixelRGB_()

void setPixelRGB_ ( unsigned int *  buffer,
unsigned int  x,
Color  c 
)

Definition at line 319 of file filters.cpp.

Referenced by c_zoom().

◆ ShiftRight()

static int ShiftRight ( int  x,
int  s 
)
inlinestatic

Definition at line 124 of file filters.cpp.

Referenced by calculatePXandPY().

◆ zoomFilterFastRGB()

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

Definition at line 450 of file filters.cpp.

Referenced by goom_update().

Variable Documentation

◆ brutD

signed int* brutD = nullptr

Definition at line 82 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ brutS

signed int* brutS = nullptr

Definition at line 81 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ brutT

signed int* brutT = nullptr

Definition at line 83 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ BUFFPOINTMASK

constexpr int32_t BUFFPOINTMASK { 0xffff }
staticconstexpr

Definition at line 111 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ BUFFPOINTNB

constexpr uint8_t BUFFPOINTNB { 16 }
staticconstexpr

Definition at line 110 of file filters.cpp.

Referenced by c_zoom(), and zoomFilterFastRGB().

◆ buffratio

int buffratio = 0

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

Definition at line 108 of file filters.cpp.

Referenced by c_zoom(), and zoomFilterFastRGB().

◆ c_resoly

volatile uint32_t c_resoly
extern

◆ coeffs

unsigned int* coeffs = nullptr

Definition at line 79 of file filters.cpp.

◆ EFFECT_DISTORS

constexpr int8_t EFFECT_DISTORS { 4 }
staticconstexpr

Definition at line 30 of file filters.cpp.

Referenced by calculatePXandPY().

◆ EFFECT_DISTORS_SL

constexpr int8_t EFFECT_DISTORS_SL { 2 }
staticconstexpr

Definition at line 31 of file filters.cpp.

Referenced by calculatePXandPY().

◆ expix1

uint32_t* expix1 = nullptr

Definition at line 86 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ expix2

uint32_t* expix2 = nullptr

Definition at line 87 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ firedec

int* firedec = nullptr
static

Definition at line 120 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ freebrutD

signed int * freebrutD = nullptr

Definition at line 82 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ freebrutS

signed int * freebrutS = nullptr

Definition at line 81 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ freebrutT

signed int * freebrutT = nullptr

Definition at line 83 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ freecoeffs

unsigned int * freecoeffs = nullptr

Definition at line 79 of file filters.cpp.

◆ hPlaneEffect

int hPlaneEffect = 0
static

Definition at line 100 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ hypercosEffect

bool hypercosEffect = false
static

Definition at line 98 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ middleX

int middleX
static

Definition at line 102 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ middleY

int middleY
static

Definition at line 102 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ mmx_zoom_size

uint32_t mmx_zoom_size

Definition at line 77 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ noisify

char noisify = 1
static

Definition at line 101 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ PERTEDEC

constexpr uint8_t PERTEDEC { 4 }
staticconstexpr

Definition at line 118 of file filters.cpp.

Referenced by c_zoom().

◆ PERTEMASK

constexpr int8_t PERTEMASK { 0xf }
staticconstexpr

Definition at line 116 of file filters.cpp.

Referenced by c_zoom().

◆ precalCoef

GoomCoefficients precalCoef = {}

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

Definition at line 127 of file filters.cpp.

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

◆ prevX

unsigned int prevX = 0

Definition at line 92 of file filters.cpp.

Referenced by zoomFilterFastRGB().

◆ prevY

unsigned int prevY = 0

Definition at line 92 of file filters.cpp.

Referenced by FormattedTextSubtitle608::Layout(), and zoomFilterFastRGB().

◆ resolx

volatile uint32_t resolx
extern

Definition at line 58 of file goom_core.cpp.

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

◆ sintable

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

Definition at line 94 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ sqrtperte

constexpr int8_t sqrtperte { 16 }
staticconstexpr

Definition at line 114 of file filters.cpp.

Referenced by generatePrecalCoef(), and zoomFilterFastRGB().

◆ theMode

char theMode = AMULETTE_MODE
static

Definition at line 96 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ vitesse

int vitesse = 127
static

Definition at line 95 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ vPlaneEffect

int vPlaneEffect = 0
static

Definition at line 99 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ waveEffect

bool waveEffect = false
static

Definition at line 97 of file filters.cpp.

Referenced by calculatePXandPY(), and zoomFilterFastRGB().

◆ zoom_width

uint32_t zoom_width

Definition at line 90 of file filters.cpp.

Referenced by zoomFilterFastRGB().