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

Lazily derive the huffman tables. Fix #839 #841

Merged
merged 4 commits into from
Feb 23, 2019
Merged

Conversation

JimBobSquarePants
Copy link
Member

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 matches 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

libjpeg and co avoid bad remaining counts when reading the huffman table marker by leaving derivation until they reach the SOS segment and it's time to decode. We now do the same.

Copy link
Member

@antonfirsov antonfirsov left a comment

Choose a reason for hiding this comment

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

Just a minor finding, otherwise everything looks good.

@codecov
Copy link

codecov bot commented Feb 21, 2019

Codecov Report

Merging #841 into master will increase coverage by <.01%.
The diff coverage is 95.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #841      +/-   ##
==========================================
+ Coverage   88.87%   88.88%   +<.01%     
==========================================
  Files        1015     1014       -1     
  Lines       44240    44272      +32     
  Branches     3202     3206       +4     
==========================================
+ Hits        39319    39349      +30     
- Misses       4200     4201       +1     
- Partials      721      722       +1
Impacted Files Coverage Δ
tests/ImageSharp.Tests/TestImages.cs 100% <ø> (ø) ⬆️
...rp/Formats/Jpeg/Components/Decoder/HuffmanTable.cs 100% <100%> (ø) ⬆️
...Sharp.Tests/Formats/Jpg/JpegDecoderTests.Images.cs 100% <100%> (ø) ⬆️
src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs 90.55% <100%> (-0.08%) ⬇️
...arp/Formats/Jpeg/Components/Decoder/ScanDecoder.cs 92.32% <94.02%> (-0.36%) ⬇️
...arp/Formats/Jpeg/Components/Decoder/FastACTable.cs 95% <95%> (ø)

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 8f3658d...0882d43. Read the comment docs.

Copy link
Member

@antonfirsov antonfirsov left a comment

Choose a reason for hiding this comment

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

Based on my current limited understanding, everything looks good.
I'm trusting our coverage more than my eyes now.

@JimBobSquarePants JimBobSquarePants merged commit 617c77c into master Feb 23, 2019
ImageSharp automation moved this from To Do to Done Feb 23, 2019
@JimBobSquarePants JimBobSquarePants deleted the js/fix-839 branch February 23, 2019 10:36
antonfirsov pushed a commit to antonfirsov/ImageSharp that referenced this pull request Nov 11, 2019
* Lazily derive the huffman tables. Fix SixLabors#839

* Lazy invoke fast table

* Add performance tweaks to scan decoder.

* Remove unneccessary classes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
ImageSharp
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants