aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-02-12 03:42:15 -0800
committerChris Robinson <[email protected]>2023-02-12 03:42:15 -0800
commit68e8f2fffbacf06a63c3f0c7a7d81fe70dbbb5a0 (patch)
treec4b5f6aeb1b140a283410a7718c8b0f4bed5dce5
parent63f840d31f09922ddef632f233342cbba46b09cf (diff)
The decoders don't need space for resampling
-rw-r--r--core/converter.cpp2
-rw-r--r--core/uhjfilter.h27
2 files changed, 13 insertions, 16 deletions
diff --git a/core/converter.cpp b/core/converter.cpp
index 132859f4..c69bada7 100644
--- a/core/converter.cpp
+++ b/core/converter.cpp
@@ -15,8 +15,6 @@
#include "alnumeric.h"
#include "fpu_ctrl.h"
-struct CTag;
-
namespace {
diff --git a/core/uhjfilter.h b/core/uhjfilter.h
index ebab14e5..c92dd61b 100644
--- a/core/uhjfilter.h
+++ b/core/uhjfilter.h
@@ -6,7 +6,6 @@
#include "almalloc.h"
#include "alspan.h"
#include "bufferline.h"
-#include "resampler_limits.h"
static constexpr size_t UhjLength256{256};
@@ -137,14 +136,14 @@ struct UhjDecoder final : public DecoderBase {
/* The number of extra sample frames needed for input. */
static constexpr size_t sInputPadding{N/2};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge+sInputPadding> mS{};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge+sInputPadding> mD{};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge+sInputPadding> mT{};
+ alignas(16) std::array<float,BufferLineSize+sInputPadding> mS{};
+ alignas(16) std::array<float,BufferLineSize+sInputPadding> mD{};
+ alignas(16) std::array<float,BufferLineSize+sInputPadding> mT{};
alignas(16) std::array<float,sInputPadding-1> mDTHistory{};
alignas(16) std::array<float,sInputPadding-1> mSHistory{};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge + sInputPadding*2> mTemp{};
+ alignas(16) std::array<float,BufferLineSize + sInputPadding*2> mTemp{};
/**
* Decodes a 3- or 4-channel UHJ signal into a B-Format signal with FuMa
@@ -168,9 +167,9 @@ struct UhjDecoderIIR final : public DecoderBase {
*/
static constexpr size_t sInputPadding{0};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge> mS{};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge> mD{};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge+1> mTemp{};
+ alignas(16) std::array<float,BufferLineSize> mS{};
+ alignas(16) std::array<float,BufferLineSize> mD{};
+ alignas(16) std::array<float,BufferLineSize+1> mTemp{};
float mDelayS{}, mDelayDT{}, mDelayQ{};
UhjAllPassFilter mFilter1S;
@@ -191,13 +190,13 @@ struct UhjStereoDecoder final : public DecoderBase {
float mCurrentWidth{-1.0f};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge+sInputPadding> mS{};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge+sInputPadding> mD{};
+ alignas(16) std::array<float,BufferLineSize+sInputPadding> mS{};
+ alignas(16) std::array<float,BufferLineSize+sInputPadding> mD{};
alignas(16) std::array<float,sInputPadding-1> mDTHistory{};
alignas(16) std::array<float,sInputPadding-1> mSHistory{};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge + sInputPadding*2> mTemp{};
+ alignas(16) std::array<float,BufferLineSize + sInputPadding*2> mTemp{};
/**
* Applies Super Stereo processing on a stereo signal to create a B-Format
@@ -216,9 +215,9 @@ struct UhjStereoDecoderIIR final : public DecoderBase {
float mCurrentWidth{-1.0f};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge> mS{};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge> mD{};
- alignas(16) std::array<float,BufferLineSize+MaxResamplerEdge+1> mTemp{};
+ alignas(16) std::array<float,BufferLineSize> mS{};
+ alignas(16) std::array<float,BufferLineSize> mD{};
+ alignas(16) std::array<float,BufferLineSize+1> mTemp{};
float mDelayS{}, mDelayD{};
UhjAllPassFilter mFilter1S;