Skip to content

Commit

Permalink
Merge tag '3.0.1' into mb-patches
Browse files Browse the repository at this point in the history
  • Loading branch information
DoDoENT committed Jan 3, 2024
2 parents 8d2556e + ec32420 commit 86efc07
Show file tree
Hide file tree
Showing 289 changed files with 50,671 additions and 14,261 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.gitattributes export-ignore
/.github export-ignore
*.ppm binary
/ChangeLog.md conflict-marker-size=8
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ accepted unless:
Specific types of features that *will not* be accepted:

- Features that extend the scope of libjpeg-turbo to support image formats
other than DCT-based JPEG and JFIF
other than DCT-based and lossless JPEG and JFIF
- Features that extend the scope of libjpeg-turbo to support image
processing algorithms that are not necessary for JPEG compression or
decompression
Expand Down
22 changes: 22 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Security Policy

## Supported Versions

Fixes for security vulnerabilities are applied to any applicable branch/release
series that is in the
[Next-Gen, Active, Maintenance, or Extended support category](https://libjpeg-turbo.org/DeveloperInfo/Versioning).

## Reporting a Vulnerability

Vulnerabilities can be reported in one of the following ways:

- [E-mail the project admin](https://libjpeg-turbo.org/About/Contact). You can
optionally encrypt the e-mail using the provided public GPG key.
- Open a
[GitHub draft security advisory](https://github.com/libjpeg-turbo/libjpeg-turbo/security/advisories/new).
- [Alpha/Evolving, Beta, and Post-Beta release series](https://libjpeg-turbo.org/DeveloperInfo/Versioning)
are not expected to be free of bugs, so vulnerabilities that affect only
those release series (for example, vulnerabilities introduced by a new
feature that is not present in a Stable release series) can optionally be
reported using a
[GitHub bug report](https://github.com/libjpeg-turbo/libjpeg-turbo/issues/new/choose).
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**Complete description of the bug fix or feature that this pull request implements**


**Checklist before submitting the pull request, to maximize the chances that the pull request will be accepted**

- [ ] Read CONTRIBUTING.md, a link to which appears under "Helpful resources" below. That document discusses general guidelines for contributing to libjpeg-turbo, as well as the types of contributions that will not be accepted or are unlikely to be accepted.
- [ ] Search the existing issues and pull requests (both open and closed) to ensure that a similar request has not already been submitted and rejected.
- [ ] Discuss the proposed bug fix or feature in a GitHub issue, through direct e-mail with the project maintainer, or on the libjpeg-turbo-devel mailing list.
47 changes: 15 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run: |
echo "BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}" >$GITHUB_ENV
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up build
run: |
mkdir -p $HOME/src/ljt.nightly
Expand Down Expand Up @@ -51,16 +51,17 @@ jobs:
run: |
aws s3 sync --acl public-read --delete $HOME/src/ljt.nightly/latest/files/ s3://libjpeg-turbo-pr/${{env.BRANCH}}/${{github.job}}/
macos:
runs-on: macos-10.15
runs-on: macos-11
steps:
- name: Set global environment variables
run: |
echo "BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}" >$GITHUB_ENV
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up build
run: |
brew install yasm md5sha1sum
sudo xcode-select -s /Applications/Xcode_12.4.app
mkdir -p $HOME/src/ljt.nightly
git clone --depth=1 https://github.com/libjpeg-turbo/buildscripts.git -b main $HOME/src/buildscripts
- name: Configure GPG signing
Expand Down Expand Up @@ -89,7 +90,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up build
run: |
sudo apt install -y nasm
Expand All @@ -105,32 +106,14 @@ jobs:
make -j$NUMCPUS --load-average=$NUMCPUS
make test
JSIMD_FORCESSE2=1 make test
cmake -DFLOATTEST=no-fp-contract ..
cmake -DFLOATTEST8=no-fp-contract ..
JSIMD_FORCENONE=1 make test
popd
linux-12bit:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Build
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: |
mkdir build
pushd build
cmake -G"Unix Makefiles" -DWITH_12BIT=1 \
-DCMAKE_C_FLAGS='--std=gnu90 -Wall -Werror -Wextra -Wpedantic -pedantic-errors -Wdouble-promotion -Wformat-overflow=2 -Wformat-security -Wformat-signedness -Wformat-truncation=2 -Wformat-y2k -Wmissing-include-dirs -Wshift-overflow=2 -Wswitch-bool -Wno-unused-parameter -Wuninitialized -Wstrict-overflow=2 -Wstringop-overflow=4 -Wstringop-truncation -Wduplicated-branches -Wduplicated-cond -Wdeclaration-after-statement -Wshadow -Wunsafe-loop-optimizations -Wundef -Wcast-align -Wno-clobbered -Wjump-misses-init -Wno-sign-compare -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wdisabled-optimization -Wno-overlength-strings' \
..
export NUMCPUS=`grep -c '^processor' /proc/cpuinfo`
make -j$NUMCPUS --load-average=$NUMCPUS
make test
popd
linux-jpeg7-x32:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up build
run: |
sudo apt update
Expand All @@ -141,21 +124,21 @@ jobs:
run: |
mkdir build
pushd build
cmake -G"Unix Makefiles" -DWITH_JPEG7=1 -DCMAKE_C_FLAGS=-mx32 \
-DCMAKE_C_FLAGS='--std=gnu90 -Wall -Werror -Wextra -Wpedantic -pedantic-errors -Wdouble-promotion -Wformat-overflow=2 -Wformat-security -Wformat-signedness -Wformat-truncation=2 -Wformat-y2k -Wmissing-include-dirs -Wshift-overflow=2 -Wswitch-bool -Wno-unused-parameter -Wuninitialized -Wstrict-overflow=2 -Wstringop-overflow=4 -Wstringop-truncation -Wduplicated-branches -Wduplicated-cond -Wdeclaration-after-statement -Wshadow -Wunsafe-loop-optimizations -Wundef -Wcast-align -Wno-clobbered -Wjump-misses-init -Wno-sign-compare -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wdisabled-optimization -Wno-overlength-strings' \
cmake -G"Unix Makefiles" -DWITH_JPEG7=1 \
-DCMAKE_C_FLAGS='-mx32 --std=gnu90 -Wall -Werror -Wextra -Wpedantic -pedantic-errors -Wdouble-promotion -Wformat-overflow=2 -Wformat-security -Wformat-signedness -Wformat-truncation=2 -Wformat-y2k -Wmissing-include-dirs -Wshift-overflow=2 -Wswitch-bool -Wno-unused-parameter -Wuninitialized -Wstrict-overflow=2 -Wstringop-overflow=4 -Wstringop-truncation -Wduplicated-branches -Wduplicated-cond -Wdeclaration-after-statement -Wshadow -Wunsafe-loop-optimizations -Wundef -Wcast-align -Wno-clobbered -Wjump-misses-init -Wno-sign-compare -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wdisabled-optimization -Wno-overlength-strings' \
..
export NUMCPUS=`grep -c '^processor' /proc/cpuinfo`
make -j$NUMCPUS --load-average=$NUMCPUS
make test
JSIMD_FORCESSE2=1 make test
cmake -DFLOATTEST=no-fp-contract ..
cmake -DFLOATTEST8=no-fp-contract ..
JSIMD_FORCENONE=1 make test
popd
linux-jpeg8:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up build
run: |
sudo apt -y install nasm
Expand All @@ -172,21 +155,21 @@ jobs:
make -j$NUMCPUS --load-average=$NUMCPUS
make test
JSIMD_FORCESSE2=1 make test
cmake -DFLOATTEST=no-fp-contract ..
cmake -DFLOATTEST8=no-fp-contract ..
JSIMD_FORCENONE=1 make test
popd
linux-msan:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Build
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: |
mkdir build
pushd build
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=clang -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O3 -g -fsanitize=memory -fno-sanitize-recover=all -fPIE" -DWITH_SIMD=0 ..
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=clang -DCMAKE_C_FLAGS_RELWITHDEBINFO="-O0 -g -fsanitize=memory -fno-sanitize-recover=all -fPIE" -DWITH_SIMD=0 ..
export NUMCPUS=`grep -c '^processor' /proc/cpuinfo`
make -j$NUMCPUS --load-average=$NUMCPUS
make test
Expand Down
27 changes: 15 additions & 12 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Build Requirements
variable or the `ASM_NASM` environment variable. On Windows, use forward
slashes rather than backslashes in the path (for example,
**c:/nasm/nasm.exe**).
* NASM and Yasm are located in the CRB (Code Ready Builder) repository on
Red Hat Enterprise Linux 8 and in the PowerTools repository on RHEL
derivatives, which is not enabled by default.
* NASM and Yasm are located in the CRB (Code Ready Builder) or PowerTools
repository on Red Hat Enterprise Linux 8+ and derivatives, which is not
enabled by default.

### Un*x Platforms (including Linux, Mac, FreeBSD, Solaris, and Cygwin)

Expand Down Expand Up @@ -288,15 +288,6 @@ API/ABI-compatible with libjpeg v8. See [README.md](README.md) for more
information about libjpeg v7 and v8 emulation.


### In-Memory Source/Destination Managers

When using libjpeg v6b or v7 API/ABI emulation, add `-DWITH_MEM_SRCDST=0` to
the CMake command line to build a version of libjpeg-turbo that lacks the
`jpeg_mem_src()` and `jpeg_mem_dest()` functions. These functions were not
part of the original libjpeg v6b and v7 APIs, so removing them ensures strict
conformance with those APIs. See [README.md](README.md) for more information.


### Arithmetic Coding Support

Since the patent on arithmetic coding has expired, this functionality has been
Expand Down Expand Up @@ -372,9 +363,13 @@ located (usually **/usr/bin**.) Next, execute the following commands:

cd {build_directory}
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
-DCMAKE_INSTALL_PREFIX={install_path} \
[additional CMake flags] {source_directory}
make

*{install\_path}* is the path under which the libjpeg-turbo binaries should be
installed.


### 64-bit MinGW Build on Un*x (including Mac and Cygwin)

Expand All @@ -391,9 +386,13 @@ located (usually **/usr/bin**.) Next, execute the following commands:

cd {build_directory}
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
-DCMAKE_INSTALL_PREFIX={install_path} \
[additional CMake flags] {source_directory}
make

*{install\_path}* is the path under which the libjpeg-turbo binaries should be
installed.


Building libjpeg-turbo for iOS
------------------------------
Expand Down Expand Up @@ -429,6 +428,10 @@ iPhone 5S/iPad Mini 2/iPad Air and newer.
[additional CMake flags] {source_directory}
make

Replace `iPhoneOS` with `iPhoneSimulator` and `-miphoneos-version-min` with
`-miphonesimulator-version-min` to build libjpeg-turbo for the iOS simulator on
Macs with Apple silicon CPUs.


Building libjpeg-turbo for Android
----------------------------------
Expand Down
Loading

0 comments on commit 86efc07

Please sign in to comment.