• Show log

    Commit

  • Hash : 94c64ead
    Author : DRC
    Date : 2024-06-17T20:27:57

    Various doc tweaks
    
    - "bits per component" = "bits per sample"
    
      Describing the data precision of a JPEG image using "bits per
      component" is technically correct, but "bits per sample" is the
      terminology that the JPEG-1 spec uses.  Also, "bits per component" is
      more commonly used to describe the precision of packed-pixel formats
      (as opposed to "bits per pixel") rather than planar formats, in which
      all components are grouped together.
    
    - Unmention legacy display technologies.  Colormapped and monochrome
      displays aren't a thing anymore, and even when they were still a
      thing, it was possible to display full-color images to them.  In 1991,
      when JPEG decompression time was measured in minutes per megapixel, it
      made sense to keep a decompressed copy of JPEG images on disk, in a
      format that could be displayed without further color conversion (since
      color conversion was slow and memory-intensive.)  In 2024, JPEG
      decompression time is measured in milliseconds per megapixel, and
      color conversion is even faster.  Thus, JPEG images can be
      decompressed, displayed, and color-converted (if necessary) "on the
      fly" at speeds too fast for human vision to perceive.  (In fact, your
      TV performs much more complicated decompression algorithms at least 60
      times per second.)
    
    - Document that color quantization (and associated features), GIF
      input/output, Targa input/output, and OS/2 BMP input/output are legacy
      features.  Legacy status doesn't necessarily mean that the features
      are deprecated.  Rather, it is meant to discourage users from using
      features that may be of little or no benefit on modern machines (such
      as low-quality modes that had significant performance advantages in
      the early 1990s but no longer do) and that are maintained on a
      break/fix basis only.
    
    - General wordsmithing, grammar/punctuation policing, and formatting
      tweaks
    
    - Clarify which data precisions each cjpeg input format and each djpeg
      output format supports.
    
    - cjpeg.1: Remove unnecessary and impolitic statement about the -targa
      switch.
    
    - Adjust or remove performance claims to reflect the fact that:
      * On modern machines, the djpeg "-fast" switch has a negligible effect
        on performance.
      * There is a measurable difference between the performance of Floyd-
        Steinberg dithering and no dithering, but it is not likely
        perceptible to most users.
      * There is a measurable difference between the performance of 1-pass
        and 2-pass color quantization, but it is not likely perceptible to
        most users.
      * There is a measurable difference between the performance of
        full-color and grayscale output when decompressing a full-color JPEG
        image, but it is not likely perceptible to most users.
      * IDCT scaling does not necessarily improve performance.  (It
        generally does if the scaling factor is <= 1/2 and generally doesn't
        if the scaling factor is > 1/2, at least on my machine.  The
        performance claim made in jpeg-6b was probably invalidated when we
        merged the additional scaling factors from jpeg-7.)
    
    - Clarify which djpeg switches/output formats cannot be used when
      decompressing lossless JPEG images.
    
    - Remove djpeg hints, since those involve quality vs. speed tradeoffs
      that are no longer relevant for modern machines.
    
    - Remove documentation regarding using color quantization with 16-bit
      data precision.  (Color quantization requires lossy mode.)
    
    - Java: Fix typos in TJDecompressor.decompress12() and
      TJDecompressor.decompress16() documentation.
    
    - jpegtran.1: Fix truncated paragraph
    
      In a man page, a single quote at the start of a line is interpreted as
      a macro.
    
      Closes #775
    
    - libjpeg.txt:
      * Mention J16SAMPLE data type (oversight.)
      * Remove statement about extending jdcolor.c.  (libjpeg-turbo is not
        quite as DIY as libjpeg once was.)
      * Remove paragraph about tweaking the various typedefs in jmorecfg.h.
        It is no longer relevant for modern machines.
      * Remove caveat regarding systems with ints less than 16 bits wide.
        (ANSI/ISO C requires an int to be at least 16 bits wide, and
        libjpeg-turbo has never supported non-ANSI compilers.)
    
    - usage.txt:
      * Add copyright header.
      * Document cjpeg -icc, -memdst, -report, -strict, and -version
        switches.
      * Document djpeg -icc, -maxscans, -memsrc, -report, -skip, -crop,
        -strict, and -version switches.
      * Document jpegtran -icc, -maxscans, -report, -strict, and -version
        switches.
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/libjpeg-turbo.git
    Git SSH git@git.kmx.io:kc3-lang/libjpeg-turbo.git
    Public access ? public
    Description

    Fork of libjpeg with SIMD

    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg_l thodg
    Tags

  • README

  • TurboJPEG Java Wrapper
    ======================
    
    The TurboJPEG shared library can optionally be built with a Java Native
    Interface wrapper, which allows the library to be loaded and used directly from
    Java applications.  The Java front end for this is defined in several classes
    located under org/libjpegturbo/turbojpeg.  The source code for these Java
    classes is licensed under a BSD-style license, so the files can be incorporated
    directly into both open source and proprietary projects without restriction.  A
    Java archive (JAR) file containing these classes is also shipped with the
    "official" distribution packages of libjpeg-turbo.
    
    TJExample.java, which should also be located in the same directory as this
    README file, demonstrates how to use the TurboJPEG Java API to compress and
    decompress JPEG images in memory.
    
    
    Performance Pitfalls
    --------------------
    
    The TurboJPEG Java API defines several convenience methods that can allocate
    image buffers or instantiate classes to hold the result of compress,
    decompress, or transform operations.  However, if you use these methods, then
    be mindful of the amount of new data you are creating on the heap.  It may be
    necessary to manually invoke the garbage collector to prevent heap exhaustion
    or to prevent performance degradation.  Background garbage collection can kill
    performance, particularly in a multi-threaded environment (Java pauses all
    threads when the GC runs.)
    
    The TurboJPEG Java API always gives you the option of pre-allocating your own
    source and destination buffers, which allows you to re-use those buffers for
    compressing/decompressing multiple images.  If the image sequence you are
    compressing or decompressing consists of images of the same size, then
    pre-allocating the buffers is recommended.
    
    
    Installation Directory
    ----------------------
    
    The TurboJPEG Java Wrapper will look for the TurboJPEG JNI library
    (libturbojpeg.so, libturbojpeg.dylib, or turbojpeg.dll) in the system library
    paths or in any paths specified in LD_LIBRARY_PATH (Un*x), DYLD_LIBRARY_PATH
    (Mac), or PATH (Windows.)  Failing this, on Un*x and Mac systems, the wrapper
    will look for the JNI library under the library directory configured when
    libjpeg-turbo was built.  If that library directory is
    /opt/libjpeg-turbo/lib32, then /opt/libjpeg-turbo/lib64 is also searched, and
    vice versa.
    
    If you installed the JNI library into another directory, then you will need
    to pass an argument of -Djava.library.path={path_to_JNI_library} to java, or
    manipulate LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, or PATH to include the directory
    containing the JNI library.