Skip to content

Commit

Permalink
Merge pull request #9 from And-Nob/master
Browse files Browse the repository at this point in the history
 Merge branch 'master' of github.com:mstorsjo/fdk-aac into HEAD
  • Loading branch information
jjts authored Sep 17, 2024
2 parents a71bddd + d937f45 commit 83dd827
Show file tree
Hide file tree
Showing 443 changed files with 2,422 additions and 1,059 deletions.
215 changes: 215 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
name: CI
on: [push, pull_request]

jobs:
linux-autotools:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
./autogen.sh
./configure --enable-example
make -j$(nproc) CFLAGS="-g -O2 -Werror" CXXFLAGS="-g -O2 -Werror"
- name: Run tests
run: |
sudo apt-get update && sudo apt-get install --no-install-recommends ffmpeg
./test/run-test.sh
linux-cmake:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_PROGRAMS=YES -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror -Wno-stringop-overflow"
cmake --build build
- name: Run tests
run: |
sudo apt-get update && sudo apt-get install --no-install-recommends ffmpeg
cd build
../test/run-test.sh
linux-sanitizers-gcc-autotools:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
./autogen.sh
FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize=shift-base -DDEBUG -fno-sanitize-recover=all"
CC="gcc $FLAGS" CXX="g++ $FLAGS" ./configure --enable-example
make -j$(nproc)
- name: Run tests
run: |
sudo apt-get update && sudo apt-get install --no-install-recommends ffmpeg
./test/run-test.sh
linux-sanitizers-clang-cmake:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize=shift-base -DDEBUG -fno-sanitize-recover=all -fno-sanitize=vptr -fno-sanitize=function"
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_PROGRAMS=YES -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="$FLAGS" -DCMAKE_CXX_FLAGS="$FLAGS"
cmake --build build
- name: Run tests
run: |
sudo apt-get update && sudo apt-get install --no-install-recommends ffmpeg
cd build
../test/run-test.sh
macos-autotools:
runs-on: macos-latest
steps:
- name: Install autotools
run: |
brew install automake
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
./autogen.sh
./configure --enable-example
make -j$(sysctl -n hw.ncpu) CFLAGS="-g -O2 -Werror" CXXFLAGS="-g -O2 -Werror -Wno-deprecated-declarations"
macos-cmake:
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_PROGRAMS=YES -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror -Wno-deprecated-declarations"
cmake --build build
mingw-cross-autotools:
runs-on: ubuntu-latest
steps:
- name: Install cross compiler
run: |
sudo apt-get update && sudo apt-get install g++-mingw-w64-x86-64
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
./autogen.sh
./configure --enable-example --host=x86_64-w64-mingw32
make -j$(nproc) CFLAGS="-g -O2 -Werror" CXXFLAGS="-g -O2 -Werror"
mingw-cross-cmake:
runs-on: ubuntu-latest
steps:
- name: Install cross compiler
run: |
sudo apt-get update && sudo apt-get install g++-mingw-w64-x86-64
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_PROGRAMS=YES -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DCMAKE_CROSSCOMPILING=TRUE -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror -Wno-stringop-overflow"
cmake --build build
msys-cmake:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: >-
git
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
cmake . -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_PROGRAMS=YES
cmake --build build
msvc-cmake:
runs-on: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
cmake . -B build -DBUILD_PROGRAMS=YES
cmake --build build --config Release
msvc-cmake-ninja-arm:
runs-on: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up the environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_arm
- name: Build
run: |
cmake . -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_PROGRAMS=YES
cmake --build build
msvc-cmake-arm64:
runs-on: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
run: |
cmake . -B build -DBUILD_PROGRAMS=YES -A ARM64
cmake --build build --config Release
llvm-mingw:
runs-on: ubuntu-latest
steps:
- name: Install llvm-mingw
run: |
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20231003/llvm-mingw-20231003-ucrt-ubuntu-20.04-x86_64.tar.xz
tar -Jxvf llvm-mingw-*-ucrt-ubuntu-*-x86_64.tar.xz
rm llvm-mingw-*.tar.xz
sudo mv llvm-mingw-* /opt/llvm-mingw
echo /opt/llvm-mingw/bin >> $GITHUB_PATH
- name: Checkout sources
uses: actions/checkout@v4
- name: Build fdk-aac
run: |
./autogen.sh
./configure --host=aarch64-w64-mingw32 --enable-example
make -j$(nproc) CFLAGS="-g -O2 -Werror" CXXFLAGS="-g -O2 -Werror"
linux-ffmpeg:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build fdk-aac
run: |
./autogen.sh
mkdir build
cd build
../configure --enable-example --prefix=$(pwd)/../prefix
make -j$(nproc)
make -j$(nproc) install
- name: Checkout FFmpeg
uses: actions/checkout@v4
with:
repository: ffmpeg/ffmpeg
path: ffmpeg
- name: Build FFmpeg
run: |
sudo apt-get update && sudo apt-get install -y nasm
cd ffmpeg
PKG_CONFIG_PATH=$(pwd)/../prefix/lib/pkgconfig ./configure --enable-libfdk-aac --enable-nonfree
make -j$(nproc)
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.o
*.lo
*.la
*~
.deps
.libs
.dirstamp
Expand All @@ -26,6 +27,7 @@ m4/lt~obsolete.m4
missing
stamp-h1
aac-enc
test-encode-decode
compile

CMakeCache.txt
Expand Down
2 changes: 1 addition & 1 deletion software/Android.bp → Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ cc_library_static {

apex_available: [
"//apex_available:platform",
"com.android.bluetooth.updatable",
"com.android.btservices",
"com.android.media.swcodec",
],
min_sdk_version: "29",
Expand Down
22 changes: 18 additions & 4 deletions software/CMakeLists.txt → CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if(POLICY CMP0091)
cmake_policy(SET CMP0091 NEW)
endif()

project(fdk-aac VERSION 2.0.1)
project(fdk-aac VERSION 2.0.3)

# Includes

Expand All @@ -62,7 +62,7 @@ include(CPack)
# Options

option(BUILD_SHARED_LIBS "Build shared library" ON)
option(BUILD_PROGRAMS "Build aac-enc utility" OFF)
option(BUILD_PROGRAMS "Build extra utilities" OFF)
option(FDK_AAC_INSTALL_CMAKE_CONFIG_MODULE "Install CMake package configuration file" ON)
option(FDK_AAC_INSTALL_PKGCONFIG_MODULE "Install pkg-config .pc file" ON)

Expand Down Expand Up @@ -487,8 +487,11 @@ target_link_libraries(fdk-aac PRIVATE $<$<BOOL:${HAVE_LIBM}>:m>)
### Set public headers and shared library version. Version info is critical for Unix-like OSes.
set_target_properties(fdk-aac PROPERTIES
PUBLIC_HEADER "${fdk_aacinclude_HEADERS}"
VERSION 2.0.1
SOVERSION 2)
VERSION 2.0.3
SOVERSION 2
MACHO_COMPATIBILITY_VERSION 3.0.0
MACHO_CURRENT_VERSION 3.3.0
LINKER_LANGUAGE C)

### Some compiler options from Makefile.am
if(MSVC)
Expand Down Expand Up @@ -583,4 +586,15 @@ if(BUILD_PROGRAMS)
## Program target installation
install(TARGETS aac-enc RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})


## Tool for testing the library
set(test_encode_decode_SOURCES
test-encode-decode.c
wavreader.c
wavreader.h
sha1.c
sha1.h)

add_executable(test-encode-decode ${test_encode_decode_SOURCES})
target_link_libraries(test-encode-decode PRIVATE fdk-aac)
endif()
11 changes: 11 additions & 0 deletions software/ChangeLog → ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2.0.3
- Minor upstream updates
- Fixed one case of a failed assert in SBR encoding
- Added build support for s390x

2.0.2
- Minor upstream updates
- Lots of upstream and local fuzzing fixes
- Added CMake project files
- Removed the MSVC specific makefile

2.0.1
- Minor release with a number of crash/fuzz fixes, primarily for the decoder

Expand Down
7 changes: 7 additions & 0 deletions METADATA
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE
# CONSULT THE OWNERS AND [email protected] BEFORE
# DEPENDING ON IT IN YOUR PROJECT. ***
third_party {
license_note: "Software License for The Fraunhofer FDK AAC Codec Library for Android"
license_type: BY_EXCEPTION_ONLY
}
File renamed without changes.
17 changes: 13 additions & 4 deletions software/Makefile.am → Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@ lib_LTLIBRARIES = libfdk-aac.la
libfdk_aac_la_LDFLAGS = -version-info @FDK_AAC_VERSION@ -no-undefined \
-export-symbols $(top_srcdir)/fdk-aac.sym


bin_PROGRAMS = aac-enc
if EXAMPLE
bin_PROGRAMS = aac-enc$(EXEEXT)
noinst_PROGRAMS = test-encode-decode$(EXEEXT)

aac_enc_LDADD = libfdk-aac.la
aac_enc_SOURCES = aac-enc.c wavreader.c

noinst_HEADERS = wavreader.h
test_encode_decode_LDADD = libfdk-aac.la
test_encode_decode_SOURCES = test-encode-decode.c wavreader.c sha1.c

noinst_HEADERS = wavreader.h
endif

AACDEC_SRC = \
libAACdec/src/FDK_delay.cpp \
Expand Down Expand Up @@ -262,7 +266,9 @@ EXTRA_DIST = \
$(top_srcdir)/Android.bp \
$(top_srcdir)/fdk-aac.def \
$(top_srcdir)/fdk-aac.sym \
$(top_srcdir)/fdk-aac-config.cmake.in \
$(top_srcdir)/documentation/*.pdf \
$(top_srcdir)/fuzzer/* \
$(top_srcdir)/libAACdec/src/*.h \
$(top_srcdir)/libAACdec/src/arm/*.cpp \
$(top_srcdir)/libAACenc/src/*.h \
Expand All @@ -276,7 +282,6 @@ EXTRA_DIST = \
$(top_srcdir)/libSBRenc/src/*.h \
$(top_srcdir)/libSBRenc/include/*.h \
$(top_srcdir)/libSBRdec/src/*.h \
$(top_srcdir)/libSBRdec/src/arm/*.cpp \
$(top_srcdir)/libSBRdec/include/*.h \
$(top_srcdir)/libSYS/include/*.h \
$(top_srcdir)/libPCMutils/include/*.h \
Expand All @@ -292,5 +297,9 @@ EXTRA_DIST = \
$(top_srcdir)/libFDK/include/x86/*.h \
$(top_srcdir)/libFDK/src/arm/*.cpp \
$(top_srcdir)/libFDK/src/mips/*.cpp \
$(top_srcdir)/METADATA \
$(top_srcdir)/PREUPLOAD.cfg \
$(top_srcdir)/sha1.h \
$(top_srcdir)/test/* \
$(top_srcdir)/win32/*.h

File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 83dd827

Please sign in to comment.