### 7 unstable releases (3 breaking)

0.4.0 | Jan 22, 2019 |
---|---|

0.3.0 | Aug 6, 2018 |

0.2.1 | Mar 19, 2018 |

0.1.3 | Jun 28, 2017 |

0.1.1 | May 24, 2017 |

#**10** in Encoding

**190** downloads per month

Used in img_hash

**MIT/Apache**

155KB

3K
SLoC

# RustDCT

RustDCT is a pure-Rust signal processing library that computes the most common Discrete Cosine Transforms:

- Discrete Cosine Transform (DCT) Types 1, 2, 3, 4
- Discrete Sine Transform (DST) Types 1, 2, 3, 4
- Modified Discrete Cosine Transform (MDCT)

## Example

`//` Compute a DCT Type 2 of size 1234
`use` `rustdct``::`DCTplanner`;`
`let` `mut` input`:` `Vec``<``f32``>` `=` `vec!``[``0``f32``;` `1234``]``;`
`let` `mut` output`:` `Vec``<``f32``>` `=` `vec!``[``0``f32``;` `1234``]``;`
`let` `mut` planner `=` `DCTplanner``::`new`(``)``;`
`let` `mut` dct `=` planner`.``plan_dct2``(``1234``)``;`
dct`.``process``(``&``mut` input`,` `&``mut` output`)``;`

## Compatibility

The

crate requires rustc 1.26 or greater.`rustdct`

## Releases

Release notes are available in RELEASES.md.

#### Dependencies

~460KB