Use a span to hold the cubic table reference
This commit is contained in:
parent
1564cfe48f
commit
eb5e48f133
@ -273,7 +273,7 @@ ResamplerFunc PrepareResampler(Resampler resampler, uint increment, InterpState
|
||||
case Resampler::Linear:
|
||||
break;
|
||||
case Resampler::Cubic:
|
||||
state->cubic.filter = gCubicSpline.Tab;
|
||||
state->cubic.filter = gCubicSpline.Tab.data();
|
||||
break;
|
||||
case Resampler::FastBSinc12:
|
||||
case Resampler::BSinc12:
|
||||
|
@ -49,7 +49,7 @@ struct SplineFilterArray {
|
||||
mTable[pi].mDeltas[3] = -mTable[pi].mCoeffs[3];
|
||||
}
|
||||
|
||||
constexpr const CubicCoefficients *getTable() const noexcept { return mTable; }
|
||||
constexpr auto getTable() const noexcept { return al::as_span(mTable); }
|
||||
};
|
||||
|
||||
constexpr SplineFilterArray SplineFilter{};
|
||||
|
@ -1,11 +1,12 @@
|
||||
#ifndef CORE_CUBIC_TABLES_H
|
||||
#define CORE_CUBIC_TABLES_H
|
||||
|
||||
#include "alspan.h"
|
||||
#include "cubic_defs.h"
|
||||
|
||||
|
||||
struct CubicTable {
|
||||
const CubicCoefficients *Tab;
|
||||
al::span<const CubicCoefficients,CubicPhaseCount> Tab;
|
||||
};
|
||||
|
||||
/* A Catmull-Rom spline. The spline passes through the center two samples,
|
||||
|
Loading…
Reference in New Issue
Block a user