From 96d6da4e252b06dcfdc041e7df23e86161c33007 Mon Sep 17 00:00:00 2001 From: rihab kouki Date: Tue, 28 Jul 2020 11:24:49 +0100 Subject: Official ARM version: v5.6.0 --- docs/DSP/html/group__DCT4__IDCT4.html | 127 +++++++++++++++++----------------- 1 file changed, 63 insertions(+), 64 deletions(-) (limited to 'docs/DSP/html/group__DCT4__IDCT4.html') diff --git a/docs/DSP/html/group__DCT4__IDCT4.html b/docs/DSP/html/group__DCT4__IDCT4.html index 7a9a7b4..ee1f041 100644 --- a/docs/DSP/html/group__DCT4__IDCT4.html +++ b/docs/DSP/html/group__DCT4__IDCT4.html @@ -32,7 +32,7 @@ Logo
CMSIS-DSP -  Version 1.5.2 +  Version 1.7.0
CMSIS DSP Software Library
@@ -155,16 +155,16 @@ Functions DCT4.gif
Discrete Cosine Transform - type-IV
-
Algorithm:
The N-point type-IV DCT is defined as a real, linear transformation by the formula:
+
Algorithm
The N-point type-IV DCT is defined as a real, linear transformation by the formula:
DCT4Equation.gif
- where k = 0,1,2,.....N-1
+ where k = 0, 1, 2, ..., N-1
Its inverse is defined as follows:
IDCT4Equation.gif
- where n = 0,1,2,.....N-1
+ where n = 0, 1, 2, ..., N-1
The DCT4 matrices become involutory (i.e. they are self-inverse) by multiplying with an overall scale factor of sqrt(2/N). The symmetry of the transform matrix indicates that the fast algorithms for the forward and inverse transform computation are identical. Note that the implementation of Inverse DCT4 and DCT4 is same, hence same process function can be used for both.
-
Lengths supported by the transform:
As DCT4 internally uses Real FFT, it supports all the lengths 128, 512, 2048 and 8192. The library provides separate functions for Q15, Q31, and floating-point data types.
+
Lengths supported by the transform:
As DCT4 internally uses Real FFT, it supports all the lengths 128, 512, 2048 and 8192. The library provides separate functions for Q15, Q31, and floating-point data types.
Instance Structure
The instances for Real FFT and FFT, cosine values table and twiddle factor table are stored in an instance data structure. A separate instance structure must be defined for each transform. There are separate instance structure declarations for each of the 3 supported data types.
Initialization Functions
There is also an associated initialization function for each data type. The initialization function performs the following operations:
  • Sets the values of the internal structure fields.
  • @@ -172,12 +172,11 @@ Discrete Cosine Transform - type-IV
Use of the initialization function is optional. However, if the initialization function is used, then the instance structure cannot be placed into a const data section. To place an instance structure into a const data section, the instance structure must be manually initialized. Manually initialize the instance structure as follows:
-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.
-
Fixed-Point Behavior
Care must be taken when using the fixed-point versions of the DCT4 transform functions. In particular, the overflow and saturation behavior of the accumulator used in each function must be considered. Refer to the function specific documentation below for usage guidelines.
-

end of DCT4_IDCT4_Table group

+ 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. +
Fixed-Point Behavior
Care must be taken when using the fixed-point versions of the DCT4 transform functions. In particular, the overflow and saturation behavior of the accumulator used in each function must be considered. Refer to the function specific documentation below for usage guidelines.

Function Documentation

@@ -210,15 +209,13 @@ Discrete Cosine Transform - type-IV
Parameters
- - - + + +
[in]*Spoints to an instance of the floating-point DCT4/IDCT4 structure.
[in]*pStatepoints to state buffer.
[in,out]*pInlineBufferpoints to the in-place input and output buffer.
[in]Spoints to an instance of the floating-point DCT4/IDCT4 structure
[in]pStatepoints to state buffer
[in,out]pInlineBufferpoints to the in-place input and output buffer
-
Returns
none.
- -

References arm_mult_f32(), arm_scale_f32(), arm_dct4_instance_f32::N, arm_dct4_instance_f32::Nby2, arm_dct4_instance_f32::pCosFactor, and arm_dct4_instance_f32::pTwiddle.

+
Returns
none
@@ -271,23 +268,25 @@ Discrete Cosine Transform - type-IV
Parameters
- - - - - + + + + +
[in,out]*Spoints to an instance of floating-point DCT4/IDCT4 structure.
[in]*S_RFFTpoints to an instance of floating-point RFFT/RIFFT structure.
[in]*S_CFFTpoints to an instance of floating-point CFFT/CIFFT structure.
[in]Nlength of the DCT4.
[in]Nby2half of the length of the DCT4.
[in,out]Spoints to an instance of floating-point DCT4/IDCT4 structure
[in]S_RFFTpoints to an instance of floating-point RFFT/RIFFT structure
[in]S_CFFTpoints to an instance of floating-point CFFT/CIFFT structure
[in]Nlength of the DCT4
[in]Nby2half of the length of the DCT4
[in]normalizenormalizing factor.
-
Returns
arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if fftLenReal is not a supported transform length.
-
Normalizing factor:
The normalizing factor is 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:
+
Returns
execution status +
+
Normalizing factor
The normalizing factor is 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:
+
dct4NormalizingF32Table.gif
-
- -

References ARM_MATH_ARGUMENT_ERROR, ARM_MATH_SUCCESS, arm_rfft_init_f32(), cos_factors_128, cos_factors_2048, cos_factors_512, cos_factors_8192, arm_dct4_instance_f32::N, arm_dct4_instance_f32::Nby2, arm_dct4_instance_f32::normalize, arm_dct4_instance_f32::pCfft, arm_dct4_instance_f32::pCosFactor, arm_dct4_instance_f32::pRfft, arm_dct4_instance_f32::pTwiddle, status, Weights_128, Weights_2048, Weights_512, and Weights_8192.

- +
@@ -339,23 +338,25 @@ Discrete Cosine Transform - type-IV
Parameters
- - - - - - + + + + + +
[in,out]*Spoints to an instance of Q15 DCT4/IDCT4 structure.
[in]*S_RFFTpoints to an instance of Q15 RFFT/RIFFT structure.
[in]*S_CFFTpoints to an instance of Q15 CFFT/CIFFT structure.
[in]Nlength of the DCT4.
[in]Nby2half of the length of the DCT4.
[in]normalizenormalizing factor.
[in,out]Spoints to an instance of Q15 DCT4/IDCT4 structure
[in]S_RFFTpoints to an instance of Q15 RFFT/RIFFT structure
[in]S_CFFTpoints to an instance of Q15 CFFT/CIFFT structure
[in]Nlength of the DCT4
[in]Nby2half of the length of the DCT4
[in]normalizenormalizing factor
-
Returns
arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if N is not a supported transform length.
-
Normalizing factor:
The normalizing factor is 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:
+
Returns
execution status +
+
Normalizing factor
The normalizing factor is 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:
+
dct4NormalizingQ15Table.gif
-
- -

References ARM_MATH_ARGUMENT_ERROR, ARM_MATH_SUCCESS, arm_rfft_init_q15(), cos_factorsQ15_128, cos_factorsQ15_2048, cos_factorsQ15_512, cos_factorsQ15_8192, arm_dct4_instance_q15::N, arm_dct4_instance_q15::Nby2, arm_dct4_instance_q15::normalize, arm_dct4_instance_q15::pCfft, arm_dct4_instance_q15::pCosFactor, arm_dct4_instance_q15::pRfft, arm_dct4_instance_q15::pTwiddle, status, WeightsQ15_128, WeightsQ15_2048, WeightsQ15_512, and WeightsQ15_8192.

- +
@@ -407,23 +408,25 @@ Discrete Cosine Transform - type-IV
Parameters
- - - + + +
[in,out]*Spoints to an instance of Q31 DCT4/IDCT4 structure.
[in]*S_RFFTpoints to an instance of Q31 RFFT/RIFFT structure
[in]*S_CFFTpoints to an instance of Q31 CFFT/CIFFT structure
[in,out]Spoints to an instance of Q31 DCT4/IDCT4 structure.
[in]S_RFFTpoints to an instance of Q31 RFFT/RIFFT structure
[in]S_CFFTpoints to an instance of Q31 CFFT/CIFFT structure
[in]Nlength of the DCT4.
[in]Nby2half of the length of the DCT4.
[in]normalizenormalizing factor.
-
Returns
arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if N is not a supported transform length.
-
Normalizing factor:
The normalizing factor is 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:
+
Returns
execution status +
+
Normalizing factor:
The normalizing factor is 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:
+
dct4NormalizingQ31Table.gif
-
- -

References ARM_MATH_ARGUMENT_ERROR, ARM_MATH_SUCCESS, arm_rfft_init_q31(), cos_factorsQ31_128, cos_factorsQ31_2048, cos_factorsQ31_512, cos_factorsQ31_8192, arm_dct4_instance_q31::N, arm_dct4_instance_q31::Nby2, arm_dct4_instance_q31::normalize, arm_dct4_instance_q31::pCfft, arm_dct4_instance_q31::pCosFactor, arm_dct4_instance_q31::pRfft, arm_dct4_instance_q31::pTwiddle, status, WeightsQ31_128, WeightsQ31_2048, WeightsQ31_512, and WeightsQ31_8192.

- +
@@ -457,20 +460,18 @@ Discrete Cosine Transform - type-IV
Parameters
- - - + + +
[in]*Spoints to an instance of the Q15 DCT4 structure.
[in]*pStatepoints to state buffer.
[in,out]*pInlineBufferpoints to the in-place input and output buffer.
[in]Spoints to an instance of the Q15 DCT4 structure.
[in]pStatepoints to state buffer.
[in,out]pInlineBufferpoints to the in-place input and output buffer.
-
Returns
none.
-
Input an output formats:
Internally inputs are downscaled in the RFFT process function to avoid overflows. Number of bits downscaled, depends on the size of the transform. The input and output formats for different DCT sizes and number of bits to upscale are mentioned in the table below:
+
Returns
none
+
Input an output formats
Internally inputs are downscaled in the RFFT process function to avoid overflows. Number of bits downscaled, depends on the size of the transform. The input and output formats for different DCT sizes and number of bits to upscale are mentioned in the table below:
dct4FormatsQ15Table.gif
-

References arm_mult_q15(), arm_shift_q15(), arm_dct4_instance_q15::N, arm_dct4_instance_q15::Nby2, arm_dct4_instance_q15::pCosFactor, and arm_dct4_instance_q15::pTwiddle.

-
@@ -504,20 +505,18 @@ Discrete Cosine Transform - type-IV
Parameters
- - - + + +
[in]*Spoints to an instance of the Q31 DCT4 structure.
[in]*pStatepoints to state buffer.
[in,out]*pInlineBufferpoints to the in-place input and output buffer.
[in]Spoints to an instance of the Q31 DCT4 structure.
[in]pStatepoints to state buffer.
[in,out]pInlineBufferpoints to the in-place input and output buffer.
-
Returns
none.
-
Input an output formats:
Input samples need to be downscaled by 1 bit to avoid saturations in the Q31 DCT process, as the conversion from DCT2 to DCT4 involves one subtraction. Internally inputs are downscaled in the RFFT process function to avoid overflows. Number of bits downscaled, depends on the size of the transform. The input and output formats for different DCT sizes and number of bits to upscale are mentioned in the table below:
+
Returns
none
+
Input an output formats
Input samples need to be downscaled by 1 bit to avoid saturations in the Q31 DCT process, as the conversion from DCT2 to DCT4 involves one subtraction. Internally inputs are downscaled in the RFFT process function to avoid overflows. Number of bits downscaled, depends on the size of the transform. The input and output formats for different DCT sizes and number of bits to upscale are mentioned in the table below:
dct4FormatsQ31Table.gif
-

References arm_cmplx_mult_cmplx_q31(), arm_mult_q31(), arm_rfft_q31(), arm_shift_q31(), arm_dct4_instance_q31::N, arm_dct4_instance_q31::Nby2, arm_dct4_instance_q31::normalize, arm_dct4_instance_q31::pCosFactor, arm_dct4_instance_q31::pRfft, and arm_dct4_instance_q31::pTwiddle.

-
@@ -525,7 +524,7 @@ Discrete Cosine Transform - type-IV