26 #include <edsp/spectral/internal/fft_impl.hpp> 28 namespace edsp {
inline namespace spectral {
43 template <
typename InputIt,
typename OutputIt>
44 inline void dct(InputIt first, InputIt last, OutputIt d_first) {
46 static_cast<typename fft_impl<meta::value_type_t<InputIt>
>::size_type>(
std::distance(first, last));
47 fft_impl<meta::value_type_t<InputIt>> plan(nfft);
48 plan.dct(&(*first), &(*d_first));
66 template <
typename InputIt,
typename OutputIt>
67 inline void idct(InputIt first, InputIt last, OutputIt d_first) {
69 static_cast<typename fft_impl<meta::value_type_t<InputIt>
>::size_type>(
std::distance(first, last));
70 fft_impl<meta::value_type_t<InputIt>> plan(nfft);
71 plan.idct(&(*first), &(*d_first));
72 plan.idct_scale(&(*d_first));
77 #endif // EDSP_DCT_HPP constexpr T distance(T x, T y) noexcept
Computes the distance between x and y.
Definition: numeric.hpp:328
void dct(InputIt first, InputIt last, OutputIt d_first)
Computes the Discrete-Cosine-Transform of the range [first, last) and stores the result in another ra...
Definition: dct.hpp:44
void idct(InputIt first, InputIt last, OutputIt d_first)
Computes the Inverse-Discrete-Cosine-Transform of the range [first, last) and stores the result in an...
Definition: dct.hpp:67
Definition: amplifier.hpp:29