-
Notifications
You must be signed in to change notification settings - Fork 7.1k
read jpeg linux #1909
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
read jpeg linux #1909
Conversation
packaging/build_wheel.sh
Outdated
@@ -7,7 +7,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |||
export BUILD_TYPE=wheel | |||
setup_env 0.6.0 | |||
setup_wheel_python | |||
pip_install numpy pyyaml future ninja | |||
pip_install numpy pyyaml future ninja pillow-simd |
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.
I don't think it's worth adding this only for unit testing. We're adding an libjpeg-turbo as an optimization for an existing feature and, I think, keep the PR centered around that. If we also want to evaluate and test pillow-simd we should do that separately and evaluate it as another potential optimization.
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.
You are right.
Small differences in output are expected when using different JPEG libraries. In particular, when you use vectorized libraries the order in which e.g. numbers are added has influence on the result. However, those differences are small and should be within a few machine epsilons of the other libraries. We could also look at other libraries and how they test their JPEG decoding testing. |
Hi @cpuhrsch, The |
- Ship libjpegturbo.so with the package
8ef7bd8
to
db586c1
Compare
Hi @fmassa, I am just leaving a small message to update you on the on going work. The linux_wheel pipelines are working. Thanks |
Hi,
As discussed earlier. This PR brings support for jpeg decoding on linux.
The link is done statically.
On open question remains though: How do we test this ?
Jpeg decoders have few differences and don't always output the same image depending on the implementation. For instance,
pillow
andpillow-simd
will not output the same Tensors. Becauselibjpeg
andlibjpeg-turbo
don't.The issue is the following: In order to build
pillow-simd
we need to installzlib
libpng
andlibjpeg-turbo
on the machine. We then take the risk of linking the system libs at build time instead of our own vendored versions.There is small package called
PyTurboJPEG
that is available onpip
that vendors it's dependencies as we do. We could use it for our unit test ( see this commit3599c64f64db131eccd3dffec6663eaa20e98113
). However, it's not available onconda
.Thoughts ?
Have a good day.
Thanks