---
title: vDSP.DCTTransformType.IV
framework: accelerate
role: symbol
role_heading: Case
path: accelerate/vdsp/dcttransformtype/iv
---

# vDSP.DCTTransformType.IV

A constant that represents a type-IV discrete cosine transform.

## Declaration

```swift
case IV
```

## Discussion

Discussion The type-IV DCT uses the following operation for a discrete cosine transform: // `N` is the length given in the setup. // `h` is the input array that contains real numbers. // `H` is the output array that contains real numbers.

For 0 <= k < N     Or[k] = sum(Ir[j] * cos((k+1/2) * (j+1/2) * pi / N, 0 <= j < N)

## See Also

### Discrete Cosine Transform Type Constants

- [vDSP.DCTTransformType.II](accelerate/vdsp/dcttransformtype/ii.md)
- [vDSP.DCTTransformType.III](accelerate/vdsp/dcttransformtype/iii.md)
