Skip to content

Commit

Permalink
Merge pull request #25 from awxkee/dev
Browse files Browse the repository at this point in the history
SSE/AVX refactoring, improvements
  • Loading branch information
awxkee authored Dec 13, 2024
2 parents c995ed0 + 1b12f00 commit 746d2df
Show file tree
Hide file tree
Showing 48 changed files with 2,648 additions and 1,873 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,17 @@ jobs:
- run: cargo fuzz run yuv16_to_rgb16 -- -max_total_time=15
- run: cargo fuzz run y16_to_rgb16 -- -max_total_time=15
- run: cargo fuzz run yuv_to_yuyu2 -- -max_total_time=15

fuzz_encoding:
name: Fuzzing encoders
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo install cargo-fuzz
- run: cargo fuzz run rgb_to_yuv -- -max_total_time=15
- run: cargo fuzz run rgb_to_y -- -max_total_time=15
- run: cargo fuzz run rgb16_to_yuv16 -- -max_total_time=15
40 changes: 37 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,19 @@ cargo bench --bench yuv8 --manifest-path ./app/Cargo.toml

Tests performed on the image 5763x3842

### Encoding
### Encoding 8-bit

| | time(NEON) | Time(AVX) |
|------------------------|:----------:|:---------:|
| utils RGB->YUV 4:2:0 | 3.16ms | 3.53ms |
| libyuv RGB->YUV 4:2:0 | 3.58ms | 33.87ms |
| utils RGBA->YUV 4:2:0 | 4.04ms | 5.47ms |
| libyuv RGBA->YUV 4:2:0 | 4.87ms | 23.48ms |
| utils RGBA->YUV 4:2:2 | 4.37ms | 7.08ms |
| utils RGBA->YUV 4:2:2 | 4.34ms | 7.08ms |
| libyuv RGBA->YUV 4:2:2 | 5.90ms | 35.23ms |
| utils RGBA->YUV 4:4:4 | 4.49ms | 7.97ms |

### Decoding
### Decoding 8-bit

| | time(NEON) | Time(AVX) |
|------------------------|:----------:|:---------:|
Expand All @@ -102,6 +102,40 @@ Tests performed on the image 5763x3842
| utils YUV 4:4:4->RGBA | 4.79ms | 7.20ms |
| libyuv YUV 4:4:4->RGBA | 4.82ms | 7.30ms |

YUV 16 bit-depth conversion

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

### Encoding 10-bit

10-bit encoding is not implemented in `libyuv`

| | time(NEON) | Time(AVX) |
|----------------------------|:----------:|:---------:|
| utils RGB10->YUV10 4:2:0 | 4.98ms | 8.71 |
| libyuv RGB10->YUV10 4:2:0 | x | x |
| utils RGBA10->YUV10 4:2:0 | 6.03ms | 9.79 |
| libyuv RGBA10->YUV10 4:2:0 | x | x |
| utils RGBA10->YUV10 4:2:2 | 5.99ms | 13.54 |
| libyuv RGBA10->YUV10 4:2:2 | x | x |
| utils RGBA10->YUV10 4:4:4 | 4.84ms | 16.88 |

### Decoding 10-bit

| | time(NEON) | Time(AVX) |
|----------------------------|:----------:|:---------:|
| utils YUV10 4:2:0->RGB10 | 5.64ms | 12.27 |
| libyuv YUV10 4:2:0->RGB10 | - | - |
| utils YUV10 4:2:0->RGBA10 | 6.26ms | 14.79 |
| utils YUV10 4:2:0->RGBA8 | 7.05ms | 42.44 |
| libyuv YUV10 4:2:0->RGBA8 | 12.79ms | 63.02 |
| utils YUV10 4:2:2->RGBA10 | 6.31ms | 15.33 |
| utils YUV10 4:2:2->RGBA8 | 7.33ms | 13.55 |
| libyuv YUV10 4:2:2->RGBA10 | 12.62ms | 58.98 |
| utils YUV10 4:4:4->RGBA10 | 6.39ms | 16.39 |

This project is licensed under either of

- BSD-3-Clause License (see [LICENSE](LICENSE.md))
Expand Down
Loading

0 comments on commit 746d2df

Please sign in to comment.