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