DCT4 Q15

riscv_status riscv_dct4_init_q15(riscv_dct4_instance_q15 *S, riscv_rfft_instance_q15 *S_RFFT, riscv_cfft_radix4_instance_q15 *S_CFFT, uint16_t N, uint16_t Nby2, q15_t normalize)
void riscv_dct4_q15(const riscv_dct4_instance_q15 *S, q15_t *pState, q15_t *pInlineBuffer)
group DCT4Q15

Functions

riscv_status riscv_dct4_init_q15(riscv_dct4_instance_q15 *S, riscv_rfft_instance_q15 *S_RFFT, riscv_cfft_radix4_instance_q15 *S_CFFT, uint16_t N, uint16_t Nby2, q15_t normalize)

Initialization function for the Q15 DCT4/IDCT4.

Deprecated:

Do not use this function. It will be removed in future versions.

DCT Size

Normalizing factor value (hexadecimal)

2048

0x400

512

0x800

128

0x1000

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:

Parameters
  • S[inout] points to an instance of Q15 DCT4/IDCT4 structure

  • S_RFFT[in] points to an instance of Q15 RFFT/RIFFT structure

  • S_CFFT[in] points to an instance of Q15 CFFT/CIFFT structure

  • N[in] length of the DCT4

  • Nby2[in] half of the length of the DCT4

  • normalize[in] normalizing factor

Returns

execution status

  • RISCV_MATH_SUCCESS : Operation successful

  • RISCV_MATH_ARGUMENT_ERROR : N is not a supported transform length

void riscv_dct4_q15(const riscv_dct4_instance_q15 *S, q15_t *pState, q15_t *pInlineBuffer)

Processing function for the Q15 DCT4/IDCT4.

Deprecated:

Do not use this function. It will be removed in future versions.

DCT Size

Input format

Output format

Number of bits to upscale

2048

1.15

11.5

10

512

1.15

9.7

8

128

1.15

7.9

6

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:

Parameters
  • S[in] points to an instance of the Q15 DCT4 structure.

  • pState[in] points to state buffer.

  • pInlineBuffer[inout] points to the in-place input and output buffer.

Returns

none