rav1e icon indicating copy to clipboard operation
rav1e copied to clipboard

Use region dimensions in SAD and ME

Open shssoichiro opened this issue 1 year ago • 3 comments

This avoids having to re-check bounds every time we perform SAD, as the region knows its own size. It also may save 2 usize's being passed around during ME. To enforce this, we also remove the w and h parameters from everywhere.

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

shssoichiro avatar Jan 16 '23 02:01 shssoichiro

Codecov Report

Base: 86.77% // Head: 86.80% // Increases project coverage by +0.03% :tada:

Coverage data is based on head (c2c7a7a) compared to base (0e2c74c). Patch coverage: 91.37% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3097      +/-   ##
==========================================
+ Coverage   86.77%   86.80%   +0.03%     
==========================================
  Files          83       83              
  Lines       33105    33098       -7     
==========================================
+ Hits        28727    28732       +5     
+ Misses       4378     4366      -12     
Impacted Files Coverage Δ
src/api/lookahead.rs 43.34% <0.00%> (+1.13%) :arrow_up:
src/dist.rs 99.46% <90.00%> (+0.50%) :arrow_up:
src/me.rs 95.46% <92.20%> (-0.14%) :arrow_down:
src/api/internal.rs 97.79% <100.00%> (ø)
src/asm/x86/dist/mod.rs 98.87% <100.00%> (+0.01%) :arrow_up:
src/rdo.rs 85.68% <100.00%> (+0.56%) :arrow_up:
src/asm/x86/lrf.rs 92.85% <0.00%> (-1.27%) :arrow_down:
src/asm/x86/predict.rs 43.29% <0.00%> (-0.39%) :arrow_down:
src/context/mod.rs 92.30% <0.00%> (-0.33%) :arrow_down:
src/encoder.rs 86.95% <0.00%> (-0.11%) :arrow_down:
... and 4 more

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

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

codecov-commenter avatar Jan 16 '23 04:01 codecov-commenter

It seems that some of the assumptions do not hold in certain circumstances. To investigate, I would revert the parts where width and height parameters are removed and assert that they match the region dimensions.

barrbrain avatar Jan 16 '23 13:01 barrbrain

This is going to be rather painful to debug given that it only seems to be failing on x64 Macos. Why that is, I have no clue... I'll fix it up when I have a moment.

shssoichiro avatar Jan 17 '23 07:01 shssoichiro