Classes | |
struct | ScalerCfg |
Enumerations | |
enum class | ColorFormat { RGB , ARGB , ARGB_UNBUFFERED } |
Functions | |
void | scale (size_t factor, const uint32_t *src, uint32_t *trg, int srcWidth, int srcHeight, ColorFormat colFmt, const ScalerCfg &cfg=ScalerCfg(), int yFirst=0, int yLast=std::numeric_limits< int >::max()) |
void | bilinearScale (const uint32_t *src, int srcWidth, int srcHeight, uint32_t *trg, int trgWidth, int trgHeight) |
void | nearestNeighborScale (const uint32_t *src, int srcWidth, int srcHeight, uint32_t *trg, int trgWidth, int trgHeight) |
bool | equalColorTest (uint32_t col1, uint32_t col2, ColorFormat colFmt, double luminanceWeight, double equalColorTolerance) |
template<uint32_t N> | |
unsigned char | getByte (uint32_t val) |
unsigned char | getAlpha (uint32_t pix) |
unsigned char | getRed (uint32_t pix) |
unsigned char | getGreen (uint32_t pix) |
unsigned char | getBlue (uint32_t pix) |
uint32_t | makePixel (unsigned char a, unsigned char r, unsigned char g, unsigned char b) |
uint32_t | makePixel (unsigned char r, unsigned char g, unsigned char b) |
uint32_t | rgb555to888 (uint16_t pix) |
uint32_t | rgb565to888 (uint16_t pix) |
uint16_t | rgb888to555 (uint32_t pix) |
uint16_t | rgb888to565 (uint32_t pix) |
template<class Pix > | |
Pix * | byteAdvance (Pix *ptr, int bytes) |
template<class Pix > | |
void | fillBlock (Pix *trg, int pitch, Pix col, int blockWidth, int blockHeight) |
template<class PixSrc , class PixTrg , class PixConverter > | |
void | nearestNeighborScale (const PixSrc *src, int srcWidth, int srcHeight, int srcPitch, PixTrg *trg, int trgWidth, int trgHeight, int trgPitch, int yFirst, int yLast, PixConverter pixCvrt) |
template<class PixSrc , class PixTrg , class PixConverter > | |
void | nearestNeighborScaleOverSource (const PixSrc *src, int srcWidth, int srcHeight, int srcPitch, PixTrg *trg, int trgWidth, int trgHeight, int trgPitch, int yFirst, int yLast, PixConverter pixCvrt) |
template<class PixTrg , class PixConverter > | |
void | bilinearScale (const uint32_t *src, int srcWidth, int srcHeight, int srcPitch, PixTrg *trg, int trgWidth, int trgHeight, int trgPitch, int yFirst, int yLast, PixConverter pixCvrt) |
Variables | |
const int | SCALE_FACTOR_MAX = 6 |
|
strong |
void xbrz::bilinearScale | ( | const uint32_t * | src, |
int | srcWidth, | ||
int | srcHeight, | ||
int | srcPitch, | ||
PixTrg * | trg, | ||
int | trgWidth, | ||
int | trgHeight, | ||
int | trgPitch, | ||
int | yFirst, | ||
int | yLast, | ||
PixConverter | pixCvrt | ||
) |
Definition at line 164 of file xbrz_tools.hpp.
References b, byteAdvance(), g, and src.
void xbrz::bilinearScale | ( | const uint32_t * | src, |
int | srcWidth, | ||
int | srcHeight, | ||
uint32_t * | trg, | ||
int | trgWidth, | ||
int | trgHeight | ||
) |
|
inline |
Definition at line 46 of file xbrz_tools.hpp.
Referenced by bilinearScale(), fillBlock(), nearestNeighborScale(), and nearestNeighborScaleOverSource().
bool xbrz::equalColorTest | ( | uint32_t | col1, |
uint32_t | col2, | ||
ColorFormat | colFmt, | ||
double | luminanceWeight, | ||
double | equalColorTolerance | ||
) |
Definition at line 1233 of file xbrz.cpp.
References ARGB, ARGB_UNBUFFERED, and RGB.
|
inline |
Definition at line 59 of file xbrz_tools.hpp.
References byteAdvance().
Referenced by nearestNeighborScaleOverSource().
|
inline |
Definition at line 30 of file xbrz_tools.hpp.
|
inline |
Definition at line 33 of file xbrz_tools.hpp.
|
inline |
Definition at line 28 of file xbrz_tools.hpp.
|
inline |
Definition at line 32 of file xbrz_tools.hpp.
|
inline |
Definition at line 31 of file xbrz_tools.hpp.
|
inline |
Definition at line 35 of file xbrz_tools.hpp.
|
inline |
Definition at line 36 of file xbrz_tools.hpp.
void xbrz::nearestNeighborScale | ( | const PixSrc * | src, |
int | srcWidth, | ||
int | srcHeight, | ||
int | srcPitch, | ||
PixTrg * | trg, | ||
int | trgWidth, | ||
int | trgHeight, | ||
int | trgPitch, | ||
int | yFirst, | ||
int | yLast, | ||
PixConverter | pixCvrt | ||
) |
Definition at line 72 of file xbrz_tools.hpp.
References byteAdvance(), and src.
void xbrz::nearestNeighborScale | ( | const uint32_t * | src, |
int | srcWidth, | ||
int | srcHeight, | ||
uint32_t * | trg, | ||
int | trgWidth, | ||
int | trgHeight | ||
) |
void xbrz::nearestNeighborScaleOverSource | ( | const PixSrc * | src, |
int | srcWidth, | ||
int | srcHeight, | ||
int | srcPitch, | ||
PixTrg * | trg, | ||
int | trgWidth, | ||
int | trgHeight, | ||
int | trgPitch, | ||
int | yFirst, | ||
int | yLast, | ||
PixConverter | pixCvrt | ||
) |
Definition at line 109 of file xbrz_tools.hpp.
References byteAdvance(), fillBlock(), and src.
|
inline |
Definition at line 38 of file xbrz_tools.hpp.
|
inline |
Definition at line 39 of file xbrz_tools.hpp.
|
inline |
Definition at line 41 of file xbrz_tools.hpp.
|
inline |
Definition at line 42 of file xbrz_tools.hpp.
void xbrz::scale | ( | size_t | factor, |
const uint32_t * | src, | ||
uint32_t * | trg, | ||
int | srcWidth, | ||
int | srcHeight, | ||
ColorFormat | colFmt, | ||
const ScalerCfg & | cfg = ScalerCfg() , |
||
int | yFirst = 0 , |
||
int | yLast = std::numeric_limits<int>::max() |
||
) |
Definition at line 1170 of file xbrz.cpp.
References ARGB, ARGB_UNBUFFERED, RGB, SCALE_FACTOR_MAX, and src.
Referenced by video::draw_offset(), image::prep_minimap_for_rendering(), rotate_any_surface(), scale_surface_xbrz(), prefs::set_font_scaling(), prefs::set_pixel_scale(), shadow_image(), and video::update_framebuffer().
const int xbrz::SCALE_FACTOR_MAX = 6 |
Definition at line 50 of file xbrz.hpp.
Referenced by scale(), and scale_surface_xbrz().