-
-
Notifications
You must be signed in to change notification settings - Fork 56.4k
jpeg: use libjpeg-turbo built-in color conversions #24875
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
Conversation
|
Performance results for Intel i5-1135G7 (mobile), system instance of libjpeg (Ubuntu 20.04): |
|
Jetson TK1 (ARM v7), CPU_BASELINE="", no NEON. libjpeg - system instance of libjpeg (Ubuntu 16.04). |
|
The same Intel system with self-built libjpeg from 3rdparty with NASM installed: |
|
The same Intel system with self-built libjpeg from 3rdparty without NASM: |
|
Jetson-tk1 result with self-built libjpeg with NASM: |
asmorkalov
left a comment
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.
👍 Thanks for the great job! The patch makes sense, even if NASM assembler is not found.
libjpeg-turbo has optimized built-in support for encoding/decoding from/to BGR and BGRA [1].
This PR integrates this optimized support when available. As a result both encoding and decoding from/to BGR are faster by ~2% and the same for BGRA is faster by ~3%, measured on a Mac M1 (ARM64) with a 512x512 image. Grayscale performance is unchanged.
Test code
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.