Skip to content

Commit

Permalink
Upgrade libaom
Browse files Browse the repository at this point in the history
  • Loading branch information
novomesk committed Dec 19, 2023
1 parent 81a7e1b commit 3f11f3e
Show file tree
Hide file tree
Showing 430 changed files with 49,825 additions and 30,696 deletions.
10 changes: 7 additions & 3 deletions ext/libavif/ext/aom/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Anupam Pandey <[email protected]>
Apurve Kumar Pandey <[email protected]>
Arild Fuldseth <[email protected]>
Aron Rosenberg <[email protected]>
Arpad Panyik <[email protected]>
Arun Singh Negi <[email protected]>
Attila Nagy <[email protected]>
Balaji Anandapadmanaban <[email protected]>
Expand Down Expand Up @@ -96,6 +97,7 @@ Hanno Böck <[email protected]>
Harish Mahendrakar <[email protected]>
Henrik Lundin <[email protected]>
Hien Ho <[email protected]>
Hirokazu Honda <[email protected]>
Hui Su <[email protected]>
Ilie Halip <[email protected]>
Ilya Brailovskiy <[email protected]>
Expand Down Expand Up @@ -150,6 +152,7 @@ Larisa Markeeva <[email protected]>
Lauren Partin <[email protected]>
Lawrence Velázquez <[email protected]>
leolzhao <[email protected]>
Leon Kollar <[email protected]>
L. E. Segovia <[email protected]>
Lester Lu <[email protected]>
liang zhao <[email protected]>
Expand Down Expand Up @@ -191,7 +194,6 @@ Morton Jonuschat <[email protected]>
Mudassir Galaganath <[email protected]>
Mufaddal Chakera <[email protected]>
Narayan Kalaburgi <[email protected]>
Narayan <[email protected]>
Nathan E. Egge <[email protected]>
Neeraj Gadgil <[email protected]>
Neha Mary Thomas <[email protected]>
Expand Down Expand Up @@ -242,8 +244,10 @@ Salome Thirot <[email protected]>
Sami Boukortt <[email protected]>
Sami Pietilä <[email protected]>
Samuel Thibault <[email protected]>
Samuthirika S <[email protected]>
Sarah Parker <[email protected]>
Sasi Inguva <[email protected]>
Satheesh Kumar <[email protected]>
Satish Kumar Suman <[email protected]>
Scott Graham <[email protected]>
Scott LaVarnway <[email protected]>
Expand All @@ -261,8 +265,9 @@ Soo-Chul Han <[email protected]>
Stanislav Vitvitskyy <[email protected]>
Stefan Holmer <[email protected]>
Steinar Midtskogen <[email protected]>
Steve Lhomme <[email protected]>
Suman Sunkara <[email protected]>
susannad <[email protected]>
Susanna D'Souza <[email protected]>
Taekhyun Kim <[email protected]>
Takanori MATSUURA <[email protected]>
Tamar Levy <[email protected]>
Expand Down Expand Up @@ -290,7 +295,6 @@ Vincent Rabaud <[email protected]>
Vishesh <[email protected]>
Vishnu Teja Manyam <[email protected]>
Vitalii Dziumenko <[email protected]>
Vitalii Dziumenko <[email protected]>
Wan-Teh Chang <[email protected]>
Wei-Ting Lin <[email protected]>
Wenyao Liu <[email protected]>
Expand Down
61 changes: 61 additions & 0 deletions ext/libavif/ext/aom/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
2023-11-30 v3.8.0
This release includes new codec interfaces, compression efficiency and
perceptual improvements, speedup and memory optimizations and many bug
fixes. This release is ABI compatible with the last release.

- New Features
* New codec controls:
* AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR: Set the maximum number of
consecutive frame drops allowed for the frame dropper in 1 pass
CBR mode.
* Run-time CPU feature detection for all Arm platforms:
CRC, DotProd, I8MM and SVE CPU feature presence is detected at run
time and code paths making use of these features are selected
dynamically. These code paths provide meaningful performance gains
for standard bitdepth RTC and VoD encoding: up to 10% and 20%
respectively, over the Armv8.0-A baseline build.
* RTC: Frame-dropper support added to the rate control library.
* RTC Rate control improvements for low bitrate and for SVC.

- Compression Efficiency Improvements
* Improved accuracy of cost estimation for loop restoration and
global motion.
* Improved selection of loop restoration unit size - full search up
to (non-realtime) speed 2, retuned static selection at higher
speeds.
* RTC Screen content mode: 3-5% bdrate gains across speeds 7 - 10.
* Good-quality mode: 0.2 - 0.5% bdrate gains across speeds 1 - 4.

- Perceptual Quality Improvements
* RTC Screen: Improved visual quality for scrolling.
* RTC: Improved color quality for both screen and video mode.

- Speedup and Memory Optimizations
* Good-quality, single-thread encoder speedups:
o 15% improvement for speed 5.
o 12% improvement for speed 6.
* Arm standard bitdepth VoD (--good):
o 8% speedup for speeds 0 and 1.
o 20% speedup for speed 2.
o 27% speedup for speed 3.
o 30% speedup for speed 4.
o 38% speedup for speeds 5 and 6.
* Arm high bitdepth VoD (--good):
o 206% speedup for speeds 0 and 1.
o 180% speedup for speed 2.
o 51% speedup for speeds 3 and 4.
o 68% speedup for speed 5.
o 72% speedup for speed 6.
* RTC Screen content: 2-6% speedup across speeds 7-10.
* RTC: 2-3% speedup for temporal layers.
* RTC: Speedups to reference scaling in nonrd pickmode.
* Good-quality mode: Simplified global motion estimation, saving
~1200 lines of code and 1KB of tables while improving quality.

- Bug Fixes
* Fixes to improve libaom stability in case of memory allocation
failures.
* Fixes to SIMD functions (x86 AVX2/SSE2 and ARM Neon).
* b/310457427, b/310766628: Bug fixes to only use rec_sse in CBR
mode.

2023-11-17 v3.7.1
This release includes several bug fixes. This release is ABI
compatible with the last release. See
Expand Down
42 changes: 20 additions & 22 deletions ext/libavif/ext/aom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ endif()
# passed to libtool.
#
# We set SO_FILE_VERSION = [c-a].a.r
set(LT_CURRENT 10)
set(LT_REVISION 1)
set(LT_AGE 7)
set(LT_CURRENT 11)
set(LT_REVISION 0)
set(LT_AGE 8)
math(EXPR SO_VERSION "${LT_CURRENT} - ${LT_AGE}")
set(SO_FILE_VERSION "${SO_VERSION}.${LT_AGE}.${LT_REVISION}")
unset(LT_CURRENT)
Expand Down Expand Up @@ -288,9 +288,9 @@ if(BUILD_SHARED_LIBS)
add_library(aom_static STATIC ${target_objs_aom} $<TARGET_OBJECTS:aom_rtcd>)
set_target_properties(aom_static PROPERTIES OUTPUT_NAME aom)
if(MSVC OR (WIN32 AND NOT MINGW))
# Fix race condition on the export library file between the two versions.
# Affects MSVC in all three flavors (stock, Clang/CL, LLVM-- the latter sets
# MSVC and MINGW both to FALSE).
# Fix race condition between the import library and the static library.
# Affects MSVC in all three flavors (stock, clang-cl, LLVM -- the latter
# sets MSVC and MINGW both to FALSE).
set_target_properties(aom PROPERTIES ARCHIVE_OUTPUT_NAME "aom_dll")
endif()

Expand Down Expand Up @@ -323,7 +323,7 @@ if(NOT WIN32 AND NOT APPLE)
endif()
endif()

if(CONFIG_AV1_ENCODER AND NOT CONFIG_REALTIME_ONLY AND NOT BUILD_SHARED_LIBS)
if(CONFIG_AV1_ENCODER AND NOT BUILD_SHARED_LIBS)
list(APPEND AOM_AV1_RC_SOURCES "${AOM_ROOT}/av1/ratectrl_rtc.h"
"${AOM_ROOT}/av1/ratectrl_rtc.cc")
add_library(aom_av1_rc ${AOM_AV1_RC_SOURCES})
Expand All @@ -336,7 +336,7 @@ endif()

# List of object and static library targets.
set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_rtcd aom_mem aom_scale aom)
if(CONFIG_AV1_ENCODER AND NOT CONFIG_REALTIME_ONLY AND NOT BUILD_SHARED_LIBS)
if(CONFIG_AV1_ENCODER AND NOT BUILD_SHARED_LIBS)
set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_av1_rc)
endif()
if(BUILD_SHARED_LIBS)
Expand Down Expand Up @@ -387,13 +387,6 @@ if(ENABLE_EXAMPLES OR ENABLE_TESTS OR ENABLE_TOOLS)
endif()
endif()

if((CONFIG_AV1_DECODER OR CONFIG_AV1_ENCODER) AND ENABLE_EXAMPLES)
add_executable(resize_util "${AOM_ROOT}/examples/resize_util.c"
$<TARGET_OBJECTS:aom_common_app_util>)
set_property(TARGET ${example} PROPERTY FOLDER examples)
list(APPEND AOM_APP_TARGETS resize_util)
endif()

if(CONFIG_AV1_DECODER AND ENABLE_EXAMPLES)
add_executable(aomdec "${AOM_ROOT}/apps/aomdec.c"
$<TARGET_OBJECTS:aom_common_app_util>
Expand Down Expand Up @@ -494,14 +487,18 @@ if(CONFIG_AV1_ENCODER)
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)

add_executable(svc_encoder_rtc "${AOM_ROOT}/examples/svc_encoder_rtc.cc"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)

# Maintain a list of encoder example targets.
list(APPEND AOM_ENCODER_EXAMPLE_TARGETS aomenc lossless_encoder noise_model
photon_noise_table set_maps simple_encoder scalable_encoder
twopass_encoder svc_encoder_rtc)
twopass_encoder)

if(NOT BUILD_SHARED_LIBS)
add_executable(svc_encoder_rtc "${AOM_ROOT}/examples/svc_encoder_rtc.cc"
$<TARGET_OBJECTS:aom_common_app_util>
$<TARGET_OBJECTS:aom_encoder_app_util>)
target_link_libraries(svc_encoder_rtc ${AOM_LIB_LINK_TYPE} aom_av1_rc)
list(APPEND AOM_ENCODER_EXAMPLE_TARGETS svc_encoder_rtc)
endif()
endif()

if(ENABLE_TOOLS)
Expand Down Expand Up @@ -852,7 +849,7 @@ set_user_flags()
# Aomedia documentation rule.
set(DOXYGEN_VERSION_VALUE 0)
if(ENABLE_DOCS)
include(FindDoxygen)
find_package(Doxygen)
if(DOXYGEN_FOUND)
# Check if Doxygen version is >= minimum required version(i.e. 1.8.10).
set(MINIMUM_DOXYGEN_VERSION 1008010)
Expand Down Expand Up @@ -942,7 +939,8 @@ endif()
get_cmake_property(all_cmake_vars VARIABLES)
foreach(var ${all_cmake_vars})
if("${var}" MATCHES "SOURCES$\|_INTRIN_\|_ASM_"
AND NOT "${var}" MATCHES "DOXYGEN\|LIBYUV\|_PKG_\|TEST")
AND NOT "${var}" MATCHES "DOXYGEN\|LIBYUV\|_PKG_\|TEST"
AND NOT "${var}" MATCHES "_ASM_NASM\|_ASM_COMPILER_")
list(APPEND aom_source_vars ${var})
endif()
endforeach()
Expand Down
1 change: 1 addition & 0 deletions ext/libavif/ext/aom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ cross compiling via the use of toolchain files included in the AV1 repository.
The toolchain files available at the time of this writing are:

- arm64-ios.cmake
- arm64-linux-clang.cmake
- arm64-linux-gcc.cmake
- arm64-mingw-gcc.cmake
- armv7-ios.cmake
Expand Down
6 changes: 3 additions & 3 deletions ext/libavif/ext/aom/aom/aom_encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -1006,11 +1006,11 @@ aom_codec_err_t aom_codec_enc_config_set(aom_codec_ctx_t *ctx,
aom_fixed_buf_t *aom_codec_get_global_headers(aom_codec_ctx_t *ctx);

/*!\brief usage parameter analogous to AV1 GOOD QUALITY mode. */
#define AOM_USAGE_GOOD_QUALITY (0)
#define AOM_USAGE_GOOD_QUALITY 0u
/*!\brief usage parameter analogous to AV1 REALTIME mode. */
#define AOM_USAGE_REALTIME (1)
#define AOM_USAGE_REALTIME 1u
/*!\brief usage parameter analogous to AV1 all intra mode. */
#define AOM_USAGE_ALL_INTRA (2)
#define AOM_USAGE_ALL_INTRA 2u

/*!\brief Encode a frame
*
Expand Down
25 changes: 17 additions & 8 deletions ext/libavif/ext/aom/aom/aomcx.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@ enum aome_enc_control_id {
* encoding process, values greater than 0 will increase encoder speed at
* the expense of quality.
*
* Valid range: 0..10. 0 runs the slowest, and 10 runs the fastest;
* Valid range: 0..11. 0 runs the slowest, and 11 runs the fastest;
* quality improves as speed decreases (since more compression
* possibilities are explored).
*
* NOTE: 10 is only allowed in AOM_USAGE_REALTIME. In AOM_USAGE_GOOD_QUALITY
* and AOM_USAGE_ALL_INTRA, 9 is the highest allowed value. However,
* AOM_USAGE_GOOD_QUALITY treats 7..9 the same as 6. Also, AOM_USAGE_REALTIME
* treats 0..4 the same as 5.
* NOTE: 10 and 11 are only allowed in AOM_USAGE_REALTIME. In
* AOM_USAGE_GOOD_QUALITY and AOM_USAGE_ALL_INTRA, 9 is the highest allowed
* value. However, AOM_USAGE_GOOD_QUALITY treats 7..9 the same as 6. Also,
* AOM_USAGE_REALTIME treats 0..4 the same as 5.
*/
AOME_SET_CPUUSED = 13,

Expand Down Expand Up @@ -1527,6 +1527,12 @@ enum aome_enc_control_id {
*/
AV1E_SET_BITRATE_ONE_PASS_CBR = 163,

/*!\brief Codec control to set the maximum number of consecutive frame drops
* allowed for the frame dropper in 1 pass CBR mode, int parameter. Value of
* zero has no effect.
*/
AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR = 164,

// Any new encoder control IDs should be added above.
// Maximum allowed encoder control ID is 229.
// No encoder control ID should be added below.
Expand Down Expand Up @@ -1678,10 +1684,10 @@ typedef struct aom_svc_params {

/*!brief Parameters for setting ref frame config */
typedef struct aom_svc_ref_frame_config {
// 7 references: LAST_FRAME (0), LAST2_FRAME(1), LAST3_FRAME(2),
// GOLDEN_FRAME(3), BWDREF_FRAME(4), ALTREF2_FRAME(5), ALTREF_FRAME(6).
// 7 references: The index 0 - 6 refers to the references:
// last(0), last2(1), last3(2), golden(3), bwdref(4), altref2(5), altref(6).
int reference[7]; /**< Reference flag for each of the 7 references. */
/*! Buffer slot index for each of 7 references. */
/*! Buffer slot index for each of 7 references indexed above. */
int ref_idx[7];
int refresh[8]; /**< Refresh flag for each of the 8 slots. */
} aom_svc_ref_frame_config_t;
Expand Down Expand Up @@ -2172,6 +2178,9 @@ AOM_CTRL_USE_TYPE(AV1E_GET_LUMA_CDEF_STRENGTH, int *)
AOM_CTRL_USE_TYPE(AV1E_SET_BITRATE_ONE_PASS_CBR, unsigned int)
#define AOM_CTRL_AV1E_SET_BITRATE_ONE_PASS_CBR

AOM_CTRL_USE_TYPE(AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR, int)
#define AOM_CTRL_AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR

/*!\endcond */
/*! @} - end defgroup aom_encoder */
#ifdef __cplusplus
Expand Down
Loading

0 comments on commit 3f11f3e

Please sign in to comment.