Merge branch 'master' into dev
This commit is contained in:
@@ -49,6 +49,9 @@ code in libjpeg-turbo from building.
|
|||||||
version of TJBench from outputting any reference images (the `-nowrite` switch
|
version of TJBench from outputting any reference images (the `-nowrite` switch
|
||||||
was accidentally enabled by default.)
|
was accidentally enabled by default.)
|
||||||
|
|
||||||
|
4. libjpeg-turbo should now build and run with full AltiVec SIMD acceleration
|
||||||
|
on PowerPC-based AmigaOS 4 and OpenBSD systems.
|
||||||
|
|
||||||
|
|
||||||
1.5.1
|
1.5.1
|
||||||
=====
|
=====
|
||||||
|
|||||||
57
LICENSE.md
57
LICENSE.md
@@ -9,13 +9,12 @@ libjpeg-turbo is covered by three compatible BSD-style open source licenses:
|
|||||||
This license applies to the libjpeg API library and associated programs
|
This license applies to the libjpeg API library and associated programs
|
||||||
(any code inherited from libjpeg, and any modifications to that code.)
|
(any code inherited from libjpeg, and any modifications to that code.)
|
||||||
|
|
||||||
- The Modified (3-clause) BSD License, which is listed in
|
- The Modified (3-clause) BSD License, which is listed below
|
||||||
[turbojpeg.c](turbojpeg.c)
|
|
||||||
|
|
||||||
This license covers the TurboJPEG API library and associated programs, as
|
This license covers the TurboJPEG API library and associated programs, as
|
||||||
well as the build system.
|
well as the build system.
|
||||||
|
|
||||||
- The zlib License, which is listed in [simd/jsimdext.inc](simd/jsimdext.inc)
|
- The zlib License, which is listed below
|
||||||
|
|
||||||
This license is a subset of the other two, and it covers the libjpeg-turbo
|
This license is a subset of the other two, and it covers the libjpeg-turbo
|
||||||
SIMD extensions.
|
SIMD extensions.
|
||||||
@@ -87,3 +86,55 @@ best of our understanding.
|
|||||||
- IJG License
|
- IJG License
|
||||||
- Modified BSD License
|
- Modified BSD License
|
||||||
- zlib License
|
- zlib License
|
||||||
|
|
||||||
|
|
||||||
|
The Modified (3-clause) BSD License
|
||||||
|
===================================
|
||||||
|
|
||||||
|
Copyright (C)\<YEAR\> \<AUTHOR\>. All Rights Reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
- Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
- 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.
|
||||||
|
- Neither the name of the libjpeg-turbo Project 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 HOLDERS 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.
|
||||||
|
|
||||||
|
|
||||||
|
The zlib License
|
||||||
|
================
|
||||||
|
|
||||||
|
Copyright (C) \<YEAR\>, \<AUTHOR\>.
|
||||||
|
|
||||||
|
This software is provided 'as-is', without any express or implied
|
||||||
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
arising from the use of this software.
|
||||||
|
|
||||||
|
Permission is granted to anyone to use this software for any purpose,
|
||||||
|
including commercial applications, and to alter it and redistribute it
|
||||||
|
freely, subject to the following restrictions:
|
||||||
|
|
||||||
|
1. The origin of this software must not be misrepresented; you must not
|
||||||
|
claim that you wrote the original software. If you use this software
|
||||||
|
in a product, an acknowledgment in the product documentation would be
|
||||||
|
appreciated but is not required.
|
||||||
|
2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
misrepresented as being the original software.
|
||||||
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
/* libjpeg-turbo build number */
|
/* libjpeg-turbo build number */
|
||||||
#define BUILD "@BUILD@"
|
#define BUILD "@BUILD@"
|
||||||
|
|
||||||
|
/* Compiler's inline keyword */
|
||||||
|
#undef inline
|
||||||
|
|
||||||
/* How to obtain function inlining. */
|
/* How to obtain function inlining. */
|
||||||
#define INLINE @INLINE@
|
#define INLINE @INLINE@
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,15 @@
|
|||||||
|
|
||||||
#include "./md5.h"
|
#include "./md5.h"
|
||||||
|
|
||||||
|
#ifdef __amigaos4__
|
||||||
|
#include <machine/endian.h>
|
||||||
|
#define le32toh(x) (((x & 0xff) << 24) | \
|
||||||
|
((x & 0xff00) << 8) | \
|
||||||
|
((x & 0xff0000) >> 8) | \
|
||||||
|
((x & 0xff000000) >> 24))
|
||||||
|
#define htole32(x) le32toh(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
static void MD5Transform(unsigned int [4], const unsigned char [64]);
|
static void MD5Transform(unsigned int [4], const unsigned char [64]);
|
||||||
|
|
||||||
#if (BYTE_ORDER == LITTLE_ENDIAN)
|
#if (BYTE_ORDER == LITTLE_ENDIAN)
|
||||||
|
|||||||
4
rdppm.c
4
rdppm.c
@@ -251,7 +251,7 @@ get_word_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
|
|||||||
ptr = source->pub.buffer[0];
|
ptr = source->pub.buffer[0];
|
||||||
bufferptr = source->iobuffer;
|
bufferptr = source->iobuffer;
|
||||||
for (col = cinfo->image_width; col > 0; col--) {
|
for (col = cinfo->image_width; col > 0; col--) {
|
||||||
register int temp;
|
register unsigned int temp;
|
||||||
temp = UCH(*bufferptr++) << 8;
|
temp = UCH(*bufferptr++) << 8;
|
||||||
temp |= UCH(*bufferptr++);
|
temp |= UCH(*bufferptr++);
|
||||||
if (temp > maxval)
|
if (temp > maxval)
|
||||||
@@ -278,7 +278,7 @@ get_word_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
|
|||||||
ptr = source->pub.buffer[0];
|
ptr = source->pub.buffer[0];
|
||||||
bufferptr = source->iobuffer;
|
bufferptr = source->iobuffer;
|
||||||
for (col = cinfo->image_width; col > 0; col--) {
|
for (col = cinfo->image_width; col > 0; col--) {
|
||||||
register int temp;
|
register unsigned int temp;
|
||||||
temp = UCH(*bufferptr++) << 8;
|
temp = UCH(*bufferptr++) << 8;
|
||||||
temp |= UCH(*bufferptr++);
|
temp |= UCH(*bufferptr++);
|
||||||
if (temp > maxval)
|
if (temp > maxval)
|
||||||
|
|||||||
@@ -31,6 +31,12 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#if defined(__OpenBSD__)
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/sysctl.h>
|
||||||
|
#include <machine/cpu.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static unsigned int simd_support = ~0;
|
static unsigned int simd_support = ~0;
|
||||||
|
|
||||||
#if defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
|
#if defined(__linux__) || defined(ANDROID) || defined(__ANDROID__)
|
||||||
@@ -106,6 +112,12 @@ init_simd (void)
|
|||||||
char *env = NULL;
|
char *env = NULL;
|
||||||
#if !defined(__ALTIVEC__) && (defined(__linux__) || defined(ANDROID) || defined(__ANDROID__))
|
#if !defined(__ALTIVEC__) && (defined(__linux__) || defined(ANDROID) || defined(__ANDROID__))
|
||||||
int bufsize = 1024; /* an initial guess for the line buffer size limit */
|
int bufsize = 1024; /* an initial guess for the line buffer size limit */
|
||||||
|
#elif defined(__amigaos4__)
|
||||||
|
uint32 altivec = 0;
|
||||||
|
#elif defined(__OpenBSD__)
|
||||||
|
int mib[2] = { CTL_MACHDEP, CPU_ALTIVEC };
|
||||||
|
int altivec;
|
||||||
|
size_t len = sizeof(altivec);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (simd_support != ~0U)
|
if (simd_support != ~0U)
|
||||||
@@ -122,10 +134,12 @@ init_simd (void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#elif defined(__amigaos4__)
|
#elif defined(__amigaos4__)
|
||||||
uint32 altivec = 0;
|
|
||||||
IExec->GetCPUInfoTags(GCIT_VectorUnit, &altivec, TAG_DONE);
|
IExec->GetCPUInfoTags(GCIT_VectorUnit, &altivec, TAG_DONE);
|
||||||
if(altivec == VECTORTYPE_ALTIVEC)
|
if(altivec == VECTORTYPE_ALTIVEC)
|
||||||
simd_support |= JSIMD_ALTIVEC;
|
simd_support |= JSIMD_ALTIVEC;
|
||||||
|
#elif defined(__OpenBSD__)
|
||||||
|
if (sysctl(mib, 2, &altivec, &len, NULL, 0) == 0 && altivec != 0)
|
||||||
|
simd_support |= JSIMD_ALTIVEC;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Force different settings through environment variables */
|
/* Force different settings through environment variables */
|
||||||
|
|||||||
Reference in New Issue
Block a user