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

SSE2 / AVX2 of webp AlphaDecoding #1930

Merged
merged 10 commits into from
Jan 18, 2022
Merged

Conversation

brianpopow
Copy link
Collaborator

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

This PR adds SSE2 / AVX2 versions of VerticalUnfilter and HorizontalUnfilter which are used during webp decoding with alpha channels.

Related to #1786

Profiling results:

master:

VerticalUnfilter

PR:

VerticalUnfilterSse

@brianpopow brianpopow added this to the 2.0.0 milestone Jan 8, 2022
@codecov
Copy link

codecov bot commented Jan 8, 2022

Codecov Report

Merging #1930 (6bd756e) into master (dfe3fb5) will decrease coverage by 0%.
The diff coverage is 89%.

❗ Current head 6bd756e differs from pull request most recent head 4c4f27d. Consider uploading reports for the commit 4c4f27d to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master   #1930    +/-   ##
=======================================
- Coverage      88%     88%    -1%     
=======================================
  Files         968     966     -2     
  Lines       51565   51383   -182     
  Branches     6428    6410    -18     
=======================================
- Hits        45405   45243   -162     
+ Misses       5090    5078    -12     
+ Partials     1070    1062     -8     
Flag Coverage Δ
unittests 88% <89%> (-1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../ImageSharp/Formats/Webp/Lossless/LosslessUtils.cs 98% <ø> (ø)
src/ImageSharp/Formats/Webp/AlphaDecoder.cs 89% <89%> (-1%) ⬇️
src/ImageSharp/Formats/Webp/WebpDecoder.cs 33% <0%> (-21%) ⬇️
src/ImageSharp/Formats/Tiff/TiffDecoder.cs 50% <0%> (-19%) ⬇️
...rc/ImageSharp/Metadata/Profiles/Exif/ExifWriter.cs 89% <0%> (-3%) ⬇️
src/ImageSharp/Formats/ImageFormatManager.cs 92% <0%> (-2%) ⬇️
...geSharp/Formats/Tiff/TiffDecoderMetadataCreator.cs 72% <0%> (-2%) ⬇️
...ImageSharp/Formats/Webp/BitWriter/BitWriterBase.cs 91% <0%> (-1%) ⬇️
src/ImageSharp/Formats/Gif/GifEncoderCore.cs 94% <0%> (-1%) ⬇️
...Formats/Gif/Sections/GifGraphicControlExtension.cs 95% <0%> (-1%) ⬇️
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe95bb5...4c4f27d. Read the comment docs.

src/ImageSharp/Formats/Webp/AlphaDecoder.cs Outdated Show resolved Hide resolved
src/ImageSharp/Formats/Webp/AlphaDecoder.cs Outdated Show resolved Hide resolved
src/ImageSharp/Formats/Webp/AlphaDecoder.cs Outdated Show resolved Hide resolved
src/ImageSharp/Formats/Webp/AlphaDecoder.cs Outdated Show resolved Hide resolved
src/ImageSharp/Formats/Webp/AlphaDecoder.cs Outdated Show resolved Hide resolved
@brianpopow
Copy link
Collaborator Author

@gfoidl thanks for your review comments!

Copy link
Member

@JimBobSquarePants JimBobSquarePants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice speedup there! Great work!

@JimBobSquarePants JimBobSquarePants merged commit 669c900 into master Jan 18, 2022
@JimBobSquarePants JimBobSquarePants deleted the bp/alphadecodingsse branch January 18, 2022 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants