11 constexpr std::array
<float,MaxAmbiOrder
+1> Ambi3DDecoderHFScale
{{
12 1.00000000e+00f
, 1.00000000e+00f
14 constexpr std::array
<float,MaxAmbiOrder
+1> Ambi3DDecoderHFScale2O
{{
15 7.45355990e-01f
, 1.00000000e+00f
, 1.00000000e+00f
17 constexpr std::array
<float,MaxAmbiOrder
+1> Ambi3DDecoderHFScale3O
{{
18 5.89792205e-01f
, 8.79693856e-01f
, 1.00000000e+00f
, 1.00000000e+00f
21 inline auto& GetDecoderHFScales(uint order
) noexcept
23 if(order
>= 3) return Ambi3DDecoderHFScale3O
;
24 if(order
== 2) return Ambi3DDecoderHFScale2O
;
25 return Ambi3DDecoderHFScale
;
30 auto AmbiScale::GetHFOrderScales(const uint in_order
, const uint out_order
) noexcept
31 -> std::array
<float,MaxAmbiOrder
+1>
33 std::array
<float,MaxAmbiOrder
+1> ret
{};
35 assert(out_order
>= in_order
);
37 const auto &target
= GetDecoderHFScales(out_order
);
38 const auto &input
= GetDecoderHFScales(in_order
);
40 for(size_t i
{0};i
< in_order
+1;++i
)
41 ret
[i
] = input
[i
] / target
[i
];