mirror of
https://github.com/microsoft/DirectXMath
synced 2024-11-21 20:00:12 +00:00
Added xdsp content
parent
8eb192937b
commit
488eb49b02
19
Deinterleave.md
Normal file
19
Deinterleave.md
Normal file
@ -0,0 +1,19 @@
|
||||
Deinterleaves audio samples such that all samples corresponding to a given channel are contiguous.
|
||||
|
||||
void Deinterleave(XMVECTOR* pOutput, const XMVECTOR* pInput,
|
||||
const size_t uChannelCount, const size_t uFrameCount);
|
||||
# Parameters
|
||||
## pOutput
|
||||
[out] Caller-provided array of XVECTOR elements that receives the samples in deinterleaved form. It cannot overlap pInput and it must have at least (uChannelCount × uFrameCount) ÷ 4 elements.
|
||||
|
||||
## pInput
|
||||
[in] Caller-provided array of XVECTOR elements that supplies audio samples in interleaved form. It cannot overlap pOutput and it must have at least (uChannelCount × uFrameCount) ÷ 4 elements.
|
||||
|
||||
## uChannelCount
|
||||
[in] The number of channels contained in the data. uChannelCount must be greater than 1.
|
||||
|
||||
## uFrameCount
|
||||
[in] The number of frames of valid data. uFrameCount must be greater than 0.
|
||||
|
||||
# Remarks
|
||||
For example, audio of the form [LRLRLR] becomes [LLLRRR].
|
27
FFT.md
Normal file
27
FFT.md
Normal file
@ -0,0 +1,27 @@
|
||||
Fast Fourier Transform with an arbitrary number of samples.
|
||||
|
||||
void FFT(XMVECTOR* pReal, XMVECTOR* pImaginary,
|
||||
const XMVECTOR* pUnityTable,
|
||||
const size_t uLength, const size_t uCount=1);
|
||||
# Parameters
|
||||
|
||||
## pReal
|
||||
[in, out] Real components of the FFT. Must have as least (uLength × uCount) ÷ 4 elements.
|
||||
|
||||
## pImaginary
|
||||
[in, out] Imaginary components of the FFT. Must have at least (uLength × uCount) ÷ 4 elements.
|
||||
|
||||
## pUnityTable
|
||||
[in] Unity table the FFT should use. Must have at least uLength × uCount XVECTORs. See [[FFTInitializeUnityTable]] for more information.
|
||||
|
||||
## uLength
|
||||
[in] FFT length in samples. uLength must be a power of two and must be greater than 16.
|
||||
|
||||
## uCount
|
||||
[in] Number of FFT iterations.
|
||||
|
||||
# Remarks
|
||||
For FFTs with a number of samples less than or equal to 16 use [[FFT16]], [[FFT8]] or [[FFT4]].
|
||||
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
||||
|
16
FFT16.md
Normal file
16
FFT16.md
Normal file
@ -0,0 +1,16 @@
|
||||
Fast Fourier Transform with sixteen samples.
|
||||
|
||||
void FFT16(XMVECTOR* pReal, XMVECTOR* pImaginary, const size_t uCount=1);
|
||||
# Parameters
|
||||
## pReal
|
||||
[in, out] Real components of the FFT. Must have as least uCount × 4 elements.
|
||||
|
||||
## pImaginary
|
||||
[in, out] Imaginary components of the FFT. Must have at least uCount × 4 elements.
|
||||
|
||||
## uCount
|
||||
[in] Number of FFT iterations.
|
||||
|
||||
# Remarks
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
||||
|
17
FFT4.md
Normal file
17
FFT4.md
Normal file
@ -0,0 +1,17 @@
|
||||
Fast Fourier Transform with four samples.
|
||||
|
||||
void FFT4(XMVECTOR* pReal, XMVECTOR* pImaginary, const size_t uCount=1);
|
||||
|
||||
# Parameters
|
||||
## pReal
|
||||
[in, out] Real components of the FFT. Must have as least uCount elements.
|
||||
|
||||
## pImaginary
|
||||
[in, out] Imaginary components of the FFT. Must have at least uCount elements.
|
||||
|
||||
## uCount
|
||||
[in] Number of FFT iterations.
|
||||
|
||||
# Remarks
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
||||
|
15
FFT8.md
Normal file
15
FFT8.md
Normal file
@ -0,0 +1,15 @@
|
||||
Fast Fourier Transform with eight samples.
|
||||
|
||||
void FFT8 (XMVECTOR* pReal, XMVECTOR* pImaginary, const size_t uCount=1);
|
||||
# Parameters
|
||||
## pReal
|
||||
[in, out] Real components of the FFT. Must have as least uCount × 2 elements.
|
||||
|
||||
## pImaginary
|
||||
[in, out] Imaginary components of the FFT. Must have at least uCount × 2 elements.
|
||||
|
||||
## uCount
|
||||
[in] Number of FFT iterations.
|
||||
|
||||
# Remarks
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
16
FFTInitializeUnityTable.md
Normal file
16
FFTInitializeUnityTable.md
Normal file
@ -0,0 +1,16 @@
|
||||
Initializes unity roots lookup table used by Fast Fourier Transform functions.
|
||||
|
||||
void FFTInitializeUnityTable(XMVECTOR* pUnityTable, size_t uLength);
|
||||
# Parameters
|
||||
## pUnityTable
|
||||
[out] Caller-provided array of XVECTOR elements that will be populated with the unity table values. The array passed to pUnityTable must be at least uLength elements long.
|
||||
|
||||
## uLength
|
||||
[in] The FFT length in frames (sample count / channel count). uLength must be a power of two and must be greater than 16.
|
||||
|
||||
# Remarks
|
||||
Once initialized, the table does not need to be initialized again unless you want a different FFT length.
|
||||
|
||||
Unity tables for FFT lengths of 16 and below are hard coded into the respective [[FFT]] functions ([[FFT16]], [[FFT8]], and [[FFT4]]). They do not need to be initialized.
|
||||
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
23
FFTInterleaved.md
Normal file
23
FFTInterleaved.md
Normal file
@ -0,0 +1,23 @@
|
||||
This function applies a 2N-sample Fast Fourier Transform, and unswizzles the result such that the samples are in order of increasing frequency. Audio is first deinterleaved if it is multichannel.
|
||||
|
||||
void FFTInterleaved(XMVECTOR* pReal, XMVECTOR* pImaginary,
|
||||
const XMVECTOR* pUnityTable,
|
||||
const size_t uChannelCount, const size_t uLog2Length);
|
||||
# Parameters
|
||||
## pReal
|
||||
[in, out] Real components of the FFT. Must have as least (1 << uLog2Length × uChannelCount) ÷ 4 elements.
|
||||
|
||||
## pImaginary
|
||||
[out] Imaginary components of the FFT. Must have at least (1 << uLog2Length × uChannelCount) ÷ 4 elements.
|
||||
|
||||
## pUnityTable
|
||||
[in] Unity table the FFT should use. Must have at least (1 << uLog2Length) elements. See [[FFTInitializeUnityTable]] for more information.
|
||||
|
||||
## uChannelCount
|
||||
[in] Number of channels in the FFT. uChannelCount must be within [1,6].
|
||||
|
||||
## uLog2Length
|
||||
[in] Log (base 2) of FFT length in frames. uLog2Length must be within [2, 9].
|
||||
|
||||
# Remarks
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
21
FFTPolar.md
Normal file
21
FFTPolar.md
Normal file
@ -0,0 +1,21 @@
|
||||
Converts complex components to polar form.
|
||||
|
||||
void FFTPolar(XMVECTOR* pOutput,
|
||||
const XMVECTOR* pInputReal, const XMVECTOR* pInputImaginary,
|
||||
const size_t uLength);
|
||||
# Parameters
|
||||
## pOutput
|
||||
[out] Caller supplied output buffer to receive samples in polar form. pOutput must have at least uLength ÷ 4 elements.
|
||||
|
||||
## pInputReal
|
||||
[in] Input buffer containing the real components of a Fast Fourier Transform. pInputReal must have at least uLength ÷ 4 elements.
|
||||
|
||||
## pInputImaginary
|
||||
[in] Input buffer containing the imaginary components of an FFT. pInputImaginary must have at least uLength ÷ 4 elements.
|
||||
|
||||
## uLength
|
||||
[in] FFT length in samples. uLength must be a power of 2 greater than or equal to 4.
|
||||
|
||||
# Remarks
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
||||
|
19
FFTUnswizzle.md
Normal file
19
FFTUnswizzle.md
Normal file
@ -0,0 +1,19 @@
|
||||
Arranges Fast Fourier Transform function output by order of increasing frequency.
|
||||
|
||||
void FFTUnswizzle(XMVECTOR* pOutput, const XMVECTOR* pInput,
|
||||
const size_t uLog2Length);
|
||||
# Parameters
|
||||
## pOutput
|
||||
[out] Caller-supplied output buffer. pOutput receives samples in order of increasing frequency. The buffer must have at least 1<<uLog2Length/4 elements.
|
||||
|
||||
## pInput
|
||||
[in] Input buffer containing samples in bit-reversed order as generated by FFT functions. The buffer must have at least 1<<uLog2Length/4 elements.
|
||||
|
||||
## uLog2Length
|
||||
[in] The log base 2 of the FFT length in samples. uLog2Length must be greater than or equal to 2.
|
||||
|
||||
# Remarks
|
||||
The FFT functions generate output in bit-reversed order. Use FFTUnswizzle to rearrange FFT function output into order of increasing frequency.
|
||||
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
||||
|
23
IFFTDeinterleaved.md
Normal file
23
IFFTDeinterleaved.md
Normal file
@ -0,0 +1,23 @@
|
||||
This function applies a 2N-sample inverse Fast Fourier Transform. Audio is first interleaved if it is multichannel.
|
||||
|
||||
void IFFTDeinterleaved(XMVECTOR* pReal, const XMVECTOR* pImaginary,
|
||||
const XMVECTOR* pUnityTable,
|
||||
const size_t uChannelCount, const size_t uLog2Length);
|
||||
# Parameters
|
||||
## pReal
|
||||
[in, out] Real components of the FFT. It must have at least (1 << uLog2Length × uChannelCount) ÷ 4 elements.
|
||||
|
||||
# pImaginary
|
||||
[in] Imaginary components of the FFT. It must have at least (1 << uLog2Length × uChannelCount) ÷ 4 elements.
|
||||
|
||||
# pUnityTable
|
||||
[in] Unity table the FFT should use. It must have at least (1 << uLog2Length) elements. See FFTInitializeUnityTable for more information.
|
||||
|
||||
# uChannelCount
|
||||
[in] Number of channels in the FFT. uChannelCount must be greater than zero.
|
||||
|
||||
# uLog2Length
|
||||
[in] Log (base 2) of FFT length in frames. uLog2Length must be within [2, 10].
|
||||
|
||||
# Remarks
|
||||
All buffer parameters must be 16-byte aligned. Audio data must be 32-bit float mono.
|
19
Interleave.md
Normal file
19
Interleave.md
Normal file
@ -0,0 +1,19 @@
|
||||
Interleaves audio samples such that all samples corresponding to a given frame are contiguous.
|
||||
|
||||
void Interleave (XMVECTOR* pOutput, const XMVECTOR* pInput,
|
||||
const size_t uChannelCount, const size_t uFrameCount);
|
||||
# Parameters
|
||||
# pOutput
|
||||
[out] Caller-provided array of XVECTOR elements that receives the samples in interleaved form. It cannot overlap pInput and it must have at least (uChannelCount × uFrameCount) ÷ 4 elements.
|
||||
|
||||
# pInput
|
||||
[in] Caller-provided array of XVECTOR elements that supplies audio samples in deinterleaved form. It cannot overlap pOutput and it must have at least (uChannelCount × uFrameCount) ÷ 4 elements.
|
||||
|
||||
# uChannelCount
|
||||
[in] The number of channels contained in the data. uChannelCount must be greater than 1.
|
||||
|
||||
# uFrameCount
|
||||
[in] The number of frames of valid data. uFrameCount must be greater than 0.
|
||||
|
||||
# Remarks
|
||||
For example, audio of the form [LLLRRR] becomes [LRLRLR].
|
Loading…
Reference in New Issue
Block a user