Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise sad_plane_internal #3088

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Optimise sad_plane_internal #3088

merged 1 commit into from
Jan 16, 2023

Conversation

shssoichiro
Copy link
Collaborator

This is part of a series of commits authored by @maj160 to improve performance of rav1e.

This commit results in an overall performance improvement of about 1% at speed 2 10-bit:

Benchmark 1: ~/Downloads/rav1e_master -s 2 --quantizer 64 ~/xiph-media-files/objective-1-fast-10bit/speed_bag_640x360_60f.y4m -y -o /dev/null
  Time (mean ± σ):     43.492 s ±  0.088 s    [User: 43.514 s, System: 0.167 s]
  Range (min … max):   43.329 s … 43.603 s    10 runs

Benchmark 2: ~/Downloads/rav1e_mod -s 2 --quantizer 64 ~/xiph-media-files/objective-1-fast-10bit/speed_bag_640x360_60f.y4m -y -o /dev/null
  Time (mean ± σ):     43.062 s ±  0.086 s    [User: 43.068 s, System: 0.173 s]
  Range (min … max):   42.947 s … 43.224 s    10 runs

@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2023

Codecov Report

Base: 86.94% // Head: 86.79% // Decreases project coverage by -0.15% ⚠️

Coverage data is based on head (2a5c324) compared to base (1c8c772).
Patch coverage: 67.77% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3088      +/-   ##
==========================================
- Coverage   86.94%   86.79%   -0.16%     
==========================================
  Files          83       83              
  Lines       33092    33098       +6     
==========================================
- Hits        28773    28727      -46     
- Misses       4319     4371      +52     
Impacted Files Coverage Δ
src/encoder.rs 86.94% <ø> (-0.18%) ⬇️
src/rdo.rs 85.57% <ø> (-0.10%) ⬇️
src/sad_plane.rs 22.72% <0.00%> (+4.87%) ⬆️
src/predict.rs 79.36% <46.47%> (-2.14%) ⬇️
src/asm/x86/predict.rs 43.29% <55.26%> (+2.03%) ⬆️
src/header.rs 68.97% <66.66%> (-0.05%) ⬇️
src/asm/x86/ec.rs 100.00% <100.00%> (ø)
src/dist.rs 98.95% <100.00%> (-0.04%) ⬇️
src/ec.rs 83.51% <100.00%> (ø)
src/frame/plane.rs 100.00% <100.00%> (ø)
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lu-zero
Copy link
Collaborator

lu-zero commented Jan 15, 2023

The Cargo.lock seems spurious?

@vibhoothi
Copy link
Collaborator

vibhoothi commented Jan 15, 2023 via email

@shssoichiro
Copy link
Collaborator Author

shssoichiro commented Jan 15, 2023

@vibhoothi Each patch is resulting in 1-2% improvement compared against master 🙂

@shssoichiro
Copy link
Collaborator Author

shssoichiro commented Jan 15, 2023

@lu-zero The lock bump was needed to pull in a change from v_frame: rust-av/v_frame#9

The original patch relied on the assumption that rows_iter returns fully cropped rows, when in reality rows_iter returns rows that are not cropped on the right side. This is an unintuitive behavior and is something I've tripped over several times before so it seemed to make sense to change upstream.

Updated Cargo.toml to make it clear that this change is intentional.

@shssoichiro shssoichiro force-pushed the maj-optim-2 branch 2 times, most recently from 59668cf to 2a5c324 Compare January 15, 2023 20:35
This is part of a series of commits authored by @maj160 to improve performance of rav1e.

This commit results in an overall performance improvement of about 1% at speed 2 10-bit:

```
Benchmark 1: ~/Downloads/rav1e_master -s 2 --quantizer 64 ~/xiph-media-files/objective-1-fast-10bit/speed_bag_640x360_60f.y4m -y -o /dev/null
  Time (mean ± σ):     43.492 s ±  0.088 s    [User: 43.514 s, System: 0.167 s]
  Range (min … max):   43.329 s … 43.603 s    10 runs

Benchmark 2: ~/Downloads/rav1e_mod -s 2 --quantizer 64 ~/xiph-media-files/objective-1-fast-10bit/speed_bag_640x360_60f.y4m -y -o /dev/null
  Time (mean ± σ):     43.062 s ±  0.086 s    [User: 43.068 s, System: 0.173 s]
  Range (min … max):   42.947 s … 43.224 s    10 runs
```
@barrbrain barrbrain merged commit c2dfb35 into xiph:master Jan 16, 2023
@shssoichiro shssoichiro deleted the maj-optim-2 branch January 16, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants