From fa626671c5625f0ec7487806d18cccaff49e0265 Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Thu, 28 Nov 2024 15:50:16 +0100 Subject: [PATCH] Bump AVM to research-8.1.0 (#2506) --- CHANGELOG.md | 2 +- cmake/Modules/LocalAom.cmake | 2 +- ext/avm.cmd | 2 +- src/codec_avm.c | 6 ++++-- src/obu.c | 30 ------------------------------ 5 files changed, 7 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 487f641234..e9ea1ce798 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ The changes are relative to the previous release, unless the baseline is specifi decoder->image->gainMap != NULL instead. * Write an empty HandlerBox name field instead of "libavif" (saves 7 bytes). * Update aom.cmd/LocalAom.cmake: v3.11.0 -* Update avm.cmd: research-v8.0.0 +* Update avm.cmd: research-v8.1.0 * Update dav1d.cmd/dav1d_android.sh/LocalDav1d.cmake: 1.5.0 * Update libjpeg.cmd/LocalJpeg.cmake: v3.0.4 * Update libxml2.cmd/LocalLibXml2.cmake: v2.13.4 diff --git a/cmake/Modules/LocalAom.cmake b/cmake/Modules/LocalAom.cmake index c375f9dbe2..44548ed54e 100644 --- a/cmake/Modules/LocalAom.cmake +++ b/cmake/Modules/LocalAom.cmake @@ -1,5 +1,5 @@ set(AVIF_LOCAL_AOM_GIT_TAG v3.11.0) -set(AVIF_LOCAL_AVM_GIT_TAG research-v8.0.0) +set(AVIF_LOCAL_AVM_GIT_TAG research-v8.1.0) if(AVIF_CODEC_AVM) # Building the avm repository generates files such as "libaom.a" because it is a fork of aom, diff --git a/ext/avm.cmd b/ext/avm.cmd index 976a0ad470..7ed0076772 100755 --- a/ext/avm.cmd +++ b/ext/avm.cmd @@ -8,7 +8,7 @@ : # If you're running this on Windows, be sure you've already run this (from your VC2019 install dir): : # "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" -git clone -b research-v8.0.0 --depth 1 https://gitlab.com/AOMediaCodec/avm.git +git clone -b research-v8.1.0 --depth 1 https://gitlab.com/AOMediaCodec/avm.git cd avm diff --git a/src/codec_avm.c b/src/codec_avm.c index 698b062cca..2c67aeab08 100644 --- a/src/codec_avm.c +++ b/src/codec_avm.c @@ -145,7 +145,8 @@ static avifBool avmCodecGetNextImage(struct avifCodec * codec, return AVIF_FALSE; } if (codec->internal->image->monochrome) { - // avm does not handle monochrome as of research-v8.0.0. + // avm does not handle monochrome as of research-v8.1.0. + // https://gitlab.com/AOMediaCodec/avm/-/issues/522 // This should not happen. yuvFormat = AVIF_PIXEL_FORMAT_YUV400; } @@ -658,7 +659,8 @@ static avifResult avmCodecEncodeImage(avifCodec * codec, cfg->g_threads = AVIF_MIN(encoder->maxThreads, 64); } - // avm does not handle monochrome as of research-v8.0.0. + // avm does not handle monochrome as of research-v8.1.0. + // https://gitlab.com/AOMediaCodec/avm/-/issues/522 // TODO(yguyon): Enable when fixed upstream codec->internal->monochromeEnabled = AVIF_FALSE; diff --git a/src/obu.c b/src/obu.c index c7a2151584..a6e341bfda 100644 --- a/src/obu.c +++ b/src/obu.c @@ -372,7 +372,6 @@ static avifBool parseAV1SequenceHeader(avifBits * bits, avifSequenceHeader * hea // See https://gitlab.com/AOMediaCodec/avm/-/blob/main/av1/decoder/decodeframe.c static avifBool parseAV2SequenceHeader(avifBits * bits, avifSequenceHeader * header) { -#if defined(AVIF_ENABLE_CWG_E103) // See read_sequence_header_obu() in avm. AVIF_CHECK(parseSequenceHeaderProfile(bits, header)); @@ -387,34 +386,6 @@ static avifBool parseAV2SequenceHeader(avifBits * bits, avifSequenceHeader * hea // See read_sequence_header_obu() in avm. AVIF_CHECK(parseSequenceHeaderLevelIdxAndTier(bits, header)); - return !bits->error; -#else // !defined(AVIF_ENABLE_CWG_E103) - // See read_sequence_header_obu() in avm. - AVIF_CHECK(parseSequenceHeaderProfile(bits, header)); - AVIF_CHECK(parseSequenceHeaderLevelIdxAndTier(bits, header)); - - // See av1_read_sequence_header() in avm. - AVIF_CHECK(parseSequenceHeaderFrameMaxDimensions(bits, header)); - if (!avifBitsRead(bits, 1)) // BLOCK_256X256 - avifBitsRead(bits, 1); // BLOCK_128X128 - AVIF_CHECK(parseSequenceHeaderEnabledFeatures(bits, header)); - - avifBitsRead(bits, 2); // enable_superres, enable_cdef - if (avifBitsRead(bits, 1)) { // enable_restoration - const int lr_tools_disable_mask_length = /*RESTORE_SWITCHABLE_TYPES=*/5 - 1; - avifBitsRead(bits, lr_tools_disable_mask_length); // lr_tools_disable_mask[0] - if (avifBitsRead(bits, 1)) { - avifBitsRead(bits, lr_tools_disable_mask_length - 1); // lr_tools_disable_mask[1] - } - } - - // See av1_read_color_config() in avm. - AVIF_CHECK(parseSequenceHeaderColorConfig(bits, header)); - // Ignored fields. - // separate_uv_delta_q - // base_y_dc_delta_q - // base_uv_dc_delta_q - // See read_sequence_header_obu() in avm. // Ignored field. // film_grain_params_present @@ -422,7 +393,6 @@ static avifBool parseAV2SequenceHeader(avifBits * bits, avifSequenceHeader * hea // See av1_read_sequence_header_beyond_av1() in avm. // Other ignored fields. return !bits->error; -#endif // defined(AVIF_ENABLE_CWG_E103) } #endif