-
Notifications
You must be signed in to change notification settings - Fork 624
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
Per-channel DWA compression scheme / custom clasifiers #1942
Comments
The ChannelList attribute does have space that future versions of OpenEXR could use to store flags that are per-channel hints to lossy compression algorithms. An approach that's already possible is to use multipart files: store the RGB channels in one part using DWA compression, and all the XYZ in another part using a lossless compression type. That way you can pick the optimal lossless compressor to use. |
This is doable without the need of new ChannelList attribute. By just commenting-out the "Y" classifiers in the "static Classifier sDefaultChannelRules[]", the problem is fixed – and the produced single-part EXR files use RLE for channels named "normals.Y", etc. It would be nice if we have control over these classifiers using the public API though. |
Yes, that could be a possibility. The API could also support querying the rules that a file was written with from the DWA chunks, so a file could be read in and written out again with the same rules. All that said, The technical specification says |
Currently DWA compressed images use different compression schemes - LOSSY_DCT, RLE.
Compresson scheme upon EXR writing is determined using hard-coded classifiers - sDefaultChannelRules[].
Would it be possible to add ability for per-channel compression scheme selection?
Probably - by using custom channel classifiers?
This would make it possible to use lossless compression for the "Y" channel.
And this would make it possible to store coordinates or vector normals.
For example - storing "Normal.X", "Normal.Y", "Normal.Z", "WorldPosition.X", "WorldPosition.Y", etc.
Using lossy DCT does not work fine for such values, that could be negative values.
The text was updated successfully, but these errors were encountered: