-
Notifications
You must be signed in to change notification settings - Fork 483
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
Update JpegSegmentReader #232
Comments
@drewnoakes I'm afraid I'm not able to fully understand the reader by just looking at the code. C# is a bit foreign to me, and without setting up an IDE an being able to check what the methods being called does etc. I get lost. It's therefore unclear to me exactly how that preamble logic works, but I hope it takes into account that not all segment types have preambles. Will this reader read through the whole file? If so, how can that be more efficient? The reason I was unsure if it was smart to touch the "exit on first SOS" was efficiency. I've just done a test-implementation with DNL segment support, but it suffers from the same problem. By definition the DNL segment comes after the first SOS segment, so I never see it. |
The preamble stuff is only used for identifying The new reader would read through the whole file, but the majority of that would be skipping forwards. JpegSegmentReader does a single pass through the JPEG, chunk by chunk. The efficiency claim comes from the idea that JPEG segment processors which can use sequential readers can operate directly on the underlying stream rather than being passed a |
Ok, I see. That sounds like a good idea. |
@Nadahar hit an issue related to JpegSegmentReader stopping at the first
SOS
marker (discussed in #231).There is also opportunity to improve the performance of JPEG processing.
In the .NET project there's an experimental approach to processing JPEG segments. It should be reviewed, tested and merged into both projects.
The text was updated successfully, but these errors were encountered: