mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-08-19 09:40:21 +00:00
Merge branch 'master' into v1.11
This commit is contained in:
@@ -27,7 +27,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew upgrade
|
||||
brew upgrade --formula || true
|
||||
# Remove pinned cmake version (https://github.com/actions/runner-images/blob/macos-15-arm64/20250825.2246/images/macos/scripts/build/install-common-utils.sh#L19)
|
||||
brew uninstall --ignore-dependencies cmake || true
|
||||
# brew install libtiff openssl@3
|
||||
|
||||
@@ -54,7 +54,7 @@ jobs:
|
||||
shell: bash
|
||||
working-directory: freeswitch
|
||||
run: |
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y libpcre2-dev libsphinxbase-dev libpocketsphinx-dev
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y libpcre2-dev libsphinxbase-dev libpocketsphinx-dev libnode-dev
|
||||
./ci.sh -t scan-build -a configure -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip"
|
||||
./ci.sh -t scan-build -a build -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip"
|
||||
./ci.sh -t scan-build -a install -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip"
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
name: Release generic source archives
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'v1.10'
|
||||
- 'v1.11'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ref:
|
||||
description: 'Branch, tag, or SHA to build tarball from'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
source:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
path: 'code'
|
||||
ref: ${{ inputs.ref || github.ref }}
|
||||
|
||||
- name: Checkout reusable actions
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: signalwire/actions-template
|
||||
ref: main
|
||||
fetch-depth: 1
|
||||
path: actions
|
||||
sparse-checkout: |
|
||||
.github/actions/teleport/action.yml
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y \
|
||||
devscripts \
|
||||
libtool \
|
||||
libtool-bin \
|
||||
zip \
|
||||
tar \
|
||||
gzip \
|
||||
bzip2 \
|
||||
xz-utils
|
||||
|
||||
- name: Run source tarball script
|
||||
shell: bash
|
||||
working-directory: ./code
|
||||
run: ./scripts/ci/src_tarball.sh
|
||||
|
||||
- name: Generate checksums
|
||||
shell: bash
|
||||
working-directory: ./code/../src_dist
|
||||
run: |
|
||||
find . \( -iname '*.tar.bz2' -o -iname '*.tar.gz' -o -iname '*.tar.xz' -o -iname '*.zip' \) | while read file; do
|
||||
echo $(md5sum $(basename $file)) > $file.md5
|
||||
echo $(sha1sum $(basename $file)) > $file.sha1
|
||||
echo $(sha256sum $(basename $file)) > $file.sha256
|
||||
done
|
||||
|
||||
- name: Pack source archives directory
|
||||
shell: bash
|
||||
run: tar -czvf source_archives.tar.gz -C ./code/../src_dist .
|
||||
|
||||
- name: List contents
|
||||
shell: bash
|
||||
run: |
|
||||
tar -tvzf source_archives.tar.gz
|
||||
|
||||
- name: Upload source tarball to remote host
|
||||
if: github.event_name != 'workflow_dispatch'
|
||||
uses: ./actions/.github/actions/teleport
|
||||
with:
|
||||
EXEC_COMMANDS_PRE: 'mkdir -p /var/www/freeswitch/public/release/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}'
|
||||
FILES: 'source_archives.tar.gz'
|
||||
FILES_FOLDER: '/var/www/freeswitch/public/release/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}'
|
||||
env:
|
||||
HOSTNAME: ${{ secrets.HOSTNAME }}
|
||||
PROXY_URL: ${{ secrets.PROXY_URL }}
|
||||
TOKEN: ${{ secrets.TELEPORT_TOKEN }}
|
||||
USERNAME: ${{ secrets.USERNAME }}
|
||||
|
||||
- name: Upload source tarball as artifact
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: source_archives
|
||||
path: source_archives.tar.gz
|
||||
@@ -14,21 +14,6 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download yasm.exe
|
||||
run: |
|
||||
curl -o libs\win32\ffmpeg\yasm.exe https://files.freeswitch.org/downloads/win64/yasm-1.3.0.87.g121a.exe
|
||||
copy libs\win32\ffmpeg\yasm.exe libs\win32\libvpx\yasm.exe
|
||||
|
||||
- name: Verify and Run yasm.exe
|
||||
run: |
|
||||
if exist libs\win32\ffmpeg\yasm.exe (
|
||||
libs\win32\ffmpeg\yasm.exe --version
|
||||
) else (
|
||||
echo ERROR: yasm.exe not found!
|
||||
exit 1
|
||||
)
|
||||
shell: cmd
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
|
||||
+10
@@ -172,6 +172,11 @@ BuildLog.htm
|
||||
|
||||
!/libs/win32/
|
||||
!/libs/speex/win32/
|
||||
|
||||
# 7-Zip extraction tool bootstrap (downloaded/extracted by w32/downloadpackage.task)
|
||||
/libs/win32/7za/
|
||||
/libs/win32/7z*-extra.7z
|
||||
|
||||
*.suo
|
||||
*.sdf
|
||||
x64/
|
||||
@@ -245,6 +250,10 @@ libs/libcodec2-*/
|
||||
libs/libsilk-*/
|
||||
libs/rabbitmq-c-*/
|
||||
libs/rabbitmq-c-*.zip
|
||||
libs/SharpZipLib.*/
|
||||
libs/SharpZipLib.*.nupkg
|
||||
libs/nasm-*/
|
||||
libs/nasm-*.zip
|
||||
libs/ffmpeg-*/
|
||||
libs/sofia-sip*/
|
||||
libs/sofia-sip*
|
||||
@@ -273,5 +282,6 @@ images/test_text.png
|
||||
|
||||
src/mod/codecs/mod_amrwb/test/test_amrwb
|
||||
src/mod/endpoints/mod_sofia/test/sipp-based-tests
|
||||
src/mod/applications/mod_commands/test/test_interface_allowlist
|
||||
|
||||
.DS_Store
|
||||
|
||||
+15
-50
@@ -444,6 +444,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_opus", "src\mod\codecs\
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_t43_gray_code_tables", "libs\win32\spandsp\make_t43_gray_code_tables.2017.vcxproj", "{EDDB8AB9-C53E-44C0-A620-0E86C2CBD5D5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_modem_godard_descriptor", "libs\win32\spandsp\make_modem_godard_descriptor.2017.vcxproj", "{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "winFailToBan", "src\mod\languages\mod_managed\managed\examples\winFailToBan\winFailToBan.csproj", "{5BA0D5BD-330D-4EE2-B959-CAFEA04E50E0}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_rtc", "src\mod\endpoints\mod_rtc\mod_rtc.2017.vcxproj", "{3884ADD2-91D0-4CD6-86D3-D5FB2D4AAB9E}"
|
||||
@@ -460,16 +462,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype.2017", "libs\win32
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_png", "src\mod\formats\mod_png\mod_png.2017.vcxproj", "{FBC7E2A4-B989-4289-BA7F-68F440E9EF8B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libav", "libs\win32\libav\libav.2017.vcxproj", "{841C345F-FCC7-4F64-8F54-0281CEABEB01}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_av", "src\mod\applications\mod_av\mod_av.2017.vcxproj", "{7AEE504B-23B6-4B05-829E-7CD34855F146}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libx264", "libs\win32\libx264\libx264.2017.vcxproj", "{20179127-853B-4FE9-B7C0-9E817E6A3A72}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_http_cache", "src\mod\applications\mod_http_cache\mod_http_cache.2017.vcxproj", "{87933C2D-0159-46F7-B326-E1B6E982C21E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcodec2", "libs\win32\libcodec2\libcodec2.2017.vcxproj", "{19E934D6-1484-41C8-9305-78DC42FD61F2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_codec2", "src\mod\codecs\mod_codec2\mod_codec2.2017.vcxproj", "{CB4E68A1-8D19-4B5E-87B9-97A895E1BA17}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_amqp", "src\mod\event_handlers\mod_amqp\mod_amqp.2017.vcxproj", "{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3}"
|
||||
@@ -512,8 +508,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "48khz music", "libs\win32\S
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_signalwire", "src\mod\applications\mod_signalwire\mod_signalwire.2017.vcxproj", "{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ffmpeg", "libs\win32\ffmpeg\ffmpeg.2017.vcxproj", "{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Setup.CA.DownloadOpenH264", "w32\Setup\CustomActions\Setup.CA.DownloadOpenH264\Setup.CA.DownloadOpenH264.csproj", "{EBFDCFCA-8095-4ECC-98BE-B494BCB4E042}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Databases", "Databases", "{31C2761D-20E0-4BF8-98B9-E32F0D8DD6E1}"
|
||||
@@ -2008,14 +2002,6 @@ Global
|
||||
{FBC7E2A4-B989-4289-BA7F-68F440E9EF8B}.Release|Win32.Build.0 = Release|Win32
|
||||
{FBC7E2A4-B989-4289-BA7F-68F440E9EF8B}.Release|x64.ActiveCfg = Release|x64
|
||||
{FBC7E2A4-B989-4289-BA7F-68F440E9EF8B}.Release|x64.Build.0 = Release|x64
|
||||
{841C345F-FCC7-4F64-8F54-0281CEABEB01}.All|Win32.ActiveCfg = Release|Win32
|
||||
{841C345F-FCC7-4F64-8F54-0281CEABEB01}.All|Win32.Build.0 = Release|Win32
|
||||
{841C345F-FCC7-4F64-8F54-0281CEABEB01}.All|x64.ActiveCfg = Release|x64
|
||||
{841C345F-FCC7-4F64-8F54-0281CEABEB01}.All|x64.Build.0 = Release|x64
|
||||
{841C345F-FCC7-4F64-8F54-0281CEABEB01}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{841C345F-FCC7-4F64-8F54-0281CEABEB01}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{841C345F-FCC7-4F64-8F54-0281CEABEB01}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{841C345F-FCC7-4F64-8F54-0281CEABEB01}.Release|x64.ActiveCfg = Release|x64
|
||||
{7AEE504B-23B6-4B05-829E-7CD34855F146}.All|Win32.ActiveCfg = Release-x264|Win32
|
||||
{7AEE504B-23B6-4B05-829E-7CD34855F146}.All|Win32.Build.0 = Release-x264|Win32
|
||||
{7AEE504B-23B6-4B05-829E-7CD34855F146}.All|x64.ActiveCfg = Release-x264|x64
|
||||
@@ -2026,14 +2012,6 @@ Global
|
||||
{7AEE504B-23B6-4B05-829E-7CD34855F146}.Release|Win32.ActiveCfg = Release-x264|Win32
|
||||
{7AEE504B-23B6-4B05-829E-7CD34855F146}.Release|x64.ActiveCfg = Release-openh264|x64
|
||||
{7AEE504B-23B6-4B05-829E-7CD34855F146}.Release|x64.Build.0 = Release-openh264|x64
|
||||
{20179127-853B-4FE9-B7C0-9E817E6A3A72}.All|Win32.ActiveCfg = Release|Win32
|
||||
{20179127-853B-4FE9-B7C0-9E817E6A3A72}.All|Win32.Build.0 = Release|Win32
|
||||
{20179127-853B-4FE9-B7C0-9E817E6A3A72}.All|x64.ActiveCfg = Release|x64
|
||||
{20179127-853B-4FE9-B7C0-9E817E6A3A72}.All|x64.Build.0 = Release|x64
|
||||
{20179127-853B-4FE9-B7C0-9E817E6A3A72}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{20179127-853B-4FE9-B7C0-9E817E6A3A72}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{20179127-853B-4FE9-B7C0-9E817E6A3A72}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{20179127-853B-4FE9-B7C0-9E817E6A3A72}.Release|x64.ActiveCfg = Release|x64
|
||||
{87933C2D-0159-46F7-B326-E1B6E982C21E}.All|Win32.ActiveCfg = Release|Win32
|
||||
{87933C2D-0159-46F7-B326-E1B6E982C21E}.All|Win32.Build.0 = Release|Win32
|
||||
{87933C2D-0159-46F7-B326-E1B6E982C21E}.All|x64.ActiveCfg = Release|x64
|
||||
@@ -2046,18 +2024,6 @@ Global
|
||||
{87933C2D-0159-46F7-B326-E1B6E982C21E}.Release|Win32.Build.0 = Release|Win32
|
||||
{87933C2D-0159-46F7-B326-E1B6E982C21E}.Release|x64.ActiveCfg = Release|x64
|
||||
{87933C2D-0159-46F7-B326-E1B6E982C21E}.Release|x64.Build.0 = Release|x64
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.All|Win32.ActiveCfg = Release|Win32
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.All|Win32.Build.0 = Release|Win32
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.All|x64.ActiveCfg = Release|x64
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.All|x64.Build.0 = Release|x64
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.Debug|x64.Build.0 = Debug|x64
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.Release|Win32.Build.0 = Release|Win32
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.Release|x64.ActiveCfg = Release|x64
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2}.Release|x64.Build.0 = Release|x64
|
||||
{CB4E68A1-8D19-4B5E-87B9-97A895E1BA17}.All|Win32.ActiveCfg = Release|Win32
|
||||
{CB4E68A1-8D19-4B5E-87B9-97A895E1BA17}.All|Win32.Build.0 = Release|Win32
|
||||
{CB4E68A1-8D19-4B5E-87B9-97A895E1BA17}.All|x64.ActiveCfg = Release|x64
|
||||
@@ -2286,16 +2252,6 @@ Global
|
||||
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.Release|Win32.Build.0 = Release|Win32
|
||||
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.Release|x64.ActiveCfg = Release|x64
|
||||
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618}.Release|x64.Build.0 = Release|x64
|
||||
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED}.All|Win32.ActiveCfg = Debug-openh264|x64
|
||||
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED}.All|Win32.Build.0 = Debug-openh264|x64
|
||||
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED}.All|x64.ActiveCfg = Debug-openh264|x64
|
||||
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED}.All|x64.Build.0 = Debug-openh264|x64
|
||||
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED}.Debug|Win32.ActiveCfg = Debug-openh264|x64
|
||||
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED}.Debug|x64.ActiveCfg = Debug-openh264|x64
|
||||
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED}.Debug|x64.Build.0 = Debug-openh264|x64
|
||||
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED}.Release|Win32.ActiveCfg = Debug-openh264|x64
|
||||
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED}.Release|x64.ActiveCfg = Release-openh264|x64
|
||||
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED}.Release|x64.Build.0 = Release-openh264|x64
|
||||
{EBFDCFCA-8095-4ECC-98BE-B494BCB4E042}.All|Win32.ActiveCfg = Release|x86
|
||||
{EBFDCFCA-8095-4ECC-98BE-B494BCB4E042}.All|Win32.Build.0 = Release|x86
|
||||
{EBFDCFCA-8095-4ECC-98BE-B494BCB4E042}.All|x64.ActiveCfg = Release|x86
|
||||
@@ -2368,6 +2324,18 @@ Global
|
||||
{589A07E7-5DE5-49FD-A62C-27795B806AFB}.Release|Win32.Build.0 = Release|Win32
|
||||
{589A07E7-5DE5-49FD-A62C-27795B806AFB}.Release|x64.ActiveCfg = Release|x64
|
||||
{589A07E7-5DE5-49FD-A62C-27795B806AFB}.Release|x64.Build.0 = Release|x64
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.All|Win32.ActiveCfg = All|Win32
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.All|Win32.Build.0 = All|Win32
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.All|x64.ActiveCfg = All|Win32
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.All|x64.Build.0 = All|Win32
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Debug|Win32.ActiveCfg = All|Win32
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Debug|Win32.Build.0 = All|Win32
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Debug|x64.ActiveCfg = All|Win32
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Debug|x64.Build.0 = All|Win32
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Release|Win32.ActiveCfg = All|Win32
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Release|Win32.Build.0 = All|Win32
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Release|x64.ActiveCfg = All|Win32
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14}.Release|x64.Build.0 = All|Win32
|
||||
{3745B86B-6BE8-3E67-FCB9-BE62A6131D67}.All|Win32.ActiveCfg = Debug|Win32
|
||||
{3745B86B-6BE8-3E67-FCB9-BE62A6131D67}.All|Win32.Build.0 = Debug|Win32
|
||||
{3745B86B-6BE8-3E67-FCB9-BE62A6131D67}.All|x64.ActiveCfg = Debug|x64
|
||||
@@ -2559,11 +2527,9 @@ Global
|
||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{FBC7E2A4-B989-4289-BA7F-68F440E9EF8B} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
|
||||
{841C345F-FCC7-4F64-8F54-0281CEABEB01} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{7AEE504B-23B6-4B05-829E-7CD34855F146} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
||||
{20179127-853B-4FE9-B7C0-9E817E6A3A72} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{87933C2D-0159-46F7-B326-E1B6E982C21E} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
||||
{19E934D6-1484-41C8-9305-78DC42FD61F2} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{C8EA4AD3-3EDD-4DD1-9D63-4BE22585AA14} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{CB4E68A1-8D19-4B5E-87B9-97A895E1BA17} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
|
||||
{7AC7AB4F-5EF3-40A0-AD2B-CF4D9720FAC3} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
|
||||
{411F6D43-9F09-47D0-8B04-E1EB6B67C5BF} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
|
||||
@@ -2584,7 +2550,6 @@ Global
|
||||
{8154C82D-58EE-4145-9DEC-A445A5AA3D6B} = {4F227C26-768F-46A3-8684-1D08A46FB374}
|
||||
{EBD0B6B4-C5CA-46B0-BBC7-DBA71DF05D31} = {4F227C26-768F-46A3-8684-1D08A46FB374}
|
||||
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
||||
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{1BA65811-5453-46F6-8190-9ECEEFEB7DF2} = {31C2761D-20E0-4BF8-98B9-E32F0D8DD6E1}
|
||||
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC} = {31C2761D-20E0-4BF8-98B9-E32F0D8DD6E1}
|
||||
{580675D7-C1C9-4197-AAC5-00F64FAFDE78} = {9388C266-C3FC-468A-92EF-0CBC35941412}
|
||||
|
||||
+1
-1
@@ -295,7 +295,6 @@ library_include_HEADERS = \
|
||||
src/include/switch_json.h \
|
||||
src/include/switch_utf8.h \
|
||||
src/include/switch_msrp.h \
|
||||
src/include/switch_vpx.h \
|
||||
src/include/switch_vad.h \
|
||||
libs/libteletone/src/libteletone_detect.h \
|
||||
libs/libteletone/src/libteletone_generate.h \
|
||||
@@ -352,6 +351,7 @@ libfreeswitch_la_SOURCES = \
|
||||
src/switch_rtp.c \
|
||||
src/switch_jitterbuffer.c \
|
||||
src/switch_estimators.c \
|
||||
src/switch_image.c \
|
||||
src/switch_ivr_bridge.c \
|
||||
src/switch_ivr_originate.c \
|
||||
src/switch_ivr_async.c \
|
||||
|
||||
@@ -56,7 +56,7 @@ Step by step tutorials to build FreeSWITCH with provided dependency packages:
|
||||
|
||||
* [Tarballs](https://files.freeswitch.org/releases/freeswitch/)
|
||||
* [Windows Installer](http://files.freeswitch.org/windows/installer/x64/)
|
||||
* [Windows Sound Packages](http://files.freeswitch.org/windows/installer/x64/sounds/)
|
||||
* [Windows Sound Packages](https://github.com/freeswitch/freeswitch-sounds/releases)
|
||||
|
||||
## Contributions
|
||||
|
||||
|
||||
+12
-2
@@ -15,10 +15,20 @@ if [ "x${DOWNLOAD_CMD}" = "x" -a -x "$CURL" ] ; then
|
||||
DOWNLOAD_CMD="$CURL -L -O"
|
||||
fi
|
||||
|
||||
base=http://files.freeswitch.org/
|
||||
base=https://github.com/freeswitch/freeswitch-sounds/releases/download
|
||||
tarfile=$1
|
||||
install=$2
|
||||
|
||||
# Build the GitHub release URL from the tarball name:
|
||||
# freeswitch-sounds-<voice>-<rate>-<version>.tar.gz -> tag <voice>-<version>
|
||||
fname=`basename "$tarfile"`
|
||||
stem=${fname#freeswitch-sounds-}
|
||||
stem=${stem%.tar.gz}
|
||||
sver=${stem##*-}
|
||||
srest=${stem%-*}
|
||||
svoice=${srest%-*}
|
||||
url=$base/$svoice-$sver/$fname
|
||||
|
||||
echo -n "#"
|
||||
pwd
|
||||
echo "# $0 $1 $2"
|
||||
@@ -29,7 +39,7 @@ if [ -n "$FS_SOUNDS_DIR" ]; then
|
||||
fi
|
||||
|
||||
if [ ! -f $DIR/$tarfile ]; then
|
||||
(cd $DIR && $DOWNLOAD_CMD $base$tarfile)
|
||||
(cd $DIR && $DOWNLOAD_CMD $url)
|
||||
if [ ! -f $DIR/$tarfile ]; then
|
||||
echo "cannot find $tarfile"
|
||||
exit 1
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.11.1-release
|
||||
1.11.2-release
|
||||
|
||||
@@ -208,4 +208,39 @@
|
||||
|
||||
</settings>
|
||||
|
||||
<!--
|
||||
Interface allowlist (optional security hardening).
|
||||
|
||||
When this section contains at least one <allow> entry, ONLY the interfaces listed here
|
||||
are permitted to register; every other application / api / json_api / chat-application
|
||||
from ANY module is refused at load time (the module still loads, it just does not expose
|
||||
the blocked interface). With this section absent or empty, nothing is enforced and all
|
||||
interfaces load normally.
|
||||
|
||||
An interface is permitted if it matches ANY entry. Entries may be written at three
|
||||
levels of precision:
|
||||
|
||||
<allow name="mod_commands"/> - permit every interface in mod_commands
|
||||
<allow name="mod_commands.status"/> - permit any interface named "status" (all types)
|
||||
<allow name="mod_commands.status.api"/> - permit ONLY the api named "status"
|
||||
|
||||
The optional trailing type token is one of: app, api, json_api, chat_app. This is how
|
||||
you permit, e.g., the APP named "system" while still blocking an API/JSON-API of the
|
||||
same name.
|
||||
|
||||
WARNING: this is an aggressive, system-wide allowlist. Once enabled you must list every
|
||||
module (or interface) whose apps/APIs you rely on, including management commands from
|
||||
mod_commands (load, unload, reload, status, ...) and your dialplan apps; otherwise the
|
||||
system will not function. It only affects app/api/json_api/chat-app registration; codecs,
|
||||
endpoints, timers, formats, etc. are never gated.
|
||||
-->
|
||||
<!--
|
||||
<interface-allowlist>
|
||||
<allow name="mod_commands"/>
|
||||
<allow name="mod_dptools"/>
|
||||
<allow name="mod_dialplan_xml"/>
|
||||
<allow name="mod_sofia"/>
|
||||
</interface-allowlist>
|
||||
-->
|
||||
|
||||
</configuration>
|
||||
|
||||
@@ -426,6 +426,20 @@
|
||||
<X-PRE-PROCESS cmd="set" data="rtp_liberal_dtmf=true"/>
|
||||
<!-- Helps with WebRTC Audio -->
|
||||
|
||||
<!-- Require valid MESSAGE-INTEGRITY on inbound ICE (STUN) connectivity checks; unverified checks are
|
||||
dropped. Default off. Uncomment and change Z- prefix to X- to enable. -->
|
||||
<!--<Z-PRE-PROCESS cmd="set" data="ice_verify_message_integrity=true"/>-->
|
||||
|
||||
<!-- DTLS-SRTP client certificate verification, server role only.
|
||||
How FreeSWITCH, when it is the DTLS server (the peer is the DTLS client, i.e. a=setup:active),
|
||||
verifies the client's certificate. No effect when FreeSWITCH is the DTLS client.
|
||||
none - default; the client certificate is not requested or checked
|
||||
fingerprint - request the client cert and require it to match the SDP a=fingerprint
|
||||
full - also enforce the certificate's CA chain (needs a CA bundle; self-signed
|
||||
WebRTC certificates will not pass)
|
||||
Uncomment the line below and change Z- prefix to X- to enable. -->
|
||||
<!--<Z-PRE-PROCESS cmd="set" data="rtp_dtls_client_cert_verify_mode=fingerprint"/>-->
|
||||
|
||||
<!-- Stock Video Avatars -->
|
||||
<X-PRE-PROCESS cmd="set" data="video_mute_png=$${images_dir}/default-mute.png"/>
|
||||
<X-PRE-PROCESS cmd="set" data="video_no_avatar_png=$${images_dir}/default-avatar.png"/>
|
||||
|
||||
+59
-20
@@ -3,10 +3,10 @@
|
||||
|
||||
# Must change all of the below together
|
||||
# For a release, set revision for that tagged release as well and uncomment
|
||||
AC_INIT([freeswitch], [1.11.1-release], bugs@freeswitch.org)
|
||||
AC_INIT([freeswitch], [1.11.2-release], bugs@freeswitch.org)
|
||||
AC_SUBST(SWITCH_VERSION_MAJOR, [1])
|
||||
AC_SUBST(SWITCH_VERSION_MINOR, [11])
|
||||
AC_SUBST(SWITCH_VERSION_MICRO, [1-release])
|
||||
AC_SUBST(SWITCH_VERSION_MICRO, [2-release])
|
||||
AC_SUBST(SWITCH_VERSION_REVISION, [])
|
||||
AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, [])
|
||||
|
||||
@@ -705,12 +705,12 @@ PKG_CHECK_MODULES([MARIADB], [libmariadb >= 3.0.9],[
|
||||
])
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES([SPANDSP], [spandsp >= 3.0],[
|
||||
PKG_CHECK_MODULES([SPANDSP], [spandsp >= 3.1.1],[
|
||||
AM_CONDITIONAL([HAVE_SPANDSP],[true])],[
|
||||
AC_MSG_ERROR([no usable spandsp; please install spandsp3 devel package or equivalent])
|
||||
AC_MSG_ERROR([no usable spandsp; please install spandsp4 devel package or equivalent])
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES([SOFIA_SIP], [sofia-sip-ua >= 1.13.17],[
|
||||
PKG_CHECK_MODULES([SOFIA_SIP], [sofia-sip-ua >= 1.13.18],[
|
||||
AM_CONDITIONAL([HAVE_SOFIA_SIP],[true])],[
|
||||
AC_MSG_ERROR([no usable sofia-sip; please install sofia-sip-ua devel package or equivalent])
|
||||
])
|
||||
@@ -1507,21 +1507,60 @@ PKG_CHECK_MODULES([MEMCACHED], [libmemcached >= 0.31],[
|
||||
AM_CONDITIONAL([HAVE_MEMCACHED],[false])
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES([V8FS_STATIC], [v8-6.1_static >= 6.1.298],[
|
||||
AM_CONDITIONAL([HAVE_V8FS],[true])],[
|
||||
PKG_CHECK_MODULES([V8FS_STATIC], [v8fs_static >= 6.1.298],[
|
||||
AM_CONDITIONAL([HAVE_V8FS],[true])],[
|
||||
PKG_CHECK_MODULES([V8FS_STATIC], [v8 >= 6.1.298],[
|
||||
AM_CONDITIONAL([HAVE_V8FS],[true])],[
|
||||
if module_enabled mod_v8; then
|
||||
AC_MSG_ERROR([You need to either install libv8-6.1-dev (>= 6.1.298), libv8fs-dev (>= 6.1.298) or disable mod_v8 in modules.conf])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AM_CONDITIONAL([HAVE_V8FS],[false])
|
||||
fi
|
||||
])
|
||||
])
|
||||
])
|
||||
# mod_v8 needs the V8 JavaScript engine, provided by libnode-dev. It ships no
|
||||
# pkg-config file, so probe the well known header and library locations.
|
||||
AC_ARG_WITH([v8],
|
||||
[AS_HELP_STRING([--with-v8=DIR],
|
||||
[look for the libnode/V8 headers (the directory containing v8.h) in DIR])],
|
||||
[v8_incdir="$withval"], [v8_incdir=""])
|
||||
|
||||
have_v8="no"
|
||||
|
||||
AC_MSG_CHECKING([for libnode bundled V8 headers])
|
||||
V8_INCDIR=""
|
||||
for d in "$v8_incdir" /usr/include/nodejs/deps/v8/include /usr/include/node /usr/local/include/node /usr/include/v8 ; do
|
||||
if test -n "$d" && test -f "$d/v8.h" && test -f "$d/libplatform/libplatform.h" ; then
|
||||
V8_INCDIR="$d"; break
|
||||
fi
|
||||
done
|
||||
if test -n "$V8_INCDIR"; then
|
||||
AC_MSG_RESULT([$V8_INCDIR])
|
||||
AC_LANG_PUSH([C++])
|
||||
v8_save_LIBS="$LIBS"
|
||||
# Prefer the standalone split V8 libraries shipped by libnode-dev; fall
|
||||
# back to the all-in-one libnode if they are not present.
|
||||
AC_MSG_CHECKING([for standalone V8 libraries (-lv8 -lv8_libplatform)])
|
||||
LIBS="-lv8 -lv8_libplatform -lv8_libbase $v8_save_LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
|
||||
[AC_MSG_RESULT([yes]); V8_LIBS="-lv8 -lv8_libplatform -lv8_libbase"],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_CHECKING([for all-in-one libnode (-lnode)])
|
||||
LIBS="-lnode $v8_save_LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
|
||||
[AC_MSG_RESULT([yes]); V8_LIBS="-lnode"],
|
||||
[AC_MSG_RESULT([no])])])
|
||||
LIBS="$v8_save_LIBS"
|
||||
AC_LANG_POP([C++])
|
||||
if test -n "$V8_LIBS"; then
|
||||
V8_CFLAGS="-I$V8_INCDIR"
|
||||
have_v8="yes"
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST([V8_CFLAGS])
|
||||
AC_SUBST([V8_LIBS])
|
||||
|
||||
if test "x$have_v8" = "xyes"; then
|
||||
AM_CONDITIONAL([HAVE_V8],[true])
|
||||
else
|
||||
if module_enabled mod_v8; then
|
||||
AC_MSG_ERROR([mod_v8 is enabled but libnode was not found. Install libnode-dev (Debian/Ubuntu: apt-get install libnode-dev) or disable mod_v8 in modules.conf])
|
||||
else
|
||||
AM_CONDITIONAL([HAVE_V8],[false])
|
||||
fi
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES([KS], [libks2 >= 2.0.11],[
|
||||
AM_CONDITIONAL([HAVE_KS],[true])],[
|
||||
|
||||
Vendored
+3
-5
@@ -51,10 +51,8 @@ avoid_mods=(
|
||||
xml_int/mod_xml_ldap
|
||||
)
|
||||
avoid_mods_armhf=(
|
||||
languages/mod_v8
|
||||
)
|
||||
avoid_mods_arm64=(
|
||||
languages/mod_v8
|
||||
)
|
||||
avoid_mods_sid=(
|
||||
directories/mod_ldap
|
||||
@@ -320,8 +318,8 @@ Build-Depends:
|
||||
uuid-dev, libexpat1-dev, libgdbm-dev, libdb-dev,
|
||||
# used by many modules
|
||||
libcurl4-openssl-dev | libcurl4-gnutls-dev | libcurl-dev,
|
||||
bison, zlib1g-dev, libsofia-sip-ua-dev (>= 1.13.17),
|
||||
libspandsp3-dev,
|
||||
bison, zlib1g-dev, libsofia-sip-ua-dev (>= 1.13.18),
|
||||
libspandsp4-dev,
|
||||
# used to format the private freeswitch apt-repo key properly
|
||||
gnupg,
|
||||
# module build-depends
|
||||
@@ -359,7 +357,7 @@ Description: Cross-Platform Scalable Multi-Protocol Soft Switch
|
||||
|
||||
Package: libfreeswitch1
|
||||
Architecture: amd64 armhf arm64
|
||||
Depends: \${shlibs:Depends}, \${misc:Depends}, libsofia-sip-ua0 (>= 1.13.17)
|
||||
Depends: \${shlibs:Depends}, \${misc:Depends}, libsofia-sip-ua0 (>= 1.13.18)
|
||||
Recommends:
|
||||
Suggests: libfreeswitch1-dbg
|
||||
Conflicts: freeswitch-all (<= 1.6.7)
|
||||
|
||||
Vendored
+1
-1
@@ -540,7 +540,7 @@ Build-Depends-Trixie: python3-dev, python3-setuptools
|
||||
Module: languages/mod_v8
|
||||
Description: mod_v8
|
||||
Adds mod_v8.
|
||||
Build-Depends: git, libv8-6.1-dev
|
||||
Build-Depends: libnode-dev
|
||||
|
||||
## mod/loggers
|
||||
|
||||
|
||||
@@ -69,10 +69,10 @@ License: MPL
|
||||
Group: Applications/Communications
|
||||
Packager: Ken Rice <krice@freeswitch.org>
|
||||
URL: http://www.freeswitch.org
|
||||
Source0:http://files.freeswitch.org/releases/sounds/%{name}-48000-%{version}.tar.gz
|
||||
Source1:http://files.freeswitch.org/releases/sounds/%{name}-32000-%{version}.tar.gz
|
||||
Source2:http://files.freeswitch.org/releases/sounds/%{name}-16000-%{version}.tar.gz
|
||||
Source3:http://files.freeswitch.org/releases/sounds/%{name}-8000-%{version}.tar.gz
|
||||
Source0:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-ca-june-%{version}/%{name}-48000-%{version}.tar.gz
|
||||
Source1:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-ca-june-%{version}/%{name}-32000-%{version}.tar.gz
|
||||
Source2:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-ca-june-%{version}/%{name}-16000-%{version}.tar.gz
|
||||
Source3:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-ca-june-%{version}/%{name}-8000-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRequires: sox
|
||||
Requires: freeswitch
|
||||
|
||||
@@ -72,10 +72,10 @@ License: MPL
|
||||
Group: Applications/Communications
|
||||
Packager: Patrick Laimbock <vc-rpms@voipconsulting.nl>
|
||||
URL: http://www.freeswitch.org
|
||||
Source0:http://files.freeswitch.org/releases/sounds/%{name}-48000-%{version}.tar.gz
|
||||
Source1:http://files.freeswitch.org/releases/sounds/%{name}-32000-%{version}.tar.gz
|
||||
Source2:http://files.freeswitch.org/releases/sounds/%{name}-16000-%{version}.tar.gz
|
||||
Source3:http://files.freeswitch.org/releases/sounds/%{name}-8000-%{version}.tar.gz
|
||||
Source0:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-us-allison-%{version}/%{name}-48000-%{version}.tar.gz
|
||||
Source1:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-us-allison-%{version}/%{name}-32000-%{version}.tar.gz
|
||||
Source2:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-us-allison-%{version}/%{name}-16000-%{version}.tar.gz
|
||||
Source3:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-us-allison-%{version}/%{name}-8000-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRequires: sox
|
||||
Requires: freeswitch
|
||||
|
||||
@@ -72,10 +72,10 @@ License: MPL
|
||||
Group: Applications/Communications
|
||||
Packager: Patrick Laimbock <vc-rpms@voipconsulting.nl>
|
||||
URL: http://www.freeswitch.org
|
||||
Source0:http://files.freeswitch.org/releases/sounds/%{name}-48000-%{version}.tar.gz
|
||||
Source1:http://files.freeswitch.org/releases/sounds/%{name}-32000-%{version}.tar.gz
|
||||
Source2:http://files.freeswitch.org/releases/sounds/%{name}-16000-%{version}.tar.gz
|
||||
Source3:http://files.freeswitch.org/releases/sounds/%{name}-8000-%{version}.tar.gz
|
||||
Source0:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-us-callie-%{version}/%{name}-48000-%{version}.tar.gz
|
||||
Source1:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-us-callie-%{version}/%{name}-32000-%{version}.tar.gz
|
||||
Source2:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-us-callie-%{version}/%{name}-16000-%{version}.tar.gz
|
||||
Source3:https://github.com/freeswitch/freeswitch-sounds/releases/download/en-us-callie-%{version}/%{name}-8000-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRequires: sox
|
||||
Requires: freeswitch
|
||||
|
||||
@@ -69,10 +69,10 @@ License: MPL
|
||||
Group: Applications/Communications
|
||||
Packager: Ken Rice <krice@freeswitch.org>
|
||||
URL: http://www.freeswitch.org
|
||||
Source0:http://files.freeswitch.org/releases/sounds/%{name}-48000-%{version}.tar.gz
|
||||
Source1:http://files.freeswitch.org/releases/sounds/%{name}-32000-%{version}.tar.gz
|
||||
Source2:http://files.freeswitch.org/releases/sounds/%{name}-16000-%{version}.tar.gz
|
||||
Source3:http://files.freeswitch.org/releases/sounds/%{name}-8000-%{version}.tar.gz
|
||||
Source0:https://github.com/freeswitch/freeswitch-sounds/releases/download/fr-ca-june-%{version}/%{name}-48000-%{version}.tar.gz
|
||||
Source1:https://github.com/freeswitch/freeswitch-sounds/releases/download/fr-ca-june-%{version}/%{name}-32000-%{version}.tar.gz
|
||||
Source2:https://github.com/freeswitch/freeswitch-sounds/releases/download/fr-ca-june-%{version}/%{name}-16000-%{version}.tar.gz
|
||||
Source3:https://github.com/freeswitch/freeswitch-sounds/releases/download/fr-ca-june-%{version}/%{name}-8000-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRequires: sox
|
||||
Requires: freeswitch
|
||||
|
||||
@@ -41,10 +41,10 @@ License: MPL
|
||||
Group: Productivity/Telephony/Servers
|
||||
Packager: Joseph L. Casale <jcasale@activenetwerx.com>
|
||||
URL: http://www.freeswitch.org
|
||||
Source0: http://files.freeswitch.org/releases/sounds/%{name}-8000-%{version}.tar.gz
|
||||
Source1: http://files.freeswitch.org/releases/sounds/%{name}-16000-%{version}.tar.gz
|
||||
Source2: http://files.freeswitch.org/releases/sounds/%{name}-32000-%{version}.tar.gz
|
||||
Source3: http://files.freeswitch.org/releases/sounds/%{name}-48000-%{version}.tar.gz
|
||||
Source0: https://github.com/freeswitch/freeswitch-sounds/releases/download/music-%{version}/%{name}-8000-%{version}.tar.gz
|
||||
Source1: https://github.com/freeswitch/freeswitch-sounds/releases/download/music-%{version}/%{name}-16000-%{version}.tar.gz
|
||||
Source2: https://github.com/freeswitch/freeswitch-sounds/releases/download/music-%{version}/%{name}-32000-%{version}.tar.gz
|
||||
Source3: https://github.com/freeswitch/freeswitch-sounds/releases/download/music-%{version}/%{name}-48000-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRequires: bash
|
||||
Requires: freeswitch
|
||||
|
||||
@@ -69,10 +69,10 @@ License: MPL
|
||||
Group: Applications/Communications
|
||||
Packager: Ken Rice <krice@freeswitch.org>
|
||||
URL: http://www.freeswitch.org
|
||||
Source0:http://files.freeswitch.org/releases/sounds/%{name}-48000-%{version}.tar.gz
|
||||
Source1:http://files.freeswitch.org/releases/sounds/%{name}-32000-%{version}.tar.gz
|
||||
Source2:http://files.freeswitch.org/releases/sounds/%{name}-16000-%{version}.tar.gz
|
||||
Source3:http://files.freeswitch.org/releases/sounds/%{name}-8000-%{version}.tar.gz
|
||||
Source0:https://github.com/freeswitch/freeswitch-sounds/releases/download/pt-BR-karina-%{version}/%{name}-48000-%{version}.tar.gz
|
||||
Source1:https://github.com/freeswitch/freeswitch-sounds/releases/download/pt-BR-karina-%{version}/%{name}-32000-%{version}.tar.gz
|
||||
Source2:https://github.com/freeswitch/freeswitch-sounds/releases/download/pt-BR-karina-%{version}/%{name}-16000-%{version}.tar.gz
|
||||
Source3:https://github.com/freeswitch/freeswitch-sounds/releases/download/pt-BR-karina-%{version}/%{name}-8000-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRequires: sox
|
||||
Requires: freeswitch
|
||||
|
||||
@@ -75,10 +75,10 @@ License: MPL
|
||||
Group: Applications/Communications
|
||||
Packager: Michal Bielicki <michal.bielicki@seventhsignal.de>
|
||||
URL: http://www.freeswitch.org
|
||||
Source0:http://files.freeswitch.org/releases/sounds/%{name}-48000-%{version}.tar.gz
|
||||
Source1:http://files.freeswitch.org/releases/sounds/%{name}-32000-%{version}.tar.gz
|
||||
Source2:http://files.freeswitch.org/releases/sounds/%{name}-16000-%{version}.tar.gz
|
||||
Source3:http://files.freeswitch.org/releases/sounds/%{name}-8000-%{version}.tar.gz
|
||||
Source0:https://github.com/freeswitch/freeswitch-sounds/releases/download/ru-RU-elena-%{version}/%{name}-48000-%{version}.tar.gz
|
||||
Source1:https://github.com/freeswitch/freeswitch-sounds/releases/download/ru-RU-elena-%{version}/%{name}-32000-%{version}.tar.gz
|
||||
Source2:https://github.com/freeswitch/freeswitch-sounds/releases/download/ru-RU-elena-%{version}/%{name}-16000-%{version}.tar.gz
|
||||
Source3:https://github.com/freeswitch/freeswitch-sounds/releases/download/ru-RU-elena-%{version}/%{name}-8000-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRequires: sox
|
||||
Requires: freeswitch
|
||||
|
||||
@@ -67,10 +67,10 @@ License: MPL
|
||||
Group: Applications/Communications
|
||||
Packager: Ken Rice <krice@freeswitch.org>
|
||||
URL: http://www.freeswitch.org
|
||||
Source0:http://files.freeswitch.org/releases/sounds/%{name}-48000-%{version}.tar.gz
|
||||
Source1:http://files.freeswitch.org/releases/sounds/%{name}-32000-%{version}.tar.gz
|
||||
Source2:http://files.freeswitch.org/releases/sounds/%{name}-16000-%{version}.tar.gz
|
||||
Source3:http://files.freeswitch.org/releases/sounds/%{name}-8000-%{version}.tar.gz
|
||||
Source0:https://github.com/freeswitch/freeswitch-sounds/releases/download/sv-se-jakob-%{version}/%{name}-48000-%{version}.tar.gz
|
||||
Source1:https://github.com/freeswitch/freeswitch-sounds/releases/download/sv-se-jakob-%{version}/%{name}-32000-%{version}.tar.gz
|
||||
Source2:https://github.com/freeswitch/freeswitch-sounds/releases/download/sv-se-jakob-%{version}/%{name}-16000-%{version}.tar.gz
|
||||
Source3:https://github.com/freeswitch/freeswitch-sounds/releases/download/sv-se-jakob-%{version}/%{name}-8000-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRequires: sox
|
||||
Requires: freeswitch
|
||||
|
||||
+2
-2
@@ -131,8 +131,8 @@ BuildRequires: curl-devel >= 7.19
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libtool >= 1.5.17
|
||||
BuildRequires: openssl-devel >= 1.0.1e
|
||||
BuildRequires: sofia-sip-devel >= 1.13.17
|
||||
BuildRequires: spandsp3-devel >= 3.0
|
||||
BuildRequires: sofia-sip-devel >= 1.13.18
|
||||
BuildRequires: spandsp4-devel >= 3.1.1
|
||||
BuildRequires: pcre2-devel
|
||||
BuildRequires: speex-devel
|
||||
BuildRequires: sqlite-devel >= 3.6.20
|
||||
|
||||
+4
-45
@@ -129,49 +129,6 @@ opal
|
||||
/js/src/jsautocfg.h
|
||||
/js/src/perlconnect/Makefile.PL
|
||||
/lame-*/
|
||||
/libcodec2/src/c2dec
|
||||
/libcodec2/src/c2demo
|
||||
/libcodec2/src/c2enc
|
||||
/libcodec2/src/c2sim
|
||||
/libcodec2/src/codebook.c
|
||||
/libcodec2/src/codebookd.c
|
||||
/libcodec2/src/codebookdt.c
|
||||
/libcodec2/src/codebookge.c
|
||||
/libcodec2/src/codebookjnd.c
|
||||
/libcodec2/src/codebookjvm.c
|
||||
/libcodec2/src/codebookvqanssi.c
|
||||
/libcodec2/src/fdmdv_demod
|
||||
/libcodec2/src/fdmdv_get_test_bits
|
||||
/libcodec2/src/fdmdv_interleave
|
||||
/libcodec2/src/fdmdv_mod
|
||||
/libcodec2/src/fdmdv_put_test_bits
|
||||
/libcodec2/src/generate_codebook
|
||||
/libcodec2/src/genlspdtcb
|
||||
/libcodec2/unittest/create_interleaver
|
||||
/libcodec2/unittest/de
|
||||
/libcodec2/unittest/extract
|
||||
/libcodec2/unittest/genampdata
|
||||
/libcodec2/unittest/genlsp
|
||||
/libcodec2/unittest/genphdata
|
||||
/libcodec2/unittest/genres
|
||||
/libcodec2/unittest/lspsync
|
||||
/libcodec2/unittest/polar2rect
|
||||
/libcodec2/unittest/pre
|
||||
/libcodec2/unittest/scalarlsptest
|
||||
/libcodec2/unittest/t48_8
|
||||
/libcodec2/unittest/tcodec2
|
||||
/libcodec2/unittest/tfdmdv
|
||||
/libcodec2/unittest/tfifo
|
||||
/libcodec2/unittest/tinterp
|
||||
/libcodec2/unittest/tlspsens
|
||||
/libcodec2/unittest/tnlp
|
||||
/libcodec2/unittest/tprede
|
||||
/libcodec2/unittest/tquant
|
||||
/libcodec2/unittest/vq_train_jvm
|
||||
/libcodec2/unittest/vqtrain
|
||||
/libcodec2/unittest/vqtrainjnd
|
||||
/libcodec2/unittest/vqtrainph
|
||||
/libcodec2/unittest/vqtrainsp
|
||||
/libg722_1/config-h.in
|
||||
/libg722_1/doc/Makefile
|
||||
/libg722_1/doc/Makefile.in
|
||||
@@ -566,8 +523,8 @@ opal
|
||||
|
||||
/zeromq-*/
|
||||
/jpeg-8d/
|
||||
/v8-*/
|
||||
/v8-*.zip
|
||||
/libnode-*/
|
||||
/libnode-*.zip
|
||||
|
||||
# build products we should remove
|
||||
!/libg722_1/config/depcomp
|
||||
@@ -618,3 +575,5 @@ mariadb-connector-c-*
|
||||
/spandsp*
|
||||
win32/spandsp/spandsp.h
|
||||
win32/spandsp/win32
|
||||
libcodec2-*
|
||||
ffmpeg-*
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
Adrian Grange <agrange@google.com>
|
||||
Aℓex Converse <alexconv@twitch.tv>
|
||||
Aℓex Converse <alexconv@twitch.tv> <aconverse@google.com>
|
||||
Aℓex Converse <alexconv@twitch.tv> <alex.converse@gmail.com>
|
||||
Alexis Ballier <aballier@gentoo.org> <alexis.ballier@gmail.com>
|
||||
Alpha Lam <hclam@google.com> <hclam@chromium.org>
|
||||
Angie Chiang <angiebird@google.com>
|
||||
Chris Cunningham <chcunningham@chromium.org>
|
||||
Chi Yo Tsai <chiyotsai@google.com>
|
||||
Daniele Castagna <dcastagna@chromium.org> <dcastagna@google.com>
|
||||
Deb Mukherjee <debargha@google.com>
|
||||
Elliott Karpilovsky <elliottk@google.com>
|
||||
Erik Niemeyer <erik.a.niemeyer@intel.com> <erik.a.niemeyer@gmail.com>
|
||||
Fyodor Kyslov <kyslov@google.com>
|
||||
Gregor Jasny <gjasny@gmail.com>
|
||||
Gregor Jasny <gjasny@gmail.com> <gjasny@googlemail.com>
|
||||
Guillaume Martres <gmartres@google.com> <smarter3@gmail.com>
|
||||
Hangyu Kuang <hkuang@google.com>
|
||||
Hui Su <huisu@google.com>
|
||||
Jacky Chen <jackychen@google.com>
|
||||
Jim Bankoski <jimbankoski@google.com>
|
||||
Johann Koenig <johannkoenig@google.com>
|
||||
Johann Koenig <johannkoenig@google.com> <johann.koenig@duck.com>
|
||||
Johann Koenig <johannkoenig@google.com> <johann.koenig@gmail.com>
|
||||
Johann Koenig <johannkoenig@google.com> <johannkoenig@chromium.org>
|
||||
John Koleszar <jkoleszar@google.com>
|
||||
Joshua Litt <joshualitt@google.com> <joshualitt@chromium.org>
|
||||
Marco Paniconi <marpan@google.com>
|
||||
Marco Paniconi <marpan@google.com> <marpan@chromium.org>
|
||||
Martin Storsjö <martin@martin.st>
|
||||
Michael Horowitz <mhoro@webrtc.org> <mhoro@google.com>
|
||||
Pascal Massimino <pascal.massimino@gmail.com>
|
||||
Paul Wilkins <paulwilkins@google.com>
|
||||
Peter Boström <pbos@chromium.org> <pbos@google.com>
|
||||
Peter de Rivaz <peter.derivaz@gmail.com>
|
||||
Peter de Rivaz <peter.derivaz@gmail.com> <peter.derivaz@argondesign.com>
|
||||
Ralph Giles <giles@xiph.org> <giles@entropywave.com>
|
||||
Ralph Giles <giles@xiph.org> <giles@mozilla.com>
|
||||
Ronald S. Bultje <rsbultje@gmail.com> <rbultje@google.com>
|
||||
Sai Deng <sdeng@google.com>
|
||||
Sami Pietilä <samipietila@google.com>
|
||||
Shiyou Yin <yinshiyou-hf@loongson.cn>
|
||||
Tamar Levy <tamar.levy@intel.com>
|
||||
Tamar Levy <tamar.levy@intel.com> <levytamar82@gmail.com>
|
||||
Tero Rintaluoma <teror@google.com> <tero.rintaluoma@on2.com>
|
||||
Timothy B. Terriberry <tterribe@xiph.org> <tterriberry@mozilla.com>
|
||||
Tom Finegan <tomfinegan@google.com>
|
||||
Tom Finegan <tomfinegan@google.com> <tomfinegan@chromium.org>
|
||||
Urvang Joshi <urvang@google.com> <urvang@chromium.org>
|
||||
Yaowu Xu <yaowu@google.com> <adam@xuyaowu.com>
|
||||
Yaowu Xu <yaowu@google.com> <yaowu@xuyaowu.com>
|
||||
Yaowu Xu <yaowu@google.com> <Yaowu Xu>
|
||||
Venkatarama NG. Avadhani <venkatarama.avadhani@ittiam.com>
|
||||
Vitaly Buka <vitalybuka@chromium.org> <vitlaybuka@chromium.org>
|
||||
xiwei gu <guxiwei-hf@loongson.cn>
|
||||
+1
-1
@@ -1 +1 @@
|
||||
Thu Mar 19 03:08:11 UTC 2020
|
||||
Mon Jul 06 01:46:10 UTC 2026
|
||||
|
||||
+30
-1
@@ -3,6 +3,7 @@
|
||||
|
||||
Aaron Watry <awatry@gmail.com>
|
||||
Abo Talib Mahfoodh <ab.mahfoodh@gmail.com>
|
||||
Adam B. Goode <adam.mckee84@gmail.com>
|
||||
Adrian Grange <agrange@google.com>
|
||||
Ahmad Sharif <asharif@google.com>
|
||||
Aidan Welch <aidansw@yahoo.com>
|
||||
@@ -10,7 +11,7 @@ Aleksey Vasenev <margtu-fivt@ya.ru>
|
||||
Alexander Potapenko <glider@google.com>
|
||||
Alexander Voronov <avoronov@graphics.cs.msu.ru>
|
||||
Alexandra Hájková <alexandra.khirnova@gmail.com>
|
||||
Aℓex Converse <aconverse@google.com>
|
||||
Aℓex Converse <alexconv@twitch.tv>
|
||||
Alexis Ballier <aballier@gentoo.org>
|
||||
Alok Ahuja <waveletcoeff@gmail.com>
|
||||
Alpha Lam <hclam@google.com>
|
||||
@@ -20,9 +21,13 @@ Andoni Morales Alastruey <ylatuya@gmail.com>
|
||||
Andres Mejia <mcitadel@gmail.com>
|
||||
Andrew Lewis <andrewlewis@google.com>
|
||||
Andrew Russell <anrussell@google.com>
|
||||
Angie Chen <yunqi@google.com>
|
||||
Angie Chiang <angiebird@google.com>
|
||||
Aron Rosenberg <arosenberg@logitech.com>
|
||||
Attila Nagy <attilanagy@google.com>
|
||||
Birk Magnussen <birk.magnussen@googlemail.com>
|
||||
Bohan Li <bohanli@google.com>
|
||||
Brian Foley <bpfoley@google.com>
|
||||
Brion Vibber <bvibber@wikimedia.org>
|
||||
changjun.yang <changjun.yang@intel.com>
|
||||
Charles 'Buck' Krasic <ckrasic@google.com>
|
||||
@@ -31,8 +36,11 @@ Chi Yo Tsai <chiyotsai@google.com>
|
||||
chm <chm@rock-chips.com>
|
||||
Chris Cunningham <chcunningham@chromium.org>
|
||||
Christian Duvivier <cduvivier@google.com>
|
||||
Chunbo Hua <chunbo.hua@intel.com>
|
||||
Clement Courbet <courbet@google.com>
|
||||
Daniele Castagna <dcastagna@chromium.org>
|
||||
Daniel Kang <ddkang@google.com>
|
||||
Daniel Sommermann <dcsommer@gmail.com>
|
||||
Dan Zhu <zxdan@google.com>
|
||||
Deb Mukherjee <debargha@google.com>
|
||||
Deepa K G <deepa.kg@ittiam.com>
|
||||
@@ -60,15 +68,19 @@ Guillermo Ballester Valor <gbvalor@gmail.com>
|
||||
Hangyu Kuang <hkuang@google.com>
|
||||
Hanno Böck <hanno@hboeck.de>
|
||||
Han Shen <shenhan@google.com>
|
||||
Hao Chen <chenhao@loongson.cn>
|
||||
Harish Mahendrakar <harish.mahendrakar@ittiam.com>
|
||||
Henrik Lundin <hlundin@google.com>
|
||||
Hien Ho <hienho@google.com>
|
||||
Hirokazu Honda <hiroh@chromium.org>
|
||||
Hui Su <huisu@google.com>
|
||||
Ilya Kurdyukov <jpegqs@gmail.com>
|
||||
Ivan Krasin <krasin@chromium.org>
|
||||
Ivan Maltz <ivanmaltz@google.com>
|
||||
Jacek Caban <cjacek@gmail.com>
|
||||
Jacky Chen <jackychen@google.com>
|
||||
James Berry <jamesberry@google.com>
|
||||
James Touton <bekenn@gmail.com>
|
||||
James Yu <james.yu@linaro.org>
|
||||
James Zern <jzern@google.com>
|
||||
Jan Gerber <j@mailb.org>
|
||||
@@ -78,17 +90,24 @@ Jean-Yves Avenard <jyavenard@mozilla.com>
|
||||
Jeff Faust <jfaust@google.com>
|
||||
Jeff Muizelaar <jmuizelaar@mozilla.com>
|
||||
Jeff Petkau <jpet@chromium.org>
|
||||
Jeremy Leconte <jleconte@google.com>
|
||||
Jerome Jiang <jianj@google.com>
|
||||
Jia Jia <jia.jia@linaro.org>
|
||||
Jianhui Dai <jianhui.j.dai@intel.com>
|
||||
Jian Zhou <zhoujian@google.com>
|
||||
Jim Bankoski <jimbankoski@google.com>
|
||||
jinbo <jinbo-hf@loongson.cn>
|
||||
Jin Bo <jinbo@loongson.cn>
|
||||
Jingning Han <jingning@google.com>
|
||||
Joel Fernandes <joelaf@google.com>
|
||||
Joey Parrish <joeyparrish@google.com>
|
||||
Johann Koenig <johannkoenig@google.com>
|
||||
John Koleszar <jkoleszar@google.com>
|
||||
Johnny Klonaris <google@jawknee.com>
|
||||
John Stark <jhnstrk@gmail.com>
|
||||
Jonathan Wright <jonathan.wright@arm.com>
|
||||
Jon Kunkee <jkunkee@microsoft.com>
|
||||
Jorge E. Moreira <jemoreira@google.com>
|
||||
Joshua Bleecher Snyder <josh@treelinelabs.com>
|
||||
Joshua Litt <joshualitt@google.com>
|
||||
Julia Robson <juliamrobson@gmail.com>
|
||||
@@ -96,6 +115,7 @@ Justin Clift <justin@salasaga.org>
|
||||
Justin Lebar <justin.lebar@gmail.com>
|
||||
Kaustubh Raste <kaustubh.raste@imgtec.com>
|
||||
KO Myung-Hun <komh@chollian.net>
|
||||
Konstantinos Margaritis <konma@vectorcamp.gr>
|
||||
Kyle Siefring <kylesiefring@gmail.com>
|
||||
Lawrence Velázquez <larryv@macports.org>
|
||||
Linfeng Zhang <linfengz@google.com>
|
||||
@@ -103,6 +123,7 @@ Liu Peng <pengliu.mail@gmail.com>
|
||||
Lou Quillio <louquillio@google.com>
|
||||
Luca Barbato <lu_zero@gentoo.org>
|
||||
Luc Trudeau <luc@trud.ca>
|
||||
Lu Wang <wanglu@loongson.cn>
|
||||
Makoto Kato <makoto.kt@gmail.com>
|
||||
Mans Rullgard <mans@mansr.com>
|
||||
Marco Paniconi <marpan@google.com>
|
||||
@@ -116,6 +137,7 @@ Michael Kohler <michaelkohler@live.com>
|
||||
Mike Frysinger <vapier@chromium.org>
|
||||
Mike Hommey <mhommey@mozilla.com>
|
||||
Mikhal Shemer <mikhal@google.com>
|
||||
Mikko Koivisto <mikko.koivisto@unikie.com>
|
||||
Min Chen <chenm003@gmail.com>
|
||||
Minghai Shang <minghai@google.com>
|
||||
Min Ye <yeemmi@google.com>
|
||||
@@ -123,6 +145,7 @@ Mirko Bonadei <mbonadei@google.com>
|
||||
Moriyoshi Koizumi <mozo@mozo.jp>
|
||||
Morton Jonuschat <yabawock@gmail.com>
|
||||
Nathan E. Egge <negge@mozilla.com>
|
||||
Neil Birkbeck <neil.birkbeck@gmail.com>
|
||||
Nico Weber <thakis@chromium.org>
|
||||
Niveditha Rau <niveditha.rau@gmail.com>
|
||||
Parag Salasakar <img.mips1@gmail.com>
|
||||
@@ -135,6 +158,7 @@ Pengchong Jin <pengchong@google.com>
|
||||
Peter Boström <pbos@chromium.org>
|
||||
Peter Collingbourne <pcc@chromium.org>
|
||||
Peter de Rivaz <peter.derivaz@gmail.com>
|
||||
Peter Kasting <pkasting@chromium.org>
|
||||
Philip Jägenstedt <philipj@opera.com>
|
||||
Priit Laes <plaes@plaes.org>
|
||||
Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
|
||||
@@ -163,6 +187,7 @@ Shimon Doodkin <helpmepro1@gmail.com>
|
||||
Shiyou Yin <yinshiyou-hf@loongson.cn>
|
||||
Shubham Tandle <shubham.tandle@ittiam.com>
|
||||
Shunyao Li <shunyaoli@google.com>
|
||||
Sreerenj Balachandran <bsreerenj@gmail.com>
|
||||
Stefan Holmer <holmer@google.com>
|
||||
Suman Sunkara <sunkaras@google.com>
|
||||
Supradeep T R <supradeep.tr@ittiam.com>
|
||||
@@ -180,13 +205,17 @@ Tristan Matthews <le.businessman@gmail.com>
|
||||
Urvang Joshi <urvang@google.com>
|
||||
Venkatarama NG. Avadhani <venkatarama.avadhani@ittiam.com>
|
||||
Vignesh Venkatasubramanian <vigneshv@google.com>
|
||||
Vitaly Buka <vitalybuka@chromium.org>
|
||||
Vlad Tsyrklevich <vtsyrklevich@chromium.org>
|
||||
Wan-Teh Chang <wtc@google.com>
|
||||
Wonkap Jang <wonkap@google.com>
|
||||
xiwei gu <guxiwei-hf@loongson.cn>
|
||||
Yaowu Xu <yaowu@google.com>
|
||||
Yi Luo <luoyi@google.com>
|
||||
Yongzhe Wang <yongzhe@google.com>
|
||||
yuanhecai <yuanhecai@loongson.cn>
|
||||
Yue Chen <yuec@google.com>
|
||||
Yun Liu <yliuyliu@google.com>
|
||||
Yunqing Wang <yunqingwang@google.com>
|
||||
Yury Gitman <yuryg@google.com>
|
||||
Zoe Liu <zoeliu@google.com>
|
||||
|
||||
+119
-1
@@ -1,3 +1,121 @@
|
||||
2022-06-17 v1.12.0 "Torrent Duck"
|
||||
This release adds optimizations for Loongarch, adds support for vp8 in the
|
||||
real-time rate control library, upgrades GoogleTest to v1.11.0, updates
|
||||
libwebm to libwebm-1.0.0.28-20-g206d268, and includes numerous bug fixes.
|
||||
|
||||
- Upgrading:
|
||||
This release is ABI compatible with the previous release.
|
||||
|
||||
vp8 support in the real-time rate control library.
|
||||
New codec control VP8E_SET_RTC_EXTERNAL_RATECTRL is added.
|
||||
|
||||
Configure support for darwin21 is added.
|
||||
|
||||
GoogleTest is upgraded to v1.11.0.
|
||||
|
||||
libwebm is updated to libwebm-1.0.0.28-20-g206d268.
|
||||
|
||||
Allow SimpleEncode environment to take target level as input to match
|
||||
the level conformance in vp9.
|
||||
|
||||
- Enhancement:
|
||||
Numerous improvements on checking memory allocations.
|
||||
Optimizations for Loongarch.
|
||||
Code clean-up.
|
||||
|
||||
- Bug fixes:
|
||||
Fix to a crash related to {vp8/vp9}_set_roi_map.
|
||||
Fix to compiling failure with -Wformat-nonliteral.
|
||||
Fix to integer overflow with vp9 with high resolution content.
|
||||
Fix to AddNoiseTest failure with ARMv7.
|
||||
Fix to libvpx Null-dereference READ in vp8.
|
||||
|
||||
2021-09-27 v1.11.0 "Smew Duck"
|
||||
This maintenance release adds support for VBR mode in VP9 rate control
|
||||
interface, new codec controls to get quantization parameters and loop filter
|
||||
levels, and includes several improvements to NEON and numerous bug fixes.
|
||||
|
||||
- Upgrading:
|
||||
New codec control is added to get quantization parameters and loop filter
|
||||
levels.
|
||||
|
||||
VBR mode is supported in VP9 rate control library.
|
||||
|
||||
- Enhancement:
|
||||
Numerous improvements for Neon optimizations.
|
||||
Code clean-up and refactoring.
|
||||
Calculation of rd multiplier is changed with BDRATE gains.
|
||||
|
||||
- Bug fixes:
|
||||
Fix to overflow on duration.
|
||||
Fix to several instances of -Wunused-but-set-variable.
|
||||
Fix to avoid chroma resampling for 420mpeg2 input.
|
||||
Fix to overflow in calc_iframe_target_size.
|
||||
Fix to disallow skipping transform and quantization.
|
||||
Fix some -Wsign-compare warnings in simple_encode.
|
||||
Fix input file path in simple_encode_test.
|
||||
Fix valid range for under/over_shoot pct.
|
||||
|
||||
2021-03-09 v1.10.0 "Ruddy Duck"
|
||||
This maintenance release adds support for darwin20 and new codec controls, as
|
||||
well as numerous bug fixes.
|
||||
|
||||
- Upgrading:
|
||||
New codec control is added to disable loopfilter for VP9.
|
||||
|
||||
New encoder control is added to disable feature to increase Q on overshoot
|
||||
detection for CBR.
|
||||
|
||||
Configure support for darwin20 is added.
|
||||
|
||||
New codec control is added for VP9 rate control. The control ID of this
|
||||
interface is VP9E_SET_EXTERNAL_RATE_CONTROL. To make VP9 use a customized
|
||||
external rate control model, users will have to implement each callback
|
||||
function in vpx_rc_funcs_t and register them using libvpx API
|
||||
vpx_codec_control_() with the control ID.
|
||||
|
||||
- Enhancement:
|
||||
Use -std=gnu++11 instead of -std=c++11 for c++ files.
|
||||
|
||||
- Bug fixes:
|
||||
Override assembler with --as option of configure for MSVS.
|
||||
Fix several compilation issues with gcc 4.8.5.
|
||||
Fix to resetting rate control for temporal layers.
|
||||
Fix to the rate control stats of SVC example encoder when number of spatial
|
||||
layers is 1.
|
||||
Fix to reusing motion vectors from the base spatial layer in SVC.
|
||||
2 pass related flags removed from SVC example encoder.
|
||||
|
||||
2020-07-29 v1.9.0 "Quacking Duck"
|
||||
This release adds support for NV12, a separate library for rate control, as
|
||||
well as incremental improvements.
|
||||
|
||||
- Upgrading:
|
||||
NV12 support is added to this release.
|
||||
A new interface is added for VP9 rate control. The new library libvp9rc.a
|
||||
must be linked by applications.
|
||||
Googletest is updated to v1.10.0.
|
||||
simple_encode.cc is compiled into a new library libsimple_encode.a with
|
||||
CONFIG_RATE_CTRL.
|
||||
|
||||
- Enhancement:
|
||||
Various changes to improve VP9 SVC, rate control, quality and speed to real
|
||||
time encoding.
|
||||
|
||||
- Bug fixes:
|
||||
Fix key frame update refresh simulcast flexible svc.
|
||||
Fix to disable_16x16part speed feature for real time encoding.
|
||||
Fix some signed integer overflows for VP9 rate control.
|
||||
Fix initialization of delta_q_uv.
|
||||
Fix condition in regulate_q for cyclic refresh.
|
||||
Various fixes to dynamic resizing for VP9 SVC.
|
||||
|
||||
2019-12-09 v1.8.2 "Pekin Duck"
|
||||
This release collects incremental improvements to many aspects of the library.
|
||||
|
||||
- Upgrading:
|
||||
ARCH_* defines have been removed in favor of VPX_ARCH_*.
|
||||
|
||||
2019-07-15 v1.8.1 "Orpington Duck"
|
||||
This release collects incremental improvements to many aspects of the library.
|
||||
|
||||
@@ -356,7 +474,7 @@
|
||||
of particular interest to real time streaming applications.
|
||||
|
||||
Temporal scalability allows the encoder to produce a stream that can
|
||||
be decimated to different frame rates, with independent rate targetting
|
||||
be decimated to different frame rates, with independent rate targeting
|
||||
for each substream.
|
||||
|
||||
Multiframe quality enhancement postprocessing can make visual quality
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# How to Contribute
|
||||
|
||||
We'd love to accept your patches and contributions to this project. There are
|
||||
just a few small guidelines you need to follow.
|
||||
|
||||
## Contributor License Agreement
|
||||
|
||||
Contributions to this project must be accompanied by a Contributor License
|
||||
Agreement. You (or your employer) retain the copyright to your contribution;
|
||||
this simply gives us permission to use and redistribute your contributions as
|
||||
part of the project. Head over to <https://cla.developers.google.com/> to see
|
||||
your current agreements on file or to sign a new one.
|
||||
|
||||
You generally only need to submit a CLA once, so if you've already submitted one
|
||||
(even if it was for a different project), you probably don't need to do it
|
||||
again.
|
||||
|
||||
## Code reviews
|
||||
|
||||
All submissions, including submissions by project members, require review. We
|
||||
use a [Gerrit](https://www.gerritcodereview.com) instance hosted at
|
||||
https://chromium-review.googlesource.com for this purpose. See the
|
||||
[WebM Project page](https://www.webmproject.org/code/contribute/submitting-patches/)
|
||||
for additional details.
|
||||
|
||||
## Community Guidelines
|
||||
|
||||
This project follows
|
||||
[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/).
|
||||
+17
-8
@@ -1,4 +1,4 @@
|
||||
README - 15 July 2019
|
||||
v1.12.0 Torrent Duck
|
||||
|
||||
Welcome to the WebM VP8/VP9 Codec SDK!
|
||||
|
||||
@@ -10,14 +10,14 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
||||
1. Prerequisites
|
||||
|
||||
* All x86 targets require the Yasm[1] assembler be installed[2].
|
||||
* All Windows builds require that Cygwin[3] be installed.
|
||||
* Building the documentation requires Doxygen[4]. If you do not
|
||||
* All Windows builds require that Cygwin[3] or MSYS2[4] be installed.
|
||||
* Building the documentation requires Doxygen[5]. If you do not
|
||||
have this package, the install-docs option will be disabled.
|
||||
* Downloading the data for the unit tests requires curl[5] and sha1sum.
|
||||
* Downloading the data for the unit tests requires curl[6] and sha1sum.
|
||||
sha1sum is provided via the GNU coreutils, installed by default on
|
||||
many *nix platforms, as well as MinGW and Cygwin. If coreutils is not
|
||||
available, a compatible version of sha1sum can be built from
|
||||
source[6]. These requirements are optional if not running the unit
|
||||
source[7]. These requirements are optional if not running the unit
|
||||
tests.
|
||||
|
||||
[1]: http://www.tortall.net/projects/yasm
|
||||
@@ -26,9 +26,10 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
||||
yasm-<version>-<arch>.exe to yasm.exe and place it in:
|
||||
Program Files (x86)/Microsoft Visual Studio/2017/<level>/Common7/Tools/
|
||||
[3]: http://www.cygwin.com
|
||||
[4]: http://www.doxygen.org
|
||||
[5]: http://curl.haxx.se
|
||||
[6]: http://www.microbrew.org/tools/md5sha1sum/
|
||||
[4]: http://www.msys2.org/
|
||||
[5]: http://www.doxygen.org
|
||||
[6]: http://curl.haxx.se
|
||||
[7]: http://www.microbrew.org/tools/md5sha1sum/
|
||||
|
||||
2. Out-of-tree builds
|
||||
Out of tree builds are a supported method of building the application. For
|
||||
@@ -62,6 +63,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
||||
|
||||
arm64-android-gcc
|
||||
arm64-darwin-gcc
|
||||
arm64-darwin20-gcc
|
||||
arm64-linux-gcc
|
||||
arm64-win64-gcc
|
||||
arm64-win64-vs15
|
||||
@@ -100,6 +102,8 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
||||
x86-win32-gcc
|
||||
x86-win32-vs14
|
||||
x86-win32-vs15
|
||||
x86-win32-vs16
|
||||
x86-win32-vs17
|
||||
x86_64-android-gcc
|
||||
x86_64-darwin9-gcc
|
||||
x86_64-darwin10-gcc
|
||||
@@ -110,6 +114,9 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
||||
x86_64-darwin15-gcc
|
||||
x86_64-darwin16-gcc
|
||||
x86_64-darwin17-gcc
|
||||
x86_64-darwin18-gcc
|
||||
x86_64-darwin19-gcc
|
||||
x86_64-darwin20-gcc
|
||||
x86_64-iphonesimulator-gcc
|
||||
x86_64-linux-gcc
|
||||
x86_64-linux-icc
|
||||
@@ -117,6 +124,8 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
||||
x86_64-win64-gcc
|
||||
x86_64-win64-vs14
|
||||
x86_64-win64-vs15
|
||||
x86_64-win64-vs16
|
||||
x86_64-win64-vs17
|
||||
generic-gnu
|
||||
|
||||
The generic-gnu target, in conjunction with the CROSS environment variable,
|
||||
|
||||
+5
-2
@@ -16,8 +16,10 @@
|
||||
#include "vpx/vpx_integer.h"
|
||||
#include "vpx_ports/msvc.h"
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__
|
||||
extern void die(const char *fmt, ...) __attribute__((noreturn));
|
||||
#if defined(__GNUC__)
|
||||
__attribute__((noreturn)) extern void die(const char *fmt, ...);
|
||||
#elif defined(_MSC_VER)
|
||||
__declspec(noreturn) extern void die(const char *fmt, ...);
|
||||
#else
|
||||
extern void die(const char *fmt, ...);
|
||||
#endif
|
||||
@@ -81,6 +83,7 @@ const char *arg_next(struct arg *arg) {
|
||||
|
||||
char **argv_dup(int argc, const char **argv) {
|
||||
char **new_argv = malloc((argc + 1) * sizeof(*argv));
|
||||
if (!new_argv) return NULL;
|
||||
|
||||
memcpy(new_argv, argv, argc * sizeof(*argv));
|
||||
new_argv[argc] = NULL;
|
||||
|
||||
@@ -166,6 +166,9 @@ LOCAL_CFLAGS += \
|
||||
-I$(ASM_CNV_PATH)/libvpx
|
||||
|
||||
LOCAL_MODULE := libvpx
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE $(LOCAL_PATH)/../../PATENTS
|
||||
|
||||
ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
|
||||
LOCAL_STATIC_LIBRARIES := cpufeatures
|
||||
|
||||
@@ -147,6 +147,16 @@ $(BUILD_PFX)%_avx512.c.o: CFLAGS += -mavx512f -mavx512cd -mavx512bw -mavx512dq -
|
||||
$(BUILD_PFX)%_vsx.c.d: CFLAGS += -maltivec -mvsx
|
||||
$(BUILD_PFX)%_vsx.c.o: CFLAGS += -maltivec -mvsx
|
||||
|
||||
# MIPS
|
||||
$(BUILD_PFX)%_msa.c.d: CFLAGS += -mmsa
|
||||
$(BUILD_PFX)%_msa.c.o: CFLAGS += -mmsa
|
||||
|
||||
# LOONGARCH
|
||||
$(BUILD_PFX)%_lsx.c.d: CFLAGS += -mlsx
|
||||
$(BUILD_PFX)%_lsx.c.o: CFLAGS += -mlsx
|
||||
$(BUILD_PFX)%_lasx.c.d: CFLAGS += -mlasx
|
||||
$(BUILD_PFX)%_lasx.c.o: CFLAGS += -mlasx
|
||||
|
||||
$(BUILD_PFX)%.c.d: %.c
|
||||
$(if $(quiet),@echo " [DEP] $@")
|
||||
$(qexec)mkdir -p $(dir $@)
|
||||
@@ -430,10 +440,10 @@ ifneq ($(call enabled,DIST-SRCS),)
|
||||
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_vcxproj.sh
|
||||
DIST-SRCS-$(CONFIG_MSVS) += build/make/msvs_common.sh
|
||||
DIST-SRCS-$(CONFIG_RVCT) += build/make/armlink_adapter.sh
|
||||
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas.pl
|
||||
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas_apple.pl
|
||||
DIST-SRCS-$(ARCH_ARM) += build/make/ads2armasm_ms.pl
|
||||
DIST-SRCS-$(ARCH_ARM) += build/make/thumb.pm
|
||||
DIST-SRCS-$(VPX_ARCH_ARM) += build/make/ads2gas.pl
|
||||
DIST-SRCS-$(VPX_ARCH_ARM) += build/make/ads2gas_apple.pl
|
||||
DIST-SRCS-$(VPX_ARCH_ARM) += build/make/ads2armasm_ms.pl
|
||||
DIST-SRCS-$(VPX_ARCH_ARM) += build/make/thumb.pm
|
||||
DIST-SRCS-yes += $(target:-$(TOOLCHAIN)=).mk
|
||||
endif
|
||||
INSTALL-SRCS := $(call cond_enabled,CONFIG_INSTALL_SRCS,INSTALL-SRCS)
|
||||
|
||||
@@ -28,7 +28,7 @@ while (<STDIN>)
|
||||
s/qsubaddx/qsax/i;
|
||||
s/qaddsubx/qasx/i;
|
||||
|
||||
thumb::FixThumbInstructions($_, 1);
|
||||
thumb::FixThumbInstructions($_);
|
||||
|
||||
s/ldrneb/ldrbne/i;
|
||||
s/ldrneh/ldrhne/i;
|
||||
|
||||
@@ -32,7 +32,7 @@ foreach my $arg (@ARGV) {
|
||||
|
||||
print "@ This file was created from a .asm file\n";
|
||||
print "@ using the ads2gas.pl script.\n";
|
||||
print "\t.syntax unified\n";
|
||||
print ".syntax unified\n";
|
||||
if ($thumb) {
|
||||
print "\t.thumb\n";
|
||||
}
|
||||
@@ -42,39 +42,11 @@ if ($thumb) {
|
||||
|
||||
while (<STDIN>)
|
||||
{
|
||||
undef $comment;
|
||||
undef $line;
|
||||
$comment_char = ";";
|
||||
$comment_sub = "@";
|
||||
|
||||
# Handle comments.
|
||||
if (/$comment_char/)
|
||||
{
|
||||
$comment = "";
|
||||
($line, $comment) = /(.*?)$comment_char(.*)/;
|
||||
$_ = $line;
|
||||
}
|
||||
|
||||
# Load and store alignment
|
||||
s/@/,:/g;
|
||||
|
||||
# Hexadecimal constants prefaced by 0x
|
||||
s/#&/#0x/g;
|
||||
|
||||
# Convert :OR: to |
|
||||
s/:OR:/ | /g;
|
||||
|
||||
# Convert :AND: to &
|
||||
s/:AND:/ & /g;
|
||||
|
||||
# Convert :NOT: to ~
|
||||
s/:NOT:/ ~ /g;
|
||||
|
||||
# Convert :SHL: to <<
|
||||
s/:SHL:/ << /g;
|
||||
|
||||
# Convert :SHR: to >>
|
||||
s/:SHR:/ >> /g;
|
||||
# Comment character
|
||||
s/;/@/;
|
||||
|
||||
# Convert ELSE to .else
|
||||
s/\bELSE\b/.else/g;
|
||||
@@ -82,105 +54,51 @@ while (<STDIN>)
|
||||
# Convert ENDIF to .endif
|
||||
s/\bENDIF\b/.endif/g;
|
||||
|
||||
# Convert ELSEIF to .elseif
|
||||
s/\bELSEIF\b/.elseif/g;
|
||||
|
||||
# Convert LTORG to .ltorg
|
||||
s/\bLTORG\b/.ltorg/g;
|
||||
|
||||
# Convert endfunc to nothing.
|
||||
s/\bendfunc\b//ig;
|
||||
|
||||
# Convert FUNCTION to nothing.
|
||||
s/\bFUNCTION\b//g;
|
||||
s/\bfunction\b//g;
|
||||
|
||||
s/\bENTRY\b//g;
|
||||
s/\bMSARMASM\b/0/g;
|
||||
s/^\s+end\s+$//g;
|
||||
|
||||
# Convert IF :DEF:to .if
|
||||
# gcc doesn't have the ability to do a conditional
|
||||
# if defined variable that is set by IF :DEF: on
|
||||
# armasm, so convert it to a normal .if and then
|
||||
# make sure to define a value elesewhere
|
||||
if (s/\bIF :DEF:\b/.if /g)
|
||||
{
|
||||
s/=/==/g;
|
||||
}
|
||||
|
||||
# Convert IF to .if
|
||||
if (s/\bIF\b/.if/g)
|
||||
{
|
||||
if (s/\bIF\b/.if/g) {
|
||||
s/=+/==/g;
|
||||
}
|
||||
|
||||
# Convert INCLUDE to .INCLUDE "file"
|
||||
s/INCLUDE(\s*)(.*)$/.include $1\"$2\"/;
|
||||
|
||||
# Code directive (ARM vs Thumb)
|
||||
s/CODE([0-9][0-9])/.code $1/;
|
||||
s/INCLUDE\s?(.*)$/.include \"$1\"/;
|
||||
|
||||
# No AREA required
|
||||
# But ALIGNs in AREA must be obeyed
|
||||
s/^\s*AREA.*ALIGN=([0-9])$/.text\n.p2align $1/;
|
||||
s/^(\s*)\bAREA\b.*ALIGN=([0-9])$/$1.text\n$1.p2align $2/;
|
||||
# If no ALIGN, strip the AREA and align to 4 bytes
|
||||
s/^\s*AREA.*$/.text\n.p2align 2/;
|
||||
s/^(\s*)\bAREA\b.*$/$1.text\n$1.p2align 2/;
|
||||
|
||||
# DCD to .word
|
||||
# This one is for incoming symbols
|
||||
s/DCD\s+\|(\w*)\|/.long $1/;
|
||||
|
||||
# DCW to .short
|
||||
s/DCW\s+\|(\w*)\|/.short $1/;
|
||||
s/DCW(.*)/.short $1/;
|
||||
|
||||
# Constants defined in scope
|
||||
s/DCD(.*)/.long $1/;
|
||||
s/DCB(.*)/.byte $1/;
|
||||
|
||||
# Make function visible to linker, and make additional symbol with
|
||||
# prepended underscore
|
||||
# Make function visible to linker.
|
||||
if ($elf) {
|
||||
s/EXPORT\s+\|([\$\w]*)\|/.global $1 \n\t.type $1, function/;
|
||||
s/(\s*)EXPORT\s+\|([\$\w]*)\|/$1.global $2\n$1.type $2, function/;
|
||||
} else {
|
||||
s/EXPORT\s+\|([\$\w]*)\|/.global $1/;
|
||||
s/(\s*)EXPORT\s+\|([\$\w]*)\|/$1.global $2/;
|
||||
}
|
||||
s/IMPORT\s+\|([\$\w]*)\|/.global $1/;
|
||||
|
||||
s/EXPORT\s+([\$\w]*)/.global $1/;
|
||||
s/export\s+([\$\w]*)/.global $1/;
|
||||
|
||||
# No vertical bars required; make additional symbol with prepended
|
||||
# underscore
|
||||
s/^\|(\$?\w+)\|/_$1\n\t$1:/g;
|
||||
# No vertical bars on function names
|
||||
s/^\|(\$?\w+)\|/$1/g;
|
||||
|
||||
# Labels need trailing colon
|
||||
# s/^(\w+)/$1:/ if !/EQU/;
|
||||
# put the colon at the end of the line in the macro
|
||||
s/^([a-zA-Z_0-9\$]+)/$1:/ if !/EQU/;
|
||||
|
||||
# ALIGN directive
|
||||
s/\bALIGN\b/.balign/g;
|
||||
|
||||
if ($thumb) {
|
||||
# ARM code - we force everything to thumb with the declaration in the header
|
||||
s/\sARM//g;
|
||||
# ARM code - we force everything to thumb with the declaration in the
|
||||
# header
|
||||
s/\bARM\b//g;
|
||||
} else {
|
||||
# ARM code
|
||||
s/\sARM/.arm/g;
|
||||
s/\bARM\b/.arm/g;
|
||||
}
|
||||
|
||||
# push/pop
|
||||
s/(push\s+)(r\d+)/stmdb sp\!, \{$2\}/g;
|
||||
s/(pop\s+)(r\d+)/ldmia sp\!, \{$2\}/g;
|
||||
|
||||
# NEON code
|
||||
s/(vld1.\d+\s+)(q\d+)/$1\{$2\}/g;
|
||||
s/(vtbl.\d+\s+[^,]+),([^,]+)/$1,\{$2\}/g;
|
||||
|
||||
if ($thumb) {
|
||||
thumb::FixThumbInstructions($_, 0);
|
||||
thumb::FixThumbInstructions($_);
|
||||
}
|
||||
|
||||
# eabi_attributes numerical equivalents can be found in the
|
||||
@@ -188,31 +106,31 @@ while (<STDIN>)
|
||||
|
||||
if ($elf) {
|
||||
# REQUIRE8 Stack is required to be 8-byte aligned
|
||||
s/\sREQUIRE8/.eabi_attribute 24, 1 \@Tag_ABI_align_needed/g;
|
||||
s/\bREQUIRE8\b/.eabi_attribute 24, 1 \@Tag_ABI_align_needed/g;
|
||||
|
||||
# PRESERVE8 Stack 8-byte align is preserved
|
||||
s/\sPRESERVE8/.eabi_attribute 25, 1 \@Tag_ABI_align_preserved/g;
|
||||
s/\bPRESERVE8\b/.eabi_attribute 25, 1 \@Tag_ABI_align_preserved/g;
|
||||
} else {
|
||||
s/\sREQUIRE8//;
|
||||
s/\sPRESERVE8//;
|
||||
s/\bREQUIRE8\b//;
|
||||
s/\bPRESERVE8\b//;
|
||||
}
|
||||
|
||||
# Use PROC and ENDP to give the symbols a .size directive.
|
||||
# This makes them show up properly in debugging tools like gdb and valgrind.
|
||||
if (/\bPROC\b/)
|
||||
{
|
||||
if (/\bPROC\b/) {
|
||||
my $proc;
|
||||
/^_([\.0-9A-Z_a-z]\w+)\b/;
|
||||
# Match the function name so it can be stored in $proc
|
||||
/^([\.0-9A-Z_a-z]\w+)\b/;
|
||||
$proc = $1;
|
||||
push(@proc_stack, $proc) if ($proc);
|
||||
s/\bPROC\b/@ $&/;
|
||||
}
|
||||
if (/\bENDP\b/)
|
||||
{
|
||||
|
||||
if (/\bENDP\b/) {
|
||||
my $proc;
|
||||
s/\bENDP\b/@ $&/;
|
||||
$proc = pop(@proc_stack);
|
||||
$_ = "\t.size $proc, .-$proc".$_ if ($proc and $elf);
|
||||
$_ = ".size $proc, .-$proc".$_ if ($proc and $elf);
|
||||
}
|
||||
|
||||
# EQU directive
|
||||
@@ -220,19 +138,20 @@ while (<STDIN>)
|
||||
|
||||
# Begin macro definition
|
||||
if (/\bMACRO\b/) {
|
||||
# Process next line down, which will be the macro definition
|
||||
$_ = <STDIN>;
|
||||
s/^/.macro/;
|
||||
s/\$//g; # remove formal param reference
|
||||
s/;/@/g; # change comment characters
|
||||
s/\$//g; # Remove $ from the variables in the declaration
|
||||
}
|
||||
|
||||
# For macros, use \ to reference formal params
|
||||
s/\$/\\/g; # End macro definition
|
||||
s/\bMEND\b/.endm/; # No need to tell it where to stop assembling
|
||||
s/\$/\\/g; # Use \ to reference formal parameters
|
||||
# End macro definition
|
||||
|
||||
s/\bMEND\b/.endm/; # No need to tell it where to stop assembling
|
||||
next if /^\s*END\s*$/;
|
||||
s/[ \t]+$//;
|
||||
print;
|
||||
print "$comment_sub$comment\n" if defined $comment;
|
||||
}
|
||||
|
||||
# Mark that this object doesn't need an executable stack.
|
||||
printf ("\t.section\t.note.GNU-stack,\"\",\%\%progbits\n") if $elf;
|
||||
printf (" .section .note.GNU-stack,\"\",\%\%progbits\n") if $elf;
|
||||
|
||||
@@ -20,17 +20,14 @@
|
||||
|
||||
print "@ This file was created from a .asm file\n";
|
||||
print "@ using the ads2gas_apple.pl script.\n\n";
|
||||
print "\t.syntax unified\n";
|
||||
print ".syntax unified\n";
|
||||
|
||||
my %register_aliases;
|
||||
my %macro_aliases;
|
||||
|
||||
my @mapping_list = ("\$0", "\$1", "\$2", "\$3", "\$4", "\$5", "\$6", "\$7", "\$8", "\$9");
|
||||
|
||||
my @incoming_array;
|
||||
|
||||
my @imported_functions;
|
||||
|
||||
# Perl trim function to remove whitespace from the start and end of the string
|
||||
sub trim($)
|
||||
{
|
||||
@@ -46,25 +43,7 @@ while (<STDIN>)
|
||||
s/@/,:/g;
|
||||
|
||||
# Comment character
|
||||
s/;/ @/g;
|
||||
|
||||
# Hexadecimal constants prefaced by 0x
|
||||
s/#&/#0x/g;
|
||||
|
||||
# Convert :OR: to |
|
||||
s/:OR:/ | /g;
|
||||
|
||||
# Convert :AND: to &
|
||||
s/:AND:/ & /g;
|
||||
|
||||
# Convert :NOT: to ~
|
||||
s/:NOT:/ ~ /g;
|
||||
|
||||
# Convert :SHL: to <<
|
||||
s/:SHL:/ << /g;
|
||||
|
||||
# Convert :SHR: to >>
|
||||
s/:SHR:/ >> /g;
|
||||
s/;/@/;
|
||||
|
||||
# Convert ELSE to .else
|
||||
s/\bELSE\b/.else/g;
|
||||
@@ -72,131 +51,64 @@ while (<STDIN>)
|
||||
# Convert ENDIF to .endif
|
||||
s/\bENDIF\b/.endif/g;
|
||||
|
||||
# Convert ELSEIF to .elseif
|
||||
s/\bELSEIF\b/.elseif/g;
|
||||
|
||||
# Convert LTORG to .ltorg
|
||||
s/\bLTORG\b/.ltorg/g;
|
||||
|
||||
# Convert IF :DEF:to .if
|
||||
# gcc doesn't have the ability to do a conditional
|
||||
# if defined variable that is set by IF :DEF: on
|
||||
# armasm, so convert it to a normal .if and then
|
||||
# make sure to define a value elesewhere
|
||||
if (s/\bIF :DEF:\b/.if /g)
|
||||
{
|
||||
s/=/==/g;
|
||||
}
|
||||
|
||||
# Convert IF to .if
|
||||
if (s/\bIF\b/.if/g)
|
||||
{
|
||||
s/=/==/g;
|
||||
if (s/\bIF\b/.if/g) {
|
||||
s/=+/==/g;
|
||||
}
|
||||
|
||||
# Convert INCLUDE to .INCLUDE "file"
|
||||
s/INCLUDE(\s*)(.*)$/.include $1\"$2\"/;
|
||||
|
||||
# Code directive (ARM vs Thumb)
|
||||
s/CODE([0-9][0-9])/.code $1/;
|
||||
s/INCLUDE\s?(.*)$/.include \"$1\"/;
|
||||
|
||||
# No AREA required
|
||||
# But ALIGNs in AREA must be obeyed
|
||||
s/^\s*AREA.*ALIGN=([0-9])$/.text\n.p2align $1/;
|
||||
s/^(\s*)\bAREA\b.*ALIGN=([0-9])$/$1.text\n$1.p2align $2/;
|
||||
# If no ALIGN, strip the AREA and align to 4 bytes
|
||||
s/^\s*AREA.*$/.text\n.p2align 2/;
|
||||
s/^(\s*)\bAREA\b.*$/$1.text\n$1.p2align 2/;
|
||||
|
||||
# DCD to .word
|
||||
# This one is for incoming symbols
|
||||
s/DCD\s+\|(\w*)\|/.long $1/;
|
||||
# Make function visible to linker.
|
||||
s/EXPORT\s+\|([\$\w]*)\|/.globl _$1/;
|
||||
|
||||
# DCW to .short
|
||||
s/DCW\s+\|(\w*)\|/.short $1/;
|
||||
s/DCW(.*)/.short $1/;
|
||||
# No vertical bars on function names
|
||||
s/^\|(\$?\w+)\|/$1/g;
|
||||
|
||||
# Constants defined in scope
|
||||
s/DCD(.*)/.long $1/;
|
||||
s/DCB(.*)/.byte $1/;
|
||||
# Labels and functions need a leading underscore and trailing colon
|
||||
s/^([a-zA-Z_0-9\$]+)/_$1:/ if !/EQU/;
|
||||
|
||||
# Make function visible to linker, and make additional symbol with
|
||||
# prepended underscore
|
||||
s/EXPORT\s+\|([\$\w]*)\|/.globl _$1\n\t.globl $1/;
|
||||
|
||||
# Prepend imported functions with _
|
||||
if (s/IMPORT\s+\|([\$\w]*)\|/.globl $1/)
|
||||
{
|
||||
$function = trim($1);
|
||||
push(@imported_functions, $function);
|
||||
}
|
||||
|
||||
foreach $function (@imported_functions)
|
||||
{
|
||||
s/$function/_$function/;
|
||||
}
|
||||
|
||||
# No vertical bars required; make additional symbol with prepended
|
||||
# underscore
|
||||
s/^\|(\$?\w+)\|/_$1\n\t$1:/g;
|
||||
|
||||
# Labels need trailing colon
|
||||
# s/^(\w+)/$1:/ if !/EQU/;
|
||||
# put the colon at the end of the line in the macro
|
||||
s/^([a-zA-Z_0-9\$]+)/$1:/ if !/EQU/;
|
||||
# Branches need to call the correct, underscored, function
|
||||
s/^(\s+b[egln]?[teq]?\s+)([a-zA-Z_0-9\$]+)/$1 _$2/ if !/EQU/;
|
||||
|
||||
# ALIGN directive
|
||||
s/\bALIGN\b/.balign/g;
|
||||
|
||||
# Strip ARM
|
||||
s/\sARM/@ ARM/g;
|
||||
s/\s+ARM//;
|
||||
|
||||
# Strip REQUIRE8
|
||||
#s/\sREQUIRE8/@ REQUIRE8/g;
|
||||
s/\sREQUIRE8/@ /g;
|
||||
s/\s+REQUIRE8//;
|
||||
|
||||
# Strip PRESERVE8
|
||||
s/\sPRESERVE8/@ PRESERVE8/g;
|
||||
s/\s+PRESERVE8//;
|
||||
|
||||
# Strip PROC and ENDPROC
|
||||
s/\bPROC\b/@/g;
|
||||
s/\bENDP\b/@/g;
|
||||
s/\bPROC\b//g;
|
||||
s/\bENDP\b//g;
|
||||
|
||||
# EQU directive
|
||||
s/(.*)EQU(.*)/.set $1, $2/;
|
||||
s/(\S+\s+)EQU(\s+\S+)/.equ $1, $2/;
|
||||
|
||||
# Begin macro definition
|
||||
if (/\bMACRO\b/)
|
||||
{
|
||||
if (/\bMACRO\b/) {
|
||||
# Process next line down, which will be the macro definition
|
||||
$_ = <STDIN>;
|
||||
|
||||
$trimmed = trim($_);
|
||||
|
||||
# remove commas that are separating list
|
||||
$trimmed =~ s/,//g;
|
||||
|
||||
# string to array
|
||||
@incoming_array = split(/\s+/, $trimmed);
|
||||
|
||||
print ".macro @incoming_array[0]\n";
|
||||
|
||||
# remove the first element, as that is the name of the macro
|
||||
shift (@incoming_array);
|
||||
|
||||
@macro_aliases{@incoming_array} = @mapping_list;
|
||||
|
||||
next;
|
||||
s/^/.macro/;
|
||||
s/\$//g; # Remove $ from the variables in the declaration
|
||||
}
|
||||
|
||||
while (($key, $value) = each(%macro_aliases))
|
||||
{
|
||||
$key =~ s/\$/\\\$/;
|
||||
s/$key\b/$value/g;
|
||||
}
|
||||
s/\$/\\/g; # Use \ to reference formal parameters
|
||||
# End macro definition
|
||||
|
||||
# For macros, use \ to reference formal params
|
||||
# s/\$/\\/g; # End macro definition
|
||||
s/\bMEND\b/.endm/; # No need to tell it where to stop assembling
|
||||
s/\bMEND\b/.endm/; # No need to tell it where to stop assembling
|
||||
next if /^\s*END\s*$/;
|
||||
|
||||
s/[ \t]+$//;
|
||||
print;
|
||||
}
|
||||
|
||||
@@ -262,6 +262,9 @@ if [ -z "$source_path" ] || [ "$source_path" = "." ]; then
|
||||
source_path="`pwd`"
|
||||
disable_feature source_path_used
|
||||
fi
|
||||
# Makefiles greedily process the '#' character as a comment, even if it is
|
||||
# inside quotes. So, this character must be escaped in all paths in Makefiles.
|
||||
source_path_mk=$(echo $source_path | sed -e 's;\#;\\\#;g')
|
||||
|
||||
if test ! -z "$TMPDIR" ; then
|
||||
TMPDIRx="${TMPDIR}"
|
||||
@@ -439,11 +442,24 @@ void f(void) {
|
||||
}
|
||||
EOF
|
||||
compile_result=$?
|
||||
if [ ${compile_result} -ne 0 ]; then
|
||||
log_echo " disabling avx512: not supported by compiler"
|
||||
disable_feature avx512
|
||||
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx512 "
|
||||
fi
|
||||
#
|
||||
# if [ ${compile_result} -ne 0 ]; then
|
||||
# log_echo " disabling avx512: not supported by compiler"
|
||||
# disable_feature avx512
|
||||
# RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx512 "
|
||||
# fi
|
||||
#*/
|
||||
}
|
||||
|
||||
check_inline_asm() {
|
||||
log check_inline_asm "$@"
|
||||
name="$1"
|
||||
code="$2"
|
||||
shift 2
|
||||
disable_feature $name
|
||||
check_cc "$@" <<EOF && enable_feature $name
|
||||
void foo(void) { __asm__ volatile($code); }
|
||||
EOF
|
||||
}
|
||||
|
||||
write_common_config_banner() {
|
||||
@@ -481,11 +497,11 @@ write_common_target_config_mk() {
|
||||
|
||||
cat >> $1 << EOF
|
||||
# This file automatically generated by configure. Do not edit!
|
||||
SRC_PATH="$source_path"
|
||||
SRC_PATH_BARE=$source_path
|
||||
SRC_PATH="$source_path_mk"
|
||||
SRC_PATH_BARE=$source_path_mk
|
||||
BUILD_PFX=${BUILD_PFX}
|
||||
TOOLCHAIN=${toolchain}
|
||||
ASM_CONVERSION=${asm_conversion_cmd:-${source_path}/build/make/ads2gas.pl}
|
||||
ASM_CONVERSION=${asm_conversion_cmd:-${source_path_mk}/build/make/ads2gas.pl}
|
||||
GEN_VCPROJ=${gen_vcproj_cmd}
|
||||
MSVS_ARCH_DIR=${msvs_arch_dir}
|
||||
|
||||
@@ -518,10 +534,10 @@ fmt_deps = sed -e 's;^\([a-zA-Z0-9_]*\)\.o;\${@:.d=.o} \$@;'
|
||||
EOF
|
||||
fi
|
||||
|
||||
print_config_mk ARCH "${1}" ${ARCH_LIST}
|
||||
print_config_mk HAVE "${1}" ${HAVE_LIST}
|
||||
print_config_mk CONFIG "${1}" ${CONFIG_LIST}
|
||||
print_config_mk HAVE "${1}" gnu_strip
|
||||
print_config_mk VPX_ARCH "${1}" ${ARCH_LIST}
|
||||
print_config_mk HAVE "${1}" ${HAVE_LIST}
|
||||
print_config_mk CONFIG "${1}" ${CONFIG_LIST}
|
||||
print_config_mk HAVE "${1}" gnu_strip
|
||||
|
||||
enabled msvs && echo "CONFIG_VS_VERSION=${vs_version}" >> "${1}"
|
||||
|
||||
@@ -538,10 +554,10 @@ write_common_target_config_h() {
|
||||
#define RESTRICT ${RESTRICT}
|
||||
#define INLINE ${INLINE}
|
||||
EOF
|
||||
print_config_h ARCH "${TMP_H}" ${ARCH_LIST}
|
||||
print_config_h HAVE "${TMP_H}" ${HAVE_LIST}
|
||||
print_config_h CONFIG "${TMP_H}" ${CONFIG_LIST}
|
||||
print_config_vars_h "${TMP_H}" ${VAR_LIST}
|
||||
print_config_h VPX_ARCH "${TMP_H}" ${ARCH_LIST}
|
||||
print_config_h HAVE "${TMP_H}" ${HAVE_LIST}
|
||||
print_config_h CONFIG "${TMP_H}" ${CONFIG_LIST}
|
||||
print_config_vars_h "${TMP_H}" ${VAR_LIST}
|
||||
echo "#endif /* VPX_CONFIG_H */" >> ${TMP_H}
|
||||
mkdir -p `dirname "$1"`
|
||||
cmp "$1" ${TMP_H} >/dev/null 2>&1 || mv ${TMP_H} "$1"
|
||||
@@ -763,17 +779,23 @@ process_common_toolchain() {
|
||||
*mips32el*)
|
||||
tgt_isa=mips32
|
||||
;;
|
||||
loongarch32*)
|
||||
tgt_isa=loongarch32
|
||||
;;
|
||||
loongarch64*)
|
||||
tgt_isa=loongarch64
|
||||
;;
|
||||
esac
|
||||
|
||||
# detect tgt_os
|
||||
case "$gcctarget" in
|
||||
arm64-apple-darwin*)
|
||||
tgt_isa=arm64
|
||||
tgt_os=darwin
|
||||
;;
|
||||
*darwin*)
|
||||
*darwin1[0-9]*)
|
||||
tgt_isa=x86_64
|
||||
tgt_os=darwin
|
||||
tgt_os=`echo $gcctarget | sed 's/.*\(darwin1[0-9]\).*/\1/'`
|
||||
;;
|
||||
*darwin2[0-1]*)
|
||||
tgt_isa=`uname -m`
|
||||
tgt_os=`echo $gcctarget | sed 's/.*\(darwin2[0-9]\).*/\1/'`
|
||||
;;
|
||||
x86_64*mingw32*)
|
||||
tgt_os=win64
|
||||
@@ -831,6 +853,11 @@ process_common_toolchain() {
|
||||
ppc*)
|
||||
enable_feature ppc
|
||||
;;
|
||||
loongarch*)
|
||||
soft_enable lsx
|
||||
soft_enable lasx
|
||||
enable_feature loongarch
|
||||
;;
|
||||
esac
|
||||
|
||||
# PIC is probably what we want when building shared libs
|
||||
@@ -849,7 +876,7 @@ process_common_toolchain() {
|
||||
# Handle darwin variants. Newer SDKs allow targeting older
|
||||
# platforms, so use the newest one available.
|
||||
case ${toolchain} in
|
||||
DISABLE-arm*-darwin*)
|
||||
arm*-darwin-*)
|
||||
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
||||
iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
|
||||
if [ -d "${iphoneos_sdk_dir}" ]; then
|
||||
@@ -857,7 +884,7 @@ process_common_toolchain() {
|
||||
add_ldflags "-isysroot ${iphoneos_sdk_dir}"
|
||||
fi
|
||||
;;
|
||||
x86*-darwin*)
|
||||
*-darwin*)
|
||||
osx_sdk_dir="$(show_darwin_sdk_path macosx)"
|
||||
if [ -d "${osx_sdk_dir}" ]; then
|
||||
add_cflags "-isysroot ${osx_sdk_dir}"
|
||||
@@ -867,15 +894,57 @@ process_common_toolchain() {
|
||||
esac
|
||||
|
||||
case ${toolchain} in
|
||||
*-darwin-*)
|
||||
mvmin=$(sw_vers -productVersion)
|
||||
if [[ $mvmin == 10.* ]]; then
|
||||
mvmin="-mmacosx-version-min=""${mvmin%.*}"
|
||||
else
|
||||
mvmin="-mmacosx-version-min=""${mvmin%%.*}"
|
||||
fi
|
||||
add_cflags $mvmin
|
||||
add_ldflags $mvmin
|
||||
*-darwin8-*)
|
||||
add_cflags "-mmacosx-version-min=10.4"
|
||||
add_ldflags "-mmacosx-version-min=10.4"
|
||||
;;
|
||||
*-darwin9-*)
|
||||
add_cflags "-mmacosx-version-min=10.5"
|
||||
add_ldflags "-mmacosx-version-min=10.5"
|
||||
;;
|
||||
*-darwin10-*)
|
||||
add_cflags "-mmacosx-version-min=10.6"
|
||||
add_ldflags "-mmacosx-version-min=10.6"
|
||||
;;
|
||||
*-darwin11-*)
|
||||
add_cflags "-mmacosx-version-min=10.7"
|
||||
add_ldflags "-mmacosx-version-min=10.7"
|
||||
;;
|
||||
*-darwin12-*)
|
||||
add_cflags "-mmacosx-version-min=10.8"
|
||||
add_ldflags "-mmacosx-version-min=10.8"
|
||||
;;
|
||||
*-darwin13-*)
|
||||
add_cflags "-mmacosx-version-min=10.9"
|
||||
add_ldflags "-mmacosx-version-min=10.9"
|
||||
;;
|
||||
*-darwin14-*)
|
||||
add_cflags "-mmacosx-version-min=10.10"
|
||||
add_ldflags "-mmacosx-version-min=10.10"
|
||||
;;
|
||||
*-darwin15-*)
|
||||
add_cflags "-mmacosx-version-min=10.11"
|
||||
add_ldflags "-mmacosx-version-min=10.11"
|
||||
;;
|
||||
*-darwin16-*)
|
||||
add_cflags "-mmacosx-version-min=10.12"
|
||||
add_ldflags "-mmacosx-version-min=10.12"
|
||||
;;
|
||||
*-darwin17-*)
|
||||
add_cflags "-mmacosx-version-min=10.13"
|
||||
add_ldflags "-mmacosx-version-min=10.13"
|
||||
;;
|
||||
*-darwin18-*)
|
||||
add_cflags "-mmacosx-version-min=10.14"
|
||||
add_ldflags "-mmacosx-version-min=10.14"
|
||||
;;
|
||||
*-darwin19-*)
|
||||
add_cflags "-mmacosx-version-min=10.15"
|
||||
add_ldflags "-mmacosx-version-min=10.15"
|
||||
;;
|
||||
*-darwin2[0-1]-*)
|
||||
add_cflags "-arch ${toolchain%%-*}"
|
||||
add_ldflags "-arch ${toolchain%%-*}"
|
||||
;;
|
||||
*-iphonesimulator-*)
|
||||
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
|
||||
@@ -950,7 +1019,7 @@ EOF
|
||||
fi
|
||||
|
||||
enabled debug && add_asflags -g
|
||||
asm_conversion_cmd="${source_path}/build/make/ads2gas.pl"
|
||||
asm_conversion_cmd="${source_path_mk}/build/make/ads2gas.pl"
|
||||
|
||||
case ${tgt_os} in
|
||||
win*)
|
||||
@@ -972,7 +1041,7 @@ EOF
|
||||
# respective SDKs' limitations. Fortunately, these are all 32-bit ABIs
|
||||
# and so can be selected as 'win32'.
|
||||
if [ ${tgt_os} = "win32" ]; then
|
||||
asm_conversion_cmd="${source_path}/build/make/ads2armasm_ms.pl"
|
||||
asm_conversion_cmd="${source_path_mk}/build/make/ads2armasm_ms.pl"
|
||||
AS_SFX=.S
|
||||
msvs_arch_dir=arm-msvs
|
||||
disable_feature multithread
|
||||
@@ -1050,62 +1119,64 @@ EOF
|
||||
soft_enable unit_tests
|
||||
;;
|
||||
|
||||
DISABLE-darwin*)
|
||||
XCRUN_FIND="xcrun --sdk iphoneos --find"
|
||||
CXX="$(${XCRUN_FIND} clang++)"
|
||||
CC="$(${XCRUN_FIND} clang)"
|
||||
AR="$(${XCRUN_FIND} ar)"
|
||||
AS="$(${XCRUN_FIND} as)"
|
||||
STRIP="$(${XCRUN_FIND} strip)"
|
||||
NM="$(${XCRUN_FIND} nm)"
|
||||
RANLIB="$(${XCRUN_FIND} ranlib)"
|
||||
AS_SFX=.S
|
||||
LD="${CXX:-$(${XCRUN_FIND} ld)}"
|
||||
darwin)
|
||||
if ! enabled external_build; then
|
||||
XCRUN_FIND="xcrun --sdk iphoneos --find"
|
||||
CXX="$(${XCRUN_FIND} clang++)"
|
||||
CC="$(${XCRUN_FIND} clang)"
|
||||
AR="$(${XCRUN_FIND} ar)"
|
||||
AS="$(${XCRUN_FIND} as)"
|
||||
STRIP="$(${XCRUN_FIND} strip)"
|
||||
NM="$(${XCRUN_FIND} nm)"
|
||||
RANLIB="$(${XCRUN_FIND} ranlib)"
|
||||
AS_SFX=.S
|
||||
LD="${CXX:-$(${XCRUN_FIND} ld)}"
|
||||
|
||||
# ASFLAGS is written here instead of using check_add_asflags
|
||||
# because we need to overwrite all of ASFLAGS and purge the
|
||||
# options that were put in above
|
||||
ASFLAGS="-arch ${tgt_isa} -g"
|
||||
# ASFLAGS is written here instead of using check_add_asflags
|
||||
# because we need to overwrite all of ASFLAGS and purge the
|
||||
# options that were put in above
|
||||
ASFLAGS="-arch ${tgt_isa} -g"
|
||||
|
||||
add_cflags -arch ${tgt_isa}
|
||||
add_ldflags -arch ${tgt_isa}
|
||||
add_cflags -arch ${tgt_isa}
|
||||
add_ldflags -arch ${tgt_isa}
|
||||
|
||||
alt_libc="$(show_darwin_sdk_path iphoneos)"
|
||||
if [ -d "${alt_libc}" ]; then
|
||||
add_cflags -isysroot ${alt_libc}
|
||||
fi
|
||||
alt_libc="$(show_darwin_sdk_path iphoneos)"
|
||||
if [ -d "${alt_libc}" ]; then
|
||||
add_cflags -isysroot ${alt_libc}
|
||||
fi
|
||||
|
||||
if [ "${LD}" = "${CXX}" ]; then
|
||||
add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}"
|
||||
else
|
||||
add_ldflags -ios_version_min "${IOS_VERSION_MIN}"
|
||||
fi
|
||||
if [ "${LD}" = "${CXX}" ]; then
|
||||
add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}"
|
||||
else
|
||||
add_ldflags -ios_version_min "${IOS_VERSION_MIN}"
|
||||
fi
|
||||
|
||||
for d in lib usr/lib usr/lib/system; do
|
||||
try_dir="${alt_libc}/${d}"
|
||||
[ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
|
||||
done
|
||||
for d in lib usr/lib usr/lib/system; do
|
||||
try_dir="${alt_libc}/${d}"
|
||||
[ -d "${try_dir}" ] && add_ldflags -L"${try_dir}"
|
||||
done
|
||||
|
||||
case ${tgt_isa} in
|
||||
armv7|armv7s|armv8|arm64)
|
||||
if enabled neon && ! check_xcode_minimum_version; then
|
||||
soft_disable neon
|
||||
log_echo " neon disabled: upgrade Xcode (need v6.3+)."
|
||||
if enabled neon_asm; then
|
||||
soft_disable neon_asm
|
||||
log_echo " neon_asm disabled: upgrade Xcode (need v6.3+)."
|
||||
case ${tgt_isa} in
|
||||
armv7|armv7s|armv8|arm64)
|
||||
if enabled neon && ! check_xcode_minimum_version; then
|
||||
soft_disable neon
|
||||
log_echo " neon disabled: upgrade Xcode (need v6.3+)."
|
||||
if enabled neon_asm; then
|
||||
soft_disable neon_asm
|
||||
log_echo " neon_asm disabled: upgrade Xcode (need v6.3+)."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl"
|
||||
|
||||
if [ "$(show_darwin_sdk_major_version iphoneos)" -gt 8 ]; then
|
||||
check_add_cflags -fembed-bitcode
|
||||
check_add_asflags -fembed-bitcode
|
||||
check_add_ldflags -fembed-bitcode
|
||||
if [ "$(show_darwin_sdk_major_version iphoneos)" -gt 8 ]; then
|
||||
check_add_cflags -fembed-bitcode
|
||||
check_add_asflags -fembed-bitcode
|
||||
check_add_ldflags -fembed-bitcode
|
||||
fi
|
||||
fi
|
||||
|
||||
asm_conversion_cmd="${source_path_mk}/build/make/ads2gas_apple.pl"
|
||||
;;
|
||||
|
||||
linux*)
|
||||
@@ -1159,25 +1230,27 @@ EOF
|
||||
check_add_asflags -mips64r6 -mabi=64 -mhard-float -mfp64
|
||||
check_add_ldflags -mips64r6 -mabi=64 -mfp64
|
||||
;;
|
||||
loongson3*)
|
||||
check_cflags -march=loongson3a && soft_enable mmi \
|
||||
|| disable_feature mmi
|
||||
check_cflags -mmsa && soft_enable msa \
|
||||
|| disable_feature msa
|
||||
tgt_isa=loongson3a
|
||||
;;
|
||||
esac
|
||||
|
||||
if enabled mmi || enabled msa; then
|
||||
soft_enable runtime_cpu_detect
|
||||
fi
|
||||
|
||||
if enabled msa; then
|
||||
# TODO(libyuv:793)
|
||||
# The new mips functions in libyuv do not build
|
||||
# with the toolchains we currently use for testing.
|
||||
soft_disable libyuv
|
||||
|
||||
add_cflags -mmsa
|
||||
add_asflags -mmsa
|
||||
add_ldflags -mmsa
|
||||
fi
|
||||
fi
|
||||
|
||||
if enabled mmi; then
|
||||
tgt_isa=loongson3a
|
||||
check_add_ldflags -march=loongson3a
|
||||
fi
|
||||
|
||||
check_add_cflags -march=${tgt_isa}
|
||||
check_add_asflags -march=${tgt_isa}
|
||||
check_add_asflags -KPIC
|
||||
@@ -1247,10 +1320,6 @@ EOF
|
||||
enabled optimizations && disabled gprof && check_add_cflags -fomit-frame-pointer
|
||||
;;
|
||||
vs*)
|
||||
# When building with Microsoft Visual Studio the assembler is
|
||||
# invoked directly. Checking at configure time is unnecessary.
|
||||
# Skip the check by setting AS arbitrarily
|
||||
AS=msvs
|
||||
msvs_arch_dir=x86-msvs
|
||||
case ${tgt_cc##vs} in
|
||||
14)
|
||||
@@ -1374,6 +1443,15 @@ EOF
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
loongarch*)
|
||||
link_with_cc=gcc
|
||||
setup_gnu_toolchain
|
||||
|
||||
enabled lsx && check_inline_asm lsx '"vadd.b $vr0, $vr1, $vr1"'
|
||||
enabled lsx && soft_enable runtime_cpu_detect
|
||||
enabled lasx && check_inline_asm lasx '"xvadd.b $xr0, $xr1, $xr1"'
|
||||
enabled lasx && soft_enable runtime_cpu_detect
|
||||
;;
|
||||
*-gcc|generic-gnu)
|
||||
link_with_cc=gcc
|
||||
enable_feature gcc
|
||||
@@ -1478,6 +1556,22 @@ EOF
|
||||
;;
|
||||
esac
|
||||
|
||||
# only for LOONGARCH platforms
|
||||
case ${toolchain} in
|
||||
loongarch*)
|
||||
if enabled big_endian; then
|
||||
if enabled lsx; then
|
||||
echo "lsx optimizations are available only for little endian platforms"
|
||||
disable_feature lsx
|
||||
fi
|
||||
if enabled lasx; then
|
||||
echo "lasx optimizations are available only for little endian platforms"
|
||||
disable_feature lasx
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# glibc needs these
|
||||
if enabled linux; then
|
||||
add_cflags -D_LARGEFILE_SOURCE
|
||||
|
||||
@@ -25,7 +25,7 @@ files.
|
||||
Options:
|
||||
--help Print this message
|
||||
--out=outfile Redirect output to a file
|
||||
--ver=version Version (7,8,9,10,11,12,14,15) of visual studio to generate for
|
||||
--ver=version Version (14-17) of visual studio to generate for
|
||||
--target=isa-os-cc Target specifier
|
||||
EOF
|
||||
exit 1
|
||||
@@ -213,13 +213,15 @@ for opt in "$@"; do
|
||||
;;
|
||||
--dep=*) eval "${optval%%:*}_deps=\"\${${optval%%:*}_deps} ${optval##*:}\""
|
||||
;;
|
||||
--ver=*) vs_ver="$optval"
|
||||
case $optval in
|
||||
10|11|12|14|15)
|
||||
;;
|
||||
*) die Unrecognized Visual Studio Version in $opt
|
||||
;;
|
||||
esac
|
||||
--ver=*)
|
||||
vs_ver="$optval"
|
||||
case $optval in
|
||||
14) vs_year=2015 ;;
|
||||
15) vs_year=2017 ;;
|
||||
16) vs_year=2019 ;;
|
||||
17) vs_year=2022 ;;
|
||||
*) die Unrecognized Visual Studio Version in $opt ;;
|
||||
esac
|
||||
;;
|
||||
--target=*) target="${optval}"
|
||||
;;
|
||||
@@ -230,21 +232,11 @@ for opt in "$@"; do
|
||||
done
|
||||
outfile=${outfile:-/dev/stdout}
|
||||
mkoutfile=${mkoutfile:-/dev/stdout}
|
||||
case "${vs_ver:-10}" in
|
||||
10) sln_vers="11.00"
|
||||
sln_vers_str="Visual Studio 2010"
|
||||
;;
|
||||
11) sln_vers="12.00"
|
||||
sln_vers_str="Visual Studio 2012"
|
||||
;;
|
||||
12) sln_vers="12.00"
|
||||
sln_vers_str="Visual Studio 2013"
|
||||
;;
|
||||
14) sln_vers="12.00"
|
||||
sln_vers_str="Visual Studio 2015"
|
||||
;;
|
||||
15) sln_vers="12.00"
|
||||
sln_vers_str="Visual Studio 2017"
|
||||
case "${vs_ver}" in
|
||||
1[4-7])
|
||||
# VS has used Format Version 12.00 continuously since vs11.
|
||||
sln_vers="12.00"
|
||||
sln_vers_str="Visual Studio ${vs_year}"
|
||||
;;
|
||||
esac
|
||||
sfx=vcxproj
|
||||
|
||||
@@ -34,7 +34,7 @@ Options:
|
||||
--name=project_name Name of the project (required)
|
||||
--proj-guid=GUID GUID to use for the project
|
||||
--module-def=filename File containing export definitions (for DLLs)
|
||||
--ver=version Version (10,11,12,14,15) of visual studio to generate for
|
||||
--ver=version Version (14-16) of visual studio to generate for
|
||||
--src-path-bare=dir Path to root of source tree
|
||||
-Ipath/to/include Additional include directories
|
||||
-DFLAG[=value] Preprocessor macros to define
|
||||
@@ -82,7 +82,7 @@ generate_filter() {
|
||||
| sed -e "s,$src_path_bare,," \
|
||||
-e 's/^[\./]\+//g' -e 's,[:/ ],_,g')
|
||||
|
||||
if ([ "$pat" == "asm" ] || [ "$pat" == "s" ] || [ "$pat" == "S" ]) && $asm_use_custom_step; then
|
||||
if ([ "$pat" == "asm" ] || [ "$pat" == "s" ] || [ "$pat" == "S" ]) && $uses_asm; then
|
||||
# Avoid object file name collisions, i.e. vpx_config.c and
|
||||
# vpx_config.asm produce the same object file without
|
||||
# this additional suffix.
|
||||
@@ -157,6 +157,8 @@ for opt in "$@"; do
|
||||
;;
|
||||
--lib) proj_kind="lib"
|
||||
;;
|
||||
--as=*) as="${optval}"
|
||||
;;
|
||||
--src-path-bare=*)
|
||||
src_path_bare=$(fix_path "$optval")
|
||||
src_path_bare=${src_path_bare%/}
|
||||
@@ -168,7 +170,7 @@ for opt in "$@"; do
|
||||
--ver=*)
|
||||
vs_ver="$optval"
|
||||
case "$optval" in
|
||||
10|11|12|14|15)
|
||||
1[4-7])
|
||||
;;
|
||||
*) die Unrecognized Visual Studio Version in $opt
|
||||
;;
|
||||
@@ -215,13 +217,7 @@ fix_file_list file_list
|
||||
|
||||
outfile=${outfile:-/dev/stdout}
|
||||
guid=${guid:-`generate_uuid`}
|
||||
asm_use_custom_step=false
|
||||
uses_asm=${uses_asm:-false}
|
||||
case "${vs_ver:-11}" in
|
||||
10|11|12|14|15)
|
||||
asm_use_custom_step=$uses_asm
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$name" ] || die "Project name (--name) must be specified!"
|
||||
[ -n "$target" ] || die "Target (--target) must be specified!"
|
||||
@@ -253,13 +249,13 @@ libs=${libs// /;}
|
||||
case "$target" in
|
||||
x86_64*)
|
||||
platforms[0]="x64"
|
||||
asm_Debug_cmdline="yasm -Xvc -g cv8 -f win64 ${yasmincs} "%(FullPath)""
|
||||
asm_Release_cmdline="yasm -Xvc -f win64 ${yasmincs} "%(FullPath)""
|
||||
asm_Debug_cmdline="${as} -Xvc -gcv8 -f win64 ${yasmincs} "%(FullPath)""
|
||||
asm_Release_cmdline="${as} -Xvc -f win64 ${yasmincs} "%(FullPath)""
|
||||
;;
|
||||
x86*)
|
||||
platforms[0]="Win32"
|
||||
asm_Debug_cmdline="yasm -Xvc -g cv8 -f win32 ${yasmincs} "%(FullPath)""
|
||||
asm_Release_cmdline="yasm -Xvc -f win32 ${yasmincs} "%(FullPath)""
|
||||
asm_Debug_cmdline="${as} -Xvc -gcv8 -f win32 ${yasmincs} "%(FullPath)""
|
||||
asm_Release_cmdline="${as} -Xvc -f win32 ${yasmincs} "%(FullPath)""
|
||||
;;
|
||||
arm64*)
|
||||
platforms[0]="ARM64"
|
||||
@@ -339,32 +335,18 @@ generate_vcxproj() {
|
||||
else
|
||||
tag_content ConfigurationType StaticLibrary
|
||||
fi
|
||||
if [ "$vs_ver" = "11" ]; then
|
||||
if [ "$plat" = "ARM" ]; then
|
||||
# Setting the wp80 toolchain automatically sets the
|
||||
# WINAPI_FAMILY define, which is required for building
|
||||
# code for arm with the windows headers. Alternatively,
|
||||
# one could add AppContainerApplication=true in the Globals
|
||||
# section and add PrecompiledHeader=NotUsing and
|
||||
# CompileAsWinRT=false in ClCompile and SubSystem=Console
|
||||
# in Link.
|
||||
tag_content PlatformToolset v110_wp80
|
||||
else
|
||||
tag_content PlatformToolset v110
|
||||
fi
|
||||
fi
|
||||
if [ "$vs_ver" = "12" ]; then
|
||||
# Setting a PlatformToolset indicating windows phone isn't
|
||||
# enough to build code for arm with MSVC 2013, one strictly
|
||||
# has to enable AppContainerApplication as well.
|
||||
tag_content PlatformToolset v120
|
||||
fi
|
||||
if [ "$vs_ver" = "14" ]; then
|
||||
tag_content PlatformToolset v140
|
||||
fi
|
||||
if [ "$vs_ver" = "15" ]; then
|
||||
tag_content PlatformToolset v141
|
||||
fi
|
||||
if [ "$vs_ver" = "16" ]; then
|
||||
tag_content PlatformToolset v142
|
||||
fi
|
||||
if [ "$vs_ver" = "17" ]; then
|
||||
tag_content PlatformToolset v143
|
||||
fi
|
||||
tag_content CharacterSet Unicode
|
||||
if [ "$config" = "Release" ]; then
|
||||
tag_content WholeProgramOptimization true
|
||||
|
||||
@@ -35,8 +35,8 @@ ARM_TARGETS="arm64-darwin-gcc
|
||||
armv7s-darwin-gcc"
|
||||
SIM_TARGETS="x86-iphonesimulator-gcc
|
||||
x86_64-iphonesimulator-gcc"
|
||||
OSX_TARGETS="x86-darwin20-gcc
|
||||
x86_64-darwin20-gcc"
|
||||
OSX_TARGETS="x86-darwin16-gcc
|
||||
x86_64-darwin16-gcc"
|
||||
TARGETS="${ARM_TARGETS} ${SIM_TARGETS}"
|
||||
|
||||
# Configures for the target specified by $1, and invokes make with the dist
|
||||
@@ -272,7 +272,7 @@ cat << EOF
|
||||
--help: Display this message and exit.
|
||||
--enable-shared: Build a dynamic framework for use on iOS 8 or later.
|
||||
--extra-configure-args <args>: Extra args to pass when configuring libvpx.
|
||||
--macosx: Uses darwin20 targets instead of iphonesimulator targets for x86
|
||||
--macosx: Uses darwin16 targets instead of iphonesimulator targets for x86
|
||||
and x86_64. Allows linking to framework when builds target MacOSX
|
||||
instead of iOS.
|
||||
--preserve-build-output: Do not delete the build directory.
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
if [ "$(uname -o 2>/dev/null)" = "Cygwin" ] \
|
||||
shell_name="$(uname -o 2>/dev/null)"
|
||||
if [[ "$shell_name" = "Cygwin" || "$shell_name" = "Msys" ]] \
|
||||
&& cygpath --help >/dev/null 2>&1; then
|
||||
FIXPATH='cygpath -m'
|
||||
else
|
||||
|
||||
@@ -315,14 +315,26 @@ EOF
|
||||
|
||||
sub mips() {
|
||||
determine_indirection("c", @ALL_ARCHS);
|
||||
|
||||
# Assign the helper variable for each enabled extension
|
||||
foreach my $opt (@ALL_ARCHS) {
|
||||
my $opt_uc = uc $opt;
|
||||
eval "\$have_${opt}=\"flags & HAS_${opt_uc}\"";
|
||||
}
|
||||
|
||||
common_top;
|
||||
|
||||
print <<EOF;
|
||||
#include "vpx_config.h"
|
||||
|
||||
#ifdef RTCD_C
|
||||
#include "vpx_ports/mips.h"
|
||||
static void setup_rtcd_internal(void)
|
||||
{
|
||||
int flags = mips_cpu_caps();
|
||||
|
||||
(void)flags;
|
||||
|
||||
EOF
|
||||
|
||||
set_function_pointers("c", @ALL_ARCHS);
|
||||
@@ -375,6 +387,37 @@ EOF
|
||||
common_bottom;
|
||||
}
|
||||
|
||||
sub loongarch() {
|
||||
determine_indirection("c", @ALL_ARCHS);
|
||||
|
||||
# Assign the helper variable for each enabled extension
|
||||
foreach my $opt (@ALL_ARCHS) {
|
||||
my $opt_uc = uc $opt;
|
||||
eval "\$have_${opt}=\"flags & HAS_${opt_uc}\"";
|
||||
}
|
||||
|
||||
common_top;
|
||||
print <<EOF;
|
||||
#include "vpx_config.h"
|
||||
|
||||
#ifdef RTCD_C
|
||||
#include "vpx_ports/loongarch.h"
|
||||
static void setup_rtcd_internal(void)
|
||||
{
|
||||
int flags = loongarch_cpu_caps();
|
||||
|
||||
(void)flags;
|
||||
EOF
|
||||
|
||||
set_function_pointers("c", @ALL_ARCHS);
|
||||
|
||||
print <<EOF;
|
||||
}
|
||||
#endif
|
||||
EOF
|
||||
common_bottom;
|
||||
}
|
||||
|
||||
sub unoptimized() {
|
||||
determine_indirection "c";
|
||||
common_top;
|
||||
@@ -410,24 +453,35 @@ if ($opts{arch} eq 'x86') {
|
||||
&require(@REQUIRES);
|
||||
x86;
|
||||
} elsif ($opts{arch} eq 'mips32' || $opts{arch} eq 'mips64') {
|
||||
my $have_dspr2 = 0;
|
||||
my $have_msa = 0;
|
||||
my $have_mmi = 0;
|
||||
@ALL_ARCHS = filter("$opts{arch}");
|
||||
open CONFIG_FILE, $opts{config} or
|
||||
die "Error opening config file '$opts{config}': $!\n";
|
||||
while (<CONFIG_FILE>) {
|
||||
if (/HAVE_DSPR2=yes/) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/dspr2/);
|
||||
last;
|
||||
$have_dspr2 = 1;
|
||||
}
|
||||
if (/HAVE_MSA=yes/) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/msa/);
|
||||
last;
|
||||
$have_msa = 1;
|
||||
}
|
||||
if (/HAVE_MMI=yes/) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/mmi/);
|
||||
last;
|
||||
$have_mmi = 1;
|
||||
}
|
||||
}
|
||||
close CONFIG_FILE;
|
||||
if ($have_dspr2 == 1) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/dspr2/);
|
||||
} elsif ($have_msa == 1 && $have_mmi == 1) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/mmi msa/);
|
||||
} elsif ($have_msa == 1) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/msa/);
|
||||
} elsif ($have_mmi == 1) {
|
||||
@ALL_ARCHS = filter("$opts{arch}", qw/mmi/);
|
||||
} else {
|
||||
unoptimized;
|
||||
}
|
||||
mips;
|
||||
} elsif ($opts{arch} =~ /armv7\w?/) {
|
||||
@ALL_ARCHS = filter(qw/neon_asm neon/);
|
||||
@@ -439,6 +493,9 @@ if ($opts{arch} eq 'x86') {
|
||||
} elsif ($opts{arch} =~ /^ppc/ ) {
|
||||
@ALL_ARCHS = filter(qw/vsx/);
|
||||
ppc;
|
||||
} elsif ($opts{arch} =~ /loongarch/ ) {
|
||||
@ALL_ARCHS = filter(qw/lsx lasx/);
|
||||
loongarch;
|
||||
} else {
|
||||
unoptimized;
|
||||
}
|
||||
|
||||
@@ -11,11 +11,8 @@
|
||||
|
||||
package thumb;
|
||||
|
||||
sub FixThumbInstructions($$)
|
||||
sub FixThumbInstructions($)
|
||||
{
|
||||
my $short_branches = $_[1];
|
||||
my $branch_shift_offset = $short_branches ? 1 : 0;
|
||||
|
||||
# Write additions with shifts, such as "add r10, r11, lsl #8",
|
||||
# in three operand form, "add r10, r10, r11, lsl #8".
|
||||
s/(add\s+)(r\d+),\s*(r\d+),\s*(lsl #\d+)/$1$2, $2, $3, $4/g;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 646 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 898 KiB |
File diff suppressed because one or more lines are too long
Vendored
+47
-7
@@ -99,6 +99,8 @@ EOF
|
||||
# alphabetically by architecture, generic-gnu last.
|
||||
all_platforms="${all_platforms} arm64-android-gcc"
|
||||
all_platforms="${all_platforms} arm64-darwin-gcc"
|
||||
all_platforms="${all_platforms} arm64-darwin20-gcc"
|
||||
all_platforms="${all_platforms} arm64-darwin21-gcc"
|
||||
all_platforms="${all_platforms} arm64-linux-gcc"
|
||||
all_platforms="${all_platforms} arm64-win64-gcc"
|
||||
all_platforms="${all_platforms} arm64-win64-vs15"
|
||||
@@ -112,12 +114,25 @@ all_platforms="${all_platforms} armv7-win32-vs14"
|
||||
all_platforms="${all_platforms} armv7-win32-vs15"
|
||||
all_platforms="${all_platforms} armv7s-darwin-gcc"
|
||||
all_platforms="${all_platforms} armv8-linux-gcc"
|
||||
all_platforms="${all_platforms} loongarch32-linux-gcc"
|
||||
all_platforms="${all_platforms} loongarch64-linux-gcc"
|
||||
all_platforms="${all_platforms} mips32-linux-gcc"
|
||||
all_platforms="${all_platforms} mips64-linux-gcc"
|
||||
all_platforms="${all_platforms} ppc64le-linux-gcc"
|
||||
all_platforms="${all_platforms} sparc-solaris-gcc"
|
||||
all_platforms="${all_platforms} x86-android-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin8-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin8-icc"
|
||||
all_platforms="${all_platforms} x86-darwin9-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin9-icc"
|
||||
all_platforms="${all_platforms} x86-darwin10-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin11-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin12-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin13-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin14-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin15-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin16-gcc"
|
||||
all_platforms="${all_platforms} x86-darwin17-gcc"
|
||||
all_platforms="${all_platforms} x86-iphonesimulator-gcc"
|
||||
all_platforms="${all_platforms} x86-linux-gcc"
|
||||
all_platforms="${all_platforms} x86-linux-icc"
|
||||
@@ -126,8 +141,22 @@ all_platforms="${all_platforms} x86-solaris-gcc"
|
||||
all_platforms="${all_platforms} x86-win32-gcc"
|
||||
all_platforms="${all_platforms} x86-win32-vs14"
|
||||
all_platforms="${all_platforms} x86-win32-vs15"
|
||||
all_platforms="${all_platforms} x86-win32-vs16"
|
||||
all_platforms="${all_platforms} x86-win32-vs17"
|
||||
all_platforms="${all_platforms} x86_64-android-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin9-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin10-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin11-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin12-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin13-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin14-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin15-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin16-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin17-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin18-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin19-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin20-gcc"
|
||||
all_platforms="${all_platforms} x86_64-darwin21-gcc"
|
||||
all_platforms="${all_platforms} x86_64-iphonesimulator-gcc"
|
||||
all_platforms="${all_platforms} x86_64-linux-gcc"
|
||||
all_platforms="${all_platforms} x86_64-linux-icc"
|
||||
@@ -135,6 +164,8 @@ all_platforms="${all_platforms} x86_64-solaris-gcc"
|
||||
all_platforms="${all_platforms} x86_64-win64-gcc"
|
||||
all_platforms="${all_platforms} x86_64-win64-vs14"
|
||||
all_platforms="${all_platforms} x86_64-win64-vs15"
|
||||
all_platforms="${all_platforms} x86_64-win64-vs16"
|
||||
all_platforms="${all_platforms} x86_64-win64-vs17"
|
||||
all_platforms="${all_platforms} generic-gnu"
|
||||
|
||||
# all_targets is a list of all targets that can be configured
|
||||
@@ -210,6 +241,7 @@ ARCH_LIST="
|
||||
x86
|
||||
x86_64
|
||||
ppc
|
||||
loongarch
|
||||
"
|
||||
ARCH_EXT_LIST_X86="
|
||||
mmx
|
||||
@@ -225,6 +257,8 @@ ARCH_EXT_LIST_X86="
|
||||
|
||||
ARCH_EXT_LIST_LOONGSON="
|
||||
mmi
|
||||
lsx
|
||||
lasx
|
||||
"
|
||||
|
||||
ARCH_EXT_LIST="
|
||||
@@ -252,6 +286,7 @@ EXPERIMENT_LIST="
|
||||
fp_mb_stats
|
||||
emulate_hardware
|
||||
non_greedy_mv
|
||||
rate_ctrl
|
||||
"
|
||||
CONFIG_LIST="
|
||||
dependency_tracking
|
||||
@@ -596,7 +631,10 @@ process_toolchain() {
|
||||
check_add_cflags -Wall
|
||||
check_add_cflags -Wdeclaration-after-statement
|
||||
check_add_cflags -Wdisabled-optimization
|
||||
check_add_cflags -Wextra-semi
|
||||
check_add_cflags -Wextra-semi-stmt
|
||||
check_add_cflags -Wfloat-conversion
|
||||
check_add_cflags -Wformat=2
|
||||
check_add_cflags -Wparentheses-equality
|
||||
check_add_cflags -Wpointer-arith
|
||||
check_add_cflags -Wtype-limits
|
||||
@@ -606,6 +644,7 @@ process_toolchain() {
|
||||
check_add_cflags -Wmissing-declarations
|
||||
check_add_cflags -Wmissing-prototypes
|
||||
check_add_cflags -Wuninitialized
|
||||
check_add_cflags -Wunreachable-code-loop-increment
|
||||
check_add_cflags -Wunused
|
||||
check_add_cflags -Wextra
|
||||
# check_add_cflags also adds to cxxflags. gtest does not do well with
|
||||
@@ -706,32 +745,33 @@ process_toolchain() {
|
||||
soft_enable libyuv
|
||||
;;
|
||||
*-android-*)
|
||||
check_add_cxxflags -std=c++11 && soft_enable webm_io
|
||||
check_add_cxxflags -std=gnu++11 && soft_enable webm_io
|
||||
soft_enable libyuv
|
||||
# GTestLog must be modified to use Android logging utilities.
|
||||
;;
|
||||
*-darwin-*)
|
||||
check_add_cxxflags -std=gnu++11
|
||||
# iOS/ARM builds do not work with gtest. This does not match
|
||||
# x86 targets.
|
||||
;;
|
||||
*-iphonesimulator-*)
|
||||
check_add_cxxflags -std=c++11 && soft_enable webm_io
|
||||
check_add_cxxflags -std=gnu++11 && soft_enable webm_io
|
||||
soft_enable libyuv
|
||||
;;
|
||||
*-win*)
|
||||
# Some mingw toolchains don't have pthread available by default.
|
||||
# Treat these more like visual studio where threading in gtest
|
||||
# would be disabled for the same reason.
|
||||
check_add_cxxflags -std=c++11 && soft_enable unit_tests \
|
||||
check_add_cxxflags -std=gnu++11 && soft_enable unit_tests \
|
||||
&& soft_enable webm_io
|
||||
check_cxx "$@" <<EOF && soft_enable libyuv
|
||||
int z;
|
||||
EOF
|
||||
;;
|
||||
*)
|
||||
enabled pthread_h && check_add_cxxflags -std=c++11 \
|
||||
enabled pthread_h && check_add_cxxflags -std=gnu++11 \
|
||||
&& soft_enable unit_tests
|
||||
check_add_cxxflags -std=c++11 && soft_enable webm_io
|
||||
check_add_cxxflags -std=gnu++11 && soft_enable webm_io
|
||||
check_cxx "$@" <<EOF && soft_enable libyuv
|
||||
int z;
|
||||
EOF
|
||||
|
||||
@@ -65,6 +65,7 @@ endif
|
||||
# while EXAMPLES demonstrate specific portions of the API.
|
||||
UTILS-$(CONFIG_DECODERS) += vpxdec.c
|
||||
vpxdec.SRCS += md5_utils.c md5_utils.h
|
||||
vpxdec.SRCS += vpx_ports/compiler_attributes.h
|
||||
vpxdec.SRCS += vpx_ports/mem_ops.h
|
||||
vpxdec.SRCS += vpx_ports/mem_ops_aligned.h
|
||||
vpxdec.SRCS += vpx_ports/msvc.h
|
||||
@@ -167,6 +168,7 @@ decode_to_md5.SRCS += y4minput.c y4minput.h
|
||||
decode_to_md5.SRCS += tools_common.h tools_common.c
|
||||
decode_to_md5.SRCS += video_common.h
|
||||
decode_to_md5.SRCS += video_reader.h video_reader.c
|
||||
decode_to_md5.SRCS += vpx_ports/compiler_attributes.h
|
||||
decode_to_md5.SRCS += vpx_ports/mem_ops.h
|
||||
decode_to_md5.SRCS += vpx_ports/mem_ops_aligned.h
|
||||
decode_to_md5.SRCS += vpx_ports/msvc.h
|
||||
@@ -374,6 +376,7 @@ $(1): $($(1:.$(VCPROJ_SFX)=).SRCS) vpx.$(VCPROJ_SFX)
|
||||
--ver=$$(CONFIG_VS_VERSION)\
|
||||
--proj-guid=$$($$(@:.$(VCPROJ_SFX)=).GUID)\
|
||||
--src-path-bare="$(SRC_PATH_BARE)" \
|
||||
--as=$$(AS) \
|
||||
$$(if $$(CONFIG_STATIC_MSVCRT),--static-crt) \
|
||||
--out=$$@ $$(INTERNAL_CFLAGS) $$(CFLAGS) \
|
||||
$$(INTERNAL_LDFLAGS) $$(LDFLAGS) -l$$(CODEC_LIB) $$^
|
||||
|
||||
@@ -106,7 +106,7 @@ int main(int argc, char **argv) {
|
||||
printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface()));
|
||||
|
||||
if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
|
||||
die_codec(&codec, "Failed to initialize decoder.");
|
||||
die("Failed to initialize decoder.");
|
||||
|
||||
while (vpx_video_reader_read_frame(reader)) {
|
||||
vpx_codec_iter_t iter = NULL;
|
||||
|
||||
@@ -86,9 +86,9 @@ int main(int argc, char **argv) {
|
||||
res = vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL,
|
||||
VPX_CODEC_USE_POSTPROC);
|
||||
if (res == VPX_CODEC_INCAPABLE)
|
||||
die_codec(&codec, "Postproc not supported by this decoder.");
|
||||
die("Postproc not supported by this decoder.");
|
||||
|
||||
if (res) die_codec(&codec, "Failed to initialize decoder.");
|
||||
if (res) die("Failed to initialize decoder.");
|
||||
|
||||
while (vpx_video_reader_read_frame(reader)) {
|
||||
vpx_codec_iter_t iter = NULL;
|
||||
@@ -109,7 +109,7 @@ int main(int argc, char **argv) {
|
||||
0 };
|
||||
if (vpx_codec_control(&codec, VP8_SET_POSTPROC, &pp))
|
||||
die_codec(&codec, "Failed to turn on postproc.");
|
||||
};
|
||||
}
|
||||
|
||||
// Decode the frame with 15ms deadline
|
||||
if (vpx_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 15000))
|
||||
|
||||
@@ -209,7 +209,7 @@ int main(int argc, char **argv) {
|
||||
die("Failed to open %s for reading.", argv[4]);
|
||||
|
||||
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
|
||||
die_codec(&codec, "Failed to initialize encoder");
|
||||
die("Failed to initialize encoder");
|
||||
|
||||
// Encode frames.
|
||||
while (vpx_img_read(&raw, infile)) {
|
||||
|
||||
@@ -118,7 +118,7 @@ int main(int argc, char **argv) {
|
||||
printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface()));
|
||||
|
||||
if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
|
||||
die_codec(&codec, "Failed to initialize decoder.");
|
||||
die("Failed to initialize decoder.");
|
||||
|
||||
while (vpx_video_reader_read_frame(reader)) {
|
||||
vpx_codec_iter_t iter = NULL;
|
||||
|
||||
@@ -218,7 +218,7 @@ int main(int argc, char **argv) {
|
||||
die("Failed to open %s for reading.", infile_arg);
|
||||
|
||||
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
|
||||
die_codec(&codec, "Failed to initialize encoder");
|
||||
die("Failed to initialize encoder");
|
||||
|
||||
// Encode frames.
|
||||
while (vpx_img_read(&raw, infile)) {
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define VPX_DISABLE_CTRL_TYPECHECKS 1
|
||||
#include "../tools_common.h"
|
||||
#include "./vpx_config.h"
|
||||
#include "./svc_context.h"
|
||||
#include "vpx/vp8cx.h"
|
||||
@@ -95,8 +96,9 @@ static const SvcInternal_t *get_const_svc_internal(const SvcContext *svc_ctx) {
|
||||
return (const SvcInternal_t *)svc_ctx->internal;
|
||||
}
|
||||
|
||||
static int svc_log(SvcContext *svc_ctx, SVC_LOG_LEVEL level, const char *fmt,
|
||||
...) {
|
||||
static VPX_TOOLS_FORMAT_PRINTF(3, 4) int svc_log(SvcContext *svc_ctx,
|
||||
SVC_LOG_LEVEL level,
|
||||
const char *fmt, ...) {
|
||||
char buf[512];
|
||||
int retval = 0;
|
||||
va_list ap;
|
||||
@@ -264,7 +266,7 @@ static vpx_codec_err_t parse_options(SvcContext *svc_ctx, const char *options) {
|
||||
if (alt_ref_enabled > REF_FRAMES - svc_ctx->spatial_layers) {
|
||||
svc_log(svc_ctx, SVC_LOG_ERROR,
|
||||
"svc: auto alt ref: Maxinum %d(REF_FRAMES - layers) layers could"
|
||||
"enabled auto alt reference frame, but % layers are enabled\n",
|
||||
"enabled auto alt reference frame, but %d layers are enabled\n",
|
||||
REF_FRAMES - svc_ctx->spatial_layers, alt_ref_enabled);
|
||||
res = VPX_CODEC_INVALID_PARAM;
|
||||
}
|
||||
@@ -456,10 +458,11 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
|
||||
svc_ctx->temporal_layers = VPX_TS_MAX_LAYERS;
|
||||
|
||||
if (svc_ctx->temporal_layers * svc_ctx->spatial_layers > VPX_MAX_LAYERS) {
|
||||
svc_log(svc_ctx, SVC_LOG_ERROR,
|
||||
"spatial layers * temporal layers exceeds the maximum number of "
|
||||
"allowed layers of %d\n",
|
||||
svc_ctx->spatial_layers * svc_ctx->temporal_layers, VPX_MAX_LAYERS);
|
||||
svc_log(
|
||||
svc_ctx, SVC_LOG_ERROR,
|
||||
"spatial layers * temporal layers (%d) exceeds the maximum number of "
|
||||
"allowed layers of %d\n",
|
||||
svc_ctx->spatial_layers * svc_ctx->temporal_layers, VPX_MAX_LAYERS);
|
||||
return VPX_CODEC_INVALID_PARAM;
|
||||
}
|
||||
res = assign_layer_bitrates(svc_ctx, enc_cfg);
|
||||
|
||||
@@ -84,6 +84,7 @@ static int get_frame_stats(vpx_codec_ctx_t *ctx, const vpx_image_t *img,
|
||||
const uint8_t *const pkt_buf = pkt->data.twopass_stats.buf;
|
||||
const size_t pkt_size = pkt->data.twopass_stats.sz;
|
||||
stats->buf = realloc(stats->buf, stats->sz + pkt_size);
|
||||
if (!stats->buf) die("Failed to reallocate stats buffer.");
|
||||
memcpy((uint8_t *)stats->buf + stats->sz, pkt_buf, pkt_size);
|
||||
stats->sz += pkt_size;
|
||||
}
|
||||
@@ -128,7 +129,7 @@ static vpx_fixed_buf_t pass0(vpx_image_t *raw, FILE *infile,
|
||||
vpx_fixed_buf_t stats = { NULL, 0 };
|
||||
|
||||
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), cfg, 0))
|
||||
die_codec(&codec, "Failed to initialize encoder");
|
||||
die("Failed to initialize encoder");
|
||||
|
||||
// Calculate frame statistics.
|
||||
while (vpx_img_read(raw, infile)) {
|
||||
@@ -164,7 +165,7 @@ static void pass1(vpx_image_t *raw, FILE *infile, const char *outfile_name,
|
||||
if (!writer) die("Failed to open %s for writing", outfile_name);
|
||||
|
||||
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), cfg, 0))
|
||||
die_codec(&codec, "Failed to initialize encoder");
|
||||
die("Failed to initialize encoder");
|
||||
|
||||
// Encode frames.
|
||||
while (vpx_img_read(raw, infile)) {
|
||||
@@ -221,7 +222,7 @@ int main(int argc, char **argv) {
|
||||
die("Invalid frame size: %dx%d", w, h);
|
||||
|
||||
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, w, h, 1))
|
||||
die("Failed to allocate image", w, h);
|
||||
die("Failed to allocate image (%dx%d)", w, h);
|
||||
|
||||
printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
|
||||
|
||||
|
||||
@@ -352,7 +352,7 @@ int main(int argc, char **argv) {
|
||||
framerate = (int)strtol(argv[3], NULL, 0);
|
||||
|
||||
if (width < 16 || width % 2 || height < 16 || height % 2)
|
||||
die("Invalid resolution: %ldx%ld", width, height);
|
||||
die("Invalid resolution: %dx%d", width, height);
|
||||
|
||||
/* Open input video file for encoding */
|
||||
if (!(infile = fopen(argv[4], "rb")))
|
||||
@@ -380,7 +380,7 @@ int main(int argc, char **argv) {
|
||||
(int)strtol(argv[2 * NUM_ENCODERS + 5 + i], NULL, 0);
|
||||
if (num_temporal_layers[i] < 1 || num_temporal_layers[i] > 3)
|
||||
die("Invalid temporal layers: %d, Must be 1, 2, or 3. \n",
|
||||
num_temporal_layers);
|
||||
num_temporal_layers[i]);
|
||||
}
|
||||
|
||||
/* Open file to write out each spatially downsampled input stream. */
|
||||
@@ -468,7 +468,7 @@ int main(int argc, char **argv) {
|
||||
/* Allocate image for each encoder */
|
||||
for (i = 0; i < NUM_ENCODERS; i++)
|
||||
if (!vpx_img_alloc(&raw[i], VPX_IMG_FMT_I420, cfg[i].g_w, cfg[i].g_h, 32))
|
||||
die("Failed to allocate image", cfg[i].g_w, cfg[i].g_h);
|
||||
die("Failed to allocate image (%dx%d)", cfg[i].g_w, cfg[i].g_h);
|
||||
|
||||
if (raw[0].stride[VPX_PLANE_Y] == (int)raw[0].d_w)
|
||||
read_frame_p = mulres_read_frame;
|
||||
|
||||
@@ -155,7 +155,7 @@ int main(int argc, char **argv) {
|
||||
die("Failed to open %s for reading.", argv[3]);
|
||||
|
||||
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
|
||||
die_codec(&codec, "Failed to initialize encoder");
|
||||
die("Failed to initialize encoder");
|
||||
|
||||
// Encode frames.
|
||||
while (vpx_img_read(&raw, infile)) {
|
||||
|
||||
@@ -110,7 +110,7 @@ int main(int argc, char **argv) {
|
||||
die("Failed to open %s for reading.", argv[3]);
|
||||
|
||||
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
|
||||
die_codec(&codec, "Failed to initialize encoder");
|
||||
die("Failed to initialize encoder");
|
||||
|
||||
if (vpx_codec_control_(&codec, VP9E_SET_LOSSLESS, 1))
|
||||
die_codec(&codec, "Failed to use lossless mode");
|
||||
|
||||
@@ -66,12 +66,6 @@ static const arg_def_t kf_dist_arg =
|
||||
ARG_DEF("k", "kf-dist", 1, "number of frames between keyframes");
|
||||
static const arg_def_t scale_factors_arg =
|
||||
ARG_DEF("r", "scale-factors", 1, "scale factors (lowest to highest layer)");
|
||||
static const arg_def_t passes_arg =
|
||||
ARG_DEF("p", "passes", 1, "Number of passes (1/2)");
|
||||
static const arg_def_t pass_arg =
|
||||
ARG_DEF(NULL, "pass", 1, "Pass to execute (1/2)");
|
||||
static const arg_def_t fpf_name_arg =
|
||||
ARG_DEF(NULL, "fpf", 1, "First pass statistics file name");
|
||||
static const arg_def_t min_q_arg =
|
||||
ARG_DEF(NULL, "min-q", 1, "Minimum quantizer");
|
||||
static const arg_def_t max_q_arg =
|
||||
@@ -125,9 +119,6 @@ static const arg_def_t *svc_args[] = { &frames_arg,
|
||||
&spatial_layers_arg,
|
||||
&kf_dist_arg,
|
||||
&scale_factors_arg,
|
||||
&passes_arg,
|
||||
&pass_arg,
|
||||
&fpf_name_arg,
|
||||
&min_q_arg,
|
||||
&max_q_arg,
|
||||
&min_bitrate_arg,
|
||||
@@ -173,8 +164,6 @@ typedef struct {
|
||||
uint32_t frames_to_skip;
|
||||
struct VpxInputContext input_ctx;
|
||||
stats_io_t rc_stats;
|
||||
int passes;
|
||||
int pass;
|
||||
int tune_content;
|
||||
int inter_layer_pred;
|
||||
} AppInput;
|
||||
@@ -197,9 +186,6 @@ static void parse_command_line(int argc, const char **argv_,
|
||||
char **argi = NULL;
|
||||
char **argj = NULL;
|
||||
vpx_codec_err_t res;
|
||||
int passes = 0;
|
||||
int pass = 0;
|
||||
const char *fpf_file_name = NULL;
|
||||
unsigned int min_bitrate = 0;
|
||||
unsigned int max_bitrate = 0;
|
||||
char string_options[1024] = { 0 };
|
||||
@@ -236,6 +222,10 @@ static void parse_command_line(int argc, const char **argv_,
|
||||
|
||||
// process command line options
|
||||
argv = argv_dup(argc - 1, argv_ + 1);
|
||||
if (!argv) {
|
||||
fprintf(stderr, "Error allocating argument list\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
for (argi = argj = argv; (*argj = *argi); argi += arg.argv_step) {
|
||||
arg.argv_step = 1;
|
||||
|
||||
@@ -289,18 +279,6 @@ static void parse_command_line(int argc, const char **argv_,
|
||||
sizeof(string_options) - strlen(string_options) - 1);
|
||||
strncat(string_options, arg.val,
|
||||
sizeof(string_options) - strlen(string_options) - 1);
|
||||
} else if (arg_match(&arg, &passes_arg, argi)) {
|
||||
passes = arg_parse_uint(&arg);
|
||||
if (passes < 1 || passes > 2) {
|
||||
die("Error: Invalid number of passes (%d)\n", passes);
|
||||
}
|
||||
} else if (arg_match(&arg, &pass_arg, argi)) {
|
||||
pass = arg_parse_uint(&arg);
|
||||
if (pass < 1 || pass > 2) {
|
||||
die("Error: Invalid pass selected (%d)\n", pass);
|
||||
}
|
||||
} else if (arg_match(&arg, &fpf_name_arg, argi)) {
|
||||
fpf_file_name = arg.val;
|
||||
} else if (arg_match(&arg, &min_q_arg, argi)) {
|
||||
strncat(string_options, " min-quantizers=",
|
||||
sizeof(string_options) - strlen(string_options) - 1);
|
||||
@@ -355,35 +333,7 @@ static void parse_command_line(int argc, const char **argv_,
|
||||
if (strlen(string_options) > 0)
|
||||
vpx_svc_set_options(svc_ctx, string_options + 1);
|
||||
|
||||
if (passes == 0 || passes == 1) {
|
||||
if (pass) {
|
||||
fprintf(stderr, "pass is ignored since there's only one pass\n");
|
||||
}
|
||||
enc_cfg->g_pass = VPX_RC_ONE_PASS;
|
||||
} else {
|
||||
if (pass == 0) {
|
||||
die("pass must be specified when passes is 2\n");
|
||||
}
|
||||
|
||||
if (fpf_file_name == NULL) {
|
||||
die("fpf must be specified when passes is 2\n");
|
||||
}
|
||||
|
||||
if (pass == 1) {
|
||||
enc_cfg->g_pass = VPX_RC_FIRST_PASS;
|
||||
if (!stats_open_file(&app_input->rc_stats, fpf_file_name, 0)) {
|
||||
fatal("Failed to open statistics store");
|
||||
}
|
||||
} else {
|
||||
enc_cfg->g_pass = VPX_RC_LAST_PASS;
|
||||
if (!stats_open_file(&app_input->rc_stats, fpf_file_name, 1)) {
|
||||
fatal("Failed to open statistics store");
|
||||
}
|
||||
enc_cfg->rc_twopass_stats_in = stats_get(&app_input->rc_stats);
|
||||
}
|
||||
app_input->passes = passes;
|
||||
app_input->pass = pass;
|
||||
}
|
||||
enc_cfg->g_pass = VPX_RC_ONE_PASS;
|
||||
|
||||
if (enc_cfg->rc_target_bitrate > 0) {
|
||||
if (min_bitrate > 0) {
|
||||
@@ -411,6 +361,8 @@ static void parse_command_line(int argc, const char **argv_,
|
||||
if (app_input->input_ctx.file_type == FILE_TYPE_Y4M) {
|
||||
enc_cfg->g_w = app_input->input_ctx.width;
|
||||
enc_cfg->g_h = app_input->input_ctx.height;
|
||||
enc_cfg->g_timebase.den = app_input->input_ctx.framerate.numerator;
|
||||
enc_cfg->g_timebase.num = app_input->input_ctx.framerate.denominator;
|
||||
}
|
||||
|
||||
if (enc_cfg->g_w < 16 || enc_cfg->g_w % 2 || enc_cfg->g_h < 16 ||
|
||||
@@ -633,7 +585,8 @@ static void set_frame_flags_bypass_mode_ex0(
|
||||
ref_frame_config->alt_fb_idx[sl] = 0;
|
||||
} else if (tl == 1) {
|
||||
ref_frame_config->lst_fb_idx[sl] = sl;
|
||||
ref_frame_config->gld_fb_idx[sl] = num_spatial_layers + sl - 1;
|
||||
ref_frame_config->gld_fb_idx[sl] =
|
||||
(sl == 0) ? 0 : num_spatial_layers + sl - 1;
|
||||
ref_frame_config->alt_fb_idx[sl] = num_spatial_layers + sl;
|
||||
}
|
||||
// Set the reference and update flags.
|
||||
@@ -828,12 +781,15 @@ static void svc_output_rc_stats(
|
||||
vpx_codec_control(codec, VP9E_GET_SVC_LAYER_ID, layer_id);
|
||||
parse_superframe_index(cx_pkt->data.frame.buf, cx_pkt->data.frame.sz,
|
||||
sizes_parsed, &count);
|
||||
if (enc_cfg->ss_number_layers == 1) sizes[0] = cx_pkt->data.frame.sz;
|
||||
for (sl = 0; sl < enc_cfg->ss_number_layers; ++sl) {
|
||||
sizes[sl] = 0;
|
||||
if (cx_pkt->data.frame.spatial_layer_encoded[sl]) {
|
||||
sizes[sl] = sizes_parsed[num_layers_encoded];
|
||||
num_layers_encoded++;
|
||||
if (enc_cfg->ss_number_layers == 1) {
|
||||
sizes[0] = cx_pkt->data.frame.sz;
|
||||
} else {
|
||||
for (sl = 0; sl < enc_cfg->ss_number_layers; ++sl) {
|
||||
sizes[sl] = 0;
|
||||
if (cx_pkt->data.frame.spatial_layer_encoded[sl]) {
|
||||
sizes[sl] = sizes_parsed[num_layers_encoded];
|
||||
num_layers_encoded++;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (sl = 0; sl < enc_cfg->ss_number_layers; ++sl) {
|
||||
@@ -1001,13 +957,11 @@ int main(int argc, const char **argv) {
|
||||
info.time_base.numerator = enc_cfg.g_timebase.num;
|
||||
info.time_base.denominator = enc_cfg.g_timebase.den;
|
||||
|
||||
if (!(app_input.passes == 2 && app_input.pass == 1)) {
|
||||
// We don't save the bitstream for the 1st pass on two pass rate control
|
||||
writer =
|
||||
vpx_video_writer_open(app_input.output_filename, kContainerIVF, &info);
|
||||
if (!writer)
|
||||
die("Failed to open %s for writing\n", app_input.output_filename);
|
||||
}
|
||||
writer =
|
||||
vpx_video_writer_open(app_input.output_filename, kContainerIVF, &info);
|
||||
if (!writer)
|
||||
die("Failed to open %s for writing\n", app_input.output_filename);
|
||||
|
||||
#if OUTPUT_RC_STATS
|
||||
// Write out spatial layer stream.
|
||||
// TODO(marpan/jianj): allow for writing each spatial and temporal stream.
|
||||
@@ -1050,6 +1004,9 @@ int main(int argc, const char **argv) {
|
||||
|
||||
vpx_codec_control(&encoder, VP9E_SET_TUNE_CONTENT, app_input.tune_content);
|
||||
|
||||
vpx_codec_control(&encoder, VP9E_SET_DISABLE_OVERSHOOT_MAXQ_CBR, 0);
|
||||
vpx_codec_control(&encoder, VP9E_SET_DISABLE_LOOPFILTER, 0);
|
||||
|
||||
svc_drop_frame.framedrop_mode = FULL_SUPERFRAME_DROP;
|
||||
for (sl = 0; sl < (unsigned int)svc_ctx.spatial_layers; ++sl)
|
||||
svc_drop_frame.framedrop_thresh[sl] = enc_cfg.rc_dropframe_thresh;
|
||||
@@ -1224,7 +1181,6 @@ int main(int argc, const char **argv) {
|
||||
#endif
|
||||
if (vpx_codec_destroy(&encoder))
|
||||
die_codec(&encoder, "Failed to destroy codec");
|
||||
if (app_input.passes == 2) stats_close(&app_input.rc_stats, 1);
|
||||
if (writer) {
|
||||
vpx_video_writer_close(writer);
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ int main(int argc, char **argv) {
|
||||
die("Failed to open %s for reading.", infile_arg);
|
||||
|
||||
if (vpx_codec_enc_init(&ecodec, encoder->codec_interface(), &cfg, 0))
|
||||
die_codec(&ecodec, "Failed to initialize encoder");
|
||||
die("Failed to initialize encoder");
|
||||
|
||||
// Disable alt_ref.
|
||||
if (vpx_codec_control(&ecodec, VP8E_SET_ENABLEAUTOALTREF, 0))
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
$make -j32
|
||||
|
||||
* Build vp9 fuzzer
|
||||
$ $CXX $CXXFLAGS -std=c++11 -DDECODER=vp9 \
|
||||
$ $CXX $CXXFLAGS -std=gnu++11 -DDECODER=vp9 \
|
||||
-fsanitize=fuzzer -I../libvpx -I. -Wl,--start-group \
|
||||
../libvpx/examples/vpx_dec_fuzzer.cc -o ./vpx_dec_fuzzer_vp9 \
|
||||
./libvpx.a -Wl,--end-group
|
||||
@@ -94,6 +94,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (threads > 1) {
|
||||
const int enable = (data[IVF_FILE_HDR_SZ] & 0xa0) != 0;
|
||||
const vpx_codec_err_t err =
|
||||
vpx_codec_control(&codec, VP9D_SET_LOOP_FILTER_OPT, enable);
|
||||
static_cast<void>(err);
|
||||
}
|
||||
|
||||
data += IVF_FILE_HDR_SZ;
|
||||
size -= IVF_FILE_HDR_SZ;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#define ROI_MAP 0
|
||||
|
||||
#define zero(Dest) memset(&(Dest), 0, sizeof(Dest));
|
||||
#define zero(Dest) memset(&(Dest), 0, sizeof(Dest))
|
||||
|
||||
static const char *exec_name;
|
||||
|
||||
@@ -240,6 +240,38 @@ static void set_roi_map(const char *enc_name, vpx_codec_enc_cfg_t *cfg,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void set_roi_skip_map(vpx_codec_enc_cfg_t *cfg, vpx_roi_map_t *roi,
|
||||
int *skip_map, int *prev_mask_map, int frame_num) {
|
||||
const int block_size = 8;
|
||||
unsigned int i, j;
|
||||
roi->rows = (cfg->g_h + block_size - 1) / block_size;
|
||||
roi->cols = (cfg->g_w + block_size - 1) / block_size;
|
||||
zero(roi->skip);
|
||||
zero(roi->delta_q);
|
||||
zero(roi->delta_lf);
|
||||
memset(roi->ref_frame, -1, sizeof(roi->ref_frame));
|
||||
roi->ref_frame[1] = 1;
|
||||
// Use segment 3 for skip.
|
||||
roi->skip[3] = 1;
|
||||
roi->roi_map =
|
||||
(uint8_t *)calloc(roi->rows * roi->cols, sizeof(*roi->roi_map));
|
||||
for (i = 0; i < roi->rows; ++i) {
|
||||
for (j = 0; j < roi->cols; ++j) {
|
||||
const int idx = i * roi->cols + j;
|
||||
// Use segment 3 for skip.
|
||||
// prev_mask_map keeps track of blocks that have been stably on segment 3
|
||||
// for the past 10 frames. Only skip when the block is on segment 3 in
|
||||
// both current map and prev_mask_map.
|
||||
if (skip_map[idx] == 1 && prev_mask_map[idx] == 1) roi->roi_map[idx] = 3;
|
||||
// Reset it every 10 frames so it doesn't propagate for too many frames.
|
||||
if (frame_num % 10 == 0)
|
||||
prev_mask_map[idx] = skip_map[idx];
|
||||
else if (prev_mask_map[idx] == 1 && skip_map[idx] == 0)
|
||||
prev_mask_map[idx] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Temporal scaling parameters:
|
||||
@@ -574,6 +606,23 @@ static void set_temporal_layer_pattern(int layering_mode,
|
||||
}
|
||||
}
|
||||
|
||||
#if ROI_MAP
|
||||
static void read_mask(FILE *mask_file, int *seg_map) {
|
||||
int mask_rows, mask_cols, i, j;
|
||||
int *map_start = seg_map;
|
||||
fscanf(mask_file, "%d %d\n", &mask_cols, &mask_rows);
|
||||
for (i = 0; i < mask_rows; i++) {
|
||||
for (j = 0; j < mask_cols; j++) {
|
||||
fscanf(mask_file, "%d ", &seg_map[j]);
|
||||
// reverse the bit
|
||||
seg_map[j] = 1 - seg_map[j];
|
||||
}
|
||||
seg_map += mask_cols;
|
||||
}
|
||||
seg_map = map_start;
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
VpxVideoWriter *outfile[VPX_TS_MAX_LAYERS] = { NULL };
|
||||
vpx_codec_ctx_t codec;
|
||||
@@ -613,7 +662,14 @@ int main(int argc, char **argv) {
|
||||
double sum_bitrate = 0.0;
|
||||
double sum_bitrate2 = 0.0;
|
||||
double framerate = 30.0;
|
||||
|
||||
#if ROI_MAP
|
||||
FILE *mask_file = NULL;
|
||||
int block_size = 8;
|
||||
int mask_rows = 0;
|
||||
int mask_cols = 0;
|
||||
int *mask_map;
|
||||
int *prev_mask_map;
|
||||
#endif
|
||||
zero(rc.layer_target_bitrate);
|
||||
memset(&layer_id, 0, sizeof(vpx_svc_layer_id_t));
|
||||
memset(&input_ctx, 0, sizeof(input_ctx));
|
||||
@@ -657,9 +713,15 @@ int main(int argc, char **argv) {
|
||||
die("Invalid layering mode (0..12) %s", argv[12]);
|
||||
}
|
||||
|
||||
#if ROI_MAP
|
||||
if (argc != min_args + mode_to_num_layers[layering_mode] + 1) {
|
||||
die("Invalid number of arguments");
|
||||
}
|
||||
#else
|
||||
if (argc != min_args + mode_to_num_layers[layering_mode]) {
|
||||
die("Invalid number of arguments");
|
||||
}
|
||||
#endif
|
||||
|
||||
input_ctx.filename = argv[1];
|
||||
open_input_file(&input_ctx);
|
||||
@@ -687,14 +749,14 @@ int main(int argc, char **argv) {
|
||||
&raw,
|
||||
bit_depth == VPX_BITS_8 ? VPX_IMG_FMT_I420 : VPX_IMG_FMT_I42016,
|
||||
width, height, 32)) {
|
||||
die("Failed to allocate image", width, height);
|
||||
die("Failed to allocate image (%dx%d)", width, height);
|
||||
}
|
||||
}
|
||||
#else
|
||||
// Y4M reader has its own allocation.
|
||||
if (input_ctx.file_type != FILE_TYPE_Y4M) {
|
||||
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, width, height, 32)) {
|
||||
die("Failed to allocate image", width, height);
|
||||
die("Failed to allocate image (%dx%d)", width, height);
|
||||
}
|
||||
}
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
@@ -815,7 +877,14 @@ int main(int argc, char **argv) {
|
||||
#else
|
||||
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
die_codec(&codec, "Failed to initialize encoder");
|
||||
die("Failed to initialize encoder");
|
||||
|
||||
#if ROI_MAP
|
||||
mask_rows = (cfg.g_h + block_size - 1) / block_size;
|
||||
mask_cols = (cfg.g_w + block_size - 1) / block_size;
|
||||
mask_map = (int *)calloc(mask_rows * mask_cols, sizeof(*mask_map));
|
||||
prev_mask_map = (int *)calloc(mask_rows * mask_cols, sizeof(*mask_map));
|
||||
#endif
|
||||
|
||||
if (strncmp(encoder->name, "vp8", 3) == 0) {
|
||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, -speed);
|
||||
@@ -827,10 +896,11 @@ int main(int argc, char **argv) {
|
||||
if (vpx_codec_control(&codec, VP8E_SET_ROI_MAP, &roi))
|
||||
die_codec(&codec, "Failed to set ROI map");
|
||||
#endif
|
||||
|
||||
} else if (strncmp(encoder->name, "vp9", 3) == 0) {
|
||||
vpx_svc_extra_cfg_t svc_params;
|
||||
memset(&svc_params, 0, sizeof(svc_params));
|
||||
vpx_codec_control(&codec, VP9E_SET_POSTENCODE_DROP, 0);
|
||||
vpx_codec_control(&codec, VP9E_SET_DISABLE_OVERSHOOT_MAXQ_CBR, 0);
|
||||
vpx_codec_control(&codec, VP8E_SET_CPUUSED, speed);
|
||||
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 3);
|
||||
vpx_codec_control(&codec, VP9E_SET_GF_CBR_BOOST_PCT, 0);
|
||||
@@ -840,15 +910,9 @@ int main(int argc, char **argv) {
|
||||
vpx_codec_control(&codec, VP8E_SET_STATIC_THRESHOLD, 1);
|
||||
vpx_codec_control(&codec, VP9E_SET_TUNE_CONTENT, 0);
|
||||
vpx_codec_control(&codec, VP9E_SET_TILE_COLUMNS, get_msb(cfg.g_threads));
|
||||
#if ROI_MAP
|
||||
set_roi_map(encoder->name, &cfg, &roi);
|
||||
if (vpx_codec_control(&codec, VP9E_SET_ROI_MAP, &roi))
|
||||
die_codec(&codec, "Failed to set ROI map");
|
||||
vpx_codec_control(&codec, VP9E_SET_AQ_MODE, 0);
|
||||
#endif
|
||||
// TODO(marpan/jianj): There is an issue with row-mt for low resolutons at
|
||||
// high speed settings, disable its use for those cases for now.
|
||||
if (cfg.g_threads > 1 && ((cfg.g_w > 320 && cfg.g_h > 240) || speed < 7))
|
||||
vpx_codec_control(&codec, VP9E_SET_DISABLE_LOOPFILTER, 0);
|
||||
|
||||
if (cfg.g_threads > 1)
|
||||
vpx_codec_control(&codec, VP9E_SET_ROW_MT, 1);
|
||||
else
|
||||
vpx_codec_control(&codec, VP9E_SET_ROW_MT, 0);
|
||||
@@ -880,6 +944,9 @@ int main(int argc, char **argv) {
|
||||
struct vpx_usec_timer timer;
|
||||
vpx_codec_iter_t iter = NULL;
|
||||
const vpx_codec_cx_pkt_t *pkt;
|
||||
#if ROI_MAP
|
||||
char mask_file_name[255];
|
||||
#endif
|
||||
// Update the temporal layer_id. No spatial layers in this test.
|
||||
layer_id.spatial_layer_id = 0;
|
||||
layer_id.temporal_layer_id =
|
||||
@@ -893,6 +960,19 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
flags = layer_flags[frame_cnt % flag_periodicity];
|
||||
if (layering_mode == 0) flags = 0;
|
||||
#if ROI_MAP
|
||||
snprintf(mask_file_name, sizeof(mask_file_name), "%s%05d.txt",
|
||||
argv[argc - 1], frame_cnt);
|
||||
mask_file = fopen(mask_file_name, "r");
|
||||
if (mask_file != NULL) {
|
||||
read_mask(mask_file, mask_map);
|
||||
fclose(mask_file);
|
||||
// set_roi_map(encoder->name, &cfg, &roi);
|
||||
set_roi_skip_map(&cfg, &roi, mask_map, prev_mask_map, frame_cnt);
|
||||
if (vpx_codec_control(&codec, VP9E_SET_ROI_MAP, &roi))
|
||||
die_codec(&codec, "Failed to set ROI map");
|
||||
}
|
||||
#endif
|
||||
frame_avail = read_frame(&input_ctx, &raw);
|
||||
if (frame_avail) ++rc.layer_input_frames[layer_id.temporal_layer_id];
|
||||
vpx_usec_timer_start(&timer);
|
||||
@@ -930,6 +1010,7 @@ int main(int argc, char **argv) {
|
||||
// Update for short-time encoding bitrate states, for moving window
|
||||
// of size rc->window, shifted by rc->window / 2.
|
||||
// Ignore first window segment, due to key frame.
|
||||
if (rc.window_size == 0) rc.window_size = 15;
|
||||
if (frame_cnt > rc.window_size) {
|
||||
sum_bitrate += 0.001 * 8.0 * pkt->data.frame.sz * framerate;
|
||||
if (frame_cnt % rc.window_size == 0) {
|
||||
@@ -961,6 +1042,10 @@ int main(int argc, char **argv) {
|
||||
++frame_cnt;
|
||||
pts += frame_duration;
|
||||
}
|
||||
#if ROI_MAP
|
||||
free(mask_map);
|
||||
free(prev_mask_map);
|
||||
#endif
|
||||
close_input_file(&input_ctx);
|
||||
printout_rate_control_summary(&rc, &cfg, frame_cnt);
|
||||
printf("\n");
|
||||
|
||||
+19
-11
@@ -13,27 +13,35 @@
|
||||
#include "vpx/vpx_encoder.h"
|
||||
#include "vpx_ports/mem_ops.h"
|
||||
|
||||
void ivf_write_file_header(FILE *outfile, const struct vpx_codec_enc_cfg *cfg,
|
||||
unsigned int fourcc, int frame_cnt) {
|
||||
void ivf_write_file_header_with_video_info(FILE *outfile, unsigned int fourcc,
|
||||
int frame_cnt, int frame_width,
|
||||
int frame_height,
|
||||
vpx_rational_t timebase) {
|
||||
char header[32];
|
||||
|
||||
header[0] = 'D';
|
||||
header[1] = 'K';
|
||||
header[2] = 'I';
|
||||
header[3] = 'F';
|
||||
mem_put_le16(header + 4, 0); // version
|
||||
mem_put_le16(header + 6, 32); // header size
|
||||
mem_put_le32(header + 8, fourcc); // fourcc
|
||||
mem_put_le16(header + 12, cfg->g_w); // width
|
||||
mem_put_le16(header + 14, cfg->g_h); // height
|
||||
mem_put_le32(header + 16, cfg->g_timebase.den); // rate
|
||||
mem_put_le32(header + 20, cfg->g_timebase.num); // scale
|
||||
mem_put_le32(header + 24, frame_cnt); // length
|
||||
mem_put_le32(header + 28, 0); // unused
|
||||
mem_put_le16(header + 4, 0); // version
|
||||
mem_put_le16(header + 6, 32); // header size
|
||||
mem_put_le32(header + 8, fourcc); // fourcc
|
||||
mem_put_le16(header + 12, frame_width); // width
|
||||
mem_put_le16(header + 14, frame_height); // height
|
||||
mem_put_le32(header + 16, timebase.den); // rate
|
||||
mem_put_le32(header + 20, timebase.num); // scale
|
||||
mem_put_le32(header + 24, frame_cnt); // length
|
||||
mem_put_le32(header + 28, 0); // unused
|
||||
|
||||
fwrite(header, 1, 32, outfile);
|
||||
}
|
||||
|
||||
void ivf_write_file_header(FILE *outfile, const struct vpx_codec_enc_cfg *cfg,
|
||||
unsigned int fourcc, int frame_cnt) {
|
||||
ivf_write_file_header_with_video_info(outfile, fourcc, frame_cnt, cfg->g_w,
|
||||
cfg->g_h, cfg->g_timebase);
|
||||
}
|
||||
|
||||
void ivf_write_frame_header(FILE *outfile, int64_t pts, size_t frame_size) {
|
||||
char header[12];
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
#include "./tools_common.h"
|
||||
|
||||
#include "vpx/vpx_encoder.h"
|
||||
|
||||
struct vpx_codec_enc_cfg;
|
||||
struct vpx_codec_cx_pkt;
|
||||
|
||||
@@ -19,6 +21,11 @@ struct vpx_codec_cx_pkt;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void ivf_write_file_header_with_video_info(FILE *outfile, unsigned int fourcc,
|
||||
int frame_cnt, int frame_width,
|
||||
int frame_height,
|
||||
vpx_rational_t timebase);
|
||||
|
||||
void ivf_write_file_header(FILE *outfile, const struct vpx_codec_enc_cfg *cfg,
|
||||
uint32_t fourcc, int frame_cnt);
|
||||
|
||||
|
||||
+191
-17
@@ -11,7 +11,7 @@
|
||||
|
||||
# ARM assembly files are written in RVCT-style. We use some make magic to
|
||||
# filter those files to allow GCC compilation
|
||||
ifeq ($(ARCH_ARM),yes)
|
||||
ifeq ($(VPX_ARCH_ARM),yes)
|
||||
ASM:=$(if $(filter yes,$(CONFIG_GCC)$(CONFIG_MSVS)),.asm.S,.asm)
|
||||
else
|
||||
ASM:=.asm
|
||||
@@ -63,6 +63,7 @@ ifeq ($(CONFIG_VP8_ENCODER),yes)
|
||||
CODEC_SRCS-yes += $(addprefix $(VP8_PREFIX),$(call enabled,VP8_CX_SRCS))
|
||||
CODEC_EXPORTS-yes += $(addprefix $(VP8_PREFIX),$(VP8_CX_EXPORTS))
|
||||
INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8cx.h
|
||||
INSTALL-LIBS-yes += include/vpx/vpx_ext_ratectrl.h
|
||||
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP8_PREFIX)/%
|
||||
CODEC_DOC_SECTIONS += vp8 vp8_encoder
|
||||
endif
|
||||
@@ -87,12 +88,35 @@ ifeq ($(CONFIG_VP9_ENCODER),yes)
|
||||
CODEC_SRCS-yes += $(addprefix $(VP9_PREFIX),$(call enabled,VP9_CX_SRCS))
|
||||
CODEC_EXPORTS-yes += $(addprefix $(VP9_PREFIX),$(VP9_CX_EXPORTS))
|
||||
CODEC_SRCS-yes += $(VP9_PREFIX)vp9cx.mk vpx/vp8.h vpx/vp8cx.h
|
||||
CODEC_SRCS-yes += vpx/vpx_ext_ratectrl.h
|
||||
INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8cx.h
|
||||
INSTALL-LIBS-yes += include/vpx/vpx_ext_ratectrl.h
|
||||
INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP9_PREFIX)/%
|
||||
CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8cx.h
|
||||
CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8cx.h vpx/vpx_ext_ratectrl.h
|
||||
CODEC_DOC_SECTIONS += vp9 vp9_encoder
|
||||
endif
|
||||
|
||||
RC_RTC_SRCS := vpx/vp8.h vpx/vp8cx.h
|
||||
RC_RTC_SRCS += vpx/vpx_ext_ratectrl.h
|
||||
RC_RTC_SRCS += vpx/internal/vpx_ratectrl_rtc.h
|
||||
ifeq ($(CONFIG_VP9_ENCODER),yes)
|
||||
VP9_PREFIX=vp9/
|
||||
RC_RTC_SRCS += $(addprefix $(VP9_PREFIX),$(call enabled,VP9_CX_SRCS))
|
||||
RC_RTC_SRCS += $(VP9_PREFIX)vp9cx.mk
|
||||
RC_RTC_SRCS += $(VP9_PREFIX)ratectrl_rtc.cc
|
||||
RC_RTC_SRCS += $(VP9_PREFIX)ratectrl_rtc.h
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)ratectrl_rtc.cc
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)ratectrl_rtc.h
|
||||
endif
|
||||
ifeq ($(CONFIG_VP8_ENCODER),yes)
|
||||
VP8_PREFIX=vp8/
|
||||
RC_RTC_SRCS += $(addprefix $(VP8_PREFIX),$(call enabled,VP8_CX_SRCS))
|
||||
RC_RTC_SRCS += $(VP8_PREFIX)vp8_ratectrl_rtc.cc
|
||||
RC_RTC_SRCS += $(VP8_PREFIX)vp8_ratectrl_rtc.h
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP8_PREFIX)vp8_ratectrl_rtc.cc
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP8_PREFIX)vp8_ratectrl_rtc.h
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_VP9_DECODER),yes)
|
||||
VP9_PREFIX=vp9/
|
||||
include $(SRC_PATH_BARE)/$(VP9_PREFIX)vp9dx.mk
|
||||
@@ -115,6 +139,7 @@ endif
|
||||
ifeq ($(CONFIG_MSVS),yes)
|
||||
CODEC_LIB=$(if $(CONFIG_STATIC_MSVCRT),vpxmt,vpxmd)
|
||||
GTEST_LIB=$(if $(CONFIG_STATIC_MSVCRT),gtestmt,gtestmd)
|
||||
RC_RTC_LIB=$(if $(CONFIG_STATIC_MSVCRT),vpxrcmt,vpxrcmd)
|
||||
# This variable uses deferred expansion intentionally, since the results of
|
||||
# $(wildcard) may change during the course of the Make.
|
||||
VS_PLATFORMS = $(foreach d,$(wildcard */Release/$(CODEC_LIB).lib),$(word 1,$(subst /, ,$(d))))
|
||||
@@ -139,7 +164,7 @@ CODEC_SRCS-yes += vpx_ports/mem_ops_aligned.h
|
||||
CODEC_SRCS-yes += vpx_ports/vpx_once.h
|
||||
CODEC_SRCS-yes += $(BUILD_PFX)vpx_config.c
|
||||
INSTALL-SRCS-no += $(BUILD_PFX)vpx_config.c
|
||||
ifeq ($(ARCH_X86)$(ARCH_X86_64),yes)
|
||||
ifeq ($(VPX_ARCH_X86)$(VPX_ARCH_X86_64),yes)
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += third_party/x86inc/x86inc.asm
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += vpx_dsp/x86/bitdepth_conversion_sse2.asm
|
||||
endif
|
||||
@@ -165,7 +190,18 @@ INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libvpx.a
|
||||
INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_RATE_CTRL),yesyes)
|
||||
SIMPLE_ENCODE_SRCS := $(call enabled,CODEC_SRCS)
|
||||
SIMPLE_ENCODE_SRCS += $(VP9_PREFIX)simple_encode.cc
|
||||
SIMPLE_ENCODE_SRCS += $(VP9_PREFIX)simple_encode.h
|
||||
SIMPLE_ENCODE_SRCS += ivfenc.h
|
||||
SIMPLE_ENCODE_SRCS += ivfenc.c
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)simple_encode.cc
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(VP9_PREFIX)simple_encode.h
|
||||
endif
|
||||
|
||||
CODEC_SRCS=$(call enabled,CODEC_SRCS)
|
||||
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(CODEC_SRCS)
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(call enabled,CODEC_EXPORTS)
|
||||
|
||||
@@ -209,6 +245,7 @@ vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def
|
||||
--ver=$(CONFIG_VS_VERSION) \
|
||||
--src-path-bare="$(SRC_PATH_BARE)" \
|
||||
--out=$@ $(CFLAGS) \
|
||||
--as=$(AS) \
|
||||
$(filter $(SRC_PATH_BARE)/vp8/%.c, $(VCPROJ_SRCS)) \
|
||||
$(filter $(SRC_PATH_BARE)/vp8/%.h, $(VCPROJ_SRCS)) \
|
||||
$(filter $(SRC_PATH_BARE)/vp9/%.c, $(VCPROJ_SRCS)) \
|
||||
@@ -225,14 +262,57 @@ PROJECTS-yes += vpx.$(VCPROJ_SFX)
|
||||
vpx.$(VCPROJ_SFX): vpx_config.asm
|
||||
vpx.$(VCPROJ_SFX): $(RTCD)
|
||||
|
||||
endif
|
||||
else
|
||||
vpxrc.$(VCPROJ_SFX): \
|
||||
VCPROJ_SRCS=$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^)
|
||||
|
||||
vpxrc.$(VCPROJ_SFX): $(RC_RTC_SRCS)
|
||||
@echo " [CREATE] $@"
|
||||
$(qexec)$(GEN_VCPROJ) \
|
||||
$(if $(CONFIG_SHARED),--dll,--lib) \
|
||||
--target=$(TOOLCHAIN) \
|
||||
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
|
||||
--name=vpxrc \
|
||||
--proj-guid=C26FF952-9494-4838-9A3F-7F3D4F613385 \
|
||||
--ver=$(CONFIG_VS_VERSION) \
|
||||
--src-path-bare="$(SRC_PATH_BARE)" \
|
||||
--out=$@ $(CFLAGS) \
|
||||
--as=$(AS) \
|
||||
$(filter $(SRC_PATH_BARE)/vp9/%.c, $(VCPROJ_SRCS)) \
|
||||
$(filter $(SRC_PATH_BARE)/vp9/%.cc, $(VCPROJ_SRCS)) \
|
||||
$(filter $(SRC_PATH_BARE)/vp9/%.h, $(VCPROJ_SRCS)) \
|
||||
$(filter $(SRC_PATH_BARE)/vpx/%, $(VCPROJ_SRCS)) \
|
||||
$(filter $(SRC_PATH_BARE)/vpx_dsp/%, $(VCPROJ_SRCS)) \
|
||||
$(filter-out $(addprefix $(SRC_PATH_BARE)/, \
|
||||
vp8/%.c vp8/%.h vp9/%.c vp9/%.cc vp9/%.h vpx/% \
|
||||
vpx_dsp/%), \
|
||||
$(VCPROJ_SRCS)) \
|
||||
--src-path-bare="$(SRC_PATH_BARE)" \
|
||||
|
||||
PROJECTS-yes += vpxrc.$(VCPROJ_SFX)
|
||||
|
||||
vpxrc.$(VCPROJ_SFX): vpx_config.asm
|
||||
vpxrc.$(VCPROJ_SFX): $(RTCD)
|
||||
|
||||
endif # ifeq ($(CONFIG_MSVS),yes)
|
||||
else # ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
|
||||
LIBVPX_OBJS=$(call objs, $(filter-out $(ASM_INCLUDES), $(CODEC_SRCS)))
|
||||
OBJS-yes += $(LIBVPX_OBJS)
|
||||
LIBS-$(if yes,$(CONFIG_STATIC)) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
|
||||
$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
|
||||
|
||||
SO_VERSION_MAJOR := 6
|
||||
# Updating version info.
|
||||
# https://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
|
||||
# For libtool: c=<current>, a=<age>, r=<revision>
|
||||
# libtool generates .so file as .so.[c-a].a.r, while -version-info c:r:a is
|
||||
# passed to libtool.
|
||||
#
|
||||
# libvpx library file is generated as libvpx.so.<MAJOR>.<MINOR>.<PATCH>
|
||||
# MAJOR = c-a, MINOR = a, PATCH = r
|
||||
#
|
||||
# To determine SO_VERSION_{MAJOR,MINOR,PATCH}, calculate c,a,r with current
|
||||
# SO_VERSION_* then follow the rules in the link to detemine the new version
|
||||
# (c1, a1, r1) and set MAJOR to [c1-a1], MINOR to a1 and PATCH to r1
|
||||
SO_VERSION_MAJOR := 7
|
||||
SO_VERSION_MINOR := 1
|
||||
SO_VERSION_PATCH := 0
|
||||
ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
|
||||
@@ -330,8 +410,23 @@ endif
|
||||
INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc
|
||||
INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc
|
||||
CLEAN-OBJS += vpx.pc
|
||||
|
||||
ifeq ($(CONFIG_ENCODERS),yes)
|
||||
RC_RTC_OBJS=$(call objs,$(RC_RTC_SRCS))
|
||||
OBJS-yes += $(RC_RTC_OBJS)
|
||||
LIBS-yes += $(BUILD_PFX)libvpxrc.a $(BUILD_PFX)libvpxrc_g.a
|
||||
$(BUILD_PFX)libvpxrc_g.a: $(RC_RTC_OBJS)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_RATE_CTRL),yesyes)
|
||||
SIMPLE_ENCODE_OBJS=$(call objs,$(SIMPLE_ENCODE_SRCS))
|
||||
OBJS-yes += $(SIMPLE_ENCODE_OBJS)
|
||||
LIBS-yes += $(BUILD_PFX)libsimple_encode.a $(BUILD_PFX)libsimple_encode_g.a
|
||||
$(BUILD_PFX)libsimple_encode_g.a: $(SIMPLE_ENCODE_OBJS)
|
||||
endif
|
||||
|
||||
endif # ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
|
||||
|
||||
libvpx.ver: $(call enabled,CODEC_EXPORTS)
|
||||
@echo " [CREATE] $@"
|
||||
$(qexec)echo "{ global:" > $@
|
||||
@@ -347,17 +442,17 @@ CLEAN-OBJS += libvpx.syms
|
||||
#
|
||||
# Rule to make assembler configuration file from C configuration file
|
||||
#
|
||||
ifeq ($(ARCH_X86)$(ARCH_X86_64),yes)
|
||||
ifeq ($(VPX_ARCH_X86)$(VPX_ARCH_X86_64),yes)
|
||||
# YASM
|
||||
$(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h
|
||||
@echo " [CREATE] $@"
|
||||
@egrep "#define [A-Z0-9_]+ [01]" $< \
|
||||
@LC_ALL=C egrep "#define [A-Z0-9_]+ [01]" $< \
|
||||
| awk '{print $$2 " equ " $$3}' > $@
|
||||
else
|
||||
ADS2GAS=$(if $(filter yes,$(CONFIG_GCC)),| $(ASM_CONVERSION))
|
||||
$(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h
|
||||
@echo " [CREATE] $@"
|
||||
@egrep "#define [A-Z0-9_]+ [01]" $< \
|
||||
@LC_ALL=C egrep "#define [A-Z0-9_]+ [01]" $< \
|
||||
| awk '{print $$2 " EQU " $$3}' $(ADS2GAS) > $@
|
||||
@echo " END" $(ADS2GAS) >> $@
|
||||
CLEAN-OBJS += $(BUILD_PFX)vpx_config.asm
|
||||
@@ -387,31 +482,57 @@ ifeq ($(CONFIG_UNIT_TESTS),yes)
|
||||
LIBVPX_TEST_DATA_PATH ?= .
|
||||
|
||||
include $(SRC_PATH_BARE)/test/test.mk
|
||||
LIBVPX_TEST_SRCS=$(addprefix test/,$(call enabled,LIBVPX_TEST_SRCS))
|
||||
|
||||
# addprefix_clean behaves like addprefix if the target doesn't start with "../"
|
||||
# However, if the target starts with "../", instead of adding prefix,
|
||||
# it will remove "../".
|
||||
# Using addprefix_clean, we can avoid two different targets building the
|
||||
# same file, i.e.
|
||||
# test/../ivfenc.c.d: ivfenc.o
|
||||
# ivfenc.c.d: ivfenc.o
|
||||
# Note that the other way to solve this problem is using "realpath".
|
||||
# The "realpath" is supported by make 3.81 or later.
|
||||
addprefix_clean=$(patsubst $(1)../%,%,$(addprefix $(1), $(2)))
|
||||
LIBVPX_TEST_SRCS=$(call addprefix_clean,test/,$(call enabled,LIBVPX_TEST_SRCS))
|
||||
|
||||
LIBVPX_TEST_BIN=./test_libvpx$(EXE_SFX)
|
||||
LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\
|
||||
$(call enabled,LIBVPX_TEST_DATA))
|
||||
libvpx_test_data_url=https://storage.googleapis.com/downloads.webmproject.org/test_data/libvpx/$(1)
|
||||
|
||||
TEST_INTRA_PRED_SPEED_BIN=./test_intra_pred_speed$(EXE_SFX)
|
||||
TEST_INTRA_PRED_SPEED_SRCS=$(addprefix test/,$(call enabled,TEST_INTRA_PRED_SPEED_SRCS))
|
||||
TEST_INTRA_PRED_SPEED_SRCS=$(call addprefix_clean,test/,\
|
||||
$(call enabled,TEST_INTRA_PRED_SPEED_SRCS))
|
||||
TEST_INTRA_PRED_SPEED_OBJS := $(sort $(call objs,$(TEST_INTRA_PRED_SPEED_SRCS)))
|
||||
|
||||
ifeq ($(CONFIG_ENCODERS),yes)
|
||||
RC_INTERFACE_TEST_BIN=./test_rc_interface$(EXE_SFX)
|
||||
RC_INTERFACE_TEST_SRCS=$(call addprefix_clean,test/,\
|
||||
$(call enabled,RC_INTERFACE_TEST_SRCS))
|
||||
RC_INTERFACE_TEST_OBJS := $(sort $(call objs,$(RC_INTERFACE_TEST_SRCS)))
|
||||
endif
|
||||
|
||||
SIMPLE_ENCODE_TEST_BIN=./test_simple_encode$(EXE_SFX)
|
||||
SIMPLE_ENCODE_TEST_SRCS=$(call addprefix_clean,test/,\
|
||||
$(call enabled,SIMPLE_ENCODE_TEST_SRCS))
|
||||
SIMPLE_ENCODE_TEST_OBJS := $(sort $(call objs,$(SIMPLE_ENCODE_TEST_SRCS)))
|
||||
|
||||
libvpx_test_srcs.txt:
|
||||
@echo " [CREATE] $@"
|
||||
@echo $(LIBVPX_TEST_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@
|
||||
CLEAN-OBJS += libvpx_test_srcs.txt
|
||||
|
||||
# Attempt to download the file using curl, retrying once if it fails for a
|
||||
# partial file (18).
|
||||
$(LIBVPX_TEST_DATA): $(SRC_PATH_BARE)/test/test-data.sha1
|
||||
@echo " [DOWNLOAD] $@"
|
||||
# Attempt to download the file using curl, retrying once if it fails for a
|
||||
# partial file (18).
|
||||
$(qexec)( \
|
||||
trap 'rm -f $@' INT TERM; \
|
||||
curl="curl --retry 1 -L -o $@ $(call libvpx_test_data_url,$(@F))"; \
|
||||
$$curl; \
|
||||
case "$$?" in \
|
||||
18) $$curl -C -;; \
|
||||
curl="curl -S -s --retry 1 -L -o $@ $(call libvpx_test_data_url,$(@F))"; \
|
||||
$$curl; ret=$$?; \
|
||||
case "$$ret" in \
|
||||
18) $$curl -C - ;; \
|
||||
*) exit $$ret ;; \
|
||||
esac \
|
||||
)
|
||||
|
||||
@@ -443,6 +564,7 @@ gtest.$(VCPROJ_SFX): $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.c
|
||||
--proj-guid=EC00E1EC-AF68-4D92-A255-181690D1C9B1 \
|
||||
--ver=$(CONFIG_VS_VERSION) \
|
||||
--src-path-bare="$(SRC_PATH_BARE)" \
|
||||
--as=$(AS) \
|
||||
-D_VARIADIC_MAX=10 \
|
||||
--out=gtest.$(VCPROJ_SFX) $(SRC_PATH_BARE)/third_party/googletest/src/src/gtest-all.cc \
|
||||
-I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" -I"$(SRC_PATH_BARE)/third_party/googletest/src"
|
||||
@@ -459,6 +581,7 @@ test_libvpx.$(VCPROJ_SFX): $(LIBVPX_TEST_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_
|
||||
--proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \
|
||||
--ver=$(CONFIG_VS_VERSION) \
|
||||
--src-path-bare="$(SRC_PATH_BARE)" \
|
||||
--as=$(AS) \
|
||||
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
|
||||
--out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \
|
||||
-I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \
|
||||
@@ -481,11 +604,34 @@ test_intra_pred_speed.$(VCPROJ_SFX): $(TEST_INTRA_PRED_SPEED_SRCS) vpx.$(VCPROJ_
|
||||
--proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \
|
||||
--ver=$(CONFIG_VS_VERSION) \
|
||||
--src-path-bare="$(SRC_PATH_BARE)" \
|
||||
--as=$(AS) \
|
||||
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
|
||||
--out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \
|
||||
-I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \
|
||||
-L. -l$(CODEC_LIB) -l$(GTEST_LIB) $^
|
||||
endif # TEST_INTRA_PRED_SPEED
|
||||
|
||||
ifeq ($(CONFIG_ENCODERS),yes)
|
||||
ifneq ($(strip $(RC_INTERFACE_TEST_OBJS)),)
|
||||
PROJECTS-$(CONFIG_MSVS) += test_rc_interface.$(VCPROJ_SFX)
|
||||
test_rc_interface.$(VCPROJ_SFX): $(RC_INTERFACE_TEST_SRCS) vpx.$(VCPROJ_SFX) \
|
||||
vpxrc.$(VCPROJ_SFX) gtest.$(VCPROJ_SFX)
|
||||
@echo " [CREATE] $@"
|
||||
$(qexec)$(GEN_VCPROJ) \
|
||||
--exe \
|
||||
--target=$(TOOLCHAIN) \
|
||||
--name=test_rc_interface \
|
||||
-D_VARIADIC_MAX=10 \
|
||||
--proj-guid=30458F88-1BC6-4689-B41C-50F3737AAB27 \
|
||||
--ver=$(CONFIG_VS_VERSION) \
|
||||
--as=$(AS) \
|
||||
--src-path-bare="$(SRC_PATH_BARE)" \
|
||||
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
|
||||
--out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \
|
||||
-I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \
|
||||
-L. -l$(CODEC_LIB) -l$(RC_RTC_LIB) -l$(GTEST_LIB) $^
|
||||
endif # RC_INTERFACE_TEST
|
||||
endif # CONFIG_VP9_ENCODER
|
||||
endif
|
||||
else
|
||||
|
||||
@@ -527,6 +673,32 @@ $(eval $(call linkerxx_template,$(TEST_INTRA_PRED_SPEED_BIN), \
|
||||
-L. -lvpx -lgtest $(extralibs) -lm))
|
||||
endif # TEST_INTRA_PRED_SPEED
|
||||
|
||||
ifeq ($(CONFIG_ENCODERS),yes)
|
||||
ifneq ($(strip $(RC_INTERFACE_TEST_OBJS)),)
|
||||
$(RC_INTERFACE_TEST_OBJS) $(RC_INTERFACE_TEST_OBJS:.o=.d): \
|
||||
CXXFLAGS += $(GTEST_INCLUDES)
|
||||
OBJS-yes += $(RC_INTERFACE_TEST_OBJS)
|
||||
BINS-yes += $(RC_INTERFACE_TEST_BIN)
|
||||
|
||||
$(RC_INTERFACE_TEST_BIN): $(TEST_LIBS) libvpxrc.a
|
||||
$(eval $(call linkerxx_template,$(RC_INTERFACE_TEST_BIN), \
|
||||
$(RC_INTERFACE_TEST_OBJS) \
|
||||
-L. -lvpx -lgtest -lvpxrc $(extralibs) -lm))
|
||||
endif # RC_INTERFACE_TEST
|
||||
endif # CONFIG_ENCODERS
|
||||
|
||||
ifneq ($(strip $(SIMPLE_ENCODE_TEST_OBJS)),)
|
||||
$(SIMPLE_ENCODE_TEST_OBJS) $(SIMPLE_ENCODE_TEST_OBJS:.o=.d): \
|
||||
CXXFLAGS += $(GTEST_INCLUDES)
|
||||
OBJS-yes += $(SIMPLE_ENCODE_TEST_OBJS)
|
||||
BINS-yes += $(SIMPLE_ENCODE_TEST_BIN)
|
||||
|
||||
$(SIMPLE_ENCODE_TEST_BIN): $(TEST_LIBS) libsimple_encode.a
|
||||
$(eval $(call linkerxx_template,$(SIMPLE_ENCODE_TEST_BIN), \
|
||||
$(SIMPLE_ENCODE_TEST_OBJS) \
|
||||
-L. -lsimple_encode -lvpx -lgtest $(extralibs) -lm))
|
||||
endif # SIMPLE_ENCODE_TEST
|
||||
|
||||
endif # CONFIG_UNIT_TESTS
|
||||
|
||||
# Install test sources only if codec source is included
|
||||
@@ -534,6 +706,7 @@ INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\
|
||||
$(shell find $(SRC_PATH_BARE)/third_party/googletest -type f))
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(LIBVPX_TEST_SRCS)
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(TEST_INTRA_PRED_SPEED_SRCS)
|
||||
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(RC_INTERFACE_TEST_SRCS)
|
||||
|
||||
define test_shard_template
|
||||
test:: test_shard.$(1)
|
||||
@@ -574,6 +747,7 @@ endif
|
||||
|
||||
## Update the global src list
|
||||
SRCS += $(CODEC_SRCS) $(LIBVPX_TEST_SRCS) $(GTEST_SRCS)
|
||||
SRCS += $(RC_INTERFACE_TEST_SRCS)
|
||||
|
||||
##
|
||||
## vpxdec/vpxenc tests.
|
||||
|
||||
+1
-13
@@ -23,6 +23,7 @@
|
||||
#include <string.h> /* for memcpy() */
|
||||
|
||||
#include "md5_utils.h"
|
||||
#include "vpx_ports/compiler_attributes.h"
|
||||
|
||||
static void byteSwap(UWORD32 *buf, unsigned words) {
|
||||
md5byte *p;
|
||||
@@ -145,17 +146,6 @@ void MD5Final(md5byte digest[16], struct MD5Context *ctx) {
|
||||
#define MD5STEP(f, w, x, y, z, in, s) \
|
||||
(w += f(x, y, z) + in, w = (w << s | w >> (32 - s)) + x)
|
||||
|
||||
#if defined(__clang__) && defined(__has_attribute)
|
||||
#if __has_attribute(no_sanitize)
|
||||
#define VPX_NO_UNSIGNED_OVERFLOW_CHECK \
|
||||
__attribute__((no_sanitize("unsigned-integer-overflow")))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef VPX_NO_UNSIGNED_OVERFLOW_CHECK
|
||||
#define VPX_NO_UNSIGNED_OVERFLOW_CHECK
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The core of the MD5 algorithm, this alters an existing MD5 hash to
|
||||
* reflect the addition of 16 longwords of new data. MD5Update blocks
|
||||
@@ -244,6 +234,4 @@ VPX_NO_UNSIGNED_OVERFLOW_CHECK void MD5Transform(UWORD32 buf[4],
|
||||
buf[3] += d;
|
||||
}
|
||||
|
||||
#undef VPX_NO_UNSIGNED_OVERFLOW_CHECK
|
||||
|
||||
#endif
|
||||
|
||||
+20
-17
@@ -193,40 +193,42 @@ static int merge_hist_buckets(struct hist_bucket *bucket, int max_buckets,
|
||||
|
||||
static void show_histogram(const struct hist_bucket *bucket, int buckets,
|
||||
int total, int scale) {
|
||||
const char *pat1, *pat2;
|
||||
int width1, width2;
|
||||
int i;
|
||||
|
||||
if (!buckets) return;
|
||||
assert(bucket != NULL);
|
||||
assert(buckets > 0);
|
||||
|
||||
switch ((int)(log(bucket[buckets - 1].high) / log(10)) + 1) {
|
||||
case 1:
|
||||
case 2:
|
||||
pat1 = "%4d %2s: ";
|
||||
pat2 = "%4d-%2d: ";
|
||||
width1 = 4;
|
||||
width2 = 2;
|
||||
break;
|
||||
case 3:
|
||||
pat1 = "%5d %3s: ";
|
||||
pat2 = "%5d-%3d: ";
|
||||
width1 = 5;
|
||||
width2 = 3;
|
||||
break;
|
||||
case 4:
|
||||
pat1 = "%6d %4s: ";
|
||||
pat2 = "%6d-%4d: ";
|
||||
width1 = 6;
|
||||
width2 = 4;
|
||||
break;
|
||||
case 5:
|
||||
pat1 = "%7d %5s: ";
|
||||
pat2 = "%7d-%5d: ";
|
||||
width1 = 7;
|
||||
width2 = 5;
|
||||
break;
|
||||
case 6:
|
||||
pat1 = "%8d %6s: ";
|
||||
pat2 = "%8d-%6d: ";
|
||||
width1 = 8;
|
||||
width2 = 6;
|
||||
break;
|
||||
case 7:
|
||||
pat1 = "%9d %7s: ";
|
||||
pat2 = "%9d-%7d: ";
|
||||
width1 = 9;
|
||||
width2 = 7;
|
||||
break;
|
||||
default:
|
||||
pat1 = "%12d %10s: ";
|
||||
pat2 = "%12d-%10d: ";
|
||||
width1 = 12;
|
||||
width2 = 10;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -241,9 +243,10 @@ static void show_histogram(const struct hist_bucket *bucket, int buckets,
|
||||
assert(len <= HIST_BAR_MAX);
|
||||
|
||||
if (bucket[i].low == bucket[i].high)
|
||||
fprintf(stderr, pat1, bucket[i].low, "");
|
||||
fprintf(stderr, "%*d %*s: ", width1, bucket[i].low, width2, "");
|
||||
else
|
||||
fprintf(stderr, pat2, bucket[i].low, bucket[i].high);
|
||||
fprintf(stderr, "%*d-%*d: ", width1, bucket[i].low, width2,
|
||||
bucket[i].high);
|
||||
|
||||
for (j = 0; j < HIST_BAR_MAX; j++) fprintf(stderr, j < len ? "=" : " ");
|
||||
fprintf(stderr, "\t%5d (%6.2f%%)\n", bucket[i].count, pct);
|
||||
|
||||
@@ -42,8 +42,7 @@ class ACMRandom {
|
||||
|
||||
int16_t Rand16Signed(void) {
|
||||
// Use 16 bits: values between 32767 and -32768.
|
||||
const uint32_t value = random_.Generate(65536);
|
||||
return static_cast<int16_t>(value) - 32768;
|
||||
return static_cast<int16_t>(random_.Generate(65536));
|
||||
}
|
||||
|
||||
int16_t Rand13Signed(void) {
|
||||
@@ -69,7 +68,7 @@ class ACMRandom {
|
||||
// Returns a random value near 0 or near 255, to better exercise
|
||||
// saturation behavior.
|
||||
const uint8_t r = Rand8();
|
||||
return r < 128 ? r << 4 : r >> 4;
|
||||
return static_cast<uint8_t>((r < 128) ? r << 4 : r >> 4);
|
||||
}
|
||||
|
||||
uint32_t RandRange(const uint32_t range) {
|
||||
|
||||
@@ -80,7 +80,7 @@ class ActiveMapRefreshTest
|
||||
} else if (video->frame() >= 2 && video->img()) {
|
||||
vpx_image_t *current = video->img();
|
||||
vpx_image_t *previous = y4m_holder_->img();
|
||||
ASSERT_TRUE(previous != NULL);
|
||||
ASSERT_NE(previous, nullptr);
|
||||
vpx_active_map_t map = vpx_active_map_t();
|
||||
const int width = static_cast<int>(current->d_w);
|
||||
const int height = static_cast<int>(current->d_h);
|
||||
@@ -122,7 +122,7 @@ TEST_P(ActiveMapRefreshTest, Test) {
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
}
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(ActiveMapRefreshTest,
|
||||
::testing::Values(::libvpx_test::kRealTime),
|
||||
::testing::Range(5, 6));
|
||||
VP9_INSTANTIATE_TEST_SUITE(ActiveMapRefreshTest,
|
||||
::testing::Values(::libvpx_test::kRealTime),
|
||||
::testing::Range(5, 6));
|
||||
} // namespace
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace {
|
||||
|
||||
class ActiveMapTest
|
||||
: public ::libvpx_test::EncoderTest,
|
||||
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
|
||||
public ::libvpx_test::CodecTestWith3Params<libvpx_test::TestMode, int,
|
||||
int> {
|
||||
protected:
|
||||
static const int kWidth = 208;
|
||||
static const int kHeight = 144;
|
||||
@@ -37,6 +38,7 @@ class ActiveMapTest
|
||||
::libvpx_test::Encoder *encoder) {
|
||||
if (video->frame() == 0) {
|
||||
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
|
||||
encoder->Control(VP9E_SET_AQ_MODE, GET_PARAM(3));
|
||||
} else if (video->frame() == 3) {
|
||||
vpx_active_map_t map = vpx_active_map_t();
|
||||
/* clang-format off */
|
||||
@@ -62,7 +64,7 @@ class ActiveMapTest
|
||||
vpx_active_map_t map = vpx_active_map_t();
|
||||
map.cols = (kWidth + 15) / 16;
|
||||
map.rows = (kHeight + 15) / 16;
|
||||
map.active_map = NULL;
|
||||
map.active_map = nullptr;
|
||||
encoder->Control(VP8E_SET_ACTIVEMAP, &map);
|
||||
}
|
||||
}
|
||||
@@ -85,7 +87,7 @@ TEST_P(ActiveMapTest, Test) {
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
}
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(ActiveMapTest,
|
||||
::testing::Values(::libvpx_test::kRealTime),
|
||||
::testing::Range(0, 9));
|
||||
VP9_INSTANTIATE_TEST_SUITE(ActiveMapTest,
|
||||
::testing::Values(::libvpx_test::kRealTime),
|
||||
::testing::Range(5, 10), ::testing::Values(0, 3));
|
||||
} // namespace
|
||||
|
||||
@@ -23,7 +23,6 @@ namespace {
|
||||
|
||||
static const int kNoiseSize = 3072;
|
||||
|
||||
// TODO(jimbankoski): make width and height integers not unsigned.
|
||||
typedef void (*AddNoiseFunc)(uint8_t *start, const int8_t *noise,
|
||||
int blackclamp, int whiteclamp, int width,
|
||||
int height, int pitch);
|
||||
@@ -53,7 +52,7 @@ TEST_P(AddNoiseTest, CheckNoiseAdded) {
|
||||
const int clamp = vpx_setup_noise(GET_PARAM(0), noise, kNoiseSize);
|
||||
uint8_t *const s =
|
||||
reinterpret_cast<uint8_t *>(vpx_calloc(image_size, sizeof(*s)));
|
||||
ASSERT_TRUE(s != NULL);
|
||||
ASSERT_NE(s, nullptr);
|
||||
memset(s, 99, image_size * sizeof(*s));
|
||||
|
||||
ASM_REGISTER_STATE_CHECK(
|
||||
@@ -106,8 +105,8 @@ TEST_P(AddNoiseTest, CheckCvsAssembly) {
|
||||
|
||||
uint8_t *const s = reinterpret_cast<uint8_t *>(vpx_calloc(image_size, 1));
|
||||
uint8_t *const d = reinterpret_cast<uint8_t *>(vpx_calloc(image_size, 1));
|
||||
ASSERT_TRUE(s != NULL);
|
||||
ASSERT_TRUE(d != NULL);
|
||||
ASSERT_NE(s, nullptr);
|
||||
ASSERT_NE(d, nullptr);
|
||||
|
||||
memset(s, 99, image_size);
|
||||
memset(d, 99, image_size);
|
||||
@@ -129,20 +128,20 @@ TEST_P(AddNoiseTest, CheckCvsAssembly) {
|
||||
|
||||
using std::make_tuple;
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, AddNoiseTest,
|
||||
::testing::Values(make_tuple(3.25, vpx_plane_add_noise_c),
|
||||
make_tuple(4.4, vpx_plane_add_noise_c)));
|
||||
|
||||
#if HAVE_SSE2
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, AddNoiseTest,
|
||||
::testing::Values(make_tuple(3.25, vpx_plane_add_noise_sse2),
|
||||
make_tuple(4.4, vpx_plane_add_noise_sse2)));
|
||||
#endif
|
||||
|
||||
#if HAVE_MSA
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
MSA, AddNoiseTest,
|
||||
::testing::Values(make_tuple(3.25, vpx_plane_add_noise_msa),
|
||||
make_tuple(4.4, vpx_plane_add_noise_msa)));
|
||||
|
||||
@@ -150,8 +150,8 @@ TEST_P(AltRefAqSegmentTest, TestNoMisMatchAltRefAQ4) {
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
}
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(AltRefAqSegmentTest,
|
||||
::testing::Values(::libvpx_test::kOnePassGood,
|
||||
::libvpx_test::kTwoPassGood),
|
||||
::testing::Range(2, 5));
|
||||
VP9_INSTANTIATE_TEST_SUITE(AltRefAqSegmentTest,
|
||||
::testing::Values(::libvpx_test::kOnePassGood,
|
||||
::libvpx_test::kTwoPassGood),
|
||||
::testing::Range(2, 5));
|
||||
} // namespace
|
||||
|
||||
@@ -63,8 +63,8 @@ TEST_P(AltRefTest, MonotonicTimestamps) {
|
||||
EXPECT_GE(altref_count(), 1);
|
||||
}
|
||||
|
||||
VP8_INSTANTIATE_TEST_CASE(AltRefTest,
|
||||
::testing::Range(kLookAheadMin, kLookAheadMax));
|
||||
VP8_INSTANTIATE_TEST_SUITE(AltRefTest,
|
||||
::testing::Range(kLookAheadMin, kLookAheadMax));
|
||||
|
||||
#endif // CONFIG_VP8_ENCODER
|
||||
|
||||
@@ -142,11 +142,11 @@ TEST_P(AltRefForcedKeyTestLarge, ForcedFrameIsKey) {
|
||||
}
|
||||
}
|
||||
|
||||
VP8_INSTANTIATE_TEST_CASE(AltRefForcedKeyTestLarge,
|
||||
::testing::Values(::libvpx_test::kOnePassGood),
|
||||
::testing::Range(0, 9));
|
||||
VP8_INSTANTIATE_TEST_SUITE(AltRefForcedKeyTestLarge,
|
||||
::testing::Values(::libvpx_test::kOnePassGood),
|
||||
::testing::Range(0, 9));
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(AltRefForcedKeyTestLarge,
|
||||
::testing::Values(::libvpx_test::kOnePassGood),
|
||||
::testing::Range(0, 9));
|
||||
VP9_INSTANTIATE_TEST_SUITE(AltRefForcedKeyTestLarge,
|
||||
::testing::Values(::libvpx_test::kOnePassGood),
|
||||
::testing::Range(0, 9));
|
||||
} // namespace
|
||||
|
||||
@@ -34,6 +34,9 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/third_party/googletest/src/
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/third_party/googletest/src/include/
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/third_party/googletest/src/include/
|
||||
LOCAL_SRC_FILES := ./third_party/googletest/src/src/gtest-all.cc
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE $(LOCAL_PATH)/../../PATENTS
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
#libvpx_test
|
||||
@@ -48,6 +51,9 @@ else
|
||||
LOCAL_STATIC_LIBRARIES += vpx
|
||||
endif
|
||||
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE $(LOCAL_PATH)/../../PATENTS
|
||||
include $(LOCAL_PATH)/test/test.mk
|
||||
LOCAL_C_INCLUDES := $(BINDINGS_DIR)
|
||||
FILTERED_SRC := $(sort $(filter %.cc %.c, $(LIBVPX_TEST_SRCS-yes)))
|
||||
|
||||
@@ -10,12 +10,13 @@ NDK_PROJECT_PATH=. ndk-build APP_BUILD_SCRIPT=./libvpx/test/android/Android.mk \
|
||||
APP_ABI=armeabi-v7a APP_PLATFORM=android-18 APP_OPTIM=release \
|
||||
APP_STL=c++_static
|
||||
|
||||
Note: Both adb and ndk-build are available prebuilt at:
|
||||
https://chromium.googlesource.com/android_tools
|
||||
Note: Both adb and ndk-build are available at:
|
||||
https://developer.android.com/studio#downloads
|
||||
https://developer.android.com/ndk/downloads
|
||||
|
||||
3) Run get_files.py to download the test files:
|
||||
python get_files.py -i /path/to/test-data.sha1 -o /path/to/put/files \
|
||||
-u http://downloads.webmproject.org/test_data/libvpx
|
||||
-u https://storage.googleapis.com/downloads.webmproject.org/test_data/libvpx
|
||||
|
||||
4) Transfer files to device using adb. Ensure you have proper permissions for
|
||||
the target
|
||||
|
||||
@@ -102,8 +102,8 @@ TEST_P(AqSegmentTest, TestNoMisMatchAQ3) {
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
}
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(AqSegmentTest,
|
||||
::testing::Values(::libvpx_test::kRealTime,
|
||||
::libvpx_test::kOnePassGood),
|
||||
::testing::Range(3, 9));
|
||||
VP9_INSTANTIATE_TEST_SUITE(AqSegmentTest,
|
||||
::testing::Values(::libvpx_test::kRealTime,
|
||||
::libvpx_test::kOnePassGood),
|
||||
::testing::Range(3, 9));
|
||||
} // namespace
|
||||
|
||||
@@ -35,12 +35,12 @@ template <typename Pixel>
|
||||
class AverageTestBase : public ::testing::Test {
|
||||
public:
|
||||
AverageTestBase(int width, int height)
|
||||
: width_(width), height_(height), source_data_(NULL), source_stride_(0),
|
||||
bit_depth_(8) {}
|
||||
: width_(width), height_(height), source_data_(nullptr),
|
||||
source_stride_(0), bit_depth_(8) {}
|
||||
|
||||
virtual void TearDown() {
|
||||
vpx_free(source_data_);
|
||||
source_data_ = NULL;
|
||||
source_data_ = nullptr;
|
||||
libvpx_test::ClearSystemState();
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class AverageTestBase : public ::testing::Test {
|
||||
virtual void SetUp() {
|
||||
source_data_ = reinterpret_cast<Pixel *>(
|
||||
vpx_memalign(kDataAlignment, kDataBlockSize * sizeof(source_data_[0])));
|
||||
ASSERT_TRUE(source_data_ != NULL);
|
||||
ASSERT_NE(source_data_, nullptr);
|
||||
source_stride_ = (width_ + 31) & ~31;
|
||||
bit_depth_ = 8;
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
@@ -152,6 +152,7 @@ class AverageTestHBD : public AverageTestBase<uint16_t>,
|
||||
};
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
#if HAVE_NEON || HAVE_SSE2 || HAVE_MSA
|
||||
typedef void (*IntProRowFunc)(int16_t hbuf[16], uint8_t const *ref,
|
||||
const int ref_stride, const int height);
|
||||
|
||||
@@ -161,7 +162,8 @@ class IntProRowTest : public AverageTestBase<uint8_t>,
|
||||
public ::testing::WithParamInterface<IntProRowParam> {
|
||||
public:
|
||||
IntProRowTest()
|
||||
: AverageTestBase(16, GET_PARAM(0)), hbuf_asm_(NULL), hbuf_c_(NULL) {
|
||||
: AverageTestBase(16, GET_PARAM(0)), hbuf_asm_(nullptr),
|
||||
hbuf_c_(nullptr) {
|
||||
asm_func_ = GET_PARAM(1);
|
||||
c_func_ = GET_PARAM(2);
|
||||
}
|
||||
@@ -170,7 +172,7 @@ class IntProRowTest : public AverageTestBase<uint8_t>,
|
||||
virtual void SetUp() {
|
||||
source_data_ = reinterpret_cast<uint8_t *>(
|
||||
vpx_memalign(kDataAlignment, kDataBlockSize * sizeof(source_data_[0])));
|
||||
ASSERT_TRUE(source_data_ != NULL);
|
||||
ASSERT_NE(source_data_, nullptr);
|
||||
|
||||
hbuf_asm_ = reinterpret_cast<int16_t *>(
|
||||
vpx_memalign(kDataAlignment, sizeof(*hbuf_asm_) * 16));
|
||||
@@ -180,11 +182,11 @@ class IntProRowTest : public AverageTestBase<uint8_t>,
|
||||
|
||||
virtual void TearDown() {
|
||||
vpx_free(source_data_);
|
||||
source_data_ = NULL;
|
||||
source_data_ = nullptr;
|
||||
vpx_free(hbuf_c_);
|
||||
hbuf_c_ = NULL;
|
||||
hbuf_c_ = nullptr;
|
||||
vpx_free(hbuf_asm_);
|
||||
hbuf_asm_ = NULL;
|
||||
hbuf_asm_ = nullptr;
|
||||
}
|
||||
|
||||
void RunComparison() {
|
||||
@@ -200,6 +202,7 @@ class IntProRowTest : public AverageTestBase<uint8_t>,
|
||||
int16_t *hbuf_asm_;
|
||||
int16_t *hbuf_c_;
|
||||
};
|
||||
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(IntProRowTest);
|
||||
|
||||
typedef int16_t (*IntProColFunc)(uint8_t const *ref, const int width);
|
||||
|
||||
@@ -226,6 +229,8 @@ class IntProColTest : public AverageTestBase<uint8_t>,
|
||||
int16_t sum_asm_;
|
||||
int16_t sum_c_;
|
||||
};
|
||||
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(IntProColTest);
|
||||
#endif // HAVE_NEON || HAVE_SSE2 || HAVE_MSA
|
||||
|
||||
typedef int (*SatdFunc)(const tran_low_t *coeffs, int length);
|
||||
typedef std::tuple<int, SatdFunc> SatdTestParam;
|
||||
@@ -239,7 +244,7 @@ class SatdTest : public ::testing::Test,
|
||||
rnd_.Reset(ACMRandom::DeterministicSeed());
|
||||
src_ = reinterpret_cast<tran_low_t *>(
|
||||
vpx_memalign(16, sizeof(*src_) * satd_size_));
|
||||
ASSERT_TRUE(src_ != NULL);
|
||||
ASSERT_NE(src_, nullptr);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
@@ -295,8 +300,8 @@ class BlockErrorTestFP
|
||||
vpx_memalign(16, sizeof(*coeff_) * txfm_size_));
|
||||
dqcoeff_ = reinterpret_cast<tran_low_t *>(
|
||||
vpx_memalign(16, sizeof(*dqcoeff_) * txfm_size_));
|
||||
ASSERT_TRUE(coeff_ != NULL);
|
||||
ASSERT_TRUE(dqcoeff_ != NULL);
|
||||
ASSERT_NE(coeff_, nullptr);
|
||||
ASSERT_NE(dqcoeff_, nullptr);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
@@ -378,6 +383,7 @@ TEST_P(AverageTestHBD, Random) {
|
||||
}
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
#if HAVE_NEON || HAVE_SSE2 || HAVE_MSA
|
||||
TEST_P(IntProRowTest, MinValue) {
|
||||
FillConstant(0);
|
||||
RunComparison();
|
||||
@@ -407,6 +413,7 @@ TEST_P(IntProColTest, Random) {
|
||||
FillRandom();
|
||||
RunComparison();
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_P(SatdLowbdTest, MinValue) {
|
||||
const int kMin = -32640;
|
||||
@@ -425,10 +432,10 @@ TEST_P(SatdLowbdTest, MaxValue) {
|
||||
TEST_P(SatdLowbdTest, Random) {
|
||||
int expected;
|
||||
switch (satd_size_) {
|
||||
case 16: expected = 263252; break;
|
||||
case 64: expected = 1105420; break;
|
||||
case 256: expected = 4252250; break;
|
||||
case 1024: expected = 16876840; break;
|
||||
case 16: expected = 261036; break;
|
||||
case 64: expected = 991732; break;
|
||||
case 256: expected = 4136358; break;
|
||||
case 1024: expected = 16677592; break;
|
||||
default:
|
||||
FAIL() << "Invalid satd size (" << satd_size_
|
||||
<< ") valid: 16/64/256/1024";
|
||||
@@ -557,38 +564,38 @@ TEST_P(BlockErrorTestFP, DISABLED_Speed) {
|
||||
|
||||
using std::make_tuple;
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, AverageTest,
|
||||
::testing::Values(make_tuple(16, 16, 1, 8, &vpx_avg_8x8_c),
|
||||
make_tuple(16, 16, 1, 4, &vpx_avg_4x4_c)));
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, AverageTestHBD,
|
||||
::testing::Values(make_tuple(16, 16, 1, 8, &vpx_highbd_avg_8x8_c),
|
||||
make_tuple(16, 16, 1, 4, &vpx_highbd_avg_4x4_c)));
|
||||
|
||||
#if HAVE_SSE2
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, AverageTestHBD,
|
||||
::testing::Values(make_tuple(16, 16, 1, 8, &vpx_highbd_avg_8x8_sse2),
|
||||
make_tuple(16, 16, 1, 4, &vpx_highbd_avg_4x4_sse2)));
|
||||
#endif // HAVE_SSE2
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(C, SatdHighbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_c),
|
||||
make_tuple(64, &vpx_satd_c),
|
||||
make_tuple(256, &vpx_satd_c),
|
||||
make_tuple(1024, &vpx_satd_c)));
|
||||
INSTANTIATE_TEST_SUITE_P(C, SatdHighbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_c),
|
||||
make_tuple(64, &vpx_satd_c),
|
||||
make_tuple(256, &vpx_satd_c),
|
||||
make_tuple(1024, &vpx_satd_c)));
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(C, SatdLowbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_c),
|
||||
make_tuple(64, &vpx_satd_c),
|
||||
make_tuple(256, &vpx_satd_c),
|
||||
make_tuple(1024, &vpx_satd_c)));
|
||||
INSTANTIATE_TEST_SUITE_P(C, SatdLowbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_c),
|
||||
make_tuple(64, &vpx_satd_c),
|
||||
make_tuple(256, &vpx_satd_c),
|
||||
make_tuple(1024, &vpx_satd_c)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, BlockErrorTestFP,
|
||||
::testing::Values(make_tuple(16, &vp9_block_error_fp_c),
|
||||
make_tuple(64, &vp9_block_error_fp_c),
|
||||
@@ -596,7 +603,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(1024, &vp9_block_error_fp_c)));
|
||||
|
||||
#if HAVE_SSE2
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, AverageTest,
|
||||
::testing::Values(make_tuple(16, 16, 0, 8, &vpx_avg_8x8_sse2),
|
||||
make_tuple(16, 16, 5, 8, &vpx_avg_8x8_sse2),
|
||||
@@ -605,27 +612,27 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(16, 16, 5, 4, &vpx_avg_4x4_sse2),
|
||||
make_tuple(32, 32, 15, 4, &vpx_avg_4x4_sse2)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, IntProRowTest,
|
||||
::testing::Values(make_tuple(16, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c),
|
||||
make_tuple(32, &vpx_int_pro_row_sse2, &vpx_int_pro_row_c),
|
||||
make_tuple(64, &vpx_int_pro_row_sse2,
|
||||
&vpx_int_pro_row_c)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, IntProColTest,
|
||||
::testing::Values(make_tuple(16, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c),
|
||||
make_tuple(32, &vpx_int_pro_col_sse2, &vpx_int_pro_col_c),
|
||||
make_tuple(64, &vpx_int_pro_col_sse2,
|
||||
&vpx_int_pro_col_c)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(SSE2, SatdLowbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_sse2),
|
||||
make_tuple(64, &vpx_satd_sse2),
|
||||
make_tuple(256, &vpx_satd_sse2),
|
||||
make_tuple(1024, &vpx_satd_sse2)));
|
||||
INSTANTIATE_TEST_SUITE_P(SSE2, SatdLowbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_sse2),
|
||||
make_tuple(64, &vpx_satd_sse2),
|
||||
make_tuple(256, &vpx_satd_sse2),
|
||||
make_tuple(1024, &vpx_satd_sse2)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, BlockErrorTestFP,
|
||||
::testing::Values(make_tuple(16, &vp9_block_error_fp_sse2),
|
||||
make_tuple(64, &vp9_block_error_fp_sse2),
|
||||
@@ -634,14 +641,14 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // HAVE_SSE2
|
||||
|
||||
#if HAVE_AVX2
|
||||
INSTANTIATE_TEST_CASE_P(AVX2, SatdLowbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_avx2),
|
||||
make_tuple(64, &vpx_satd_avx2),
|
||||
make_tuple(256, &vpx_satd_avx2),
|
||||
make_tuple(1024, &vpx_satd_avx2)));
|
||||
INSTANTIATE_TEST_SUITE_P(AVX2, SatdLowbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_avx2),
|
||||
make_tuple(64, &vpx_satd_avx2),
|
||||
make_tuple(256, &vpx_satd_avx2),
|
||||
make_tuple(1024, &vpx_satd_avx2)));
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
AVX2, SatdHighbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_highbd_satd_avx2),
|
||||
make_tuple(64, &vpx_highbd_satd_avx2),
|
||||
@@ -649,7 +656,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(1024, &vpx_highbd_satd_avx2)));
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
AVX2, BlockErrorTestFP,
|
||||
::testing::Values(make_tuple(16, &vp9_block_error_fp_avx2),
|
||||
make_tuple(64, &vp9_block_error_fp_avx2),
|
||||
@@ -658,7 +665,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif
|
||||
|
||||
#if HAVE_NEON
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
NEON, AverageTest,
|
||||
::testing::Values(make_tuple(16, 16, 0, 8, &vpx_avg_8x8_neon),
|
||||
make_tuple(16, 16, 5, 8, &vpx_avg_8x8_neon),
|
||||
@@ -667,30 +674,30 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(16, 16, 5, 4, &vpx_avg_4x4_neon),
|
||||
make_tuple(32, 32, 15, 4, &vpx_avg_4x4_neon)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
NEON, IntProRowTest,
|
||||
::testing::Values(make_tuple(16, &vpx_int_pro_row_neon, &vpx_int_pro_row_c),
|
||||
make_tuple(32, &vpx_int_pro_row_neon, &vpx_int_pro_row_c),
|
||||
make_tuple(64, &vpx_int_pro_row_neon,
|
||||
&vpx_int_pro_row_c)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
NEON, IntProColTest,
|
||||
::testing::Values(make_tuple(16, &vpx_int_pro_col_neon, &vpx_int_pro_col_c),
|
||||
make_tuple(32, &vpx_int_pro_col_neon, &vpx_int_pro_col_c),
|
||||
make_tuple(64, &vpx_int_pro_col_neon,
|
||||
&vpx_int_pro_col_c)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(NEON, SatdLowbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_neon),
|
||||
make_tuple(64, &vpx_satd_neon),
|
||||
make_tuple(256, &vpx_satd_neon),
|
||||
make_tuple(1024, &vpx_satd_neon)));
|
||||
INSTANTIATE_TEST_SUITE_P(NEON, SatdLowbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_neon),
|
||||
make_tuple(64, &vpx_satd_neon),
|
||||
make_tuple(256, &vpx_satd_neon),
|
||||
make_tuple(1024, &vpx_satd_neon)));
|
||||
|
||||
// TODO(jianj): Remove the highbitdepth flag once the SIMD functions are
|
||||
// in place.
|
||||
#if !CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
NEON, BlockErrorTestFP,
|
||||
::testing::Values(make_tuple(16, &vp9_block_error_fp_neon),
|
||||
make_tuple(64, &vp9_block_error_fp_neon),
|
||||
@@ -700,7 +707,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // HAVE_NEON
|
||||
|
||||
#if HAVE_MSA
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
MSA, AverageTest,
|
||||
::testing::Values(make_tuple(16, 16, 0, 8, &vpx_avg_8x8_msa),
|
||||
make_tuple(16, 16, 5, 8, &vpx_avg_8x8_msa),
|
||||
@@ -709,14 +716,14 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(16, 16, 5, 4, &vpx_avg_4x4_msa),
|
||||
make_tuple(32, 32, 15, 4, &vpx_avg_4x4_msa)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
MSA, IntProRowTest,
|
||||
::testing::Values(make_tuple(16, &vpx_int_pro_row_msa, &vpx_int_pro_row_c),
|
||||
make_tuple(32, &vpx_int_pro_row_msa, &vpx_int_pro_row_c),
|
||||
make_tuple(64, &vpx_int_pro_row_msa,
|
||||
&vpx_int_pro_row_c)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
MSA, IntProColTest,
|
||||
::testing::Values(make_tuple(16, &vpx_int_pro_col_msa, &vpx_int_pro_col_c),
|
||||
make_tuple(32, &vpx_int_pro_col_msa, &vpx_int_pro_col_c),
|
||||
@@ -726,11 +733,11 @@ INSTANTIATE_TEST_CASE_P(
|
||||
// TODO(jingning): Remove the highbitdepth flag once the SIMD functions are
|
||||
// in place.
|
||||
#if !CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(MSA, SatdLowbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_msa),
|
||||
make_tuple(64, &vpx_satd_msa),
|
||||
make_tuple(256, &vpx_satd_msa),
|
||||
make_tuple(1024, &vpx_satd_msa)));
|
||||
INSTANTIATE_TEST_SUITE_P(MSA, SatdLowbdTest,
|
||||
::testing::Values(make_tuple(16, &vpx_satd_msa),
|
||||
make_tuple(64, &vpx_satd_msa),
|
||||
make_tuple(256, &vpx_satd_msa),
|
||||
make_tuple(1024, &vpx_satd_msa)));
|
||||
#endif // !CONFIG_VP9_HIGHBITDEPTH
|
||||
#endif // HAVE_MSA
|
||||
|
||||
|
||||
@@ -35,18 +35,18 @@ class BlockinessTestBase : public ::testing::Test {
|
||||
public:
|
||||
BlockinessTestBase(int width, int height) : width_(width), height_(height) {}
|
||||
|
||||
static void SetUpTestCase() {
|
||||
static void SetUpTestSuite() {
|
||||
source_data_ = reinterpret_cast<uint8_t *>(
|
||||
vpx_memalign(kDataAlignment, kDataBufferSize));
|
||||
reference_data_ = reinterpret_cast<uint8_t *>(
|
||||
vpx_memalign(kDataAlignment, kDataBufferSize));
|
||||
}
|
||||
|
||||
static void TearDownTestCase() {
|
||||
static void TearDownTestSuite() {
|
||||
vpx_free(source_data_);
|
||||
source_data_ = NULL;
|
||||
source_data_ = nullptr;
|
||||
vpx_free(reference_data_);
|
||||
reference_data_ = NULL;
|
||||
reference_data_ = nullptr;
|
||||
}
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
@@ -154,8 +154,8 @@ class BlockinessVP9Test
|
||||
};
|
||||
#endif // CONFIG_VP9_ENCODER
|
||||
|
||||
uint8_t *BlockinessTestBase::source_data_ = NULL;
|
||||
uint8_t *BlockinessTestBase::reference_data_ = NULL;
|
||||
uint8_t *BlockinessTestBase::source_data_ = nullptr;
|
||||
uint8_t *BlockinessTestBase::reference_data_ = nullptr;
|
||||
|
||||
#if CONFIG_VP9_ENCODER
|
||||
TEST_P(BlockinessVP9Test, SourceBlockierThanReference) {
|
||||
@@ -215,7 +215,8 @@ using std::make_tuple;
|
||||
const BlockinessParam c_vp9_tests[] = { make_tuple(320, 240),
|
||||
make_tuple(318, 242),
|
||||
make_tuple(318, 238) };
|
||||
INSTANTIATE_TEST_CASE_P(C, BlockinessVP9Test, ::testing::ValuesIn(c_vp9_tests));
|
||||
INSTANTIATE_TEST_SUITE_P(C, BlockinessVP9Test,
|
||||
::testing::ValuesIn(c_vp9_tests));
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -79,6 +79,6 @@ TEST_P(BordersTest, TestLowBitrate) {
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
}
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(BordersTest,
|
||||
::testing::Values(::libvpx_test::kTwoPassGood));
|
||||
VP9_INSTANTIATE_TEST_SUITE(BordersTest,
|
||||
::testing::Values(::libvpx_test::kTwoPassGood));
|
||||
} // namespace
|
||||
|
||||
@@ -31,7 +31,7 @@ class Buffer {
|
||||
: width_(width), height_(height), top_padding_(top_padding),
|
||||
left_padding_(left_padding), right_padding_(right_padding),
|
||||
bottom_padding_(bottom_padding), alignment_(0), padding_value_(0),
|
||||
stride_(0), raw_size_(0), num_elements_(0), raw_buffer_(NULL) {}
|
||||
stride_(0), raw_size_(0), num_elements_(0), raw_buffer_(nullptr) {}
|
||||
|
||||
Buffer(int width, int height, int top_padding, int left_padding,
|
||||
int right_padding, int bottom_padding, unsigned int alignment)
|
||||
@@ -39,19 +39,19 @@ class Buffer {
|
||||
left_padding_(left_padding), right_padding_(right_padding),
|
||||
bottom_padding_(bottom_padding), alignment_(alignment),
|
||||
padding_value_(0), stride_(0), raw_size_(0), num_elements_(0),
|
||||
raw_buffer_(NULL) {}
|
||||
raw_buffer_(nullptr) {}
|
||||
|
||||
Buffer(int width, int height, int padding)
|
||||
: width_(width), height_(height), top_padding_(padding),
|
||||
left_padding_(padding), right_padding_(padding),
|
||||
bottom_padding_(padding), alignment_(0), padding_value_(0), stride_(0),
|
||||
raw_size_(0), num_elements_(0), raw_buffer_(NULL) {}
|
||||
raw_size_(0), num_elements_(0), raw_buffer_(nullptr) {}
|
||||
|
||||
Buffer(int width, int height, int padding, unsigned int alignment)
|
||||
: width_(width), height_(height), top_padding_(padding),
|
||||
left_padding_(padding), right_padding_(padding),
|
||||
bottom_padding_(padding), alignment_(alignment), padding_value_(0),
|
||||
stride_(0), raw_size_(0), num_elements_(0), raw_buffer_(NULL) {}
|
||||
stride_(0), raw_size_(0), num_elements_(0), raw_buffer_(nullptr) {}
|
||||
|
||||
~Buffer() {
|
||||
if (alignment_) {
|
||||
@@ -103,7 +103,7 @@ class Buffer {
|
||||
bool CheckValues(const Buffer<T> &a) const;
|
||||
|
||||
bool Init() {
|
||||
if (raw_buffer_ != NULL) return false;
|
||||
if (raw_buffer_ != nullptr) return false;
|
||||
EXPECT_GT(width_, 0);
|
||||
EXPECT_GT(height_, 0);
|
||||
EXPECT_GE(top_padding_, 0);
|
||||
@@ -126,7 +126,7 @@ class Buffer {
|
||||
} else {
|
||||
raw_buffer_ = new (std::nothrow) T[num_elements_];
|
||||
}
|
||||
EXPECT_TRUE(raw_buffer_ != NULL);
|
||||
EXPECT_NE(raw_buffer_, nullptr);
|
||||
SetPadding(std::numeric_limits<T>::max());
|
||||
return !::testing::Test::HasFailure();
|
||||
}
|
||||
@@ -150,7 +150,7 @@ class Buffer {
|
||||
|
||||
template <typename T>
|
||||
T *Buffer<T>::TopLeftPixel() const {
|
||||
if (!raw_buffer_) return NULL;
|
||||
if (!raw_buffer_) return nullptr;
|
||||
return raw_buffer_ + (top_padding_ * stride_) + left_padding_;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,23 +55,24 @@ const ByteAlignmentTestParam kBaTestParams[] = {
|
||||
class ByteAlignmentTest
|
||||
: public ::testing::TestWithParam<ByteAlignmentTestParam> {
|
||||
protected:
|
||||
ByteAlignmentTest() : video_(NULL), decoder_(NULL), md5_file_(NULL) {}
|
||||
ByteAlignmentTest()
|
||||
: video_(nullptr), decoder_(nullptr), md5_file_(nullptr) {}
|
||||
|
||||
virtual void SetUp() {
|
||||
video_ = new libvpx_test::WebMVideoSource(kVP9TestFile);
|
||||
ASSERT_TRUE(video_ != NULL);
|
||||
ASSERT_NE(video_, nullptr);
|
||||
video_->Init();
|
||||
video_->Begin();
|
||||
|
||||
const vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
|
||||
decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
|
||||
ASSERT_TRUE(decoder_ != NULL);
|
||||
ASSERT_NE(decoder_, nullptr);
|
||||
|
||||
OpenMd5File(kVP9Md5File);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
if (md5_file_ != NULL) fclose(md5_file_);
|
||||
if (md5_file_ != nullptr) fclose(md5_file_);
|
||||
|
||||
delete decoder_;
|
||||
delete video_;
|
||||
@@ -90,7 +91,7 @@ class ByteAlignmentTest
|
||||
}
|
||||
|
||||
vpx_codec_err_t DecodeRemainingFrames(int byte_alignment_to_check) {
|
||||
for (; video_->cxdata() != NULL; video_->Next()) {
|
||||
for (; video_->cxdata() != nullptr; video_->Next()) {
|
||||
const vpx_codec_err_t res =
|
||||
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
|
||||
if (res != VPX_CODEC_OK) return res;
|
||||
@@ -113,7 +114,7 @@ class ByteAlignmentTest
|
||||
const vpx_image_t *img;
|
||||
|
||||
// Get decompressed data
|
||||
while ((img = dec_iter.Next()) != NULL) {
|
||||
while ((img = dec_iter.Next()) != nullptr) {
|
||||
if (byte_alignment_to_check == kLegacyByteAlignment) {
|
||||
CheckByteAlignment(img->planes[0], kLegacyYPlaneByteAlignment);
|
||||
} else {
|
||||
@@ -128,12 +129,12 @@ class ByteAlignmentTest
|
||||
// TODO(fgalligan): Move the MD5 testing code into another class.
|
||||
void OpenMd5File(const std::string &md5_file_name_) {
|
||||
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_);
|
||||
ASSERT_TRUE(md5_file_ != NULL)
|
||||
ASSERT_NE(md5_file_, nullptr)
|
||||
<< "MD5 file open failed. Filename: " << md5_file_name_;
|
||||
}
|
||||
|
||||
void CheckMd5(const vpx_image_t &img) {
|
||||
ASSERT_TRUE(md5_file_ != NULL);
|
||||
ASSERT_NE(md5_file_, nullptr);
|
||||
char expected_md5[33];
|
||||
char junk[128];
|
||||
|
||||
@@ -176,8 +177,8 @@ TEST_P(ByteAlignmentTest, TestAlignment) {
|
||||
}
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(Alignments, ByteAlignmentTest,
|
||||
::testing::ValuesIn(kBaTestParams));
|
||||
INSTANTIATE_TEST_SUITE_P(Alignments, ByteAlignmentTest,
|
||||
::testing::ValuesIn(kBaTestParams));
|
||||
|
||||
#endif // CONFIG_WEBM_IO
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ class VP8Decoder : public Decoder {
|
||||
#if CONFIG_VP8_DECODER
|
||||
return &vpx_codec_vp8_dx_algo;
|
||||
#else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
@@ -104,7 +104,7 @@ class VP8Encoder : public Encoder {
|
||||
#if CONFIG_VP8_ENCODER
|
||||
return &vpx_codec_vp8_cx_algo;
|
||||
#else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
@@ -124,7 +124,7 @@ class VP8CodecFactory : public CodecFactory {
|
||||
#else
|
||||
(void)cfg;
|
||||
(void)flags;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ class VP8CodecFactory : public CodecFactory {
|
||||
(void)deadline;
|
||||
(void)init_flags;
|
||||
(void)stats;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -157,15 +157,15 @@ class VP8CodecFactory : public CodecFactory {
|
||||
|
||||
const libvpx_test::VP8CodecFactory kVP8;
|
||||
|
||||
#define VP8_INSTANTIATE_TEST_CASE(test, ...) \
|
||||
INSTANTIATE_TEST_CASE_P( \
|
||||
#define VP8_INSTANTIATE_TEST_SUITE(test, ...) \
|
||||
INSTANTIATE_TEST_SUITE_P( \
|
||||
VP8, test, \
|
||||
::testing::Combine( \
|
||||
::testing::Values(static_cast<const libvpx_test::CodecFactory *>( \
|
||||
&libvpx_test::kVP8)), \
|
||||
__VA_ARGS__))
|
||||
#else
|
||||
#define VP8_INSTANTIATE_TEST_CASE(test, ...)
|
||||
#define VP8_INSTANTIATE_TEST_SUITE(test, ...)
|
||||
#endif // CONFIG_VP8
|
||||
|
||||
/*
|
||||
@@ -184,7 +184,7 @@ class VP9Decoder : public Decoder {
|
||||
#if CONFIG_VP9_DECODER
|
||||
return &vpx_codec_vp9_dx_algo;
|
||||
#else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
@@ -200,7 +200,7 @@ class VP9Encoder : public Encoder {
|
||||
#if CONFIG_VP9_ENCODER
|
||||
return &vpx_codec_vp9_cx_algo;
|
||||
#else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
@@ -220,7 +220,7 @@ class VP9CodecFactory : public CodecFactory {
|
||||
#else
|
||||
(void)cfg;
|
||||
(void)flags;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ class VP9CodecFactory : public CodecFactory {
|
||||
(void)deadline;
|
||||
(void)init_flags;
|
||||
(void)stats;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -253,15 +253,15 @@ class VP9CodecFactory : public CodecFactory {
|
||||
|
||||
const libvpx_test::VP9CodecFactory kVP9;
|
||||
|
||||
#define VP9_INSTANTIATE_TEST_CASE(test, ...) \
|
||||
INSTANTIATE_TEST_CASE_P( \
|
||||
#define VP9_INSTANTIATE_TEST_SUITE(test, ...) \
|
||||
INSTANTIATE_TEST_SUITE_P( \
|
||||
VP9, test, \
|
||||
::testing::Combine( \
|
||||
::testing::Values(static_cast<const libvpx_test::CodecFactory *>( \
|
||||
&libvpx_test::kVP9)), \
|
||||
__VA_ARGS__))
|
||||
#else
|
||||
#define VP9_INSTANTIATE_TEST_CASE(test, ...)
|
||||
#define VP9_INSTANTIATE_TEST_SUITE(test, ...)
|
||||
#endif // CONFIG_VP9
|
||||
|
||||
} // namespace libvpx_test
|
||||
|
||||
@@ -29,9 +29,9 @@ uint8_t avg_with_rounding(uint8_t a, uint8_t b) { return (a + b + 1) >> 1; }
|
||||
|
||||
void reference_pred(const Buffer<uint8_t> &pred, const Buffer<uint8_t> &ref,
|
||||
int width, int height, Buffer<uint8_t> *avg) {
|
||||
ASSERT_TRUE(avg->TopLeftPixel() != NULL);
|
||||
ASSERT_TRUE(pred.TopLeftPixel() != NULL);
|
||||
ASSERT_TRUE(ref.TopLeftPixel() != NULL);
|
||||
ASSERT_NE(avg->TopLeftPixel(), nullptr);
|
||||
ASSERT_NE(pred.TopLeftPixel(), nullptr);
|
||||
ASSERT_NE(ref.TopLeftPixel(), nullptr);
|
||||
|
||||
for (int y = 0; y < height; ++y) {
|
||||
for (int x = 0; x < width; ++x) {
|
||||
@@ -166,21 +166,26 @@ TEST_P(AvgPredTest, DISABLED_Speed) {
|
||||
}
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(C, AvgPredTest,
|
||||
::testing::Values(&vpx_comp_avg_pred_c));
|
||||
INSTANTIATE_TEST_SUITE_P(C, AvgPredTest,
|
||||
::testing::Values(&vpx_comp_avg_pred_c));
|
||||
|
||||
#if HAVE_SSE2
|
||||
INSTANTIATE_TEST_CASE_P(SSE2, AvgPredTest,
|
||||
::testing::Values(&vpx_comp_avg_pred_sse2));
|
||||
INSTANTIATE_TEST_SUITE_P(SSE2, AvgPredTest,
|
||||
::testing::Values(&vpx_comp_avg_pred_sse2));
|
||||
#endif // HAVE_SSE2
|
||||
|
||||
#if HAVE_NEON
|
||||
INSTANTIATE_TEST_CASE_P(NEON, AvgPredTest,
|
||||
::testing::Values(&vpx_comp_avg_pred_neon));
|
||||
INSTANTIATE_TEST_SUITE_P(NEON, AvgPredTest,
|
||||
::testing::Values(&vpx_comp_avg_pred_neon));
|
||||
#endif // HAVE_NEON
|
||||
|
||||
#if HAVE_VSX
|
||||
INSTANTIATE_TEST_CASE_P(VSX, AvgPredTest,
|
||||
::testing::Values(&vpx_comp_avg_pred_vsx));
|
||||
INSTANTIATE_TEST_SUITE_P(VSX, AvgPredTest,
|
||||
::testing::Values(&vpx_comp_avg_pred_vsx));
|
||||
#endif // HAVE_VSX
|
||||
|
||||
#if HAVE_LSX
|
||||
INSTANTIATE_TEST_SUITE_P(LSX, AvgPredTest,
|
||||
::testing::Values(&vpx_comp_avg_pred_lsx));
|
||||
#endif // HAVE_LSX
|
||||
} // namespace
|
||||
|
||||
@@ -58,5 +58,5 @@ TEST_P(ConfigTest, LagIsDisabled) {
|
||||
EXPECT_EQ(frame_count_in_, frame_count_out_);
|
||||
}
|
||||
|
||||
VP8_INSTANTIATE_TEST_CASE(ConfigTest, ONE_PASS_TEST_MODES);
|
||||
VP8_INSTANTIATE_TEST_SUITE(ConfigTest, ONE_PASS_TEST_MODES);
|
||||
} // namespace
|
||||
|
||||
@@ -39,7 +39,7 @@ class ConsistencyTestBase : public ::testing::Test {
|
||||
public:
|
||||
ConsistencyTestBase(int width, int height) : width_(width), height_(height) {}
|
||||
|
||||
static void SetUpTestCase() {
|
||||
static void SetUpTestSuite() {
|
||||
source_data_[0] = reinterpret_cast<uint8_t *>(
|
||||
vpx_memalign(kDataAlignment, kDataBufferSize));
|
||||
reference_data_[0] = reinterpret_cast<uint8_t *>(
|
||||
@@ -52,15 +52,15 @@ class ConsistencyTestBase : public ::testing::Test {
|
||||
}
|
||||
|
||||
static void ClearSsim() { memset(ssim_array_, 0, kDataBufferSize / 16); }
|
||||
static void TearDownTestCase() {
|
||||
static void TearDownTestSuite() {
|
||||
vpx_free(source_data_[0]);
|
||||
source_data_[0] = NULL;
|
||||
source_data_[0] = nullptr;
|
||||
vpx_free(reference_data_[0]);
|
||||
reference_data_[0] = NULL;
|
||||
reference_data_[0] = nullptr;
|
||||
vpx_free(source_data_[1]);
|
||||
source_data_[1] = NULL;
|
||||
source_data_[1] = nullptr;
|
||||
vpx_free(reference_data_[1]);
|
||||
reference_data_[1] = NULL;
|
||||
reference_data_[1] = nullptr;
|
||||
|
||||
delete[] ssim_array_;
|
||||
}
|
||||
@@ -145,9 +145,9 @@ class ConsistencyVP9Test
|
||||
};
|
||||
#endif // CONFIG_VP9_ENCODER
|
||||
|
||||
uint8_t *ConsistencyTestBase::source_data_[2] = { NULL, NULL };
|
||||
uint8_t *ConsistencyTestBase::reference_data_[2] = { NULL, NULL };
|
||||
Ssimv *ConsistencyTestBase::ssim_array_ = NULL;
|
||||
uint8_t *ConsistencyTestBase::source_data_[2] = { nullptr, nullptr };
|
||||
uint8_t *ConsistencyTestBase::reference_data_[2] = { nullptr, nullptr };
|
||||
Ssimv *ConsistencyTestBase::ssim_array_ = nullptr;
|
||||
|
||||
#if CONFIG_VP9_ENCODER
|
||||
TEST_P(ConsistencyVP9Test, ConsistencyIsZero) {
|
||||
@@ -208,8 +208,8 @@ using std::make_tuple;
|
||||
const ConsistencyParam c_vp9_tests[] = { make_tuple(320, 240),
|
||||
make_tuple(318, 242),
|
||||
make_tuple(318, 238) };
|
||||
INSTANTIATE_TEST_CASE_P(C, ConsistencyVP9Test,
|
||||
::testing::ValuesIn(c_vp9_tests));
|
||||
INSTANTIATE_TEST_SUITE_P(C, ConsistencyVP9Test,
|
||||
::testing::ValuesIn(c_vp9_tests));
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -341,7 +341,7 @@ void wrapper_filter_block2d_8_c(const uint8_t *src_ptr,
|
||||
|
||||
class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
|
||||
public:
|
||||
static void SetUpTestCase() {
|
||||
static void SetUpTestSuite() {
|
||||
// Force input_ to be unaligned, output to be 16 byte aligned.
|
||||
input_ = reinterpret_cast<uint8_t *>(
|
||||
vpx_memalign(kDataAlignment, kInputBufferSize + 1)) +
|
||||
@@ -363,20 +363,20 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
|
||||
|
||||
virtual void TearDown() { libvpx_test::ClearSystemState(); }
|
||||
|
||||
static void TearDownTestCase() {
|
||||
static void TearDownTestSuite() {
|
||||
vpx_free(input_ - 1);
|
||||
input_ = NULL;
|
||||
input_ = nullptr;
|
||||
vpx_free(output_);
|
||||
output_ = NULL;
|
||||
output_ = nullptr;
|
||||
vpx_free(output_ref_);
|
||||
output_ref_ = NULL;
|
||||
output_ref_ = nullptr;
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
vpx_free(input16_ - 1);
|
||||
input16_ = NULL;
|
||||
input16_ = nullptr;
|
||||
vpx_free(output16_);
|
||||
output16_ = NULL;
|
||||
output16_ = nullptr;
|
||||
vpx_free(output16_ref_);
|
||||
output16_ref_ = NULL;
|
||||
output16_ref_ = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -541,13 +541,13 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
|
||||
#endif
|
||||
};
|
||||
|
||||
uint8_t *ConvolveTest::input_ = NULL;
|
||||
uint8_t *ConvolveTest::output_ = NULL;
|
||||
uint8_t *ConvolveTest::output_ref_ = NULL;
|
||||
uint8_t *ConvolveTest::input_ = nullptr;
|
||||
uint8_t *ConvolveTest::output_ = nullptr;
|
||||
uint8_t *ConvolveTest::output_ref_ = nullptr;
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
uint16_t *ConvolveTest::input16_ = NULL;
|
||||
uint16_t *ConvolveTest::output16_ = NULL;
|
||||
uint16_t *ConvolveTest::output16_ref_ = NULL;
|
||||
uint16_t *ConvolveTest::input16_ = nullptr;
|
||||
uint16_t *ConvolveTest::output16_ = nullptr;
|
||||
uint16_t *ConvolveTest::output16_ref_ = nullptr;
|
||||
#endif
|
||||
|
||||
TEST_P(ConvolveTest, GuardBlocks) { CheckGuardBlocks(); }
|
||||
@@ -562,7 +562,7 @@ TEST_P(ConvolveTest, DISABLED_Copy_Speed) {
|
||||
|
||||
vpx_usec_timer_start(&timer);
|
||||
for (int n = 0; n < kNumTests; ++n) {
|
||||
UUT_->copy_[0](in, kInputStride, out, kOutputStride, NULL, 0, 0, 0, 0,
|
||||
UUT_->copy_[0](in, kInputStride, out, kOutputStride, nullptr, 0, 0, 0, 0,
|
||||
width, height);
|
||||
}
|
||||
vpx_usec_timer_mark(&timer);
|
||||
@@ -582,7 +582,7 @@ TEST_P(ConvolveTest, DISABLED_Avg_Speed) {
|
||||
|
||||
vpx_usec_timer_start(&timer);
|
||||
for (int n = 0; n < kNumTests; ++n) {
|
||||
UUT_->copy_[1](in, kInputStride, out, kOutputStride, NULL, 0, 0, 0, 0,
|
||||
UUT_->copy_[1](in, kInputStride, out, kOutputStride, nullptr, 0, 0, 0, 0,
|
||||
width, height);
|
||||
}
|
||||
vpx_usec_timer_mark(&timer);
|
||||
@@ -780,7 +780,8 @@ TEST_P(ConvolveTest, Copy) {
|
||||
uint8_t *const out = output();
|
||||
|
||||
ASM_REGISTER_STATE_CHECK(UUT_->copy_[0](in, kInputStride, out, kOutputStride,
|
||||
NULL, 0, 0, 0, 0, Width(), Height()));
|
||||
nullptr, 0, 0, 0, 0, Width(),
|
||||
Height()));
|
||||
|
||||
CheckGuardBlocks();
|
||||
|
||||
@@ -799,7 +800,8 @@ TEST_P(ConvolveTest, Avg) {
|
||||
CopyOutputToRef();
|
||||
|
||||
ASM_REGISTER_STATE_CHECK(UUT_->copy_[1](in, kInputStride, out, kOutputStride,
|
||||
NULL, 0, 0, 0, 0, Width(), Height()));
|
||||
nullptr, 0, 0, 0, 0, Width(),
|
||||
Height()));
|
||||
|
||||
CheckGuardBlocks();
|
||||
|
||||
@@ -955,9 +957,9 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
|
||||
UUT_->h8_[i](in, kInputStride, out, kOutputStride, filters,
|
||||
filter_x, 16, 0, 16, Width(), Height()));
|
||||
else
|
||||
ASM_REGISTER_STATE_CHECK(UUT_->copy_[i](in, kInputStride, out,
|
||||
kOutputStride, NULL, 0, 0,
|
||||
0, 0, Width(), Height()));
|
||||
ASM_REGISTER_STATE_CHECK(
|
||||
UUT_->copy_[i](in, kInputStride, out, kOutputStride, nullptr, 0,
|
||||
0, 0, 0, Width(), Height()));
|
||||
|
||||
CheckGuardBlocks();
|
||||
|
||||
@@ -1053,9 +1055,9 @@ TEST_P(ConvolveTest, FilterExtremes) {
|
||||
UUT_->h8_[0](in, kInputStride, out, kOutputStride, filters,
|
||||
filter_x, 16, 0, 16, Width(), Height()));
|
||||
else
|
||||
ASM_REGISTER_STATE_CHECK(UUT_->copy_[0](in, kInputStride, out,
|
||||
kOutputStride, NULL, 0, 0,
|
||||
0, 0, Width(), Height()));
|
||||
ASM_REGISTER_STATE_CHECK(
|
||||
UUT_->copy_[0](in, kInputStride, out, kOutputStride, nullptr,
|
||||
0, 0, 0, 0, Width(), Height()));
|
||||
|
||||
for (int y = 0; y < Height(); ++y) {
|
||||
for (int x = 0; x < Width(); ++x)
|
||||
@@ -1133,7 +1135,7 @@ using std::make_tuple;
|
||||
x0_q4, x_step_q4, y0_q4, y_step_q4, w, h, bd); \
|
||||
}
|
||||
|
||||
#if HAVE_SSE2 && ARCH_X86_64
|
||||
#if HAVE_SSE2 && VPX_ARCH_X86_64
|
||||
WRAP(convolve_copy_sse2, 8)
|
||||
WRAP(convolve_avg_sse2, 8)
|
||||
WRAP(convolve_copy_sse2, 10)
|
||||
@@ -1158,7 +1160,7 @@ WRAP(convolve8_vert_sse2, 12)
|
||||
WRAP(convolve8_avg_vert_sse2, 12)
|
||||
WRAP(convolve8_sse2, 12)
|
||||
WRAP(convolve8_avg_sse2, 12)
|
||||
#endif // HAVE_SSE2 && ARCH_X86_64
|
||||
#endif // HAVE_SSE2 && VPX_ARCH_X86_64
|
||||
|
||||
#if HAVE_AVX2
|
||||
WRAP(convolve_copy_avx2, 8)
|
||||
@@ -1276,9 +1278,10 @@ const ConvolveFunctions convolve8_c(
|
||||
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||
const ConvolveParam kArrayConvolve_c[] = { ALL_SIZES(convolve8_c) };
|
||||
#endif
|
||||
INSTANTIATE_TEST_CASE_P(C, ConvolveTest, ::testing::ValuesIn(kArrayConvolve_c));
|
||||
INSTANTIATE_TEST_SUITE_P(C, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve_c));
|
||||
|
||||
#if HAVE_SSE2 && ARCH_X86_64
|
||||
#if HAVE_SSE2 && VPX_ARCH_X86_64
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
const ConvolveFunctions convolve8_sse2(
|
||||
wrap_convolve_copy_sse2_8, wrap_convolve_avg_sse2_8,
|
||||
@@ -1317,8 +1320,8 @@ const ConvolveFunctions convolve8_sse2(
|
||||
|
||||
const ConvolveParam kArrayConvolve_sse2[] = { ALL_SIZES(convolve8_sse2) };
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve_sse2));
|
||||
INSTANTIATE_TEST_SUITE_P(SSE2, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve_sse2));
|
||||
#endif
|
||||
|
||||
#if HAVE_SSSE3
|
||||
@@ -1330,8 +1333,8 @@ const ConvolveFunctions convolve8_ssse3(
|
||||
vpx_scaled_avg_vert_c, vpx_scaled_2d_ssse3, vpx_scaled_avg_2d_c, 0);
|
||||
|
||||
const ConvolveParam kArrayConvolve8_ssse3[] = { ALL_SIZES(convolve8_ssse3) };
|
||||
INSTANTIATE_TEST_CASE_P(SSSE3, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve8_ssse3));
|
||||
INSTANTIATE_TEST_SUITE_P(SSSE3, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve8_ssse3));
|
||||
#endif
|
||||
|
||||
#if HAVE_AVX2
|
||||
@@ -1362,8 +1365,8 @@ const ConvolveFunctions convolve12_avx2(
|
||||
const ConvolveParam kArrayConvolve8_avx2[] = { ALL_SIZES(convolve8_avx2),
|
||||
ALL_SIZES(convolve10_avx2),
|
||||
ALL_SIZES(convolve12_avx2) };
|
||||
INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve8_avx2));
|
||||
INSTANTIATE_TEST_SUITE_P(AVX2, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve8_avx2));
|
||||
#else // !CONFIG_VP9_HIGHBITDEPTH
|
||||
const ConvolveFunctions convolve8_avx2(
|
||||
vpx_convolve_copy_c, vpx_convolve_avg_c, vpx_convolve8_horiz_avx2,
|
||||
@@ -1372,8 +1375,8 @@ const ConvolveFunctions convolve8_avx2(
|
||||
vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c, vpx_scaled_vert_c,
|
||||
vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||
const ConvolveParam kArrayConvolve8_avx2[] = { ALL_SIZES(convolve8_avx2) };
|
||||
INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve8_avx2));
|
||||
INSTANTIATE_TEST_SUITE_P(AVX2, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve8_avx2));
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
#endif // HAVE_AVX2
|
||||
|
||||
@@ -1416,8 +1419,8 @@ const ConvolveFunctions convolve8_neon(
|
||||
|
||||
const ConvolveParam kArrayConvolve_neon[] = { ALL_SIZES(convolve8_neon) };
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(NEON, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve_neon));
|
||||
INSTANTIATE_TEST_SUITE_P(NEON, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve_neon));
|
||||
#endif // HAVE_NEON
|
||||
|
||||
#if HAVE_DSPR2
|
||||
@@ -1429,8 +1432,8 @@ const ConvolveFunctions convolve8_dspr2(
|
||||
vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||
|
||||
const ConvolveParam kArrayConvolve8_dspr2[] = { ALL_SIZES(convolve8_dspr2) };
|
||||
INSTANTIATE_TEST_CASE_P(DSPR2, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve8_dspr2));
|
||||
INSTANTIATE_TEST_SUITE_P(DSPR2, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve8_dspr2));
|
||||
#endif // HAVE_DSPR2
|
||||
|
||||
#if HAVE_MSA
|
||||
@@ -1442,10 +1445,23 @@ const ConvolveFunctions convolve8_msa(
|
||||
vpx_scaled_avg_vert_c, vpx_scaled_2d_msa, vpx_scaled_avg_2d_c, 0);
|
||||
|
||||
const ConvolveParam kArrayConvolve8_msa[] = { ALL_SIZES(convolve8_msa) };
|
||||
INSTANTIATE_TEST_CASE_P(MSA, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve8_msa));
|
||||
INSTANTIATE_TEST_SUITE_P(MSA, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve8_msa));
|
||||
#endif // HAVE_MSA
|
||||
|
||||
#if HAVE_LSX
|
||||
const ConvolveFunctions convolve8_lsx(
|
||||
vpx_convolve_copy_lsx, vpx_convolve_avg_lsx, vpx_convolve8_horiz_lsx,
|
||||
vpx_convolve8_avg_horiz_lsx, vpx_convolve8_vert_lsx,
|
||||
vpx_convolve8_avg_vert_lsx, vpx_convolve8_lsx, vpx_convolve8_avg_lsx,
|
||||
vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c, vpx_scaled_vert_c,
|
||||
vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||
|
||||
const ConvolveParam kArrayConvolve8_lsx[] = { ALL_SIZES(convolve8_lsx) };
|
||||
INSTANTIATE_TEST_SUITE_P(LSX, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve8_lsx));
|
||||
#endif // HAVE_LSX
|
||||
|
||||
#if HAVE_VSX
|
||||
const ConvolveFunctions convolve8_vsx(
|
||||
vpx_convolve_copy_vsx, vpx_convolve_avg_vsx, vpx_convolve8_horiz_vsx,
|
||||
@@ -1454,8 +1470,8 @@ const ConvolveFunctions convolve8_vsx(
|
||||
vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c, vpx_scaled_vert_c,
|
||||
vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||
const ConvolveParam kArrayConvolve_vsx[] = { ALL_SIZES(convolve8_vsx) };
|
||||
INSTANTIATE_TEST_CASE_P(VSX, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve_vsx));
|
||||
INSTANTIATE_TEST_SUITE_P(VSX, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve_vsx));
|
||||
#endif // HAVE_VSX
|
||||
|
||||
#if HAVE_MMI
|
||||
@@ -1466,7 +1482,7 @@ const ConvolveFunctions convolve8_mmi(
|
||||
vpx_scaled_horiz_c, vpx_scaled_avg_horiz_c, vpx_scaled_vert_c,
|
||||
vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
|
||||
const ConvolveParam kArrayConvolve_mmi[] = { ALL_SIZES(convolve8_mmi) };
|
||||
INSTANTIATE_TEST_CASE_P(MMI, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve_mmi));
|
||||
INSTANTIATE_TEST_SUITE_P(MMI, ConvolveTest,
|
||||
::testing::ValuesIn(kArrayConvolve_mmi));
|
||||
#endif // HAVE_MMI
|
||||
} // namespace
|
||||
|
||||
@@ -148,9 +148,9 @@ TEST_P(CpuSpeedTest, TestLowBitrate) {
|
||||
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
|
||||
}
|
||||
|
||||
VP9_INSTANTIATE_TEST_CASE(CpuSpeedTest,
|
||||
::testing::Values(::libvpx_test::kTwoPassGood,
|
||||
::libvpx_test::kOnePassGood,
|
||||
::libvpx_test::kRealTime),
|
||||
::testing::Range(0, 10));
|
||||
VP9_INSTANTIATE_TEST_SUITE(CpuSpeedTest,
|
||||
::testing::Values(::libvpx_test::kTwoPassGood,
|
||||
::libvpx_test::kOnePassGood,
|
||||
::libvpx_test::kRealTime),
|
||||
::testing::Range(0, 10));
|
||||
} // namespace
|
||||
|
||||
@@ -29,9 +29,9 @@ class CQTest : public ::libvpx_test::EncoderTest,
|
||||
// maps the cqlevel to the bitrate produced.
|
||||
typedef std::map<int, uint32_t> BitrateMap;
|
||||
|
||||
static void SetUpTestCase() { bitrates_.clear(); }
|
||||
static void SetUpTestSuite() { bitrates_.clear(); }
|
||||
|
||||
static void TearDownTestCase() {
|
||||
static void TearDownTestSuite() {
|
||||
ASSERT_TRUE(!HasFailure())
|
||||
<< "skipping bitrate validation due to earlier failure.";
|
||||
uint32_t prev_actual_bitrate = kCQTargetBitrate;
|
||||
@@ -126,6 +126,6 @@ TEST_P(CQTest, LinearPSNRIsHigherForCQLevel) {
|
||||
EXPECT_GE(cq_psnr_lin, vbr_psnr_lin);
|
||||
}
|
||||
|
||||
VP8_INSTANTIATE_TEST_CASE(CQTest, ::testing::Range(kCQLevelMin, kCQLevelMax,
|
||||
kCQLevelStep));
|
||||
VP8_INSTANTIATE_TEST_SUITE(CQTest, ::testing::Range(kCQLevelMin, kCQLevelMax,
|
||||
kCQLevelStep));
|
||||
} // namespace
|
||||
|
||||
@@ -38,7 +38,7 @@ vpx_set_ref() {
|
||||
|
||||
eval "${VPX_TEST_PREFIX}" "${encoder}" "${YUV_RAW_INPUT_WIDTH}" \
|
||||
"${YUV_RAW_INPUT_HEIGHT}" "${YUV_RAW_INPUT}" "${output_file}" \
|
||||
"${ref_frame_num}" ${devnull}
|
||||
"${ref_frame_num}" ${devnull} || return 1
|
||||
|
||||
[ -e "${output_file}" ] || return 1
|
||||
}
|
||||
|
||||
@@ -714,6 +714,7 @@ TEST_P(Trans16x16HT, QuantCheck) {
|
||||
RunQuantCheck(429, 729);
|
||||
}
|
||||
|
||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
class InvTrans16x16DCT : public Trans16x16TestBase,
|
||||
public ::testing::TestWithParam<Idct16x16Param> {
|
||||
public:
|
||||
@@ -739,29 +740,31 @@ class InvTrans16x16DCT : public Trans16x16TestBase,
|
||||
IdctFunc inv_txfm_;
|
||||
int thresh_;
|
||||
};
|
||||
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(InvTrans16x16DCT);
|
||||
|
||||
TEST_P(InvTrans16x16DCT, CompareReference) {
|
||||
CompareInvReference(ref_txfm_, thresh_);
|
||||
}
|
||||
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
using std::make_tuple;
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, Trans16x16DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vpx_highbd_fdct16x16_c, &idct16x16_10, 0, VPX_BITS_10),
|
||||
make_tuple(&vpx_highbd_fdct16x16_c, &idct16x16_12, 0, VPX_BITS_12),
|
||||
make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, 0, VPX_BITS_8)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(C, Trans16x16DCT,
|
||||
::testing::Values(make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_c,
|
||||
0, VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_SUITE_P(C, Trans16x16DCT,
|
||||
::testing::Values(make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_c,
|
||||
0, VPX_BITS_8)));
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, Trans16x16HT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_highbd_fht16x16_c, &iht16x16_10, 0, VPX_BITS_10),
|
||||
@@ -777,7 +780,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 2, VPX_BITS_8),
|
||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 3, VPX_BITS_8)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, Trans16x16HT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fht16x16_c, &vp9_iht16x16_256_add_c, 0, VPX_BITS_8),
|
||||
@@ -787,18 +790,18 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
#if HAVE_NEON && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
NEON, Trans16x16DCT,
|
||||
::testing::Values(make_tuple(&vpx_fdct16x16_neon,
|
||||
&vpx_idct16x16_256_add_neon, 0, VPX_BITS_8)));
|
||||
#endif // HAVE_NEON && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, Trans16x16DCT,
|
||||
::testing::Values(make_tuple(&vpx_fdct16x16_sse2,
|
||||
&vpx_idct16x16_256_add_sse2, 0, VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, Trans16x16HT,
|
||||
::testing::Values(make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_sse2,
|
||||
0, VPX_BITS_8),
|
||||
@@ -811,7 +814,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, Trans16x16DCT,
|
||||
::testing::Values(
|
||||
make_tuple(&vpx_highbd_fdct16x16_sse2, &idct16x16_10, 0, VPX_BITS_10),
|
||||
@@ -822,7 +825,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
VPX_BITS_12),
|
||||
make_tuple(&vpx_fdct16x16_sse2, &vpx_idct16x16_256_add_c, 0,
|
||||
VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, Trans16x16HT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fht16x16_sse2, &vp9_iht16x16_256_add_c, 0, VPX_BITS_8),
|
||||
@@ -832,7 +835,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
VPX_BITS_8)));
|
||||
// Optimizations take effect at a threshold of 3155, so we use a value close to
|
||||
// that to test both branches.
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, InvTrans16x16DCT,
|
||||
::testing::Values(make_tuple(&idct16x16_10_add_10_c,
|
||||
&idct16x16_10_add_10_sse2, 3167, VPX_BITS_10),
|
||||
@@ -845,11 +848,11 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(MSA, Trans16x16DCT,
|
||||
::testing::Values(make_tuple(&vpx_fdct16x16_msa,
|
||||
&vpx_idct16x16_256_add_msa,
|
||||
0, VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
MSA, Trans16x16DCT,
|
||||
::testing::Values(make_tuple(&vpx_fdct16x16_msa, &vpx_idct16x16_256_add_msa,
|
||||
0, VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
MSA, Trans16x16HT,
|
||||
::testing::Values(
|
||||
make_tuple(&vp9_fht16x16_msa, &vp9_iht16x16_256_add_msa, 0, VPX_BITS_8),
|
||||
@@ -860,9 +863,16 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_VSX && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(VSX, Trans16x16DCT,
|
||||
::testing::Values(make_tuple(&vpx_fdct16x16_c,
|
||||
&vpx_idct16x16_256_add_vsx,
|
||||
0, VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
VSX, Trans16x16DCT,
|
||||
::testing::Values(make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_vsx,
|
||||
0, VPX_BITS_8)));
|
||||
#endif // HAVE_VSX && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_LSX && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_SUITE_P(LSX, Trans16x16DCT,
|
||||
::testing::Values(make_tuple(&vpx_fdct16x16_lsx,
|
||||
&vpx_idct16x16_256_add_c,
|
||||
0, VPX_BITS_8)));
|
||||
#endif // HAVE_LSX && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
} // namespace
|
||||
|
||||
@@ -317,7 +317,7 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
|
||||
using std::make_tuple;
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, Trans32x32Test,
|
||||
::testing::Values(
|
||||
make_tuple(&vpx_highbd_fdct32x32_c, &idct32x32_10, 0, VPX_BITS_10),
|
||||
@@ -328,7 +328,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vpx_fdct32x32_rd_c, &vpx_idct32x32_1024_add_c, 1,
|
||||
VPX_BITS_8)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, Trans32x32Test,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_c, 0,
|
||||
VPX_BITS_8),
|
||||
@@ -337,7 +337,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
#if HAVE_NEON && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
NEON, Trans32x32Test,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_neon,
|
||||
&vpx_idct32x32_1024_add_neon, 0, VPX_BITS_8),
|
||||
@@ -346,7 +346,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // HAVE_NEON && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, Trans32x32Test,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_sse2,
|
||||
&vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
||||
@@ -355,7 +355,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, Trans32x32Test,
|
||||
::testing::Values(
|
||||
make_tuple(&vpx_highbd_fdct32x32_sse2, &idct32x32_10, 0, VPX_BITS_10),
|
||||
@@ -371,7 +371,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
AVX2, Trans32x32Test,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_avx2,
|
||||
&vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
|
||||
@@ -380,7 +380,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
MSA, Trans32x32Test,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_msa,
|
||||
&vpx_idct32x32_1024_add_msa, 0, VPX_BITS_8),
|
||||
@@ -389,11 +389,20 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_VSX && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
VSX, Trans32x32Test,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_c, &vpx_idct32x32_1024_add_vsx,
|
||||
0, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct32x32_rd_vsx,
|
||||
&vpx_idct32x32_1024_add_vsx, 1, VPX_BITS_8)));
|
||||
#endif // HAVE_VSX && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_LSX && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
LSX, Trans32x32Test,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_lsx,
|
||||
&vpx_idct32x32_1024_add_lsx, 0, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct32x32_rd_lsx,
|
||||
&vpx_idct32x32_1024_add_lsx, 1, VPX_BITS_8)));
|
||||
#endif // HAVE_LSX && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
|
||||
} // namespace
|
||||
|
||||
@@ -39,7 +39,7 @@ typedef tuple<PartialFdctFunc, int /* size */, vpx_bit_depth_t>
|
||||
|
||||
tran_low_t partial_fdct_ref(const Buffer<int16_t> &in, int size) {
|
||||
int64_t sum = 0;
|
||||
if (in.TopLeftPixel() != NULL) {
|
||||
if (in.TopLeftPixel() != nullptr) {
|
||||
for (int y = 0; y < size; ++y) {
|
||||
for (int x = 0; x < size; ++x) {
|
||||
sum += in.TopLeftPixel()[y * in.stride() + x];
|
||||
@@ -81,7 +81,7 @@ class PartialFdctTest : public ::testing::TestWithParam<PartialFdctParam> {
|
||||
Buffer<tran_low_t> output_block = Buffer<tran_low_t>(size_, size_, 0, 16);
|
||||
ASSERT_TRUE(output_block.Init());
|
||||
|
||||
if (output_block.TopLeftPixel() != NULL) {
|
||||
if (output_block.TopLeftPixel() != nullptr) {
|
||||
for (int i = 0; i < 100; ++i) {
|
||||
if (i == 0) {
|
||||
input_block.Set(maxvalue);
|
||||
@@ -111,7 +111,7 @@ class PartialFdctTest : public ::testing::TestWithParam<PartialFdctParam> {
|
||||
TEST_P(PartialFdctTest, PartialFdctTest) { RunTest(); }
|
||||
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, PartialFdctTest,
|
||||
::testing::Values(make_tuple(&vpx_highbd_fdct32x32_1_c, 32, VPX_BITS_12),
|
||||
make_tuple(&vpx_highbd_fdct32x32_1_c, 32, VPX_BITS_10),
|
||||
@@ -124,7 +124,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vpx_fdct8x8_1_c, 8, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct4x4_1_c, 4, VPX_BITS_8)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, PartialFdctTest,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_1_c, 32, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct16x16_1_c, 16, VPX_BITS_8),
|
||||
@@ -133,7 +133,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
#endif // CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
#if HAVE_SSE2
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, PartialFdctTest,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_1_sse2, 32, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct16x16_1_sse2, 16, VPX_BITS_8),
|
||||
@@ -143,7 +143,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
|
||||
#if HAVE_NEON
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
NEON, PartialFdctTest,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_1_neon, 32, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct16x16_1_neon, 16, VPX_BITS_8),
|
||||
@@ -152,7 +152,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
make_tuple(&vpx_fdct8x8_1_neon, 8, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct4x4_1_neon, 4, VPX_BITS_8)));
|
||||
#else
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
NEON, PartialFdctTest,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_1_neon, 32, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct16x16_1_neon, 16, VPX_BITS_8),
|
||||
@@ -163,11 +163,11 @@ INSTANTIATE_TEST_CASE_P(
|
||||
|
||||
#if HAVE_MSA
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(MSA, PartialFdctTest,
|
||||
::testing::Values(make_tuple(&vpx_fdct8x8_1_msa, 8,
|
||||
VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_SUITE_P(MSA, PartialFdctTest,
|
||||
::testing::Values(make_tuple(&vpx_fdct8x8_1_msa, 8,
|
||||
VPX_BITS_8)));
|
||||
#else // !CONFIG_VP9_HIGHBITDEPTH
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
MSA, PartialFdctTest,
|
||||
::testing::Values(make_tuple(&vpx_fdct32x32_1_msa, 32, VPX_BITS_8),
|
||||
make_tuple(&vpx_fdct16x16_1_msa, 16, VPX_BITS_8),
|
||||
|
||||
@@ -160,17 +160,17 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> {
|
||||
|
||||
src_ = reinterpret_cast<uint8_t *>(
|
||||
vpx_memalign(16, pixel_size_ * block_size_));
|
||||
ASSERT_TRUE(src_ != NULL);
|
||||
ASSERT_NE(src_, nullptr);
|
||||
dst_ = reinterpret_cast<uint8_t *>(
|
||||
vpx_memalign(16, pixel_size_ * block_size_));
|
||||
ASSERT_TRUE(dst_ != NULL);
|
||||
ASSERT_NE(dst_, nullptr);
|
||||
}
|
||||
|
||||
virtual void TearDown() {
|
||||
vpx_free(src_);
|
||||
src_ = NULL;
|
||||
src_ = nullptr;
|
||||
vpx_free(dst_);
|
||||
dst_ = NULL;
|
||||
dst_ = nullptr;
|
||||
libvpx_test::ClearSystemState();
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> {
|
||||
Buffer<int16_t> test_input_block =
|
||||
Buffer<int16_t>(size_, size_, 8, size_ == 4 ? 0 : 16);
|
||||
ASSERT_TRUE(test_input_block.Init());
|
||||
ASSERT_TRUE(test_input_block.TopLeftPixel() != NULL);
|
||||
ASSERT_NE(test_input_block.TopLeftPixel(), nullptr);
|
||||
Buffer<tran_low_t> test_temp_block =
|
||||
Buffer<tran_low_t>(size_, size_, 0, 16);
|
||||
ASSERT_TRUE(test_temp_block.Init());
|
||||
@@ -316,7 +316,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> {
|
||||
} else if (i == 1) {
|
||||
input_extreme_block.Set(-max_pixel_value_);
|
||||
} else {
|
||||
ASSERT_TRUE(input_extreme_block.TopLeftPixel() != NULL);
|
||||
ASSERT_NE(input_extreme_block.TopLeftPixel(), nullptr);
|
||||
for (int h = 0; h < size_; ++h) {
|
||||
for (int w = 0; w < size_; ++w) {
|
||||
input_extreme_block
|
||||
@@ -331,7 +331,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> {
|
||||
|
||||
// The minimum quant value is 4.
|
||||
EXPECT_TRUE(output_block.CheckValues(output_ref_block));
|
||||
ASSERT_TRUE(output_block.TopLeftPixel() != NULL);
|
||||
ASSERT_NE(output_block.TopLeftPixel(), nullptr);
|
||||
for (int h = 0; h < size_; ++h) {
|
||||
for (int w = 0; w < size_; ++w) {
|
||||
EXPECT_GE(
|
||||
@@ -369,7 +369,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> {
|
||||
|
||||
for (int i = 0; i < count_test_block; ++i) {
|
||||
InitMem();
|
||||
ASSERT_TRUE(in.TopLeftPixel() != NULL);
|
||||
ASSERT_NE(in.TopLeftPixel(), nullptr);
|
||||
// Initialize a test block with input range [-max_pixel_value_,
|
||||
// max_pixel_value_].
|
||||
for (int h = 0; h < size_; ++h) {
|
||||
@@ -473,7 +473,7 @@ static const FuncInfo dct_c_func_info[] = {
|
||||
1 }
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, TransDCT,
|
||||
::testing::Combine(
|
||||
::testing::Range(0, static_cast<int>(sizeof(dct_c_func_info) /
|
||||
@@ -505,7 +505,7 @@ static const FuncInfo dct_sse2_func_info[] = {
|
||||
&idct_wrapper<vpx_idct32x32_1024_add_sse2>, 32, 1 }
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, TransDCT,
|
||||
::testing::Combine(
|
||||
::testing::Range(0, static_cast<int>(sizeof(dct_sse2_func_info) /
|
||||
@@ -514,17 +514,17 @@ INSTANTIATE_TEST_CASE_P(
|
||||
::testing::Values(VPX_BITS_8, VPX_BITS_10, VPX_BITS_12)));
|
||||
#endif // HAVE_SSE2
|
||||
|
||||
#if HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && ARCH_X86_64
|
||||
#if HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && VPX_ARCH_X86_64
|
||||
// vpx_fdct8x8_ssse3 is only available in 64 bit builds.
|
||||
static const FuncInfo dct_ssse3_func_info = {
|
||||
&fdct_wrapper<vpx_fdct8x8_ssse3>, &idct_wrapper<vpx_idct8x8_64_add_sse2>, 8, 1
|
||||
};
|
||||
|
||||
// TODO(johannkoenig): high bit depth fdct8x8.
|
||||
INSTANTIATE_TEST_CASE_P(SSSE3, TransDCT,
|
||||
::testing::Values(make_tuple(0, &dct_ssse3_func_info, 0,
|
||||
VPX_BITS_8)));
|
||||
#endif // HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && ARCH_X86_64
|
||||
INSTANTIATE_TEST_SUITE_P(SSSE3, TransDCT,
|
||||
::testing::Values(make_tuple(0, &dct_ssse3_func_info,
|
||||
0, VPX_BITS_8)));
|
||||
#endif // HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && VPX_ARCH_X86_64
|
||||
|
||||
#if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH
|
||||
static const FuncInfo dct_avx2_func_info = {
|
||||
@@ -533,9 +533,9 @@ static const FuncInfo dct_avx2_func_info = {
|
||||
};
|
||||
|
||||
// TODO(johannkoenig): high bit depth fdct32x32.
|
||||
INSTANTIATE_TEST_CASE_P(AVX2, TransDCT,
|
||||
::testing::Values(make_tuple(0, &dct_avx2_func_info, 0,
|
||||
VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_SUITE_P(AVX2, TransDCT,
|
||||
::testing::Values(make_tuple(0, &dct_avx2_func_info, 0,
|
||||
VPX_BITS_8)));
|
||||
#endif // HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
#if HAVE_NEON
|
||||
@@ -550,7 +550,7 @@ static const FuncInfo dct_neon_func_info[4] = {
|
||||
&idct_wrapper<vpx_idct32x32_1024_add_neon>, 32, 1 }
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
NEON, TransDCT,
|
||||
::testing::Combine(::testing::Range(0, 4),
|
||||
::testing::Values(dct_neon_func_info),
|
||||
@@ -569,11 +569,11 @@ static const FuncInfo dct_msa_func_info[4] = {
|
||||
32, 1 }
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(MSA, TransDCT,
|
||||
::testing::Combine(::testing::Range(0, 4),
|
||||
::testing::Values(dct_msa_func_info),
|
||||
::testing::Values(0),
|
||||
::testing::Values(VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
MSA, TransDCT,
|
||||
::testing::Combine(::testing::Range(0, 4),
|
||||
::testing::Values(dct_msa_func_info),
|
||||
::testing::Values(0), ::testing::Values(VPX_BITS_8)));
|
||||
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
#if HAVE_VSX && !CONFIG_VP9_HIGHBITDEPTH
|
||||
@@ -581,11 +581,28 @@ static const FuncInfo dct_vsx_func_info = {
|
||||
&fdct_wrapper<vpx_fdct4x4_c>, &idct_wrapper<vpx_idct4x4_16_add_vsx>, 4, 1
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(VSX, TransDCT,
|
||||
::testing::Values(make_tuple(0, &dct_vsx_func_info, 0,
|
||||
VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_SUITE_P(VSX, TransDCT,
|
||||
::testing::Values(make_tuple(0, &dct_vsx_func_info, 0,
|
||||
VPX_BITS_8)));
|
||||
#endif // HAVE_VSX && !CONFIG_VP9_HIGHBITDEPTH &&
|
||||
|
||||
#if HAVE_LSX && !CONFIG_VP9_HIGHBITDEPTH
|
||||
static const FuncInfo dct_lsx_func_info[4] = {
|
||||
{ &fdct_wrapper<vpx_fdct4x4_lsx>, &idct_wrapper<vpx_idct4x4_16_add_c>, 4, 1 },
|
||||
{ &fdct_wrapper<vpx_fdct8x8_lsx>, &idct_wrapper<vpx_idct8x8_64_add_c>, 8, 1 },
|
||||
{ &fdct_wrapper<vpx_fdct16x16_lsx>, &idct_wrapper<vpx_idct16x16_256_add_c>,
|
||||
16, 1 },
|
||||
{ &fdct_wrapper<vpx_fdct32x32_lsx>, &idct_wrapper<vpx_idct32x32_1024_add_lsx>,
|
||||
32, 1 }
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
LSX, TransDCT,
|
||||
::testing::Combine(::testing::Range(0, 4),
|
||||
::testing::Values(dct_lsx_func_info),
|
||||
::testing::Values(0), ::testing::Values(VPX_BITS_8)));
|
||||
#endif // HAVE_LSX && !CONFIG_VP9_HIGHBITDEPTH
|
||||
|
||||
#endif // !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
@@ -619,7 +636,7 @@ static const FuncInfo ht_c_func_info[] = {
|
||||
{ &vp9_fht16x16_c, &iht_wrapper<vp9_iht16x16_256_add_c>, 16, 1 }
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, TransHT,
|
||||
::testing::Combine(
|
||||
::testing::Range(0, static_cast<int>(sizeof(ht_c_func_info) /
|
||||
@@ -641,11 +658,14 @@ static const FuncInfo ht_neon_func_info[] = {
|
||||
&highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_neon>, 16, 2 },
|
||||
#endif
|
||||
{ &vp9_fht4x4_c, &iht_wrapper<vp9_iht4x4_16_add_neon>, 4, 1 },
|
||||
{ &vp9_fht4x4_neon, &iht_wrapper<vp9_iht4x4_16_add_neon>, 4, 1 },
|
||||
{ &vp9_fht8x8_c, &iht_wrapper<vp9_iht8x8_64_add_neon>, 8, 1 },
|
||||
{ &vp9_fht16x16_c, &iht_wrapper<vp9_iht16x16_256_add_neon>, 16, 1 }
|
||||
{ &vp9_fht8x8_neon, &iht_wrapper<vp9_iht8x8_64_add_neon>, 8, 1 },
|
||||
{ &vp9_fht16x16_c, &iht_wrapper<vp9_iht16x16_256_add_neon>, 16, 1 },
|
||||
{ &vp9_fht16x16_neon, &iht_wrapper<vp9_iht16x16_256_add_neon>, 16, 1 }
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
NEON, TransHT,
|
||||
::testing::Combine(
|
||||
::testing::Range(0, static_cast<int>(sizeof(ht_neon_func_info) /
|
||||
@@ -662,11 +682,11 @@ static const FuncInfo ht_sse2_func_info[3] = {
|
||||
{ &vp9_fht16x16_sse2, &iht_wrapper<vp9_iht16x16_256_add_sse2>, 16, 1 }
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(SSE2, TransHT,
|
||||
::testing::Combine(::testing::Range(0, 3),
|
||||
::testing::Values(ht_sse2_func_info),
|
||||
::testing::Range(0, 4),
|
||||
::testing::Values(VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE2, TransHT,
|
||||
::testing::Combine(::testing::Range(0, 3),
|
||||
::testing::Values(ht_sse2_func_info),
|
||||
::testing::Range(0, 4), ::testing::Values(VPX_BITS_8)));
|
||||
#endif // HAVE_SSE2
|
||||
|
||||
#if HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
|
||||
@@ -679,7 +699,7 @@ static const FuncInfo ht_sse4_1_func_info[3] = {
|
||||
&highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, 2 }
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SSE4_1, TransHT,
|
||||
::testing::Combine(::testing::Range(0, 3),
|
||||
::testing::Values(ht_sse4_1_func_info),
|
||||
@@ -695,11 +715,11 @@ static const FuncInfo ht_vsx_func_info[3] = {
|
||||
{ &vp9_fht16x16_c, &iht_wrapper<vp9_iht16x16_256_add_vsx>, 16, 1 }
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(VSX, TransHT,
|
||||
::testing::Combine(::testing::Range(0, 3),
|
||||
::testing::Values(ht_vsx_func_info),
|
||||
::testing::Range(0, 4),
|
||||
::testing::Values(VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_SUITE_P(VSX, TransHT,
|
||||
::testing::Combine(::testing::Range(0, 3),
|
||||
::testing::Values(ht_vsx_func_info),
|
||||
::testing::Range(0, 4),
|
||||
::testing::Values(VPX_BITS_8)));
|
||||
#endif // HAVE_VSX
|
||||
#endif // !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
@@ -726,7 +746,7 @@ static const FuncInfo wht_c_func_info[] = {
|
||||
{ &fdct_wrapper<vp9_fwht4x4_c>, &idct_wrapper<vpx_iwht4x4_16_add_c>, 4, 1 }
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
C, TransWHT,
|
||||
::testing::Combine(
|
||||
::testing::Range(0, static_cast<int>(sizeof(wht_c_func_info) /
|
||||
@@ -739,9 +759,9 @@ static const FuncInfo wht_sse2_func_info = {
|
||||
&fdct_wrapper<vp9_fwht4x4_sse2>, &idct_wrapper<vpx_iwht4x4_16_add_sse2>, 4, 1
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(SSE2, TransWHT,
|
||||
::testing::Values(make_tuple(0, &wht_sse2_func_info, 0,
|
||||
VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_SUITE_P(SSE2, TransWHT,
|
||||
::testing::Values(make_tuple(0, &wht_sse2_func_info, 0,
|
||||
VPX_BITS_8)));
|
||||
#endif // HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
#if HAVE_VSX && !CONFIG_EMULATE_HARDWARE && !CONFIG_VP9_HIGHBITDEPTH
|
||||
@@ -749,8 +769,9 @@ static const FuncInfo wht_vsx_func_info = {
|
||||
&fdct_wrapper<vp9_fwht4x4_c>, &idct_wrapper<vpx_iwht4x4_16_add_vsx>, 4, 1
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(VSX, TransWHT,
|
||||
::testing::Values(make_tuple(0, &wht_vsx_func_info, 0,
|
||||
VPX_BITS_8)));
|
||||
INSTANTIATE_TEST_SUITE_P(VSX, TransWHT,
|
||||
::testing::Values(make_tuple(0, &wht_vsx_func_info, 0,
|
||||
VPX_BITS_8)));
|
||||
#endif // HAVE_VSX && !CONFIG_EMULATE_HARDWARE
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -31,27 +31,33 @@ TEST(DecodeAPI, InvalidParams) {
|
||||
uint8_t buf[1] = { 0 };
|
||||
vpx_codec_ctx_t dec;
|
||||
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_dec_init(NULL, NULL, NULL, 0));
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_dec_init(&dec, NULL, NULL, 0));
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_decode(NULL, NULL, 0, NULL, 0));
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_decode(NULL, buf, 0, NULL, 0));
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||
vpx_codec_decode(NULL, buf, NELEMENTS(buf), NULL, 0));
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||
vpx_codec_decode(NULL, NULL, NELEMENTS(buf), NULL, 0));
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_destroy(NULL));
|
||||
EXPECT_TRUE(vpx_codec_error(NULL) != NULL);
|
||||
EXPECT_EQ(vpx_codec_dec_init(nullptr, nullptr, nullptr, 0),
|
||||
VPX_CODEC_INVALID_PARAM);
|
||||
EXPECT_EQ(vpx_codec_dec_init(&dec, nullptr, nullptr, 0),
|
||||
VPX_CODEC_INVALID_PARAM);
|
||||
EXPECT_EQ(vpx_codec_decode(nullptr, nullptr, 0, nullptr, 0),
|
||||
VPX_CODEC_INVALID_PARAM);
|
||||
EXPECT_EQ(vpx_codec_decode(nullptr, buf, 0, nullptr, 0),
|
||||
VPX_CODEC_INVALID_PARAM);
|
||||
EXPECT_EQ(vpx_codec_decode(nullptr, buf, NELEMENTS(buf), nullptr, 0),
|
||||
VPX_CODEC_INVALID_PARAM);
|
||||
EXPECT_EQ(vpx_codec_decode(nullptr, nullptr, NELEMENTS(buf), nullptr, 0),
|
||||
VPX_CODEC_INVALID_PARAM);
|
||||
EXPECT_EQ(vpx_codec_destroy(nullptr), VPX_CODEC_INVALID_PARAM);
|
||||
EXPECT_NE(vpx_codec_error(nullptr), nullptr);
|
||||
EXPECT_EQ(vpx_codec_error_detail(nullptr), nullptr);
|
||||
|
||||
for (int i = 0; i < NELEMENTS(kCodecs); ++i) {
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||
vpx_codec_dec_init(NULL, kCodecs[i], NULL, 0));
|
||||
vpx_codec_dec_init(nullptr, kCodecs[i], nullptr, 0));
|
||||
|
||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, kCodecs[i], NULL, 0));
|
||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, kCodecs[i], nullptr, 0));
|
||||
EXPECT_EQ(VPX_CODEC_UNSUP_BITSTREAM,
|
||||
vpx_codec_decode(&dec, buf, NELEMENTS(buf), NULL, 0));
|
||||
vpx_codec_decode(&dec, buf, NELEMENTS(buf), nullptr, 0));
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||
vpx_codec_decode(&dec, NULL, NELEMENTS(buf), NULL, 0));
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_decode(&dec, buf, 0, NULL, 0));
|
||||
vpx_codec_decode(&dec, nullptr, NELEMENTS(buf), nullptr, 0));
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||
vpx_codec_decode(&dec, buf, 0, nullptr, 0));
|
||||
|
||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
|
||||
}
|
||||
@@ -62,11 +68,12 @@ TEST(DecodeAPI, OptionalParams) {
|
||||
vpx_codec_ctx_t dec;
|
||||
|
||||
#if CONFIG_ERROR_CONCEALMENT
|
||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, &vpx_codec_vp8_dx_algo, NULL,
|
||||
VPX_CODEC_USE_ERROR_CONCEALMENT));
|
||||
EXPECT_EQ(VPX_CODEC_OK,
|
||||
vpx_codec_dec_init(&dec, &vpx_codec_vp8_dx_algo, nullptr,
|
||||
VPX_CODEC_USE_ERROR_CONCEALMENT));
|
||||
#else
|
||||
EXPECT_EQ(VPX_CODEC_INCAPABLE,
|
||||
vpx_codec_dec_init(&dec, &vpx_codec_vp8_dx_algo, NULL,
|
||||
vpx_codec_dec_init(&dec, &vpx_codec_vp8_dx_algo, nullptr,
|
||||
VPX_CODEC_USE_ERROR_CONCEALMENT));
|
||||
#endif // CONFIG_ERROR_CONCEALMENT
|
||||
}
|
||||
@@ -90,25 +97,25 @@ void TestVp9Controls(vpx_codec_ctx_t *dec) {
|
||||
default: EXPECT_EQ(VPX_CODEC_OK, res) << kControls[i]; break;
|
||||
}
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||
vpx_codec_control_(dec, kControls[i], NULL));
|
||||
vpx_codec_control_(dec, kControls[i], nullptr));
|
||||
}
|
||||
|
||||
vp9_ref_frame_t ref;
|
||||
ref.idx = 0;
|
||||
EXPECT_EQ(VPX_CODEC_ERROR, vpx_codec_control(dec, VP9_GET_REFERENCE, &ref));
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||
vpx_codec_control(dec, VP9_GET_REFERENCE, NULL));
|
||||
vpx_codec_control(dec, VP9_GET_REFERENCE, nullptr));
|
||||
|
||||
vpx_ref_frame_t ref_copy;
|
||||
const int width = 352;
|
||||
const int height = 288;
|
||||
ASSERT_TRUE(
|
||||
vpx_img_alloc(&ref_copy.img, VPX_IMG_FMT_I420, width, height, 1) != NULL);
|
||||
EXPECT_NE(vpx_img_alloc(&ref_copy.img, VPX_IMG_FMT_I420, width, height, 1),
|
||||
nullptr);
|
||||
ref_copy.frame_type = VP8_LAST_FRAME;
|
||||
EXPECT_EQ(VPX_CODEC_ERROR,
|
||||
vpx_codec_control(dec, VP8_COPY_REFERENCE, &ref_copy));
|
||||
EXPECT_EQ(VPX_CODEC_INVALID_PARAM,
|
||||
vpx_codec_control(dec, VP8_COPY_REFERENCE, NULL));
|
||||
vpx_codec_control(dec, VP8_COPY_REFERENCE, nullptr));
|
||||
vpx_img_free(&ref_copy.img);
|
||||
}
|
||||
|
||||
@@ -122,17 +129,17 @@ TEST(DecodeAPI, Vp9InvalidDecode) {
|
||||
ASSERT_TRUE(!HasFailure());
|
||||
|
||||
vpx_codec_ctx_t dec;
|
||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
|
||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, nullptr, 0));
|
||||
const uint32_t frame_size = static_cast<uint32_t>(video.frame_size());
|
||||
#if CONFIG_VP9_HIGHBITDEPTH
|
||||
EXPECT_EQ(VPX_CODEC_MEM_ERROR,
|
||||
vpx_codec_decode(&dec, video.cxdata(), frame_size, NULL, 0));
|
||||
vpx_codec_decode(&dec, video.cxdata(), frame_size, nullptr, 0));
|
||||
#else
|
||||
EXPECT_EQ(VPX_CODEC_UNSUP_BITSTREAM,
|
||||
vpx_codec_decode(&dec, video.cxdata(), frame_size, NULL, 0));
|
||||
vpx_codec_decode(&dec, video.cxdata(), frame_size, nullptr, 0));
|
||||
#endif
|
||||
vpx_codec_iter_t iter = NULL;
|
||||
EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
|
||||
vpx_codec_iter_t iter = nullptr;
|
||||
EXPECT_EQ(nullptr, vpx_codec_get_frame(&dec, &iter));
|
||||
|
||||
TestVp9Controls(&dec);
|
||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
|
||||
@@ -145,12 +152,12 @@ void TestPeekInfo(const uint8_t *const data, uint32_t data_sz,
|
||||
// to decoder_peek_si_internal on frames of size < 8.
|
||||
if (data_sz >= 8) {
|
||||
vpx_codec_ctx_t dec;
|
||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
|
||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, nullptr, 0));
|
||||
EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM
|
||||
: VPX_CODEC_CORRUPT_FRAME,
|
||||
vpx_codec_decode(&dec, data, data_sz, NULL, 0));
|
||||
vpx_codec_iter_t iter = NULL;
|
||||
EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
|
||||
vpx_codec_decode(&dec, data, data_sz, nullptr, 0));
|
||||
vpx_codec_iter_t iter = nullptr;
|
||||
EXPECT_EQ(nullptr, vpx_codec_get_frame(&dec, &iter));
|
||||
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user