mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
(SoftFilters) Fixed HQ2x
This commit is contained in:
parent
09bb2b4fae
commit
2b3624a864
@ -97,6 +97,8 @@ static softfilter_get_implementation_t softfilter_get_implementation_from_idx(un
|
||||
return darken_get_implementation;
|
||||
case SOFTFILTER_TWOXSAI:
|
||||
return twoxsai_get_implementation;
|
||||
case SOFTFILTER_HQ2X:
|
||||
return hq2x_get_implementation;
|
||||
case SOFTFILTER_SCALE2X:
|
||||
return scale2x_get_implementation;
|
||||
}
|
||||
|
@ -51,12 +51,14 @@ enum
|
||||
SOFTFILTER_NONE = 0,
|
||||
//SOFTFILTER_2XBR,
|
||||
SOFTFILTER_DARKEN,
|
||||
SOFTFILTER_HQ2X,
|
||||
SOFTFILTER_TWOXSAI,
|
||||
SOFTFILTER_SCALE2X,
|
||||
SOFTFILTER_LAST,
|
||||
};
|
||||
|
||||
#ifdef HAVE_FILTERS_BUILTIN
|
||||
const struct softfilter_implementation *hq2x_get_implementation(softfilter_simd_mask_t simd);
|
||||
const struct softfilter_implementation *twoxsai_get_implementation(softfilter_simd_mask_t simd);
|
||||
const struct softfilter_implementation *twoxbr_get_implementation(softfilter_simd_mask_t simd);
|
||||
const struct softfilter_implementation *darken_get_implementation(softfilter_simd_mask_t simd);
|
||||
|
@ -82,7 +82,7 @@ static void hq2x_generic_destroy(void *data)
|
||||
#define HQ2X_565_SHIFT (16)
|
||||
#define HQ2X_4444_SHIFT (16)
|
||||
|
||||
static uint32_t *yuvTable;
|
||||
static uint32_t yuvTable[32768];
|
||||
static uint8_t rotate[256];
|
||||
|
||||
const static uint8_t hqTable[256] = {
|
||||
@ -112,9 +112,6 @@ static void initialize(void)
|
||||
if (initialized)
|
||||
return;
|
||||
|
||||
if (posix_memalign((void**)&yuvTable, 16, 32768 * sizeof(uint32_t)))
|
||||
return;
|
||||
|
||||
for (i = 0; i < 32768; ++i)
|
||||
{
|
||||
const uint8_t R = (i >> 0) & 31;
|
||||
|
@ -480,6 +480,7 @@ FILTERS
|
||||
#include "../gfx/filters/2xsai.c"
|
||||
#include "../gfx/filters/2xbr.c"
|
||||
#include "../gfx/filters/darken.c"
|
||||
#include "../gfx/filters/hq2x.c"
|
||||
#include "../gfx/filters/scale2x.c"
|
||||
#endif
|
||||
/*============================================================
|
||||
|
Loading…
Reference in New Issue
Block a user