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

#12 Synch with master and improve performance of decoders #986

Merged
merged 293 commits into from
Aug 25, 2019

Conversation

IldarKhayrutdinov
Copy link
Contributor

@IldarKhayrutdinov IldarKhayrutdinov commented Aug 22, 2019

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

  • merge from master
  • add simple blackBox tests and benchmarks for decoder
  • report deflate decoding bug (see: 51720a8)
  • improve performance of decoders at 1.1x - 2.5x (see: 1b32629)

iamcarbon and others added 30 commits April 14, 2019 12:01
* Update metadata names

* Use WithIterationCount

* Format Benchmark documents

* Update copyright assignment to Six Labors & Contributors

* Update deps

* React to Benchmark library update
- ResizeWindow -> ResizeWorker
- Most logic moved to ResizeWorker
which has been renamed from CalculateResizeWorkerWindowCount()
IldarKhayrutdinov and others added 9 commits August 22, 2019 10:17
…s#979)

* remove some redundant constructor overloads from exceptions

* re add ImageProcessingException ctor

only used in release
… tiff-codec

# Conflicts:
#	src/ImageSharp/Configuration.cs
#	src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.cs
#	src/ImageSharp/PixelFormats/PixelBlenders/DefaultPixelBlenders.Generated.tt
#	src/ImageSharp/PixelFormats/PixelBlender{TPixel}.cs
#	tests/ImageSharp.Tests/ConfigurationTests.cs
Correct Metadata updated name (for Resolution properties), temporary disable tiff native metadata properties.
@IldarKhayrutdinov IldarKhayrutdinov changed the title WIP: Synch with master and improve performance of decoders WIP: #12 Synch with master and improve performance of decoders Aug 22, 2019
@antonfirsov
Copy link
Member

antonfirsov commented Aug 22, 2019

@Sergio0694 can you help a bit? Doest the bokeh blur processor + test code look up to date on this branch?

EDIT:
Or does it need a submodule update to get the latest reference images?

@James-Jackson-South
Copy link

@antonfirsov @Sergio0694 I can have a look, I'm familiar with that code also now.

@IldarKhayrutdinov
Copy link
Contributor Author

IldarKhayrutdinov commented Aug 23, 2019

@antonfirsov @Sergio0694 Thanks! Really I forgot to update submodules 😃
@antonfirsov @James-Jackson-South @Andy-Wilkinson Now I have passed the tests locally and I expect that on the CI will pass. Please code review.
I continue to work on Tiff format, soon I will prepare new PR.

@Sergio0694
Copy link
Member

Thanks @James-Jackson-South!
@antonfirsov I think James is actually more familiar than me with the tests part of the bokeh blur processor actually, as he kindly set that part up after I finished working on the last tweaks for the processor itself 😄

@JimBobSquarePants
Copy link
Member

1198 files! Crikey!

I'll do a folder check via BeyondCompare before digging through the diff. Everything should be identical except for the new Tiff code.

@codecov
Copy link

codecov bot commented Aug 23, 2019

Codecov Report

Merging #986 into tiff-codec will increase coverage by 0.87%.
The diff coverage is 91.1%.

Impacted file tree graph

@@              Coverage Diff               @@
##           tiff-codec     #986      +/-   ##
==============================================
+ Coverage       89.08%   89.96%   +0.87%     
==============================================
  Files            1084     1168      +84     
  Lines           47212    51664    +4452     
  Branches         3402     3644     +242     
==============================================
+ Hits            42061    46481    +4420     
- Misses           4391     4447      +56     
+ Partials          760      736      -24
Impacted Files Coverage Δ
...ImageSharp/Formats/Tiff/TiffImageFormatDetector.cs 100% <ø> (ø) ⬆️
...PhotometricInterpretation/BlackIsZero4TiffColor.cs 100% <ø> (ø) ⬆️
src/ImageSharp/Formats/Jpeg/JpegMetaData.cs 100% <ø> (ø) ⬆️
src/ImageSharp/ImageFrame.cs 100% <ø> (ø)
src/ImageSharp/Formats/Jpeg/JpegConstants.cs 100% <ø> (ø) ⬆️
.../Implementation/WorkingSpaces/GammaWorkingSpace.cs 29.41% <ø> (ø) ⬆️
...ImageSharp/Formats/Tiff/TiffConfigurationModule.cs 100% <ø> (+100%) ⬆️
src/ImageSharp/Formats/Jpeg/JpegFormat.cs 87.5% <ø> (ø) ⬆️
src/ImageSharp/Memory/Buffer2D{T}.cs 100% <ø> (ø) ⬆️
src/ImageSharp/ImageExtensions.Internal.cs 100% <ø> (ø) ⬆️
... and 882 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 904f5be...b576c25. Read the comment docs.

@codecov
Copy link

codecov bot commented Aug 23, 2019

Codecov Report

Merging #986 into tiff-codec will increase coverage by 0.96%.
The diff coverage is 91.1%.

Impacted file tree graph

@@              Coverage Diff               @@
##           tiff-codec     #986      +/-   ##
==============================================
+ Coverage       89.08%   90.05%   +0.96%     
==============================================
  Files            1084     1169      +85     
  Lines           47212    51679    +4467     
  Branches         3402     3644     +242     
==============================================
+ Hits            42061    46540    +4479     
- Misses           4391     4405      +14     
+ Partials          760      734      -26
Impacted Files Coverage Δ
...ImageSharp/Formats/Tiff/TiffImageFormatDetector.cs 100% <ø> (ø) ⬆️
...PhotometricInterpretation/BlackIsZero4TiffColor.cs 100% <ø> (ø) ⬆️
src/ImageSharp/Formats/Jpeg/JpegMetaData.cs 100% <ø> (ø) ⬆️
src/ImageSharp/ImageFrame.cs 100% <ø> (ø)
src/ImageSharp/Formats/Jpeg/JpegConstants.cs 100% <ø> (ø) ⬆️
.../Implementation/WorkingSpaces/GammaWorkingSpace.cs 29.41% <ø> (ø) ⬆️
...ImageSharp/Formats/Tiff/TiffConfigurationModule.cs 100% <ø> (+100%) ⬆️
src/ImageSharp/Formats/Jpeg/JpegFormat.cs 87.5% <ø> (ø) ⬆️
src/ImageSharp/Memory/Buffer2D{T}.cs 100% <ø> (ø) ⬆️
src/ImageSharp/ImageExtensions.Internal.cs 100% <ø> (ø) ⬆️
... and 885 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 904f5be...5a601ef. Read the comment docs.

@IldarKhayrutdinov
Copy link
Contributor Author

1198 files! Crikey!

I'll do a folder check via BeyondCompare before digging through the diff. Everything should be identical except for the new Tiff code.

Sure, the most of changes are merge from master.

@antonfirsov
Copy link
Member

@James-Jackson-South since this is not going into main, I think we can merge it as-is as soon as the tests in TiffDecoderTests are matching the current capabilities of the decoder.

I see a few improvement points, but I don't think it's a good idea to address them in this huge PR, let's do them later:

  • Using MemoryAllocator and disposable buffers instead of ArrayPool.Shared
  • Consider sharing code with other decoders. Eg. TiffLzwDecoder looks pretty much the same as SixLabors.ImageSharp.Formats.Gif.LzwDecoder

@antonfirsov
Copy link
Member

@James-Jackson-South see #988 for the diff.

@JimBobSquarePants
Copy link
Member

Thanks, I’ll have a look later today. 👍

@JimBobSquarePants
Copy link
Member

Looks good to me. Will merge now.

@JimBobSquarePants JimBobSquarePants merged commit 9773e61 into SixLabors:tiff-codec Aug 25, 2019
@IldarKhayrutdinov IldarKhayrutdinov changed the title WIP: #12 Synch with master and improve performance of decoders #12 Synch with master and improve performance of decoders Aug 26, 2019
@IldarKhayrutdinov IldarKhayrutdinov deleted the tiff-codec branch August 26, 2019 12:30
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.