ImfCompression.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. // Copyright (c) Contributors to the OpenEXR Project.
  4. //
  5. #ifndef INCLUDED_IMF_COMPRESSION_H
  6. #define INCLUDED_IMF_COMPRESSION_H
  7. //-----------------------------------------------------------------------------
  8. //
  9. // enum Compression
  10. //
  11. //-----------------------------------------------------------------------------
  12. #include "ImfExport.h"
  13. #include "ImfNamespace.h"
  14. OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
  15. enum IMF_EXPORT_ENUM Compression
  16. {
  17. NO_COMPRESSION = 0, // no compression
  18. RLE_COMPRESSION = 1, // run length encoding
  19. ZIPS_COMPRESSION = 2, // zlib compression, one scan line at a time
  20. ZIP_COMPRESSION = 3, // zlib compression, in blocks of 16 scan lines
  21. PIZ_COMPRESSION = 4, // piz-based wavelet compression
  22. PXR24_COMPRESSION = 5, // lossy 24-bit float compression
  23. B44_COMPRESSION = 6, // lossy 4-by-4 pixel block compression,
  24. // fixed compression rate
  25. B44A_COMPRESSION = 7, // lossy 4-by-4 pixel block compression,
  26. // flat fields are compressed more
  27. DWAA_COMPRESSION = 8, // lossy DCT based compression, in blocks
  28. // of 32 scanlines. More efficient for partial
  29. // buffer access.
  30. DWAB_COMPRESSION = 9, // lossy DCT based compression, in blocks
  31. // of 256 scanlines. More efficient space
  32. // wise and faster to decode full frames
  33. // than DWAA_COMPRESSION.
  34. NUM_COMPRESSION_METHODS // number of different compression methods
  35. };
  36. /// Controls the default zip compression level used. Zip is used for
  37. /// the 2 zip levels as well as some modes of the DWAA/B compression.
  38. IMF_EXPORT void setDefaultZipCompressionLevel (int level);
  39. /// Controls the default quality level for the DWA lossy compression
  40. IMF_EXPORT void setDefaultDwaCompressionLevel (float level);
  41. OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
  42. #endif