-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Allow configuring JPEG restart marker interval on save #7488
Conversation
1474f56
to
e56fbf4
Compare
Just linking to some more information, https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/libjpeg.txt describes these features as
|
e56fbf4
to
9e6157d
Compare
9e6157d
to
5efb218
Compare
Updated with feedback from bgilbert#2. |
Just in a comment here, could you provide a short explanation for why you picked the names "restart_marker_blocks" and "restart_marker_rows" instead of continuing with libjpeg's names of "restart_interval" and "restart_in_rows"? |
I find the libjpeg names inconsistent and confusing, and tried to pick better ones. I'm open to other ideas though. |
70d9cdf
to
929b8c0
Compare
libjpeg allows specifying the marker interval either in MCU blocks or in MCU rows. Support both, via separate parameters, rather than requiring callers to do the math. Co-authored-by: Andrew Murray <[email protected]>
929b8c0
to
e572722
Compare
Sorry, I missed the previous merge of |
Is this ready to go in? |
I've approved it, so I raise no objections if it were to be merged in. I'm holding off on actually merging for two reasons
|
If a JPEG includes restart markers, the decoder doesn't have to give up if it finds data corruption, but can scan forward to the next restart marker and resume decoding from there. Restart markers add overhead, but are useful in applications that want to support a limited form of error recovery or random access within a JPEG.
libjpeg allows specifying the marker interval either in MCU blocks or in MCU rows. Support both, via separate parameters, rather than requiring callers to do the math.