mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
Add some basic SINC profiles.
This commit is contained in:
parent
a145e4f451
commit
b2226de89d
@ -53,7 +53,9 @@ static inline float hermite_kernel(float mu1, float a, float b, float c, float d
|
|||||||
|
|
||||||
rarch_resampler_t *resampler_new(void)
|
rarch_resampler_t *resampler_new(void)
|
||||||
{
|
{
|
||||||
|
#ifndef RESAMPLER_TEST
|
||||||
RARCH_LOG("Hermite resampler [C]\n");
|
RARCH_LOG("Hermite resampler [C]\n");
|
||||||
|
#endif
|
||||||
return (rarch_resampler_t*)calloc(1, sizeof(rarch_resampler_t));
|
return (rarch_resampler_t*)calloc(1, sizeof(rarch_resampler_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
17
audio/sinc.c
17
audio/sinc.c
@ -33,21 +33,32 @@
|
|||||||
#include <xmmintrin.h>
|
#include <xmmintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SINC_LOWER_QUALITY
|
||||||
|
#define PHASE_BITS 12
|
||||||
|
#define SIDELOBES 4
|
||||||
|
#define ENABLE_AVX 0
|
||||||
|
#elif defined(SINC_HIGHER_QUALITY)
|
||||||
|
#define PHASE_BITS 16
|
||||||
|
#define SIDELOBES 32
|
||||||
|
#define ENABLE_AVX 1
|
||||||
|
#else
|
||||||
|
#define PHASE_BITS 16
|
||||||
|
#define SIDELOBES 8
|
||||||
|
#define ENABLE_AVX 0
|
||||||
|
#endif
|
||||||
|
|
||||||
// For the little amount of taps we're using,
|
// For the little amount of taps we're using,
|
||||||
// SSE1 is faster than AVX for some reason.
|
// SSE1 is faster than AVX for some reason.
|
||||||
// AVX code is kept here though as by increasing number
|
// AVX code is kept here though as by increasing number
|
||||||
// of sinc taps, the AVX code is clearly faster than SSE1.
|
// of sinc taps, the AVX code is clearly faster than SSE1.
|
||||||
#define ENABLE_AVX 0
|
|
||||||
|
|
||||||
#if defined(__AVX__) && ENABLE_AVX
|
#if defined(__AVX__) && ENABLE_AVX
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PHASE_BITS 16
|
|
||||||
#define SUBPHASE_BITS 10
|
#define SUBPHASE_BITS 10
|
||||||
#define PHASES (1 << (PHASE_BITS + SUBPHASE_BITS))
|
#define PHASES (1 << (PHASE_BITS + SUBPHASE_BITS))
|
||||||
|
|
||||||
#define SIDELOBES 8
|
|
||||||
#define TAPS (SIDELOBES * 2)
|
#define TAPS (SIDELOBES * 2)
|
||||||
#define CUTOFF 0.98
|
#define CUTOFF 0.98
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user