mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-11-15 18:50:32 +01:00
SPU2: Optimize reverb downsampling.
Skip multiplying the 0's
This commit is contained in:
1 parent
599d25c59b
commit
458f22d214
1 file changed
+5
-1
@@ -96,11 +96,15 @@ s32 __forceinline V_Core::ReverbDownsample(bool right)
|
||||
{
|
||||
s32 out = 0;
|
||||
|
||||
for (u32 i = 0; i < NUM_TAPS; i++)
|
||||
// Skipping the 0 coefs.
|
||||
for (u32 i = 0; i < NUM_TAPS; i += 2)
|
||||
{
|
||||
out += RevbDownBuf[right][((RevbSampleBufPos - NUM_TAPS) + i) & 63] * filter_coefs[i];
|
||||
}
|
||||
|
||||
// We also skipped the middle so add that in.
|
||||
out += RevbDownBuf[right][((RevbSampleBufPos - NUM_TAPS) + 19) & 63] * filter_coefs[19];
|
||||
|
||||
out >>= 15;
|
||||
Clampify(out, INT16_MIN, INT16_MAX);
|
||||
|
||||
|
||||
Reference in new issue
Block a user