-
-
Notifications
You must be signed in to change notification settings - Fork 888
Better Jpeg Identify #549
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
Merged
Better Jpeg Identify #549
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
e4c17ec
Increase Identify performance and reduce allocations
JimBobSquarePants 2c0fb6d
Merge branch 'master' into js/better-identify
JimBobSquarePants f6b374d
Golang is skipping EXIF reading when it shouldn't.
JimBobSquarePants b44e30e
Pool buffer
JimBobSquarePants f64f2b0
Ensure buffer is always aligned and fix tests
JimBobSquarePants 75050c5
Ben Adams is a wizard
JimBobSquarePants f598561
Merge branch 'master' into js/better-identify
JimBobSquarePants 2662853
Faster multibyte reading and fix test
JimBobSquarePants e927ed1
Merge branch 'master' into js/better-identify
JimBobSquarePants b52b872
Slight perf tweak plus duplicate refactoring
JimBobSquarePants 3ef9480
Merge branch 'master' into js/better-identify
JimBobSquarePants a20f5f7
Minor scan decoder optimization
JimBobSquarePants b1db217
Refactor buffer-filling to be more like libjpegturbo + add optimizati…
JimBobSquarePants b419eb6
Merge branch 'master' into js/better-identify
JimBobSquarePants 97020f7
fix indentation
antonfirsov 00fa494
better unit tests for Identify & MetaData parsing
antonfirsov 0bae6ad
Update external refs
JimBobSquarePants 934e2bc
Skip SOS contents when parsing metadata only
JimBobSquarePants 803ce2a
Merge branch 'js/better-identify' of https://github.com/SixLabors/Ima…
JimBobSquarePants 4a895b4
Better sanitation for scan decoder.
JimBobSquarePants 2d2477b
Merge branch 'master' into js/better-identify
JimBobSquarePants 694972d
Break out after SOS marker
JimBobSquarePants 34dc609
Add skip test
JimBobSquarePants 2e96ff6
Improve readability in scan decoder (less params, no discernable perf…
JimBobSquarePants 5095426
Merge branch 'master' into js/better-identify
antonfirsov 2f29567
Merge branch 'master' into js/better-identify
JimBobSquarePants 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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After "ignoring" SOS, the decoder will start scanning through the contents of the SOS block using tens (hundreds? thousands?) of
FindNextFileMarker()calls returning invalid "file markers". I don't think this is the expected behavior.Can't this behavior push the decoder into a faulted state leading to ignore some further actual file markers it shouldn't ignore, even in metadata-only state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidentally commented this on
OrigJpegDecoderCoreinstead ofPdfJsDecoderCore.Actually I only investigetad the latter, and the issue is present here! Haven't checked
OrigJpegDecoderCore.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this marker declare it's length? If so we might be able to simply skip the length.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it should.
However,
ProcessSOSdoes not depend on it as far as I understand.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just skip the remaining value same as the other markers.