Class libxl

java.lang.Object
gov.nih.mipav.model.file.libxl

public class libxl extends Object
JPEG XL image format reference implementation ported from C++ to Java by William Gandler Copyright (c) the JPEG XL Project Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. JPEG XL was standardized in 2022 as [ISO/IEC 18181](https://jpeg.org/jpegxl/workplan.html). The [core codestream](doc/format_overview.md#codestream-features) is specified in 18181-1, the [file format](doc/format_overview.md#file-format-features) in 18181-2. [Decoder conformance](https://github.com/libjxl/conformance) is defined in 18181-3, and 18181-4 is the [reference software](https://github.com/libjxl/libjxl). ## License This software is available under a 3-clause BSD license which can be found in the [LICENSE](LICENSE) file, with an "Additional IP Rights Grant" as outlined in the [PATENTS](PATENTS) file. Please note that the PATENTS file only mentions Google since Google is the legal entity receiving the Contributor License Agreements (CLA) from all contributors to the JPEG XL Project, including the initial main contributors to the JPEG XL format: Cloudinary and Google. ## Additional documentation ### Codec description [JPEG XL Format Overview](doc/format_overview.md) [Introductory paper](https://www.spiedigitallibrary.org/proceedings/Download?fullDOI=10.1117%2F12.2529237) (open-access) [XL Overview](doc/xl_overview.md) - a brief introduction to the source code modules [JPEG XL white paper](https://ds.jpeg.org/whitepapers/jpeg-xl-whitepaper.pdf) [JPEG XL official website](https://jpeg.org/jpegxl) [JPEG XL community website](https://jpegxl.info) ### Development process [More information on testing/build options](doc/building_and_testing.md) [Git guide for JPEG XL](doc/developing_in_github.md) - for developers [Fuzzing](doc/fuzzing.md) - for developers [Building Web Assembly artifacts](doc/building_wasm.md) [Test coverage on Codecov.io](https://app.codecov.io/gh/libjxl/libjxl) - for developers [libjxl documentation on readthedocs.io](https://libjxl.readthedocs.io/) The development of jpegli, the improved JPEG encoder and decoder, will continue at https://github.com/google/jpegli
  • Field Details

  • Constructor Details

    • libxl

      public libxl()
  • Method Details

    • TO_JXL_BOOL

      int TO_JXL_BOOL(boolean c)
    • FROM_JXL_BOOL

      boolean FROM_JXL_BOOL(int c)
    • DivCeil

      int DivCeil(int a, int b)
    • DivCeil

      float DivCeil(float a, float b)
    • RoundUpTo

      int RoundUpTo(int a, int b)
    • RoundUpTo

      float RoundUpTo(float a, float b)
    • jpegli_bytes_per_sample

      int jpegli_bytes_per_sample(libxl.JpegliDataType data_type)
    • NextTableBitSize

      int NextTableBitSize(int[] count, int len)
    • BuildJpegHuffmanTable

      void BuildJpegHuffmanTable(int[] count, int[] symbols, libxl.HuffmanTableEntry[] lut)
    • SetDepth

      void SetDepth(libxl.HuffmanTree p, libxl.HuffmanTree[] pool, byte[] depth, byte level)
    • SetDepth

      void SetDepth(libxl.HuffmanTree p, Vector<libxl.HuffmanTree> pool, byte[] depth, byte level)
    • CreateHuffmanTree

      void CreateHuffmanTree(int[] data, int length, int tree_limit, byte[] depth)
    • ValidateHuffmanTable

      void ValidateHuffmanTable(libxl.JHUFF_TBL table, boolean is_dc)
    • AddStandardHuffmanTables

      void AddStandardHuffmanTables(libxl.jpeg_common_struct cinfo, boolean is_dc)