![]() |
STM32F769IDiscovery
1.00
uDANTE Audio Networking with STM32F7 DISCO board
|
Functions | |
void | arm_dct4_f32 (const arm_dct4_instance_f32 *S, float32_t *pState, float32_t *pInlineBuffer) |
Processing function for the floating-point DCT4/IDCT4. More... | |
arm_status | arm_dct4_init_f32 (arm_dct4_instance_f32 *S, arm_rfft_instance_f32 *S_RFFT, arm_cfft_radix4_instance_f32 *S_CFFT, uint16_t N, uint16_t Nby2, float32_t normalize) |
Initialization function for the floating-point DCT4/IDCT4. More... | |
arm_status | arm_dct4_init_q15 (arm_dct4_instance_q15 *S, arm_rfft_instance_q15 *S_RFFT, arm_cfft_radix4_instance_q15 *S_CFFT, uint16_t N, uint16_t Nby2, q15_t normalize) |
Initialization function for the Q15 DCT4/IDCT4. More... | |
arm_status | arm_dct4_init_q31 (arm_dct4_instance_q31 *S, arm_rfft_instance_q31 *S_RFFT, arm_cfft_radix4_instance_q31 *S_CFFT, uint16_t N, uint16_t Nby2, q31_t normalize) |
Initialization function for the Q31 DCT4/IDCT4. More... | |
void | arm_dct4_q15 (const arm_dct4_instance_q15 *S, q15_t *pState, q15_t *pInlineBuffer) |
Processing function for the Q15 DCT4/IDCT4. More... | |
void | arm_dct4_q31 (const arm_dct4_instance_q31 *S, q31_t *pState, q31_t *pInlineBuffer) |
Processing function for the Q31 DCT4/IDCT4. More... | |
Representation of signals by minimum number of values is important for storage and transmission. The possibility of large discontinuity between the beginning and end of a period of a signal in DFT can be avoided by extending the signal so that it is even-symmetric. Discrete Cosine Transform (DCT) is constructed such that its energy is heavily concentrated in the lower part of the spectrum and is very widely used in signal and image coding applications. The family of DCTs (DCT type- 1,2,3,4) is the outcome of different combinations of homogeneous boundary conditions. DCT has an excellent energy-packing capability, hence has many applications and in data compression in particular.
DCT is essentially the Discrete Fourier Transform(DFT) of an even-extended real signal. Reordering of the input data makes the computation of DCT just a problem of computing the DFT of a real signal with a few additional operations. This approach provides regular, simple, and very efficient DCT algorithms for practical hardware and software implementations.
DCT type-II can be implemented using Fast fourier transform (FFT) internally, as the transform is applied on real values, Real FFT can be used. DCT4 is implemented using DCT2 as their implementations are similar except with some added pre-processing and post-processing. DCT2 implementation can be described in the following steps:
This process is explained by the block diagram below:
k = 0,1,2,.....N-1
n = 0,1,2,.....N-1
arm_dct4_instance_f32 S = {N, Nby2, normalize, pTwiddle, pCosFactor, pRfft, pCfft}; arm_dct4_instance_q31 S = {N, Nby2, normalize, pTwiddle, pCosFactor, pRfft, pCfft}; arm_dct4_instance_q15 S = {N, Nby2, normalize, pTwiddle, pCosFactor, pRfft, pCfft};where
N
is the length of the DCT4; Nby2
is half of the length of the DCT4; normalize
is normalizing factor used and is equal to sqrt(2/N)
; pTwiddle
points to the twiddle factor table; pCosFactor
points to the cosFactor table; pRfft
points to the real FFT instance; pCfft
points to the complex FFT instance; The CFFT and RFFT structures also needs to be initialized, refer to arm_cfft_radix4_f32() and arm_rfft_f32() respectively for details regarding static initialization.void arm_dct4_f32 | ( | const arm_dct4_instance_f32 * | S, |
float32_t * | pState, | ||
float32_t * | pInlineBuffer | ||
) |
Processing function for the floating-point DCT4/IDCT4.
[in] | *S | points to an instance of the floating-point DCT4/IDCT4 structure. |
[in] | *pState | points to state buffer. |
[in,out] | *pInlineBuffer | points to the in-place input and output buffer. |
Definition at line 137 of file arm_dct4_f32.c.
arm_status arm_dct4_init_f32 | ( | arm_dct4_instance_f32 * | S, |
arm_rfft_instance_f32 * | S_RFFT, | ||
arm_cfft_radix4_instance_f32 * | S_CFFT, | ||
uint16_t | N, | ||
uint16_t | Nby2, | ||
float32_t | normalize | ||
) |
Initialization function for the floating-point DCT4/IDCT4.
[in,out] | *S | points to an instance of floating-point DCT4/IDCT4 structure. |
[in] | *S_RFFT | points to an instance of floating-point RFFT/RIFFT structure. |
[in] | *S_CFFT | points to an instance of floating-point CFFT/CIFFT structure. |
[in] | N | length of the DCT4. |
[in] | Nby2 | half of the length of the DCT4. |
[in] | normalize | normalizing factor. |
fftLenReal
is not a supported transform length. sqrt(2/N)
, which depends on the size of transform N
. Floating-point normalizing factors are mentioned in the table below for different DCT sizes: Definition at line 16449 of file arm_dct4_init_f32.c.
arm_status arm_dct4_init_q15 | ( | arm_dct4_instance_q15 * | S, |
arm_rfft_instance_q15 * | S_RFFT, | ||
arm_cfft_radix4_instance_q15 * | S_CFFT, | ||
uint16_t | N, | ||
uint16_t | Nby2, | ||
q15_t | normalize | ||
) |
Initialization function for the Q15 DCT4/IDCT4.
[in,out] | *S | points to an instance of Q15 DCT4/IDCT4 structure. |
[in] | *S_RFFT | points to an instance of Q15 RFFT/RIFFT structure. |
[in] | *S_CFFT | points to an instance of Q15 CFFT/CIFFT structure. |
[in] | N | length of the DCT4. |
[in] | Nby2 | half of the length of the DCT4. |
[in] | normalize | normalizing factor. |
N
is not a supported transform length. sqrt(2/N)
, which depends on the size of transform N
. Normalizing factors in 1.15 format are mentioned in the table below for different DCT sizes: Definition at line 4215 of file arm_dct4_init_q15.c.
arm_status arm_dct4_init_q31 | ( | arm_dct4_instance_q31 * | S, |
arm_rfft_instance_q31 * | S_RFFT, | ||
arm_cfft_radix4_instance_q31 * | S_CFFT, | ||
uint16_t | N, | ||
uint16_t | Nby2, | ||
q31_t | normalize | ||
) |
Initialization function for the Q31 DCT4/IDCT4.
[in,out] | *S | points to an instance of Q31 DCT4/IDCT4 structure. |
[in] | *S_RFFT | points to an instance of Q31 RFFT/RIFFT structure |
[in] | *S_CFFT | points to an instance of Q31 CFFT/CIFFT structure |
[in] | N | length of the DCT4. |
[in] | Nby2 | half of the length of the DCT4. |
[in] | normalize | normalizing factor. |
N
is not a supported transform length. sqrt(2/N)
, which depends on the size of transform N
. Normalizing factors in 1.31 format are mentioned in the table below for different DCT sizes: Definition at line 8295 of file arm_dct4_init_q31.c.
void arm_dct4_q15 | ( | const arm_dct4_instance_q15 * | S, |
q15_t * | pState, | ||
q15_t * | pInlineBuffer | ||
) |
Processing function for the Q15 DCT4/IDCT4.
[in] | *S | points to an instance of the Q15 DCT4 structure. |
[in] | *pState | points to state buffer. |
[in,out] | *pInlineBuffer | points to the in-place input and output buffer. |
Definition at line 63 of file arm_dct4_q15.c.
void arm_dct4_q31 | ( | const arm_dct4_instance_q31 * | S, |
q31_t * | pState, | ||
q31_t * | pInlineBuffer | ||
) |
Processing function for the Q31 DCT4/IDCT4.
[in] | *S | points to an instance of the Q31 DCT4 structure. |
[in] | *pState | points to state buffer. |
[in,out] | *pInlineBuffer | points to the in-place input and output buffer. |
Definition at line 64 of file arm_dct4_q31.c.