Skip to content

Commit d265a0c

Browse files
committed
Merge branch 'main' into verbose-test-output
* main: (53 commits) Fix reading gray/color ICC profile from color/gray image in apps (AOMediaCodec#2675) Revert "Use SVT_LOG=0 in avifsvttest for SVT-AV1 3.0.0 (AOMediaCodec#2668)" (AOMediaCodec#2674) Fix monochrome ICC profile error message in apps (AOMediaCodec#2673) Add missing changelog for `avifdec --index all` (AOMediaCodec#2672) Specify target platform version in binary artifacts (AOMediaCodec#2652) avidec: output all frames of animations when passed `--index all` (AOMediaCodec#2670) Do not allow keeping the ICC when converting from RGB to gray (AOMediaCodec#2669) Update CHANGELOG (AOMediaCodec#2666) Use SVT_LOG=0 in avifsvttest for SVT-AV1 3.0.0 (AOMediaCodec#2668) read.c: fix empty struct initializers (AOMediaCodec#2661) avifutil.c: fix avifQueryCPUCount() empty param list (AOMediaCodec#2662) Add libyuv dependency to the README.md (AOMediaCodec#2664) fix: patch libyuv CMakeLists for compatibility with gcc 10 (AOMediaCodec#2660) Use default for tensorflow with libavm (AOMediaCodec#2624) Bump some Rust dependencies (AOMediaCodec#2658) Use C99 syntax to initialize avifFileType struct (AOMediaCodec#2657) Bump the github-actions group with 3 updates libargparse: use a git patch file instead of sed command (AOMediaCodec#2654) y4m: Remove some repeated code Remove fully static instructions (AOMediaCodec#2649) ...
2 parents 1a3769c + 1cb71c0 commit d265a0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1092
-579
lines changed

.github/workflows/ci-fuzztest.yml

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
-DAVIF_LIBYUV=${{ matrix.libyuv }}
4646
-DAVIF_BUILD_EXAMPLES=ON -DAVIF_BUILD_APPS=ON
4747
-DAVIF_BUILD_TESTS=ON -DAVIF_GTEST=LOCAL
48-
-DAVIF_ENABLE_EXPERIMENTAL_YCGCO_R=ON
4948
-DAVIF_ENABLE_EXPERIMENTAL_MINI=ON
5049
-DAVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM=ON
5150
-DAVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI=ON

.github/workflows/ci-linux-artifacts.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
types: [created]
77

88
permissions:
9-
contents: read
9+
contents: write
1010

1111
jobs:
1212
build-linux-artifacts:
@@ -34,8 +34,7 @@ jobs:
3434
-DAVIF_ZLIBPNG=LOCAL -DAVIF_JPEG=LOCAL
3535
-DAVIF_BUILD_EXAMPLES=OFF -DAVIF_BUILD_APPS=ON
3636
-DAVIF_BUILD_TESTS=OFF -DAVIF_ENABLE_WERROR=ON
37-
-DCMAKE_C_COMPILER=clang
38-
-DCMAKE_C_FLAGS_RELEASE="-static" -DCMAKE_EXE_LINKER_FLAGS="-static"
37+
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
3938
- name: Build libavif (ninja)
4039
working-directory: ./build
4140
run: ninja

.github/workflows/ci-linux-coverage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555

5656
# See https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
5757
- name: Archive coverage output
58-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
58+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
5959
with:
6060
name: coverage-output
6161
path: |

.github/workflows/ci-linux-golden-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
# See https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
6262
- name: Archive golden tests output for debugging
6363
if: failure()
64-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
64+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
6565
with:
6666
name: golden-tests-output
6767
path: ${{ runner.temp }}/golden_tests/**/*

.github/workflows/ci-macos-artifacts.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
types: [created]
77

88
permissions:
9-
contents: read
9+
contents: write
1010

1111
jobs:
1212
build-macos-artifacts:
@@ -33,7 +33,8 @@ jobs:
3333
-DAVIF_ZLIBPNG=LOCAL -DAVIF_JPEG=LOCAL
3434
-DAVIF_BUILD_EXAMPLES=OFF -DAVIF_BUILD_APPS=ON
3535
-DAVIF_BUILD_TESTS=OFF -DAVIF_ENABLE_WERROR=ON
36-
-DCMAKE_C_COMPILER=clang
36+
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
37+
-DCMAKE_OSX_DEPLOYMENT_TARGET=11
3738
- name: Build libavif (ninja)
3839
working-directory: ./build
3940
run: ninja

.github/workflows/ci-unix-shared-local.yml

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ jobs:
5454
-DAVIF_LIBYUV=${{ matrix.libyuv }}
5555
-DAVIF_BUILD_EXAMPLES=ON -DAVIF_BUILD_APPS=ON
5656
-DAVIF_BUILD_TESTS=ON -DAVIF_GTEST=LOCAL
57-
-DAVIF_ENABLE_EXPERIMENTAL_YCGCO_R=ON
5857
-DAVIF_ENABLE_EXPERIMENTAL_MINI=ON
5958
-DAVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM=ON
6059
-DAVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI=ON

.github/workflows/ci-unix-static-av2.yml

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ jobs:
6565
echo "CC=cc" >> $GITHUB_ENV
6666
shell: bash
6767
- name: Check static link bundling
68+
# Disabled until libavm properly depends on tensorflow-lite.
69+
if: ${{ false }}
6870
run: |
6971
${{ env.CC }} -o avifenc -I./apps/shared -I./third_party/iccjpeg -I./include apps/avifenc.c \
7072
apps/shared/*.c third_party/iccjpeg/iccjpeg.c build/libavif.a \

.github/workflows/ci-unix-static.yml

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ jobs:
5959
-DAVIF_LIBSHARPYUV=LOCAL -DAVIF_LIBXML2=LOCAL -DAVIF_LIBYUV=0
6060
-DAVIF_BUILD_EXAMPLES=ON -DAVIF_BUILD_APPS=ON
6161
-DAVIF_BUILD_TESTS=ON -DAVIF_GTEST=LOCAL
62-
-DAVIF_ENABLE_EXPERIMENTAL_YCGCO_R=ON
6362
-DAVIF_ENABLE_EXPERIMENTAL_MINI=ON
6463
-DAVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM=ON
6564
-DAVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI=ON

.github/workflows/ci-windows-artifacts.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,23 @@ jobs:
5656

5757
- name: Prepare libavif (cmake)
5858
run: >
59-
cmake -G Ninja -S . -B build
59+
cmake -G "Visual Studio 17 2022" -A x64 -S . -B build
6060
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
6161
-DAVIF_CODEC_AOM=LOCAL -DAVIF_CODEC_AOM_ENCODE=ON
6262
-DAVIF_CODEC_AOM_DECODE=OFF -DAVIF_CODEC_DAV1D=LOCAL
6363
-DAVIF_LIBYUV=0 -DAVIF_LIBSHARPYUV=LOCAL
6464
-DAVIF_JPEG=LOCAL -DAVIF_ZLIBPNG=LOCAL
6565
-DAVIF_BUILD_EXAMPLES=OFF -DAVIF_BUILD_APPS=ON
6666
-DAVIF_BUILD_TESTS=OFF -DAVIF_ENABLE_WERROR=ON
67-
- name: Build libavif (ninja)
68-
working-directory: ./build
69-
run: ninja
67+
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=10
68+
- name: Build libavif
69+
run: cmake --build build --config=Release --parallel 4
7070
- name: Archive artifacts
7171
uses: thedoctor0/zip-release@b57d897cb5d60cb78b51a507f63fa184cfe35554 # 0.7.6
7272
with:
7373
type: "zip"
7474
filename: "windows-artifacts.zip"
75-
directory: "build"
75+
directory: "build/Release"
7676
path: "*.exe"
7777
- name: Upload artifacts
7878
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
@@ -81,7 +81,7 @@ jobs:
8181
with:
8282
# See https://docs.github.com/en/webhooks/webhook-events-and-payloads#release.
8383
upload_url: ${{ github.event.release.upload_url }}
84-
asset_path: build/windows-artifacts.zip
84+
asset_path: build/Release/windows-artifacts.zip
8585
asset_name: windows-artifacts.zip
8686
asset_content_type: application/zip
8787

@@ -90,4 +90,4 @@ jobs:
9090
# uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
9191
# with:
9292
# name: windows-artifacts.zip
93-
# path: build/windows-artifacts.zip
93+
# path: build/Release/windows-artifacts.zip

.github/workflows/ci-windows-installed.yml

-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ jobs:
7373
-DAVIF_LIBYUV=0 -DAVIF_ZLIBPNG=SYSTEM
7474
-DAVIF_BUILD_EXAMPLES=ON -DAVIF_BUILD_APPS=ON
7575
-DAVIF_BUILD_TESTS=ON -DAVIF_GTEST=LOCAL
76-
-DAVIF_ENABLE_EXPERIMENTAL_YCGCO_R=ON
7776
-DAVIF_ENABLE_EXPERIMENTAL_MINI=ON
7877
-DAVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM=ON
7978
-DAVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI=ON

.github/workflows/ci-windows-shared-local.yml

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ jobs:
5454
-DAVIF_LIBYUV=0 -DAVIF_ZLIBPNG=LOCAL
5555
-DAVIF_BUILD_EXAMPLES=ON -DAVIF_BUILD_APPS=ON
5656
-DAVIF_BUILD_TESTS=ON -DAVIF_GTEST=LOCAL
57-
-DAVIF_ENABLE_EXPERIMENTAL_YCGCO_R=ON
5857
-DAVIF_ENABLE_EXPERIMENTAL_MINI=ON
5958
-DAVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM=ON
6059
-DAVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI=ON

.github/workflows/ci-windows.yml

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ jobs:
6767
-DAVIF_LIBYUV=0 -DAVIF_ZLIBPNG=LOCAL
6868
-DAVIF_BUILD_EXAMPLES=ON -DAVIF_BUILD_APPS=ON
6969
-DAVIF_BUILD_TESTS=ON -DAVIF_GTEST=LOCAL
70-
-DAVIF_ENABLE_EXPERIMENTAL_YCGCO_R=ON
7170
-DAVIF_ENABLE_EXPERIMENTAL_MINI=ON
7271
-DAVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM=ON
7372
-DAVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI=ON

.github/workflows/scorecard.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
persist-credentials: false
3535

3636
- name: "Run analysis"
37-
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
37+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
3838
with:
3939
results_file: results.sarif
4040
results_format: sarif
@@ -52,14 +52,14 @@ jobs:
5252
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
5353
# format to the repository Actions tab.
5454
- name: "Upload artifact"
55-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
55+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
5656
with:
5757
name: SARIF file
5858
path: results.sarif
5959
retention-days: 5
6060

6161
# Upload the results to GitHub's code scanning dashboard.
6262
- name: "Upload to code-scanning"
63-
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
63+
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
6464
with:
6565
sarif_file: results.sarif

CHANGELOG.md

+59-18
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,71 @@ The changes are relative to the previous release, unless the baseline is specifi
88

99
## [Unreleased]
1010

11+
### Added since 1.2.0
12+
13+
* Add support for outputting all frames of an image sequence in `avifdec`.
14+
`avifdec --index all sequence.avif out.png` creates files named
15+
`out-xxxxxxxxxx.png` where xxxxxxxxxx are the zero-padded frame indices.
16+
17+
### Changed since 1.2.0
18+
19+
* Fix local libargparse dependency patch step on macOS 10.15 and earlier.
20+
* Patch local libyuv dependency for compatibility with gcc 10.
21+
* Use stricter C99 syntax to avoid related compilation issues.
22+
* Reject the conversion in avifenc from non-monochrome/monochrome to
23+
monochrome/non-monochrome when an ICC profile is present and not explicitly
24+
discarded.
25+
26+
## [1.2.0] - 2025-02-25
27+
1128
### Added since 1.1.1
29+
* Turn on the gain map API. Remove the AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP CMake
30+
flag.
31+
* Allow YCgCo_Re and YCgCo_Ro encoding/decoding and update the enum values to
32+
the latest CICP specification. Remove the AVIF_ENABLE_EXPERIMENTAL_YCGCO_R
33+
CMake flag.
1234
* Add the properties and numProperties fields to avifImage. They are filled by
1335
the avifDecoder instance with the properties unrecognized by libavif. They are
1436
written by the avifEncoder.
1537
* Add avif(Un)SignedFraction structs and avifDoubleTo(Un)SignedFraction
1638
utility functions.
1739
* Add 'avifgainmaputil' command line tool to installed apps.
1840
* Add avifCropRectRequiresUpsampling().
41+
* Add experimental support for PixelInformationProperty syntax from HEIF 3rd Ed.
42+
Amd2 behind the compilation flag AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI.
43+
* Add experimental Sample Transform recipe
44+
BIT_DEPTH_EXTENSION_12B_8B_OVERLAP_4B.
1945

2046
### Changed since 1.1.1
2147
* avifenc: Allow large images to be encoded.
2248
* Fix empty CMAKE_CXX_FLAGS_RELEASE if -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=OFF
2349
is specified. https://github.com/AOMediaCodec/libavif/issues/2365.
24-
* Renamed AVIF_ENABLE_EXPERIMENTAL_METAV1 to AVIF_ENABLE_EXPERIMENTAL_MINI and
25-
updated the experimental reduced header feature to the latest specification
26-
draft.
50+
* Rename AVIF_ENABLE_EXPERIMENTAL_METAV1 to AVIF_ENABLE_EXPERIMENTAL_MINI and
51+
update the experimental reduced header feature to the latest specification
52+
draft. Rename AVIF_HEADER_REDUCED to AVIF_HEADER_MINI.
53+
* Update the experimental Sample Transform feature behind the
54+
AVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM CMake flag to the latest
55+
specification draft.
2756
* Ignore gain maps with unsupported metadata. Handle gain maps with
2857
writer_version > 0 correctly.
29-
Simplify gain map API: remove the enableParsingGainMapMetadata setting, now gain
30-
map metadata is always parsed if present and if this feature is compiled in.
31-
Replace enableDecodingGainMap and ignoreColorAndAlpha with a bit field to choose
32-
image content to decode. Remove gainMapPresent: users can check if
33-
decoder->image->gainMap != NULL instead.
58+
* Simplify gain map API: remove the enableParsingGainMapMetadata setting, now
59+
gain map metadata is always parsed if present and if this feature is compiled
60+
in. Replace enableDecodingGainMap and ignoreColorAndAlpha with a bit field to
61+
choose image content to decode. Remove gainMapPresent: users can check if
62+
decoder->image->gainMap != NULL instead. Remove avifGainMapMetadata and
63+
avifGainMapMetadataDouble structs.
3464
* Write an empty HandlerBox name field instead of "libavif" (saves 7 bytes).
35-
* Update aom.cmd/LocalAom.cmake: v3.12.0
36-
* Update avm.cmd: research-v9.0.0
65+
* Check for FileTypeBox precedence in avifParse().
66+
* Do not write an alternative group with the same ID as an item.
67+
* Update aom.cmd/LocalAom.cmake: v3.12.0. The new codec-specific option tune=iq
68+
(image quality) is added in libaom v3.12.0.
69+
* Update parseAV2SequenceHeader() and avm.cmd: research-v9.0.0
3770
* Update dav1d.cmd/dav1d_android.sh/LocalDav1d.cmake: 1.5.1
3871
* Update libjpeg.cmd/LocalJpeg.cmake: v3.0.4
3972
* Update libxml2.cmd/LocalLibXml2.cmake: v2.13.5
4073
* Update libyuv.cmd: ccdf87034 (1903)
41-
* Update svt.cmd/svt.sh/LocalSvt.cmake: v2.3.0
42-
* Change experimental gainmap API: remove avifGainMapMetadata and
43-
avifGainMapMetadataDouble structs.
44-
* Turn on the gain map API. Remove the
45-
AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP compile flag.
74+
* Update svt.cmd/svt.sh/LocalSvt.cmake to v3.0.0. When available, use
75+
EbSvtAv1EncConfiguration::lossless and ::level_of_parallelism in libavif.
4676
* Remove AVIF_ENABLE_GTEST CMake option. It's now implied by
4777
AVIF_GTEST=LOCAL/SYSTEM.
4878
* Deprecate `avifEncoder`'s `minQuantizer`, `maxQuantizer`, `minQuantizerAlpha`,
@@ -56,8 +86,20 @@ The changes are relative to the previous release, unless the baseline is specifi
5686
* Deprecate avifCropRectConvertCleanApertureBox() and
5787
avifCleanApertureBoxConvertCropRect(). Replace them with
5888
avifCropRectFromCleanApertureBox() and avifCleanApertureBoxFromCropRect().
89+
* Write descriptive properties before transformative properties.
5990
* Reject non-essential transformative properties.
6091
* Treat avifenc --stdin as a regular positional file path argument.
92+
* Update man pages based on avifenc/dec's --help message.
93+
* android_jni: Support 16kb page size
94+
* android_jni: Set threads to 2 instead of CPU count
95+
* Fix overflows when dealing with alpha during YUV/RGB conversions and in
96+
avifRGBImageAllocatePixels().
97+
* Make avifEncoder.headerFormat a flag combination for future features.
98+
* Rename AVIF_HEADER_FULL to AVIF_HEADER_DEFAULT. Deprecate AVIF_HEADER_FULL.
99+
* Fix decoding image sequences with non video tracks (such as audio or subtitles).
100+
* Fix type checking of auxiliary tracks: previously any auxiliary track was
101+
assumed to be alpha, even if it was a different type. If the aux type is absent,
102+
it is assumed to be alpha.
61103

62104
## [1.1.1] - 2024-07-30
63105

@@ -269,8 +311,6 @@ List of incompatible ABI changes in this release:
269311
* Add avifenc --no-overwrite flag to avoid overwriting output file.
270312
* Add avifenc --clli flag to set clli.
271313
* Add support for all transfer functions when using libsharpyuv.
272-
* Add experimental support for PixelInformationProperty syntax from HEIF 3rd Ed.
273-
Amd2 behind the compilation flag AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI.
274314

275315
### Changed
276316
* Enable the libaom AV1E_SET_SKIP_POSTPROC_FILTERING codec control by default.
@@ -1187,7 +1227,8 @@ code.
11871227
- Constants `AVIF_VERSION`, `AVIF_VERSION_MAJOR`, `AVIF_VERSION_MINOR`, `AVIF_VERSION_PATCH`
11881228
- `avifVersion()` function
11891229

1190-
[Unreleased]: https://github.com/AOMediaCodec/libavif/compare/v1.1.1...HEAD
1230+
[Unreleased]: https://github.com/AOMediaCodec/libavif/compare/v1.2.0...HEAD
1231+
[1.2.0]: https://github.com/AOMediaCodec/libavif/compare/v1.1.1...v1.2.0
11911232
[1.1.1]: https://github.com/AOMediaCodec/libavif/compare/v1.1.0...v1.1.1
11921233
[1.1.0]: https://github.com/AOMediaCodec/libavif/compare/v1.0.0...v1.1.0
11931234
[1.0.4]: https://github.com/AOMediaCodec/libavif/compare/v1.0.3...v1.0.4

CMakeLists.txt

+7-10
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if(POLICY CMP0169)
2020
cmake_policy(SET CMP0169 OLD)
2121
endif()
2222

23-
project(libavif LANGUAGES C VERSION 1.1.1)
23+
project(libavif LANGUAGES C VERSION 1.2.0)
2424

2525
# The root directory of the avif source
2626
set(AVIF_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
@@ -55,16 +55,15 @@ endif()
5555
# If the source code was changed, but there were no interface changes:
5656
# Increment PATCH.
5757
set(LIBRARY_VERSION_MAJOR 16)
58-
set(LIBRARY_VERSION_MINOR 1)
59-
set(LIBRARY_VERSION_PATCH 1)
58+
set(LIBRARY_VERSION_MINOR 2)
59+
set(LIBRARY_VERSION_PATCH 0)
6060
set(LIBRARY_VERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH}")
6161
set(LIBRARY_SOVERSION ${LIBRARY_VERSION_MAJOR})
6262

6363
option(BUILD_SHARED_LIBS "Build shared avif library" ON)
6464

6565
option(AVIF_ENABLE_WERROR "Treat all compiler warnings as errors" OFF)
6666

67-
option(AVIF_ENABLE_EXPERIMENTAL_YCGCO_R "Enable experimental YCgCo-R matrix code" OFF)
6867
option(AVIF_ENABLE_EXPERIMENTAL_MINI "Enable experimental reduced header" OFF)
6968
option(AVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM "Enable experimental sample transform code" OFF)
7069
option(AVIF_ENABLE_EXPERIMENTAL_EXTENDED_PIXI "Enable experimental PixelInformationProperty syntax from HEIF 3rd Ed. Amd2" OFF)
@@ -340,10 +339,6 @@ if(AVIF_ENABLE_COVERAGE)
340339
endif()
341340
endif()
342341

343-
if(AVIF_ENABLE_EXPERIMENTAL_YCGCO_R)
344-
add_compile_definitions(AVIF_ENABLE_EXPERIMENTAL_YCGCO_R)
345-
endif()
346-
347342
if(AVIF_ENABLE_EXPERIMENTAL_MINI)
348343
add_compile_definitions(AVIF_ENABLE_EXPERIMENTAL_MINI)
349344
endif()
@@ -551,6 +546,8 @@ if(AVIF_CODEC_AVM_ENABLED)
551546
target_sources(avif_obj PRIVATE src/codec_avm.c)
552547

553548
avif_target_link_library(aom)
549+
# C++ is needed because of tensorflow-lite.
550+
set(AVIF_LIB_USE_CXX ON)
554551

555552
message(STATUS "libavif: Codec enabled: avm (encode/decode)")
556553
endif()
@@ -565,8 +562,8 @@ endif()
565562

566563
if(AVIF_LIB_USE_CXX OR AVIF_BUILD_APPS OR (AVIF_BUILD_TESTS AND (AVIF_FUZZTEST OR AVIF_GTEST)))
567564
enable_language(CXX)
568-
if(AVIF_ENABLE_NODISCARD)
569-
# [[nodiscard]] requires C++17.
565+
if(AVIF_ENABLE_NODISCARD OR AVIF_CODEC_AVM_ENABLED)
566+
# [[nodiscard]] and tensorflow-lite require C++17.
570567
set(CMAKE_CXX_STANDARD 17)
571568
set(CMAKE_CXX_STANDARD_REQUIRED ON)
572569
else()

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -144,22 +144,22 @@ The following instructions can be used to build the libavif library and the
144144

145145
#### Build using installed dependencies
146146

147-
To link against the already installed `aom`, `libjpeg` and `libpng` dependency
147+
To link against the already installed `aom`, `libjpeg`, `libpng` and `libyuv` dependency
148148
libraries (recommended):
149149

150150
```sh
151-
git clone -b v1.1.1 https://github.com/AOMediaCodec/libavif.git
151+
git clone -b v1.2.0 https://github.com/AOMediaCodec/libavif.git
152152
cmake -S libavif -B libavif/build -DAVIF_CODEC_AOM=SYSTEM -DAVIF_BUILD_APPS=ON
153153
cmake --build libavif/build --parallel
154154
```
155155

156156
#### Build everything from scratch
157157

158-
For development and debugging purposes, or to generate fully static binaries:
158+
For development and debugging purposes:
159159

160160
```sh
161-
git clone -b v1.1.1 https://github.com/AOMediaCodec/libavif.git
162-
cmake -S libavif -B libavif/build -DBUILD_SHARED_LIBS=OFF -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=LOCAL -DAVIF_LIBSHARPYUV=LOCAL -DAVIF_JPEG=LOCAL -DAVIF_ZLIBPNG=LOCAL -DAVIF_BUILD_APPS=ON -DCMAKE_C_FLAGS_RELEASE="-static" -DCMAKE_EXE_LINKER_FLAGS="-static"
161+
git clone -b v1.2.0 https://github.com/AOMediaCodec/libavif.git
162+
cmake -S libavif -B libavif/build -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=LOCAL -DAVIF_LIBSHARPYUV=LOCAL -DAVIF_JPEG=LOCAL -DAVIF_ZLIBPNG=LOCAL -DAVIF_BUILD_APPS=ON
163163
cmake --build libavif/build --parallel
164164
```
165165

0 commit comments

Comments
 (0)