Permalink
Commits on Jul 15, 2016
  1. @enh

    Merge "Fix AArch64 ABI conformance issue in SIMD code."

    enh committed with Gerrit Code Review Jul 15, 2016
  2. @enh

    Fix AArch64 ABI conformance issue in SIMD code.

    In the AArch64 ABI, the high (unused) DWORD of a 32-bit argument's
    register is undefined, so it was incorrect to use 64-bit instructions
    to transfer a JDIMENSION argument in the 64-bit NEON SIMD functions.
    The code worked thus far only because the existing compiler optimizers
    weren't smart enough to do anything else with the register in question,
    so the upper 32 bits happened to be all zeroes.
    
    The latest builds of Clang/LLVM have a smarter optimizer, and under
    certain circumstances, it will attempt to load-combine adjacent 32-bit
    integers from one of the libjpeg structures into a single 64-bit integer
    and pass that 64-bit integer as a 32-bit argument to one of the SIMD
    functions (which is allowed by the ABI, since the upper 32 bits of the
    32-bit argument's register are undefined.)  This caused the
    libjpeg-turbo regression tests to crash.
    
    This patch tries to use the Wn registers whenever possible.  Otherwise,
    it uses a zero-extend instruction to avoid using the upper 32 bits of
    the 64-bit registers, which are not guaranteed to be valid for 32-bit
    arguments.
    
    Based on sebpop@1fbae13
    
    Closes #91.  Refer also to android-ndk/ndk#110 and
    https://llvm.org/bugs/show_bug.cgi?id=28393
    
    (cherrypick from external/libjpeg-turbo of c8282be605a139b269f2b8f4b4fb6f4118e740ab.)
    
    Change-Id: I935a3696106e7ffcf9b1a6c12cb7f31d95b4ccc8
    enh committed Jul 15, 2016
Commits on Jun 21, 2016
  1. @danw

    Merge "Add NDK versions of libjpeg"

    danw committed with Gerrit Code Review Jun 21, 2016
  2. @danw

    Add NDK versions of libjpeg

    Change-Id: I753d5fc954522d8b9e66406ec9778e2df9237d8c
    danw committed Jun 17, 2016
Commits on Mar 25, 2016
  1. Merge "Use arch-specific variables"

    Ying Wang committed with Gerrit Code Review Mar 25, 2016
  2. @wangying1015

    Use arch-specific variables

    This fixes x86+arm multilib build.
    
    Bug: 27526885
    Change-Id: I06d11b33ed2fef027ff73dda9309b29d28dda6b6
    wangying1015 committed Mar 25, 2016
Commits on Jan 26, 2016
  1. @danw

    Merge "Remove headers from LOCAL_SRC_FILES"

    danw committed with Gerrit Code Review Jan 26, 2016
Commits on Jan 25, 2016
  1. @danw

    Remove headers from LOCAL_SRC_FILES

    The build system does not use headers in LOCAL_SRC_FILES. To prevent
    typos, it's becoming a warning to add something to LOCAL_SRC_FILES that
    is not used.
    
    Change-Id: Ib005369c88fc8fb93b512fd6492c2d19ee14d6ae
    danw committed Jan 25, 2016
Commits on Jan 22, 2016
  1. @enh

    Merge "libjpeg: -Wno-unused-parameter."

    enh committed with Gerrit Code Review Jan 22, 2016
Commits on Jan 21, 2016
  1. @enh

    libjpeg: -Wno-unused-parameter.

    Change-Id: Id9b260f6d189edca04093f04fbef8cf91a75efab
    enh committed Jan 21, 2016
Commits on Dec 22, 2015
  1. @colincross

    Merge "libjpeg: export include dirs"

    colincross committed with Gerrit Code Review Dec 22, 2015
  2. @colincross

    libjpeg: export include dirs

    Export $(LOCAL_PATH) as an include dir to modules that depend on libjpeg
    so they can include jpeglib.h.
    
    Change-Id: I1c708ad587c073b97f382226bc34a22f24257d64
    colincross committed Dec 22, 2015
Commits on Nov 5, 2015
  1. Merge "Revert "Revert "JPEG decoding arm64 optimization"""

    John Reck committed with Gerrit Code Review Nov 5, 2015
Commits on Nov 4, 2015
  1. @ek9852

    Revert "Revert "JPEG decoding arm64 optimization""

    And fix clang build break on
    .arch armv8-a+fp+simd
    
    This reverts commit 0e087c4.
    
    Change-Id: I1447da5403c55a0079e46f052b18005b9bc5a438
    ek9852 committed Nov 4, 2015
Commits on Nov 3, 2015
  1. @enh

    Merge "Revert "JPEG decoding arm64 optimization""

    enh committed with Gerrit Code Review Nov 3, 2015
  2. @enh

    Revert "JPEG decoding arm64 optimization"

    This reverts commit 1ace004.
    
    This change broke the AOSP N9 build:
    
      external/jpeg/jsimd_arm64_neon.S:33:1: error: unknown directive
      .arch armv8-a+fp+simd
      ^
    
    Change-Id: I8a75667268a52efd3a91cd1e9b74add565fae2be
    enh committed Nov 3, 2015
  3. Merge "JPEG decoding arm64 optimization"

    John Reck committed with Gerrit Code Review Nov 3, 2015
Commits on Nov 2, 2015
  1. @ek9852

    JPEG decoding arm64 optimization

    Previously only arm 32 bits jpeg library are assembly optimzated.
    Porting from libjpeg-turbo commit-id:d7e6dd639d91ee8770d070c11087926c5d5daa0f
    for idct and color conversion assembly optimzation for arm64.
    Roughly 20% improvment in idct and 20% improvement for yuv->rgb conversion
    
    Change-Id: I65ac04915685f57e4b0b757ad8bc71c4948dc65d
    ek9852 committed Oct 15, 2015
Commits on Aug 27, 2015
  1. @chih-hung

    am 01ce4e0: (-s ours) resolved conflicts for merge of 0fa7bb8 to mnc-…

    …dev-plus-aosp
    
    * commit '01ce4e0dfd73d2ec550e2efdb4fb228ca836083d':
    chih-hung committed with Android Git Automerger Aug 27, 2015
Commits on Aug 19, 2015
  1. @chih-hung

    resolved conflicts for merge of 0fa7bb8 to mnc-dev-plus-aosp

    Change-Id: I5aee0816a8ab0d531df88bffd70c6c91e07ebdfb
    chih-hung committed Aug 19, 2015
  2. @chih-hung

    resolved conflicts for merge of 0fa7bb8 to mnc-dr-dev-plus-aosp

    Change-Id: I89a7d96e8c3267799c7616da89448061f1839b00
    chih-hung committed Aug 19, 2015
  3. @chih-hung

    Merge "Use unified syntax to compile with both llvm and gas."

    chih-hung committed with Gerrit Code Review Aug 19, 2015
Commits on Aug 18, 2015
  1. @chih-hung

    Use unified syntax to compile with both llvm and gas.

    * Remove useless stab debug info directive .func/.endfunc,
      which are not recognized by clang/llvm integrated assembler.
    * Replace orreqs with orrseq.
    * Use full syntax of ldrd.
    * New assembler output code is identical to old gas output.
    
    Change-Id: I5144e75a8459ce9630477513d4b4570f624257a0
    chih-hung committed Aug 18, 2015
Commits on Jun 10, 2015
  1. @hasinoff

    Fix build break for unbundled apps

    Change-Id: I72f09e303c77873dbc77417b06b71339392dd015
    hasinoff committed Jun 10, 2015
  2. @mattsarett

    libjpeg should always use jmemnobs

    When using jmem-android with libjpeg, the client has the option
    to provide a value for maximum memory usage (or use a default
    value) during the decode.  When this value for maximum memory usage
    would be exceeded, jmem-android backs data arrays with temp files
    to stay below the memory limit.  The CL that defines this memory
    limit is at:
    https://skia.googlesource.com/skia/+/2295c6332512833760060d803cf6ad19a28adc51
    However, it is unclear why the current limit was chosen.
    
    Unfortunately, these temp files are not guaranteed to have unique
    names, leading to bugs where multiple arrays are backed up to the
    same file.  The original purpose of this CL was to fix this bug.
    
    However, attempting to fix this bug has led to a variety of
    additional questions.
    
    The creation of temp files is tricky in this type of library.
    Concerns about the creation of temp files include security,
    performance of writing to disk, and difficulty of finding the
    right directory to use from a library that could be used by an
    arbitrary process.
    
    Additionally, there have already been complaints about jmem-android
    from the users of the Java API.  b/2791339 explains that writing
    to disk is extremely slow, and it causes users of the decoder to
    need WRITE_EXTERNAL_STORAGE permission in order to decode.
    
    This led to the creation of jmem-ashmem.c as the memory
    implementation for libjpeg to be used by apps.  This acts in the
    same way as jmem-android up until the arbitrary maximum memory
    usage value is reached.  At this point, jmem-ashmem uses ashmem
    to back up the data arrays instead of temp files.
    
    We first considered using jmem-ashmem all the time, since it was
    introduced as a faster alternative to jmem-android that does not
    require extra permissions and does not have known bugs.
    
    However, thinking further about jmem-ashmem, we feel that it is
    not a good alternative.  It is quite odd to solve the problem
    of being "out of memory" (having reached the memory limit) by
    choosing to allocate more memory.
    
    It seems more intuitive to simply allocate memory on the heap
    until we run out or the process is killed.
    
    Using jmemnobs.c follows exactly this approach.  It has no memory
    limit and will allocate memory until it runs out or is killed.
    
    Another alternative would be to modify jmem-android to simply
    error exit once we reach a maximum memory limit.  This would
    make behavior more predicatble, but may prevent us from decoding
    images that could possibly be decoded.  This would also bring up
    the question of how we choose this maximum memory limit.
    
    BUG:20541233
    
    Change-Id: Iae944ac8588769c3e24f25f64de847e58cc2ad2e
    mattsarett committed Apr 23, 2015
Commits on Feb 20, 2015
  1. @LeonScroggins

    am c261b80: am d22d8e0: am 1933272: am 31b3a82: am 0e1c7ef: Fix bugs …

    …in jmem-ashmem.
    
    * commit 'c261b80971b2d214f2801e434f15e181cda01c5b':
      Fix bugs in jmem-ashmem.
    LeonScroggins committed with Android Git Automerger Feb 20, 2015
  2. @LeonScroggins

    am d22d8e0: am 1933272: am 31b3a82: am 0e1c7ef: Fix bugs in jmem-ashmem.

    * commit 'd22d8e03f6bec40d22d1baad36884bd6dd11dc5e':
      Fix bugs in jmem-ashmem.
    LeonScroggins committed with Android Git Automerger Feb 20, 2015
  3. @LeonScroggins

    am 1933272: am 31b3a82: am 0e1c7ef: Fix bugs in jmem-ashmem.

    * commit '193327270691afde273fe6befd88aa6942862373':
      Fix bugs in jmem-ashmem.
    LeonScroggins committed with Android Git Automerger Feb 20, 2015
  4. @LeonScroggins

    am 31b3a82: am 0e1c7ef: Fix bugs in jmem-ashmem.

    * commit '31b3a825a1934d9635e4b674dda9025465d35b69':
      Fix bugs in jmem-ashmem.
    LeonScroggins committed with Android Git Automerger Feb 20, 2015
  5. @LeonScroggins

    am 0e1c7ef: Fix bugs in jmem-ashmem.

    * commit '0e1c7ef17722081497e0ae6757d02e649454646a':
      Fix bugs in jmem-ashmem.
    LeonScroggins committed with Android Git Automerger Feb 20, 2015
Commits on Feb 19, 2015
  1. @LeonScroggins @LeonScroggins

    Fix bugs in jmem-ashmem.

    If ashmem_set_prot_region fails, close the previously opened file.
    
    If mmap fails, close the file and return -1.
    
    BUG:18894965
    Change-Id: I936b5c7395480249b1457e7dee566da6141fb023
    (cherry picked from commit 3773c6e)
    (cherry picked from commit a9ccf6f)
    LeonScroggins committed with LeonScroggins Jan 15, 2015
Commits on Jan 22, 2015
  1. @LeonScroggins

    am 1dae686: am a9ccf6f: Fix bugs in jmem-ashmem.

    * commit '1dae686531927208eca3dc4f99e117ff28aeba97':
      Fix bugs in jmem-ashmem.
    LeonScroggins committed with Android Git Automerger Jan 22, 2015
  2. @LeonScroggins

    am a9ccf6f: Fix bugs in jmem-ashmem.

    * commit 'a9ccf6f358d544eedc9432ca81da3d3c76b0e65a':
      Fix bugs in jmem-ashmem.
    LeonScroggins committed with Android Git Automerger Jan 22, 2015
Commits on Jan 16, 2015
  1. @LeonScroggins @LeonScroggins

    Fix bugs in jmem-ashmem.

    If ashmem_set_prot_region fails, close the previously opened file.
    
    If mmap fails, close the file and return -1.
    
    BUG:18894965
    Change-Id: I936b5c7395480249b1457e7dee566da6141fb023
    (cherry picked from commit 3773c6e)
    LeonScroggins committed with LeonScroggins Jan 15, 2015
Commits on Jan 15, 2015
  1. @LeonScroggins

    Fix bugs in jmem-ashmem.

    If ashmem_set_prot_region fails, close the previously opened file.
    
    If mmap fails, close the file and return -1.
    
    BUG:18894965
    Change-Id: I936b5c7395480249b1457e7dee566da6141fb023
    LeonScroggins committed Jan 15, 2015