Skip to content

Commit

Permalink
Benchmarking, improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed Nov 23, 2024
1 parent de728bb commit c5b688a
Show file tree
Hide file tree
Showing 7 changed files with 447 additions and 22 deletions.
172 changes: 167 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ documentation = "https://github.com/awxkee/yuvutils-rs"
categories = ["multimedia::images", "multimedia::video"]
homepage = "https://github.com/awxkee/yuvutils-rs"
repository = "https://github.com/awxkee/yuvutils-rs"
exclude = ["*.jpg", "assets/*"]
exclude = ["*.jpg", "assets/*", "*.png"]

[dependencies]
num-traits = "0.2.19"
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,27 @@ ycgco420_to_rgb(&y_plane, y_stride,
YuvRange::TV);
```

## Benchmarks

YUV 8bit

```bash
cargo bench --bench yuv8 --manifest-path ./app/Cargo.toml
```

Tests performed on the image 5763x3842

| | time(NEON) | Time(AVX) |
|------------------------|:----------:|:---------:|
| utils YUV 4:2:0->RGB | 4.95ms | - |
| libyuv YUV 4:2:0->RGB | 5.70ms | - |
| utils YUV 4:2:0->RGBA | 5.56ms | - |
| libyuv YUV 4:2:0->RGBA | 6.13ms | - |
| utils YUV 4:2:2->RGBA | 5.39ms | - |
| libyuv YUV 4:2:2->RGBA | 5.91ms | - |
| utils YUV 4:4:4->RGBA | 5.04ms | - |
| libyuv YUV 4:4:4->RGBA | 4.82ms | - |

This project is licensed under either of

- BSD-3-Clause License (see [LICENSE](LICENSE.md))
Expand Down
4 changes: 4 additions & 0 deletions app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ edition = "2021"
[dependencies]
yuvutils-rs = { path = "..", features = [] }
image = "0.25.5"
yuv-sys = "0.3.6"

[dev-dependencies]
criterion = "0.5.1"

[[bench]]
name = "yuv8"
harness = false
Loading

0 comments on commit c5b688a

Please sign in to comment.