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

Improve JPEG writing performance #36

Closed
wants to merge 24 commits into from
Closed

Improve JPEG writing performance #36

wants to merge 24 commits into from

Conversation

mcroomp
Copy link
Collaborator

@mcroomp mcroomp commented Jun 23, 2023

No description provided.

@@ -44,8 +43,29 @@ impl BitWriter {
self.current_bit = tmp_current_bit;
}

#[inline(never)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comments why it should be a separate method, why it's good for perf to have a "cold" method which is almost a duplicate of another method.


if tmp == 0 {
let mut z = 1;
write_coef(huffw, b as i16, 0, dctbl);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got lost in this block of changes. Please add some comments.

Copy link
Contributor

@gbrovman gbrovman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add more comments, especially in places where I left comments.

@mcroomp mcroomp closed this Apr 29, 2024
@mcroomp mcroomp deleted the fasterjpeg branch April 29, 2024 14:44
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.

2 participants