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

imgcodecs: jpeg: refactoring JpegEncoder with/without libjpeg turbo #25452

Closed
Kumataro opened this issue Apr 19, 2024 · 0 comments · Fixed by #25453
Closed

imgcodecs: jpeg: refactoring JpegEncoder with/without libjpeg turbo #25452

Kumataro opened this issue Apr 19, 2024 · 0 comments · Fixed by #25453
Labels

Comments

@Kumataro
Copy link
Contributor

Describe the feature and motivation

Currently, JpegEncoder extends to support extended color space(BGR/BGEX) with JCS_EXTENSIONS.

However old codes for libjpeg are left, so it is not easy to read.

I think to refactor it is needed for future works.

Additional context

For non-continuous source, I think updating to use Mat::ptr() insted of Mat::data + bias is better way.

- uchar *data = img.data + img.step*y, *ptr = data;
+ uchar *data = const_cast<uchar*>(img.ptr<uchar>(y));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant