-
-
Notifications
You must be signed in to change notification settings - Fork 887
JpegDecoder: post-process baseline spectral data per MCU-row #1694
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
Merged
JimBobSquarePants
merged 78 commits into
SixLabors:master
from
br3aker:jpeg-decoder-memory
Jul 15, 2021
Merged
Changes from 51 commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
6f6ee73
Renamed pixel dimensions for JpegFrame
925b3ad
Added debug code to the sandbox
2f8d3c9
Injected progressive scan parameters
336c64a
Injected scan selectors count
3b2d2d8
Injected frame & reset interval
5d44503
Injected huffman tables
442af2c
Scan decoder is not a persistent state of the decoder core
b7d54b1
Added comments for future refactoring
7044741
Added extra comment
9b81724
Jpeg frame is now injected to the scan decoder at the SOF marker
7e1bd59
Slight change to image post processor for better understanding
5ba8763
Replaced hardcoded values with actual calculated ones in postprocessor
22af241
WIP spectral converter
dbe4c4e
Fixed iteration variables
887c0ba
Added todo(s)
6b2f189
Decoupled image processor from component processor
dc4bc6e
Fixed converter frame injection
d178c8c
Added getter which converts pixels to PixelBuffer property
c86d029
Fixed sandbox code
1dbb16a
Wired up converter & scan decoder
1c10ec6
Added Buffer2D Image ctor, wired new post processor with decoder core
1348ecf
Implemented disposable pattern for spectral converter
1d4dd08
Implemented step-based iteration for spectralconverter
fa0aaec
Added separate step parameter for spectral data enumeration
c017357
Added external way to mark convesion finished
3c59cd9
Added initial support for the baseline interleaved stride conversion
460b02c
Sandbox changes
e39adf8
Fixed invalid baseline jpeg decoding
7afca19
Rolled back to counter enumeration for spectral converter
4b5f0f6
Refactored scan converter
74a7e90
Refactores post processor buffer clear
4af7fd1
Refactored spectral converter
fae763e
Final refactor of the converter
243e2bd
Removed todo
639ed62
Implemented new spectral buffers allocation
27d7c3a
Rolled back to initial sandbox code
da7bca3
Moved SpectralConverter to the separate file
86a7b46
Added docs
d325d06
Fixed styling issues
3fb7105
Fixed docs
73d35b7
Fixed no color deduction for metadata only pass
ccd6601
Marked ParseStream private as it now can't be called outside of Decod…
b9f12a6
Removed unsupported benchmark
ef80d98
Tests no longer use ParseStream method
8078688
Fixed null reference in spectral converter
7c63fb4
Fixed out of range exception at component postprocessor
ae1b40d
Skipped old post processing pipeline tests
3c4d0fe
Fixed invalid frame mcu size calculation
7fbc33c
Fixed invalid internal deconding mode selection for grayscale jpegs
e478795
Cosmetic fixes
b8e13e7
Disabled spectral tests due to new architecture incompatibility
519c6b2
Baseline jpegs now clear allocated buffers in the decoding loop
daccbfb
Basement for spectral tests
bbbfb50
Additional fixes for spectral tests
19e2e3d
Fixed new spectral tests for progressive and multi-scan images
39dd5bc
Fixed out of range exception for baseline tests
0c78c67
Clarified diff logs
4c97fcc
Rolled back spectral buffer cleaning logic
024be3b
Spectral converter base class no longer implements IDisposable interface
194f6e0
Debug converter no longer use actual converter
7540fd9
Fixed baseline images tsting code
0261ea9
Fixed bad EOI image
79eb6c4
Fixed metadata only pass for a test
d7084eb
Style fixes
2e5b0ad
Fixed baseline image invalid reference output png image
005fff7
Removed post processor tests
c6a2c6b
Removed post processor from jpeg decoder
865c706
Added new tolerance to the Jpeg420Small test image
4ff282e
Merge branch 'master' into jpeg-decoder-memory
8b6ad9c
Fixed docs
19b65ab
Merge branch 'jpeg-decoder-memory' of https://github.com/br3aker/Imag…
84900dc
Restored memory stress test to the sandbox
82e22c3
Restored decoder parse stream only benchmark
0c27adc
Updated StreamParseOnly benchmark
2eaa2d5
Added docs
13c3a45
Added DivideCeil
269c073
Fixed spectral data as image saving test
190964c
Disabled image saving test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
188 changes: 98 additions & 90 deletions
188
src/ImageSharp/Formats/Jpeg/Components/Decoder/HuffmanScanDecoder.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/ImageSharp/Formats/Jpeg/Components/Decoder/SpectralConverter.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // Copyright (c) Six Labors. | ||
| // Licensed under the Apache License, Version 2.0. | ||
|
|
||
| using System; | ||
|
|
||
| namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder | ||
| { | ||
| internal abstract class SpectralConverter : IDisposable | ||
| { | ||
| public abstract void InjectFrameData(JpegFrame frame, IRawJpegData jpegData); | ||
br3aker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| public abstract void ConvertStrideBaseline(); | ||
|
|
||
| public abstract void Dispose(); | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.