From 440ce71dcedb39e827660d0925b6cc2046c6d0f0 Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat@gmail.com>
Date: Sat, 24 Apr 2021 13:46:52 -0700
Subject: Move GetHFOrderScales to a more appropriate place

---
 alc/bformatdec.cpp | 33 ---------------------------------
 1 file changed, 33 deletions(-)

(limited to 'alc/bformatdec.cpp')

diff --git a/alc/bformatdec.cpp b/alc/bformatdec.cpp
index 9b2d9049..36b8d50e 100644
--- a/alc/bformatdec.cpp
+++ b/alc/bformatdec.cpp
@@ -21,23 +21,6 @@
 
 namespace {
 
-constexpr std::array<float,MaxAmbiOrder+1> Ambi3DDecoderHFScale{{
-    1.00000000e+00f, 1.00000000e+00f
-}};
-constexpr std::array<float,MaxAmbiOrder+1> Ambi3DDecoderHFScale2O{{
-    7.45355990e-01f, 1.00000000e+00f, 1.00000000e+00f
-}};
-constexpr std::array<float,MaxAmbiOrder+1> Ambi3DDecoderHFScale3O{{
-    5.89792205e-01f, 8.79693856e-01f, 1.00000000e+00f, 1.00000000e+00f
-}};
-
-inline auto& GetDecoderHFScales(uint order) noexcept
-{
-    if(order >= 3) return Ambi3DDecoderHFScale3O;
-    if(order == 2) return Ambi3DDecoderHFScale2O;
-    return Ambi3DDecoderHFScale;
-}
-
 inline auto& GetAmbiScales(AmbDecScale scaletype) noexcept
 {
     if(scaletype == AmbDecScale::FuMa) return AmbiScale::FromFuMa();
@@ -266,22 +249,6 @@ void BFormatDec::processStablize(const al::span<FloatBufferLine> OutBuffer,
 }
 
 
-auto BFormatDec::GetHFOrderScales(const uint in_order, const uint out_order) noexcept
-    -> std::array<float,MaxAmbiOrder+1>
-{
-    std::array<float,MaxAmbiOrder+1> ret{};
-
-    assert(out_order >= in_order);
-
-    const auto &target = GetDecoderHFScales(out_order);
-    const auto &input = GetDecoderHFScales(in_order);
-
-    for(size_t i{0};i < in_order+1;++i)
-        ret[i] = input[i] / target[i];
-
-    return ret;
-}
-
 std::unique_ptr<BFormatDec> BFormatDec::Create(const AmbDecConf *conf, const bool allow_2band,
     const size_t inchans, const uint srate, const uint (&chanmap)[MAX_OUTPUT_CHANNELS],
     std::unique_ptr<FrontStablizer> stablizer)
-- 
cgit v1.2.3