Merge branch 'master' into v1.11

This commit is contained in:
Andrey Volk committed 2026-11-19 00:01:36 +03:00
commit 795228ad43
1133 files changed
+225325 -100946

No files matched your search

@@ -1,4 +1,4 @@
ARG BUILDER_IMAGE=signalwire/freeswitch-public-ci-base:bookworm-amd64
ARG BUILDER_IMAGE=signalwire/freeswitch-public-ci-base:trixie-amd64
FROM ${BUILDER_IMAGE}
+1 -1
View File
@@ -27,7 +27,7 @@ on:
default: false
env:
CI_BASE_STATIC_IMAGE: signalwire/freeswitch-public-ci-base:bookworm-amd64
CI_BASE_STATIC_IMAGE: signalwire/freeswitch-public-ci-base:trixie-amd64
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_CHECKS_ANNOTATIONS: false
DOCKER_BUILD_RECORD_UPLOAD: false
+9 -8
View File
@@ -16,11 +16,11 @@ on:
jobs:
build:
name: Build MacOS
runs-on: macos-latest
runs-on: xcode-27
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
fetch-depth: 0
@@ -30,7 +30,6 @@ jobs:
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
brew install \
autoconf \
automake \
@@ -39,29 +38,31 @@ jobs:
gnu-sed \
jpeg \
ldns \
libks \
libnatpmp \
libpq@18 \
libsndfile \
libtool \
lua \
miniupnpc \
opus \
ossp-uuid \
pcre2 \
pkgconf \
signalwire-client-c \
sofia-sip \
speex \
speexdsp \
sqlite \
yasm \
&& \
brew list --pinned | awk '{system("brew unpin " $1)}' && \
brew install --adopt \
signalwire/homebrew-signalwire/libks2 \
signalwire/homebrew-signalwire/signalwire-c2 \
signalwire/homebrew-signalwire/spandsp \
&& \
brew link --force --overwrite \
ffmpeg@7 \
libpq@18
libpq@18 \
ruby@3.4
- name: Bootstrap FreeSWITCH
run: ./bootstrap.sh -j
@@ -94,7 +95,7 @@ jobs:
# find . -type f | sort
- name: Upload build artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: always()
with:
name: freeswitch-macos-build
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
scan-build:
runs-on: ubuntu-latest
container:
image: signalwire/freeswitch-public-ci-base:bookworm-amd64
image: signalwire/freeswitch-public-ci-base:trixie-amd64
options: --privileged
env:
DEBIAN_FRONTEND: noninteractive
+2 -2
View File
@@ -23,7 +23,7 @@ jobs:
unit-tests:
runs-on: ubuntu-latest
container:
image: signalwire/freeswitch-public-ci-base:bookworm-amd64
image: signalwire/freeswitch-public-ci-base:trixie-amd64
options: --privileged
env:
DEBIAN_FRONTEND: noninteractive
@@ -65,7 +65,7 @@ jobs:
echo "logs_path=${GITHUB_WORKSPACE}/freeswitch/tests/unit/logs" >> $GITHUB_OUTPUT
"${GITHUB_WORKSPACE}/freeswitch/tests/unit/run-tests-docker.sh" \
--base-image signalwire/freeswitch-public-ci-base:bookworm-amd64 \
--base-image signalwire/freeswitch-public-ci-base:trixie-amd64 \
--cpus ${{ env.NUM_CPU_PER_CONTAINER }} \
--image-tag ci.local \
--max-containers ${{ env.MAX_CONTAINERS }} \
+2 -2
View File
@@ -25,7 +25,7 @@ on:
description: 'Container image to use for running tests'
required: false
type: string
default: 'signalwire/freeswitch-public-ci-base:bookworm-amd64'
default: 'signalwire/freeswitch-public-ci-base:trixie-amd64'
working-directory:
description: 'Working directory for running tests'
required: false
@@ -39,7 +39,7 @@ on:
jobs:
unit-test:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container:
image: ${{ inputs.container-image }}
options: --privileged
+58 -5
View File
@@ -104,7 +104,6 @@ Release/
/build/freeswitch.pc
/build/standalone_module/freeswitch.pc
/build/getlib.sh
/build/getg729.sh
/build/getsounds.sh
/build/Makefile
/build/Makefile.in
@@ -116,7 +115,6 @@ Release/
/libs/esl/fs_ivrd
/libs/esl/testclient
/libs/esl/testserver
/libs/fsg729-*-installer
/libs/g729/
/libs/libcodec2/compile
/libs/libcodec2/config.guess
@@ -148,8 +146,6 @@ Release/
/src/mod/applications/mod_snipe_hunt/Makefile
/src/mod/applications/mod_test/test/Makefile
/src/mod/applications/mod_test/test/Makefile.in
/src/mod/codecs/mod_com_g729/Makefile
/src/mod/codecs/mod_com_g729/Makefile.in
/src/mod/dialplans/mod_dialplan_directory/Makefile
/src/mod/formats/mod_shell_stream/Makefile
/src/mod/languages/mod_lua/mod_lua_wrap.cpp.orig
@@ -228,7 +224,6 @@ yum/temp
Freeswitch.2015.VC.db
Freeswitch.2015.VC.VC.opendb
libs/freetype/
libs/libpng/
libs/zlib/
@@ -250,6 +245,60 @@ libs/libcodec2-*/
libs/libsilk-*/
libs/rabbitmq-c-*/
libs/rabbitmq-c-*.zip
# Dependency packages w32\*.props download from freeswitch/windows-deps
# into libs\<name>-<version>_<build>\ (rabbitmq-c is listed above).
libs/zlib-*/
libs/zlib-*.zip
libs/openssl-*/
libs/openssl-*.zip
libs/libpng-*/
libs/libpng-*.zip
libs/libks-*/
libs/libks-*.zip
libs/signalwire-client-c-*/
libs/signalwire-client-c-*.zip
libs/curl-*/
libs/curl-*.zip
libs/libpcap-*/
libs/libpcap-*.zip
libs/libpq-*/
libs/libpq-*.zip
libs/mariadb-connector-c-*/
libs/mariadb-connector-c-*.zip
libs/flite-*/
libs/flite-*.zip
libs/pcre-*/
libs/pcre-*.zip
libs/opencv-*/
libs/opencv-*.zip
libs/broadvoice-*.zip
libs/lua-*.zip
libs/g722_1-*.zip
libs/ilbc-*.zip
libs/libsilk-*.zip
libs/libtiff-*/
libs/libtiff-*.zip
libs/lame-*/
libs/lame-*.zip
libs/libshout-*/
libs/libshout-*.zip
libs/libogg-*/
libs/libogg-*.zip
libs/pthreads-*/
libs/pthreads-*.zip
libs/mpg123-*/
libs/mpg123-*.zip
libs/ldns-*/
libs/ldns-*.zip
libs/speex-*.zip
libs/libjpeg-*/
libs/libjpeg-*.zip
libs/freetype-*/
libs/freetype-*.zip
libs/miniupnpc-*/
libs/miniupnpc-*.zip
libs/libnatpmp-*/
libs/libnatpmp-*.zip
libs/SharpZipLib.*/
libs/SharpZipLib.*.nupkg
libs/nasm-*/
@@ -268,6 +317,10 @@ src/mod/applications/mod_http_cache/test/test_aws.log
src/mod/applications/mod_http_cache/test/test_aws.trs
src/mod/formats/mod_sndfile/test/test_sndfile
src/mod/formats/mod_sndfile/test/test_sndfile_conf
# Recordings test_sndfile writes here on Windows, named <uuid>.<ext>. A passing run
# unlinks them, but libsndfile also writes a ._<uuid>.sd2 resource fork that nothing
# removes, and a failing run leaves the lot behind.
src/mod/formats/mod_sndfile/test/*-*-*-*-*
src/mod/*/*/test/*.log
src/mod/*/*/test/*.trs
src/mod/*/*/test/[0-9]*/*
+19 -319
View File
@@ -206,14 +206,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_socket", "src\mod
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsrtp", "libs\srtp\libsrtp.2017.vcxproj", "{EEF031CB-FED8-451E-A471-91EC8D4F6750}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsqlite", "libs\win32\sqlite\sqlite.2017.vcxproj", "{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libapr", "libs\win32\apr\libapr.2017.vcxproj", "{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_sofia", "src\mod\endpoints\mod_sofia\mod_sofia.2017.vcxproj", "{0DF3ABD0-DDC0-4265-B778-07C66780979B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthread", "libs\win32\pthread\pthread.2017.vcxproj", "{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g723_1", "src\mod\codecs\mod_g723_1\mod_g723_1.2017.vcxproj", "{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_native_file", "src\mod\formats\mod_native_file\mod_native_file.2017.vcxproj", "{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}"
@@ -278,28 +274,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "32khz", "libs\win32\Sound_F
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_flite", "src\mod\asr_tts\mod_flite\mod_flite.2017.vcxproj", "{66444AEE-554C-11DD-A9F0-8C5D56D89593}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmp3lame", "libs\win32\libmp3lame\libmp3lame.2017.vcxproj", "{E316772F-5D8F-4F2A-8F71-094C3E859D34}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libshout", "libs\win32\libshout\libshout.2017.vcxproj", "{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_shout", "src\mod\formats\mod_shout\mod_shout.2017.vcxproj", "{38FE0559-9910-43A8-9E45-3E5004C27692}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg", "libs\win32\libogg\libogg.2017.vcxproj", "{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_zh", "src\mod\say\mod_say_zh\mod_say_zh.2017.vcxproj", "{B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_managed", "src\mod\languages\mod_managed\mod_managed.2017.vcxproj", "{7B42BDA1-72C0-4378-A9B6-5C530F8CD61E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeSWITCH.Managed.2017", "src\mod\languages\mod_managed\managed\FreeSWITCH.Managed.2017.csproj", "{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpg123", "libs\win32\mpg123\libmpg123.2017.vcxproj", "{419C8F80-D858-4B48-A25C-AF4007608137}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_loopback", "src\mod\endpoints\mod_loopback\mod_loopback.2017.vcxproj", "{B3F424EC-3D8F-417C-B244-3919D5E1A577}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_vmd", "src\mod\applications\mod_vmd\mod_vmd.2017.vcxproj", "{14E4A972-9CFB-436D-B0A5-4943F3F80D47}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libg722_1", "libs\win32\libg722_1\libg722_1.2017.vcxproj", "{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_siren", "src\mod\codecs\mod_siren\mod_siren.2017.vcxproj", "{0B6C905B-142E-4999-B39D-92FF7951E921}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libesl", "libs\esl\src\libesl.2017.vcxproj", "{CF405366-9558-4AE8-90EF-5E21B51CCB4E}"
@@ -313,16 +299,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_easyroute", "src\mod\ap
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_lcr", "src\mod\applications\mod_lcr\mod_lcr.2017.vcxproj", "{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtiff", "libs\win32\libtiff\libtiff.2017.vcxproj", "{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libs\win32\spandsp\libspandsp.2017.vcxproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspeex", "libs\win32\speex\libspeex.2017.vcxproj", "{E972C52F-9E85-4D65-B19C-031E511E9DB4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspeexdsp", "libs\win32\speex\libspeexdsp.2017.vcxproj", "{03207781-0D1C-4DB3-A71D-45C608F28DBD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libilbc", "libs\win32\ilbc\libilbc.2017.vcxproj", "{9A5DDF08-C88C-4A35-B7F6-D605228446BD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_opal", "src\mod\endpoints\mod_opal\mod_opal.2017.vcxproj", "{05C9FB27-480E-4D53-B3B7-6338E2526666}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_skinny", "src\mod\endpoints\mod_skinny\mod_skinny.2017.vcxproj", "{CC1DD008-9406-448D-A0AD-33C3186CFADB}"
@@ -347,20 +327,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_ru", "src\mod\say\m
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_valet_parking", "src\mod\applications\mod_valet_parking\mod_valet_parking.2017.vcxproj", "{432DB165-1EB2-4781-A9C0-71E62610B20A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbroadvoice", "libs\win32\broadvoice\libbroadvoice.2017.vcxproj", "{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_bv", "src\mod\codecs\mod_bv\mod_bv.2017.vcxproj", "{D5C87B19-150D-4EF3-A671-96589BD2D14A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcelt", "libs\win32\celt\libcelt.2017.vcxproj", "{ABB71A76-42B0-47A4-973A-42E3D920C6FD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FSComm", "fscomm\FSComm.2017.vcxproj", "{7D3122C7-C9D0-3748-81F8-F0DDCB40BF5E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_curl", "src\mod\applications\mod_curl\mod_curl.2017.vcxproj", "{EF300386-A8DF-4372-B6D8-FB9BFFCA9AED}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_silk", "src\mod\codecs\mod_silk\mod_silk.2017.vcxproj", "{AFA983D6-4569-4F88-BA94-555ED00FD9A8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Silk_FIX", "libs\win32\libsilk\Silk_FIX.2017.vcxproj", "{56B91D01-9150-4BBF-AFA1-5B68AB991B76}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_avmd", "src\mod\applications\mod_avmd\mod_avmd.2017.vcxproj", "{990BAA76-89D3-4E38-8479-C7B28784EFC8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spandsp", "src\mod\applications\mod_spandsp\mod_spandsp.2017.vcxproj", "{1E21AFE0-6FDB-41D2-942D-863607C24B91}"
@@ -379,8 +353,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_pt", "src\mod\say\m
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_sv", "src\mod\say\mod_say_sv\mod_say_sv.2017.vcxproj", "{8CDA2B34-FA44-49CC-9EC2-B8F35856CD15}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ldns", "libs\win32\ldns\ldns-lib\ldns-lib.2017.vcxproj", "{23B4D303-79FC-49E0-89E2-2280E7E28940}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_callcenter", "src\mod\applications\mod_callcenter\mod_callcenter.2017.vcxproj", "{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_blacklist", "src\mod\applications\mod_blacklist\mod_blacklist.2017.vcxproj", "{50AAC2CE-BFC9-4912-87CC-C6381850D735}"
@@ -395,8 +367,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xmlrpc-c", "xmlrpc-c", "{9D
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_redis", "src\mod\applications\mod_redis\mod_redis.2017.vcxproj", "{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "libs\win32\libjpeg\libjpeg.2017.vcxproj", "{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abyss", "libs\win32\xmlrpc-c\abyss.2017.vcxproj", "{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}"
ProjectSection(ProjectDependencies) = postProject
{0D108721-EAE8-4BAF-8102-D8960EC93647} = {0D108721-EAE8-4BAF-8102-D8960EC93647}
@@ -428,18 +398,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_math_fixed_tables", "l
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_cielab_luts", "libs\win32\spandsp\make_cielab_luts.2017.vcxproj", "{85F0CF8C-C7AB-48F6-BA19-CC94CF87F981}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "opus", "opus", "{ED2CA8B5-8E91-4296-A120-02BB0B674652}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opus", "libs\win32\opus\opus.2017.vcxproj", "{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opus.celt", "libs\win32\opus\opus.celt.2017.vcxproj", "{245603E3-F580-41A5-9632-B25FE3372CBF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opus.silk_common", "libs\win32\opus\opus.silk_common.2017.vcxproj", "{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opus.silk_fixed", "libs\win32\opus\opus.silk_fixed.2017.vcxproj", "{8484C90D-1561-402F-A91D-2DB10F8C5171}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opus.silk_float", "libs\win32\opus\opus.silk_float.2017.vcxproj", "{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_opus", "src\mod\codecs\mod_opus\mod_opus.2017.vcxproj", "{64E99CCA-3C6F-4AEB-9FA3-CFAC711257BB}"
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}"
@@ -456,10 +414,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libyuv", "libs\win32\libyuv
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvpx", "libs\win32\libvpx\libvpx.2017.vcxproj", "{DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libs\win32\libpng\libpng.2017.vcxproj", "{D6973076-9317-4EF2-A0B8-B7A18AC0713E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype.2017", "libs\win32\freetype\freetype.2017.vcxproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
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}") = "mod_av", "src\mod\applications\mod_av\mod_av.2017.vcxproj", "{7AEE504B-23B6-4B05-829E-7CD34855F146}"
@@ -528,6 +482,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_test", "src\mod\applica
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_switch_xml", "tests\unit\test_switch_xml.2017.vcxproj", "{FED39CFF-E6CD-1C09-844D-F1174B8A5C18}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_sndfile", "src\mod\formats\mod_sndfile\test\test_sndfile.2017.vcxproj", "{19D12A4C-1036-4695-85B0-6030F6048233}"
ProjectSection(ProjectDependencies) = postProject
{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6} = {AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}
{B3F424EC-3D8F-417C-B244-3919D5E1A577} = {B3F424EC-3D8F-417C-B244-3919D5E1A577}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Win32 = All|Win32
@@ -749,17 +709,6 @@ Global
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Release|Win32.Build.0 = Release|Win32
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Release|x64.ActiveCfg = Release|x64
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Release|x64.Build.0 = Release|x64
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.All|Win32.ActiveCfg = Release DLL|x64
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.All|x64.ActiveCfg = Release DLL|x64
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.All|x64.Build.0 = Release DLL|x64
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|Win32.ActiveCfg = Debug|Win32
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|Win32.Build.0 = Debug|Win32
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|x64.ActiveCfg = Debug|x64
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|x64.Build.0 = Debug|x64
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|Win32.ActiveCfg = Release|Win32
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|Win32.Build.0 = Release|Win32
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|x64.ActiveCfg = Release|x64
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|x64.Build.0 = Release|x64
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.All|Win32.ActiveCfg = Release|x64
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.All|x64.ActiveCfg = Release|x64
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.All|x64.Build.0 = Release|x64
@@ -782,17 +731,6 @@ Global
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.Release|Win32.Build.0 = Release|Win32
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.Release|x64.ActiveCfg = Release|x64
{0DF3ABD0-DDC0-4265-B778-07C66780979B}.Release|x64.Build.0 = Release|x64
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.All|Win32.ActiveCfg = Release DLL|x64
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.All|x64.ActiveCfg = Release DLL|x64
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.All|x64.Build.0 = Release DLL|x64
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Debug|Win32.ActiveCfg = Debug DLL|Win32
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Debug|Win32.Build.0 = Debug DLL|Win32
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Debug|x64.ActiveCfg = Debug DLL|x64
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Debug|x64.Build.0 = Debug DLL|x64
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Release|Win32.ActiveCfg = Release DLL|Win32
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Release|Win32.Build.0 = Release DLL|Win32
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Release|x64.ActiveCfg = Release DLL|x64
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}.Release|x64.Build.0 = Release DLL|x64
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.All|Win32.ActiveCfg = Release Passthrough|x64
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.All|x64.ActiveCfg = Release Passthrough|x64
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}.All|x64.Build.0 = Release Passthrough|x64
@@ -1137,28 +1075,6 @@ Global
{66444AEE-554C-11DD-A9F0-8C5D56D89593}.Release|Win32.Build.0 = Release|Win32
{66444AEE-554C-11DD-A9F0-8C5D56D89593}.Release|x64.ActiveCfg = Release|x64
{66444AEE-554C-11DD-A9F0-8C5D56D89593}.Release|x64.Build.0 = Release|x64
{E316772F-5D8F-4F2A-8F71-094C3E859D34}.All|Win32.ActiveCfg = Debug|x64
{E316772F-5D8F-4F2A-8F71-094C3E859D34}.All|x64.ActiveCfg = Debug|x64
{E316772F-5D8F-4F2A-8F71-094C3E859D34}.All|x64.Build.0 = Debug|x64
{E316772F-5D8F-4F2A-8F71-094C3E859D34}.Debug|Win32.ActiveCfg = Debug|Win32
{E316772F-5D8F-4F2A-8F71-094C3E859D34}.Debug|Win32.Build.0 = Debug|Win32
{E316772F-5D8F-4F2A-8F71-094C3E859D34}.Debug|x64.ActiveCfg = Debug|x64
{E316772F-5D8F-4F2A-8F71-094C3E859D34}.Debug|x64.Build.0 = Debug|x64
{E316772F-5D8F-4F2A-8F71-094C3E859D34}.Release|Win32.ActiveCfg = Release|Win32
{E316772F-5D8F-4F2A-8F71-094C3E859D34}.Release|Win32.Build.0 = Release|Win32
{E316772F-5D8F-4F2A-8F71-094C3E859D34}.Release|x64.ActiveCfg = Release|x64
{E316772F-5D8F-4F2A-8F71-094C3E859D34}.Release|x64.Build.0 = Release|x64
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.All|Win32.ActiveCfg = Debug|x64
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.All|x64.ActiveCfg = Debug|x64
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.All|x64.Build.0 = Debug|x64
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Debug|Win32.ActiveCfg = Debug|Win32
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Debug|Win32.Build.0 = Debug|Win32
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Debug|x64.ActiveCfg = Debug|x64
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Debug|x64.Build.0 = Debug|x64
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Release|Win32.ActiveCfg = Release|Win32
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Release|Win32.Build.0 = Release|Win32
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Release|x64.ActiveCfg = Release|x64
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5}.Release|x64.Build.0 = Release|x64
{38FE0559-9910-43A8-9E45-3E5004C27692}.All|Win32.ActiveCfg = Release|x64
{38FE0559-9910-43A8-9E45-3E5004C27692}.All|x64.ActiveCfg = Release|x64
{38FE0559-9910-43A8-9E45-3E5004C27692}.All|x64.Build.0 = Release|x64
@@ -1170,17 +1086,6 @@ Global
{38FE0559-9910-43A8-9E45-3E5004C27692}.Release|Win32.Build.0 = Release|Win32
{38FE0559-9910-43A8-9E45-3E5004C27692}.Release|x64.ActiveCfg = Release|x64
{38FE0559-9910-43A8-9E45-3E5004C27692}.Release|x64.Build.0 = Release|x64
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.All|Win32.ActiveCfg = Debug|x64
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.All|x64.ActiveCfg = Debug|x64
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.All|x64.Build.0 = Debug|x64
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Debug|Win32.ActiveCfg = Debug|Win32
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Debug|Win32.Build.0 = Debug|Win32
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Debug|x64.ActiveCfg = Debug|x64
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Debug|x64.Build.0 = Debug|x64
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Release|Win32.ActiveCfg = Release|Win32
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Release|Win32.Build.0 = Release|Win32
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Release|x64.ActiveCfg = Release|x64
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4}.Release|x64.Build.0 = Release|x64
{B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}.All|Win32.ActiveCfg = Release|x64
{B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}.All|x64.ActiveCfg = Release|x64
{B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E}.All|x64.Build.0 = Release|x64
@@ -1213,17 +1118,6 @@ Global
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Release|Win32.Build.0 = Release|Any CPU
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Release|x64.ActiveCfg = Release|x64
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Release|x64.Build.0 = Release|x64
{419C8F80-D858-4B48-A25C-AF4007608137}.All|Win32.ActiveCfg = Debug_Generic_Dll|Win32
{419C8F80-D858-4B48-A25C-AF4007608137}.All|Win32.Build.0 = Debug_Generic_Dll|Win32
{419C8F80-D858-4B48-A25C-AF4007608137}.All|x64.ActiveCfg = Debug_Generic_Dll|Win32
{419C8F80-D858-4B48-A25C-AF4007608137}.Debug|Win32.ActiveCfg = Debug_Generic|Win32
{419C8F80-D858-4B48-A25C-AF4007608137}.Debug|Win32.Build.0 = Debug_Generic|Win32
{419C8F80-D858-4B48-A25C-AF4007608137}.Debug|x64.ActiveCfg = Debug_Generic|x64
{419C8F80-D858-4B48-A25C-AF4007608137}.Debug|x64.Build.0 = Debug_Generic|x64
{419C8F80-D858-4B48-A25C-AF4007608137}.Release|Win32.ActiveCfg = Release_Generic|Win32
{419C8F80-D858-4B48-A25C-AF4007608137}.Release|Win32.Build.0 = Release_Generic|Win32
{419C8F80-D858-4B48-A25C-AF4007608137}.Release|x64.ActiveCfg = Release_Generic|x64
{419C8F80-D858-4B48-A25C-AF4007608137}.Release|x64.Build.0 = Release_Generic|x64
{B3F424EC-3D8F-417C-B244-3919D5E1A577}.All|Win32.ActiveCfg = Release|x64
{B3F424EC-3D8F-417C-B244-3919D5E1A577}.All|x64.ActiveCfg = Release|x64
{B3F424EC-3D8F-417C-B244-3919D5E1A577}.All|x64.Build.0 = Release|x64
@@ -1246,17 +1140,6 @@ Global
{14E4A972-9CFB-436D-B0A5-4943F3F80D47}.Release|Win32.Build.0 = Release|Win32
{14E4A972-9CFB-436D-B0A5-4943F3F80D47}.Release|x64.ActiveCfg = Release|x64
{14E4A972-9CFB-436D-B0A5-4943F3F80D47}.Release|x64.Build.0 = Release|x64
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}.All|Win32.ActiveCfg = Release|x64
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}.All|x64.ActiveCfg = Release|x64
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}.All|x64.Build.0 = Release|x64
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}.Debug|Win32.ActiveCfg = Debug|Win32
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}.Debug|Win32.Build.0 = Debug|Win32
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}.Debug|x64.ActiveCfg = Debug|x64
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}.Debug|x64.Build.0 = Debug|x64
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}.Release|Win32.ActiveCfg = Release|Win32
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}.Release|Win32.Build.0 = Release|Win32
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}.Release|x64.ActiveCfg = Release|x64
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C}.Release|x64.Build.0 = Release|x64
{0B6C905B-142E-4999-B39D-92FF7951E921}.All|Win32.ActiveCfg = Release|x64
{0B6C905B-142E-4999-B39D-92FF7951E921}.All|x64.ActiveCfg = Release|x64
{0B6C905B-142E-4999-B39D-92FF7951E921}.All|x64.Build.0 = Release|x64
@@ -1312,17 +1195,6 @@ Global
{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439}.Release|Win32.Build.0 = Release|Win32
{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439}.Release|x64.ActiveCfg = Release|x64
{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439}.Release|x64.Build.0 = Release|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.All|Win32.ActiveCfg = Release|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.All|x64.ActiveCfg = Release|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.All|x64.Build.0 = Release|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.ActiveCfg = Debug|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|Win32.Build.0 = Debug|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|x64.ActiveCfg = Debug|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Debug|x64.Build.0 = Debug|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.ActiveCfg = Release|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|Win32.Build.0 = Release|Win32
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|x64.ActiveCfg = Release|x64
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}.Release|x64.Build.0 = Release|x64
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.All|Win32.ActiveCfg = Release|x64
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.All|x64.ActiveCfg = Release|x64
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.All|x64.Build.0 = Release|x64
@@ -1334,18 +1206,6 @@ Global
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|Win32.Build.0 = Release|Win32
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|x64.ActiveCfg = Release|x64
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}.Release|x64.Build.0 = Release|x64
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.All|Win32.ActiveCfg = Release_Dynamic|Win32
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.All|Win32.Build.0 = Release_Dynamic|Win32
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.All|x64.ActiveCfg = Release_Dynamic|x64
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.All|x64.Build.0 = Release_Dynamic|x64
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug|Win32.ActiveCfg = Debug|Win32
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug|Win32.Build.0 = Debug|Win32
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug|x64.ActiveCfg = Debug|x64
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Debug|x64.Build.0 = Debug|x64
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release|Win32.ActiveCfg = Release|Win32
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release|Win32.Build.0 = Release|Win32
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release|x64.ActiveCfg = Release|x64
{E972C52F-9E85-4D65-B19C-031E511E9DB4}.Release|x64.Build.0 = Release|x64
{03207781-0D1C-4DB3-A71D-45C608F28DBD}.All|Win32.ActiveCfg = Release_Static_SSE|x64
{03207781-0D1C-4DB3-A71D-45C608F28DBD}.All|x64.ActiveCfg = Release_Static_SSE|x64
{03207781-0D1C-4DB3-A71D-45C608F28DBD}.All|x64.Build.0 = Release_Static_SSE|x64
@@ -1357,17 +1217,6 @@ Global
{03207781-0D1C-4DB3-A71D-45C608F28DBD}.Release|Win32.Build.0 = Release|Win32
{03207781-0D1C-4DB3-A71D-45C608F28DBD}.Release|x64.ActiveCfg = Release|x64
{03207781-0D1C-4DB3-A71D-45C608F28DBD}.Release|x64.Build.0 = Release|x64
{9A5DDF08-C88C-4A35-B7F6-D605228446BD}.All|Win32.ActiveCfg = Release|x64
{9A5DDF08-C88C-4A35-B7F6-D605228446BD}.All|x64.ActiveCfg = Release|x64
{9A5DDF08-C88C-4A35-B7F6-D605228446BD}.All|x64.Build.0 = Release|x64
{9A5DDF08-C88C-4A35-B7F6-D605228446BD}.Debug|Win32.ActiveCfg = Debug|Win32
{9A5DDF08-C88C-4A35-B7F6-D605228446BD}.Debug|Win32.Build.0 = Debug|Win32
{9A5DDF08-C88C-4A35-B7F6-D605228446BD}.Debug|x64.ActiveCfg = Debug|x64
{9A5DDF08-C88C-4A35-B7F6-D605228446BD}.Debug|x64.Build.0 = Debug|x64
{9A5DDF08-C88C-4A35-B7F6-D605228446BD}.Release|Win32.ActiveCfg = Release|Win32
{9A5DDF08-C88C-4A35-B7F6-D605228446BD}.Release|Win32.Build.0 = Release|Win32
{9A5DDF08-C88C-4A35-B7F6-D605228446BD}.Release|x64.ActiveCfg = Release|x64
{9A5DDF08-C88C-4A35-B7F6-D605228446BD}.Release|x64.Build.0 = Release|x64
{05C9FB27-480E-4D53-B3B7-6338E2526666}.All|Win32.ActiveCfg = Release|Win32
{05C9FB27-480E-4D53-B3B7-6338E2526666}.All|Win32.Build.0 = Release|Win32
{05C9FB27-480E-4D53-B3B7-6338E2526666}.All|x64.ActiveCfg = Release|Win32
@@ -1485,17 +1334,6 @@ Global
{432DB165-1EB2-4781-A9C0-71E62610B20A}.Release|Win32.Build.0 = Release|Win32
{432DB165-1EB2-4781-A9C0-71E62610B20A}.Release|x64.ActiveCfg = Release|x64
{432DB165-1EB2-4781-A9C0-71E62610B20A}.Release|x64.Build.0 = Release|x64
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.All|Win32.ActiveCfg = Release|Win32
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.All|Win32.Build.0 = Release|Win32
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.All|x64.ActiveCfg = Release|Win32
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|Win32.ActiveCfg = Debug|Win32
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|Win32.Build.0 = Debug|Win32
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|x64.ActiveCfg = Debug|x64
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Debug|x64.Build.0 = Debug|x64
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|Win32.ActiveCfg = Release|Win32
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|Win32.Build.0 = Release|Win32
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|x64.ActiveCfg = Release|x64
{CF70F278-3364-4395-A2E1-23501C9B8AD2}.Release|x64.Build.0 = Release|x64
{D5C87B19-150D-4EF3-A671-96589BD2D14A}.All|Win32.ActiveCfg = Release|x64
{D5C87B19-150D-4EF3-A671-96589BD2D14A}.All|x64.ActiveCfg = Release|x64
{D5C87B19-150D-4EF3-A671-96589BD2D14A}.All|x64.Build.0 = Release|x64
@@ -1507,17 +1345,6 @@ Global
{D5C87B19-150D-4EF3-A671-96589BD2D14A}.Release|Win32.Build.0 = Release|Win32
{D5C87B19-150D-4EF3-A671-96589BD2D14A}.Release|x64.ActiveCfg = Release|x64
{D5C87B19-150D-4EF3-A671-96589BD2D14A}.Release|x64.Build.0 = Release|x64
{ABB71A76-42B0-47A4-973A-42E3D920C6FD}.All|Win32.ActiveCfg = Release|x64
{ABB71A76-42B0-47A4-973A-42E3D920C6FD}.All|x64.ActiveCfg = Release|x64
{ABB71A76-42B0-47A4-973A-42E3D920C6FD}.All|x64.Build.0 = Release|x64
{ABB71A76-42B0-47A4-973A-42E3D920C6FD}.Debug|Win32.ActiveCfg = Debug|Win32
{ABB71A76-42B0-47A4-973A-42E3D920C6FD}.Debug|Win32.Build.0 = Debug|Win32
{ABB71A76-42B0-47A4-973A-42E3D920C6FD}.Debug|x64.ActiveCfg = Debug|x64
{ABB71A76-42B0-47A4-973A-42E3D920C6FD}.Debug|x64.Build.0 = Debug|x64
{ABB71A76-42B0-47A4-973A-42E3D920C6FD}.Release|Win32.ActiveCfg = Release|Win32
{ABB71A76-42B0-47A4-973A-42E3D920C6FD}.Release|Win32.Build.0 = Release|Win32
{ABB71A76-42B0-47A4-973A-42E3D920C6FD}.Release|x64.ActiveCfg = Release|x64
{ABB71A76-42B0-47A4-973A-42E3D920C6FD}.Release|x64.Build.0 = Release|x64
{7D3122C7-C9D0-3748-81F8-F0DDCB40BF5E}.All|Win32.ActiveCfg = Release|Win32
{7D3122C7-C9D0-3748-81F8-F0DDCB40BF5E}.All|Win32.Build.0 = Release|Win32
{7D3122C7-C9D0-3748-81F8-F0DDCB40BF5E}.All|x64.ActiveCfg = Release|Win32
@@ -1547,17 +1374,6 @@ Global
{AFA983D6-4569-4F88-BA94-555ED00FD9A8}.Release|Win32.Build.0 = Release|Win32
{AFA983D6-4569-4F88-BA94-555ED00FD9A8}.Release|x64.ActiveCfg = Release|x64
{AFA983D6-4569-4F88-BA94-555ED00FD9A8}.Release|x64.Build.0 = Release|x64
{56B91D01-9150-4BBF-AFA1-5B68AB991B76}.All|Win32.ActiveCfg = Release|Win32
{56B91D01-9150-4BBF-AFA1-5B68AB991B76}.All|Win32.Build.0 = Release|Win32
{56B91D01-9150-4BBF-AFA1-5B68AB991B76}.All|x64.ActiveCfg = Release|Win32
{56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug|Win32.ActiveCfg = Debug|Win32
{56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug|Win32.Build.0 = Debug|Win32
{56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug|x64.ActiveCfg = Debug|x64
{56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Debug|x64.Build.0 = Debug|x64
{56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Release|Win32.ActiveCfg = Release|Win32
{56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Release|Win32.Build.0 = Release|Win32
{56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Release|x64.ActiveCfg = Release|x64
{56B91D01-9150-4BBF-AFA1-5B68AB991B76}.Release|x64.Build.0 = Release|x64
{990BAA76-89D3-4E38-8479-C7B28784EFC8}.All|Win32.ActiveCfg = Release|Win32
{990BAA76-89D3-4E38-8479-C7B28784EFC8}.All|Win32.Build.0 = Release|Win32
{990BAA76-89D3-4E38-8479-C7B28784EFC8}.All|x64.ActiveCfg = Release|Win32
@@ -1654,17 +1470,6 @@ Global
{8CDA2B34-FA44-49CC-9EC2-B8F35856CD15}.Release|Win32.Build.0 = Release|Win32
{8CDA2B34-FA44-49CC-9EC2-B8F35856CD15}.Release|x64.ActiveCfg = Release|x64
{8CDA2B34-FA44-49CC-9EC2-B8F35856CD15}.Release|x64.Build.0 = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|Win32.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|x64.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.All|x64.Build.0 = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|Win32.ActiveCfg = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|Win32.Build.0 = Debug|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|x64.ActiveCfg = Debug|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Debug|x64.Build.0 = Debug|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|Win32.ActiveCfg = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|Win32.Build.0 = Release|Win32
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|x64.ActiveCfg = Release|x64
{23B4D303-79FC-49E0-89E2-2280E7E28940}.Release|x64.Build.0 = Release|x64
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.All|Win32.ActiveCfg = Release|x64
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.All|x64.ActiveCfg = Release|x64
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A}.All|x64.Build.0 = Release|x64
@@ -1731,17 +1536,6 @@ Global
{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6}.Release|Win32.Build.0 = Release|Win32
{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6}.Release|x64.ActiveCfg = Release|x64
{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6}.Release|x64.Build.0 = Release|x64
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.All|Win32.ActiveCfg = Release|Win32
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.All|Win32.Build.0 = Release|Win32
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.All|x64.ActiveCfg = Release|Win32
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Debug|Win32.ActiveCfg = Debug|Win32
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Debug|Win32.Build.0 = Debug|Win32
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Debug|x64.ActiveCfg = Debug|x64
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Debug|x64.Build.0 = Debug|x64
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|Win32.ActiveCfg = Release|Win32
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|Win32.Build.0 = Release|Win32
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|x64.ActiveCfg = Release|x64
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}.Release|x64.Build.0 = Release|x64
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.All|Win32.ActiveCfg = Release|x64
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.All|x64.ActiveCfg = Release|x64
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9}.All|x64.Build.0 = Release|x64
@@ -1831,66 +1625,6 @@ Global
{85F0CF8C-C7AB-48F6-BA19-CC94CF87F981}.Release|Win32.Build.0 = All|Win32
{85F0CF8C-C7AB-48F6-BA19-CC94CF87F981}.Release|x64.ActiveCfg = All|Win32
{85F0CF8C-C7AB-48F6-BA19-CC94CF87F981}.Release|x64.Build.0 = All|Win32
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.All|Win32.ActiveCfg = Release|Win32
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.All|Win32.Build.0 = Release|Win32
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.All|x64.ActiveCfg = Release|x64
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.All|x64.Build.0 = Release|x64
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.Debug|Win32.ActiveCfg = Debug|Win32
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.Debug|Win32.Build.0 = Debug|Win32
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.Debug|x64.ActiveCfg = Debug|x64
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.Debug|x64.Build.0 = Debug|x64
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.Release|Win32.ActiveCfg = Release|Win32
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.Release|Win32.Build.0 = Release|Win32
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.Release|x64.ActiveCfg = Release|x64
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E}.Release|x64.Build.0 = Release|x64
{245603E3-F580-41A5-9632-B25FE3372CBF}.All|Win32.ActiveCfg = Release|Win32
{245603E3-F580-41A5-9632-B25FE3372CBF}.All|Win32.Build.0 = Release|Win32
{245603E3-F580-41A5-9632-B25FE3372CBF}.All|x64.ActiveCfg = Release|x64
{245603E3-F580-41A5-9632-B25FE3372CBF}.All|x64.Build.0 = Release|x64
{245603E3-F580-41A5-9632-B25FE3372CBF}.Debug|Win32.ActiveCfg = Debug|Win32
{245603E3-F580-41A5-9632-B25FE3372CBF}.Debug|Win32.Build.0 = Debug|Win32
{245603E3-F580-41A5-9632-B25FE3372CBF}.Debug|x64.ActiveCfg = Debug|x64
{245603E3-F580-41A5-9632-B25FE3372CBF}.Debug|x64.Build.0 = Debug|x64
{245603E3-F580-41A5-9632-B25FE3372CBF}.Release|Win32.ActiveCfg = Release|Win32
{245603E3-F580-41A5-9632-B25FE3372CBF}.Release|Win32.Build.0 = Release|Win32
{245603E3-F580-41A5-9632-B25FE3372CBF}.Release|x64.ActiveCfg = Release|x64
{245603E3-F580-41A5-9632-B25FE3372CBF}.Release|x64.Build.0 = Release|x64
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.All|Win32.ActiveCfg = Release|Win32
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.All|Win32.Build.0 = Release|Win32
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.All|x64.ActiveCfg = Release|x64
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.All|x64.Build.0 = Release|x64
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.Debug|Win32.ActiveCfg = Debug|Win32
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.Debug|Win32.Build.0 = Debug|Win32
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.Debug|x64.ActiveCfg = Debug|x64
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.Debug|x64.Build.0 = Debug|x64
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.Release|Win32.ActiveCfg = Release|Win32
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.Release|Win32.Build.0 = Release|Win32
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.Release|x64.ActiveCfg = Release|x64
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16}.Release|x64.Build.0 = Release|x64
{8484C90D-1561-402F-A91D-2DB10F8C5171}.All|Win32.ActiveCfg = Release|Win32
{8484C90D-1561-402F-A91D-2DB10F8C5171}.All|Win32.Build.0 = Release|Win32
{8484C90D-1561-402F-A91D-2DB10F8C5171}.All|x64.ActiveCfg = Release|x64
{8484C90D-1561-402F-A91D-2DB10F8C5171}.All|x64.Build.0 = Release|x64
{8484C90D-1561-402F-A91D-2DB10F8C5171}.Debug|Win32.ActiveCfg = Debug|Win32
{8484C90D-1561-402F-A91D-2DB10F8C5171}.Debug|Win32.Build.0 = Debug|Win32
{8484C90D-1561-402F-A91D-2DB10F8C5171}.Debug|x64.ActiveCfg = Debug|x64
{8484C90D-1561-402F-A91D-2DB10F8C5171}.Debug|x64.Build.0 = Debug|x64
{8484C90D-1561-402F-A91D-2DB10F8C5171}.Release|Win32.ActiveCfg = Release|Win32
{8484C90D-1561-402F-A91D-2DB10F8C5171}.Release|Win32.Build.0 = Release|Win32
{8484C90D-1561-402F-A91D-2DB10F8C5171}.Release|x64.ActiveCfg = Release|x64
{8484C90D-1561-402F-A91D-2DB10F8C5171}.Release|x64.Build.0 = Release|x64
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.All|Win32.ActiveCfg = Release|Win32
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.All|Win32.Build.0 = Release|Win32
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.All|x64.ActiveCfg = Release|x64
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.All|x64.Build.0 = Release|x64
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.Debug|Win32.ActiveCfg = Debug|Win32
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.Debug|Win32.Build.0 = Debug|Win32
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.Debug|x64.ActiveCfg = Debug|x64
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.Debug|x64.Build.0 = Debug|x64
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.Release|Win32.ActiveCfg = Release|Win32
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.Release|Win32.Build.0 = Release|Win32
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.Release|x64.ActiveCfg = Release|x64
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782}.Release|x64.Build.0 = Release|x64
{64E99CCA-3C6F-4AEB-9FA3-CFAC711257BB}.All|Win32.ActiveCfg = Release|Win32
{64E99CCA-3C6F-4AEB-9FA3-CFAC711257BB}.All|Win32.Build.0 = Release|Win32
{64E99CCA-3C6F-4AEB-9FA3-CFAC711257BB}.All|x64.ActiveCfg = Release|x64
@@ -1966,30 +1700,6 @@ Global
{DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74}.Release|Win32.Build.0 = Release|Win32
{DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74}.Release|x64.ActiveCfg = Release|x64
{DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74}.Release|x64.Build.0 = Release|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.All|Win32.ActiveCfg = Release|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.All|Win32.Build.0 = Release|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.All|x64.ActiveCfg = Release|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.All|x64.Build.0 = Release|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|Win32.ActiveCfg = Debug|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|Win32.Build.0 = Debug|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|x64.ActiveCfg = Debug|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|x64.Build.0 = Debug|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|Win32.ActiveCfg = Release|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|Win32.Build.0 = Release|Win32
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.ActiveCfg = Release|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.Build.0 = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.All|Win32.ActiveCfg = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.All|Win32.Build.0 = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.All|x64.ActiveCfg = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.All|x64.Build.0 = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.ActiveCfg = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|Win32.Build.0 = Debug|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.ActiveCfg = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug|x64.Build.0 = Debug|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.ActiveCfg = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64
{FBC7E2A4-B989-4289-BA7F-68F440E9EF8B}.All|Win32.ActiveCfg = Release|Win32
{FBC7E2A4-B989-4289-BA7F-68F440E9EF8B}.All|Win32.Build.0 = Release|Win32
{FBC7E2A4-B989-4289-BA7F-68F440E9EF8B}.All|x64.ActiveCfg = Release|x64
@@ -2372,6 +2082,18 @@ Global
{FED39CFF-E6CD-1C09-844D-F1174B8A5C18}.Release|Win32.Build.0 = Release|Win32
{FED39CFF-E6CD-1C09-844D-F1174B8A5C18}.Release|x64.ActiveCfg = Release|x64
{FED39CFF-E6CD-1C09-844D-F1174B8A5C18}.Release|x64.Build.0 = Release|x64
{19D12A4C-1036-4695-85B0-6030F6048233}.All|Win32.ActiveCfg = Debug|Win32
{19D12A4C-1036-4695-85B0-6030F6048233}.All|Win32.Build.0 = Debug|Win32
{19D12A4C-1036-4695-85B0-6030F6048233}.All|x64.ActiveCfg = Debug|x64
{19D12A4C-1036-4695-85B0-6030F6048233}.All|x64.Build.0 = Debug|x64
{19D12A4C-1036-4695-85B0-6030F6048233}.Debug|Win32.ActiveCfg = Debug|Win32
{19D12A4C-1036-4695-85B0-6030F6048233}.Debug|Win32.Build.0 = Debug|Win32
{19D12A4C-1036-4695-85B0-6030F6048233}.Debug|x64.ActiveCfg = Debug|x64
{19D12A4C-1036-4695-85B0-6030F6048233}.Debug|x64.Build.0 = Debug|x64
{19D12A4C-1036-4695-85B0-6030F6048233}.Release|Win32.ActiveCfg = Release|Win32
{19D12A4C-1036-4695-85B0-6030F6048233}.Release|Win32.Build.0 = Release|Win32
{19D12A4C-1036-4695-85B0-6030F6048233}.Release|x64.ActiveCfg = Release|x64
{19D12A4C-1036-4695-85B0-6030F6048233}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -2412,10 +2134,8 @@ Global
{B5881A85-FE70-4F64-8607-2CAAE52669C6} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{05515420-16DE-4E63-BE73-85BE85BA5142} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
{EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{0DF3ABD0-DDC0-4265-B778-07C66780979B} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{FEA1EEF7-876F-48DE-88BF-C0E3E606D758} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{9254C4B0-6F60-42B6-BB3A-36D63FC001C7} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
@@ -2448,26 +2168,18 @@ Global
{7EB71250-F002-4ED8-92CA-CA218114537A} = {4F227C26-768F-46A3-8684-1D08A46FB374}
{464AAB78-5489-4916-BE51-BF8D61822311} = {4F227C26-768F-46A3-8684-1D08A46FB374}
{66444AEE-554C-11DD-A9F0-8C5D56D89593} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}
{E316772F-5D8F-4F2A-8F71-094C3E859D34} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{D3D8B329-20BE-475E-9E83-653CEA0E0EF5} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{38FE0559-9910-43A8-9E45-3E5004C27692} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
{0FEEAEC6-4399-4C46-B7DB-62ECE80D15B4} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{B6A9FB7A-1CC4-442B-812D-EC33E4E4A36E} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
{7B42BDA1-72C0-4378-A9B6-5C530F8CD61E} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{419C8F80-D858-4B48-A25C-AF4007608137} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{B3F424EC-3D8F-417C-B244-3919D5E1A577} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{14E4A972-9CFB-436D-B0A5-4943F3F80D47} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{1BC8A8EC-E03B-44DF-BCD9-088650F4D29C} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{0B6C905B-142E-4999-B39D-92FF7951E921} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{CF405366-9558-4AE8-90EF-5E21B51CCB4E} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{329FD5B0-EF28-4606-86D0-F6EA21CF8E36} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{1A3793D1-05D1-4B57-9B0F-5AF3E79DC439} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{E972C52F-9E85-4D65-B19C-031E511E9DB4} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{03207781-0D1C-4DB3-A71D-45C608F28DBD} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{9A5DDF08-C88C-4A35-B7F6-D605228446BD} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{05C9FB27-480E-4D53-B3B7-6338E2526666} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{CC1DD008-9406-448D-A0AD-33C3186CFADB} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{48414740-C693-4968-9846-EE058020C64F} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
@@ -2480,12 +2192,9 @@ Global
{3C977801-FE88-48F2-83D3-FA2EBFF6688E} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{0382E8FD-CFDC-41C0-8B03-792C7C84FC31} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
{432DB165-1EB2-4781-A9C0-71E62610B20A} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{CF70F278-3364-4395-A2E1-23501C9B8AD2} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{D5C87B19-150D-4EF3-A671-96589BD2D14A} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{ABB71A76-42B0-47A4-973A-42E3D920C6FD} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{EF300386-A8DF-4372-B6D8-FB9BFFCA9AED} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{AFA983D6-4569-4F88-BA94-555ED00FD9A8} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{56B91D01-9150-4BBF-AFA1-5B68AB991B76} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{990BAA76-89D3-4E38-8479-C7B28784EFC8} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{1E21AFE0-6FDB-41D2-942D-863607C24B91} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{2E250296-0C08-4342-9C8A-BCBDD0E7DF65} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
@@ -2495,7 +2204,6 @@ Global
{5C2B4D88-3BEA-4FE0-90DF-FA9836099D5F} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{7C22BDFF-CC09-400C-8A09-660733980028} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
{8CDA2B34-FA44-49CC-9EC2-B8F35856CD15} = {6CD61A1D-797C-470A-BE08-8C31B68BB336}
{23B4D303-79FC-49E0-89E2-2280E7E28940} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{47886A6C-CCA6-4F9F-A7D4-F97D06FB2B1A} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{50AAC2CE-BFC9-4912-87CC-C6381850D735} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{A61D7CB4-75A5-4A55-8CA1-BE5AF615D921} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
@@ -2503,7 +2211,6 @@ Global
{2469B306-B027-4FF2-8815-C9C1EA2CAE79} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{9DE35039-A8F6-4FBF-B1B6-EB527F802411} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9} = {9DE35039-A8F6-4FBF-B1B6-EB527F802411}
{BED7539C-0099-4A14-AD5D-30828F15A171} = {9DE35039-A8F6-4FBF-B1B6-EB527F802411}
{0D108721-EAE8-4BAF-8102-D8960EC93647} = {9DE35039-A8F6-4FBF-B1B6-EB527F802411}
@@ -2511,12 +2218,6 @@ Global
{B535402E-38D2-4D54-8360-423ACBD17192} = {9DE35039-A8F6-4FBF-B1B6-EB527F802411}
{2386B892-35F5-46CF-A0F0-10394D2FBF9B} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{85F0CF8C-C7AB-48F6-BA19-CC94CF87F981} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{ED2CA8B5-8E91-4296-A120-02BB0B674652} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{FD60942F-72D6-4CA1-8B57-EA1D1B95A89E} = {ED2CA8B5-8E91-4296-A120-02BB0B674652}
{245603E3-F580-41A5-9632-B25FE3372CBF} = {ED2CA8B5-8E91-4296-A120-02BB0B674652}
{C303D2FC-FF97-49B8-9DDD-467B4C9A0B16} = {ED2CA8B5-8E91-4296-A120-02BB0B674652}
{8484C90D-1561-402F-A91D-2DB10F8C5171} = {ED2CA8B5-8E91-4296-A120-02BB0B674652}
{9C4961D2-5DDB-40C7-9BE8-CA918DC4E782} = {ED2CA8B5-8E91-4296-A120-02BB0B674652}
{64E99CCA-3C6F-4AEB-9FA3-CFAC711257BB} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}
{EDDB8AB9-C53E-44C0-A620-0E86C2CBD5D5} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{5BA0D5BD-330D-4EE2-B959-CAFEA04E50E0} = {0C808854-54D1-4230-BFF5-77B5FD905000}
@@ -2524,8 +2225,6 @@ Global
{5B2BACE4-0F5A-4A21-930D-C0F4B1F58FA6} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{B6E22500-3DB6-4E6E-8CD5-591B781D7D99} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{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}
{7AEE504B-23B6-4B05-829E-7CD34855F146} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{87933C2D-0159-46F7-B326-E1B6E982C21E} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
@@ -2558,6 +2257,7 @@ Global
{3745B86B-6BE8-3E67-FCB9-BE62A6131D67} = {9388C266-C3FC-468A-92EF-0CBC35941412}
{E9FF8127-D5F0-2398-59EB-702CE55F7800} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{FED39CFF-E6CD-1C09-844D-F1174B8A5C18} = {9388C266-C3FC-468A-92EF-0CBC35941412}
{19D12A4C-1036-4695-85B0-6030F6048233} = {9388C266-C3FC-468A-92EF-0CBC35941412}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {09840DE7-9208-45AA-9667-1A71EE93BD1E}
-12
View File
@@ -1246,14 +1246,6 @@ Copyright: 2000-2005 The Apache Software Foundation or its licensors
1992-1996 Regents of the University of Michigan
License: Apache-2.0 and OpenLDAP and BSD-like
Files: libs/miniupnpc/*
Copyright: 2005-2009, Thomas Bernard
License: BSD-3-clause
Files: libs/miniupnpc/bsdqueue.h
Copyright: 1991,1993, The Regents of the University of California
License: BSD-3-clause
Files: libs/js/*
Copyright: 1998-2006 Mozilla <http://www.mozilla.org/>
1996-2000 Netscape Communications Corporation
@@ -1562,10 +1554,6 @@ Files: libs/libtpl-1.5/src/tpl.[ch]
Copyright: 2005-2010, Troy D. Hanson
License: BSD-2-clause
Files: libs/libnatpmp/*
Copyright: 2007-2008, Thomas BERNARD <miniupnp@free.fr>
License: ISC
Files: libs/libwebsockets/*
Copyright: 2010-2011 Andy Green <andy@warmcat.com>
License: LGPL
+60 -25
View File
@@ -179,10 +179,9 @@ libfreeswitch_libyuv_la_SOURCES = \
libs/libyuv/source/compare.cc \
libs/libyuv/source/compare_common.cc \
libs/libyuv/source/compare_gcc.cc \
libs/libyuv/source/compare_mmi.cc \
libs/libyuv/source/compare_msa.cc \
libs/libyuv/source/compare_neon64.cc \
libs/libyuv/source/compare_hvx.cc \
libs/libyuv/source/compare_neon.cc \
libs/libyuv/source/compare_wasm.cc \
libs/libyuv/source/compare_win.cc \
libs/libyuv/source/convert_argb.cc \
libs/libyuv/source/convert.cc \
@@ -200,40 +199,87 @@ libs/libyuv/source/rotate_argb.cc \
libs/libyuv/source/rotate.cc \
libs/libyuv/source/rotate_common.cc \
libs/libyuv/source/rotate_gcc.cc \
libs/libyuv/source/rotate_mmi.cc \
libs/libyuv/source/rotate_msa.cc \
libs/libyuv/source/rotate_neon64.cc \
libs/libyuv/source/rotate_hvx.cc \
libs/libyuv/source/rotate_lasx.cc \
libs/libyuv/source/rotate_lsx.cc \
libs/libyuv/source/rotate_neon.cc \
libs/libyuv/source/rotate_rvv.cc \
libs/libyuv/source/rotate_wasm.cc \
libs/libyuv/source/rotate_win.cc \
libs/libyuv/source/row_any.cc \
libs/libyuv/source/row_common.cc \
libs/libyuv/source/row_gcc.cc \
libs/libyuv/source/row_mmi.cc \
libs/libyuv/source/row_msa.cc \
libs/libyuv/source/row_neon64.cc \
libs/libyuv/source/row_hvx.cc \
libs/libyuv/source/row_lasx.cc \
libs/libyuv/source/row_lsx.cc \
libs/libyuv/source/row_neon.cc \
libs/libyuv/source/row_rvv.cc \
libs/libyuv/source/row_wasm.cc \
libs/libyuv/source/row_win.cc \
libs/libyuv/source/scale_any.cc \
libs/libyuv/source/scale_argb.cc \
libs/libyuv/source/scale.cc \
libs/libyuv/source/scale_common.cc \
libs/libyuv/source/scale_gcc.cc \
libs/libyuv/source/scale_mmi.cc \
libs/libyuv/source/scale_msa.cc \
libs/libyuv/source/scale_neon64.cc \
libs/libyuv/source/scale_hvx.cc \
libs/libyuv/source/scale_lsx.cc \
libs/libyuv/source/scale_neon.cc \
libs/libyuv/source/scale_rgb.cc \
libs/libyuv/source/scale_rvv.cc \
libs/libyuv/source/scale_uv.cc \
libs/libyuv/source/scale_wasm.cc \
libs/libyuv/source/scale_win.cc \
libs/libyuv/source/video_common.cc
libfreeswitch_libyuv_la_CPPFLAGS = -O2 -fomit-frame-pointer -Ilibs/libyuv/include
libfreeswitch_libyuv_la_LIBADD =
# libyuv's AArch64 dot-product (udot), i8mm (usdot), SVE and SME kernels emit
# instructions outside the baseline armv8-a target and are selected at runtime
# by libyuv's own CPU detection. Build them as separate objects with the
# required -march flags so the rest of the library stays portable to any
# armv8-a CPU. This mirrors libs/libyuv/CMakeLists.txt.
if LIBYUV_AARCH64
noinst_LTLIBRARIES += libfreeswitch_libyuv_neon64.la
libfreeswitch_libyuv_neon64_la_SOURCES = \
libs/libyuv/source/compare_neon64.cc \
libs/libyuv/source/rotate_neon64.cc \
libs/libyuv/source/row_neon64.cc \
libs/libyuv/source/scale_neon64.cc
libfreeswitch_libyuv_neon64_la_CPPFLAGS = $(libfreeswitch_libyuv_la_CPPFLAGS)
libfreeswitch_libyuv_neon64_la_CXXFLAGS = -march=armv8.2-a+dotprod+i8mm
libfreeswitch_libyuv_la_LIBADD += libfreeswitch_libyuv_neon64.la
noinst_LTLIBRARIES += libfreeswitch_libyuv_sve.la
libfreeswitch_libyuv_sve_la_SOURCES = \
libs/libyuv/source/rotate_sve.cc \
libs/libyuv/source/row_sve.cc
libfreeswitch_libyuv_sve_la_CPPFLAGS = $(libfreeswitch_libyuv_la_CPPFLAGS)
libfreeswitch_libyuv_sve_la_CXXFLAGS = -march=armv8.5-a+i8mm+sve2
libfreeswitch_libyuv_la_LIBADD += libfreeswitch_libyuv_sve.la
if LIBYUV_AARCH64_SME
noinst_LTLIBRARIES += libfreeswitch_libyuv_sme.la
libfreeswitch_libyuv_sme_la_SOURCES = \
libs/libyuv/source/rotate_sme.cc \
libs/libyuv/source/row_sme.cc \
libs/libyuv/source/scale_sme.cc
libfreeswitch_libyuv_sme_la_CPPFLAGS = $(libfreeswitch_libyuv_la_CPPFLAGS)
libfreeswitch_libyuv_sme_la_CXXFLAGS = -march=armv8.5-a+i8mm+sme
libfreeswitch_libyuv_la_LIBADD += libfreeswitch_libyuv_sme.la
else
libfreeswitch_libyuv_la_CPPFLAGS += -DLIBYUV_DISABLE_SME
endif
endif
CORE_LIBS+=libfreeswitch_libyuv.la
endif
lib_LTLIBRARIES = libfreeswitch.la
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(SQLITE_CFLAGS) $(GUMBO_CFLAGS) $(FVAD_CFLAGS) $(FREETYPE_CFLAGS) $(CURL_CFLAGS) $(PCRE2_CFLAGS) $(SPEEX_CFLAGS) $(LIBEDIT_CFLAGS) $(openssl_CFLAGS) $(SOFIA_SIP_CFLAGS) $(AM_CFLAGS) $(TPL_CFLAGS)
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(SQLITE_CFLAGS) $(GUMBO_CFLAGS) $(FVAD_CFLAGS) $(FREETYPE_CFLAGS) $(CURL_CFLAGS) $(PCRE2_CFLAGS) $(SPEEX_CFLAGS) $(MINIUPNPC_CFLAGS) $(LIBEDIT_CFLAGS) $(openssl_CFLAGS) $(SOFIA_SIP_CFLAGS) $(AM_CFLAGS) $(TPL_CFLAGS)
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(PLATFORM_CORE_LDFLAGS) -no-undefined
libfreeswitch_la_LIBADD = $(CORE_LIBS) $(APR_LIBS) $(SQLITE_LIBS) $(GUMBO_LIBS) $(FVAD_LIBS) $(FREETYPE_LIBS) $(CURL_LIBS) $(PCRE2_LIBS) $(SPEEX_LIBS) $(LIBEDIT_LIBS) $(SYSTEMD_LIBS) $(openssl_LIBS) $(PLATFORM_CORE_LIBS) $(TPL_LIBS) $(SPANDSP_LIBS) $(SOFIA_SIP_LIBS)
libfreeswitch_la_LIBADD = $(CORE_LIBS) $(APR_LIBS) $(SQLITE_LIBS) $(GUMBO_LIBS) $(FVAD_LIBS) $(FREETYPE_LIBS) $(CURL_LIBS) $(PCRE2_LIBS) $(SPEEX_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(LIBEDIT_LIBS) $(SYSTEMD_LIBS) $(openssl_LIBS) $(PLATFORM_CORE_LIBS) $(TPL_LIBS) $(SPANDSP_LIBS) $(SOFIA_SIP_LIBS)
libfreeswitch_la_DEPENDENCIES = $(BUILT_SOURCES)
if HAVE_PNG
@@ -384,17 +430,6 @@ libfreeswitch_la_SOURCES = \
src/switch_vpx.c \
libs/libteletone/src/libteletone_detect.c \
libs/libteletone/src/libteletone_generate.c \
libs/miniupnpc/miniwget.c \
libs/miniupnpc/minixml.c \
libs/miniupnpc/igd_desc_parse.c \
libs/miniupnpc/minisoap.c \
libs/miniupnpc/miniupnpc.c \
libs/miniupnpc/upnpreplyparse.c \
libs/miniupnpc/upnpcommands.c \
libs/miniupnpc/minissdpc.c \
libs/miniupnpc/upnperrors.c \
libs/libnatpmp/natpmp.c \
libs/libnatpmp/getgateway.c \
src/switch_uuidv7.c
if ENABLE_CPP
+2 -2
View File
@@ -6,8 +6,8 @@
# in that same directory.
#
#
RPMS=git gcc-c++ autoconf automake libtool wget ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre2-devel speex-devel ldns-devel libedit-devel
DEBS=git build-essential automake autoconf 'libtool-bin|libtool' wget uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre2-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev pkg-config
RPMS=git gcc-c++ autoconf automake libtool wget ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre2-devel speex-devel miniupnpc-devel libnatpmp-devel ldns-devel libedit-devel
DEBS=git build-essential automake autoconf 'libtool-bin|libtool' wget uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre2-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev libminiupnpc-dev libnatpmp-dev perl libgdbm-dev libdb-dev bison libvlc-dev pkg-config
freeswitch: deps has-git freeswitch.git/Makefile
cd freeswitch.git && make
-34
View File
@@ -1,34 +0,0 @@
#!/bin/sh
TAR=@TAR@
ZCAT=@ZCAT@
WGET=@WGET@
CURL=@CURL@
if [ -f "$WGET" ] ; then
DOWNLOAD_CMD=$WGET
else
if [ -f "$CURL" ] ; then
DOWNLOAD_CMD="$CURL -L -O"
fi
fi
base=http://files.freeswitch.org/g729/
tarfile=$1
url=`echo $tarfile | grep "://"`
if [ ! -z $url ] ; then
base=$tarfile/
tarfile=$2
fi
if [ ! -f $tarfile ] ; then
$DOWNLOAD_CMD $base$tarfile
if [ ! -f $tarfile ] ; then
echo cannot find $tarfile
exit 1
fi
fi
exit 0
-1
View File
@@ -52,7 +52,6 @@ codecs/mod_amr
codecs/mod_b64
#codecs/mod_bv
#codecs/mod_codec2
#codecs/mod_com_g729
codecs/mod_g723_1
codecs/mod_g729
#codecs/mod_ilbc
-1
View File
@@ -52,7 +52,6 @@ codecs/mod_amrwb
codecs/mod_b64
codecs/mod_bv
codecs/mod_codec2
#codecs/mod_com_g729
codecs/mod_g723_1
codecs/mod_g729
codecs/mod_ilbc
+1 -1
View File
@@ -1 +1 @@
1.11.3-release
1.11.4-release
+13 -3
View File
@@ -131,14 +131,24 @@ build_freeswitch()
;;
"scan-build")
if ! command -v scan-build-14 > /dev/null 2>&1; then
echo "Error: scan-build-14 command not found. Please ensure clang static analyzer is installed." >&2
# Use scan-build-14 for bookworm, default scan-build otherwise
DEBIAN_CODENAME=$(. /etc/os-release && echo "$VERSION_CODENAME")
if [[ "$DEBIAN_CODENAME" == "bookworm" ]]; then
SCAN_BUILD_CMD="scan-build-14"
else
SCAN_BUILD_CMD="scan-build"
fi
if ! command -v $SCAN_BUILD_CMD > /dev/null 2>&1; then
echo "Error: $SCAN_BUILD_CMD command not found. Please ensure clang static analyzer is installed." >&2
exit 1
fi
echo "Using: $SCAN_BUILD_CMD (Debian: $DEBIAN_CODENAME)"
mkdir -p scan-build
scan-build-14 \
$SCAN_BUILD_CMD \
--force-analyze-debug-code \
--status-bugs \
-o ./scan-build/ \
@@ -33,6 +33,5 @@
<load module="mod_xml_curl"/>
<load module="mod_say_en"/>
<load module="mod_com_amd"/>
<load module="mod_com_g729"/>
</modules>
</configuration>
+4
View File
@@ -107,6 +107,10 @@
<!-- extended info parsing -->
<!-- <param name="extended-info-parsing" value="true"/> -->
<!-- with extended-info-parsing on, lets an INFO body of content type freeswitch/api-request
run FreeSWITCH API commands, so enable only for trusted peers -->
<!-- <param name="enable-info-api-request" value="true"/> -->
<!--<param name="aggressive-nat-detection" value="true"/>-->
<!--
There are known issues (asserts and segfaults) when 100rel is enabled.
@@ -26,6 +26,12 @@
Prefer the fsapi method with jsonrpc-allowed-fsapi, which allow-lists commands
per user. This param is here for clients that already use api+<command>. -->
<!-- <param name="enable-chat-api-proto" value="true"/> -->
<!-- login userVariables become channel variables on calls from that socket.
Their names are prefixed with verto_uvar_, which keeps them clear of the
names FreeSWITCH acts on itself. Setting this false stores them under the
names the client sent and is not recommended: it is here only for clients
and dialplan that still expect the unprefixed names. -->
<!-- <param name="enable-uservars-namespace" value="false"/> -->
<param name="mcast-ip" value="224.1.1.1"/>
<param name="mcast-port" value="1337"/>
<param name="rtp-ip" value="$${local_ip_v4}"/>
@@ -52,6 +58,7 @@
<!-- setting this to true will allow anyone to register even with no account so use with care -->
<param name="blind-reg" value="false"/>
<!-- <param name="enable-chat-api-proto" value="true"/> -->
<!-- <param name="enable-uservars-namespace" value="false"/> -->
<param name="rtp-ip" value="$${local_ip_v6}"/>
<!-- <param name="ext-rtp-ip" value=""/> -->
<param name="outbound-codec-string" value="opus,h264,vp8"/>
+4
View File
@@ -107,6 +107,10 @@
<!-- extended info parsing -->
<!-- <param name="extended-info-parsing" value="true"/> -->
<!-- with extended-info-parsing on, lets an INFO body of content type freeswitch/api-request
run FreeSWITCH API commands, so enable only for trusted peers -->
<!-- <param name="enable-info-api-request" value="true"/> -->
<!-- lets an inbound MESSAGE to api+<command> run FreeSWITCH API commands, so enable only for trusted peers -->
<!-- <param name="enable-chat-api-proto" value="true"/> -->
+36 -8
View File
@@ -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.3-release], bugs@freeswitch.org)
AC_INIT([freeswitch], [1.11.4-release], bugs@freeswitch.org)
AC_SUBST(SWITCH_VERSION_MAJOR, [1])
AC_SUBST(SWITCH_VERSION_MINOR, [11])
AC_SUBST(SWITCH_VERSION_MICRO, [3-release])
AC_SUBST(SWITCH_VERSION_MICRO, [4-release])
AC_SUBST(SWITCH_VERSION_REVISION, [])
AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, [])
@@ -549,6 +549,28 @@ AC_ARG_ENABLE(libyuv,
AM_CONDITIONAL([ENABLE_LIBYUV],[test "${enable_libyuv}" = "yes"])
# libyuv's AArch64 SIMD kernels (dot-product, i8mm, SVE, SME) use instructions
# outside the baseline armv8-a target, so they must be compiled with per-file
# -march flags (see Makefile.am). These conditionals mirror the logic in
# libs/libyuv/CMakeLists.txt.
AM_CONDITIONAL([LIBYUV_AARCH64],
[test "x$host_cpu" = "xaarch64" || test "x$host_cpu" = "xarm64"])
libyuv_have_sme=no
AS_IF([test "x$host_cpu" = "xaarch64" || test "x$host_cpu" = "xarm64"], [
AC_LANG_PUSH([C])
libyuv_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -march=armv8.5-a+i8mm+sme"
AC_MSG_CHECKING([whether $CC supports AArch64 SME kernels])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[__arm_locally_streaming void func(void) { }
int main(void) { return 0; }]])],
[libyuv_have_sme=yes])
AC_MSG_RESULT([$libyuv_have_sme])
CFLAGS="$libyuv_save_CFLAGS"
AC_LANG_POP([C])
])
AM_CONDITIONAL([LIBYUV_AARCH64_SME], [test "x$libyuv_have_sme" = "xyes"])
AC_ARG_ENABLE(libvpx,
[AC_HELP_STRING([--disable-libvpx],[build without libvpx])],[enable_libvpx="$enableval"],[enable_libvpx="yes"])
@@ -710,7 +732,7 @@ PKG_CHECK_MODULES([SPANDSP], [spandsp >= 3.1.1],[
AC_MSG_ERROR([no usable spandsp; please install spandsp4 devel package or equivalent])
])
PKG_CHECK_MODULES([SOFIA_SIP], [sofia-sip-ua >= 1.13.18],[
PKG_CHECK_MODULES([SOFIA_SIP], [sofia-sip-ua >= 1.13.19],[
AM_CONDITIONAL([HAVE_SOFIA_SIP],[true])],[
AC_MSG_ERROR([no usable sofia-sip; please install sofia-sip-ua devel package or equivalent])
])
@@ -1249,8 +1271,6 @@ AC_PATH_PROGS(WGET, wget)
AC_PATH_PROGS(CURL, curl)
GETLIB="cd $switch_srcdir/libs && ${SHELL} $switch_builddir/build/getlib.sh"
AC_SUBST(GETLIB)
GETG729="cd $switch_srcdir/libs && ${SHELL} $switch_builddir/build/getg729.sh"
AC_SUBST(GETG729)
GETSOUNDS="${SHELL} $switch_builddir/build/getsounds.sh"
AC_SUBST(GETSOUNDS)
@@ -1326,6 +1346,12 @@ PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.6.20])
PKG_CHECK_MODULES([CURL], [libcurl >= 7.19])
PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.00])
PKG_CHECK_MODULES([SPEEX], [speex >= 1.2rc1 speexdsp >= 1.2rc1])
PKG_CHECK_MODULES([MINIUPNPC], [miniupnpc >= 2.1])
AC_CHECK_HEADER([natpmp.h], [], [AC_MSG_ERROR([no usable libnatpmp; please install libnatpmp devel package or equivalent])])
AC_CHECK_LIB([natpmp], [initnatpmp], [NATPMP_LIBS=-lnatpmp], [AC_MSG_ERROR([no usable libnatpmp; please install libnatpmp devel package or equivalent])])
AC_SUBST([NATPMP_LIBS])
PKG_CHECK_MODULES([LDNS], [libldns-fs >= 1.6.6],[
AM_CONDITIONAL([HAVE_LDNS],[true])],[
PKG_CHECK_MODULES([LDNS], [libldns >= 1.6.6],[
@@ -1726,7 +1752,11 @@ if test x$HAVE_OPENSSL = x1; then
openssl_CFLAGS="$openssl_CFLAGS -DHAVE_OPENSSL";
APR_ADDTO(SWITCH_AM_CFLAGS, -DHAVE_OPENSSL)
AC_CHECK_LIB(ssl, SSL_CTX_set_tlsext_use_srtp, AC_DEFINE_UNQUOTED(HAVE_OPENSSL_DTLS_SRTP, 1, HAVE_OPENSSL_DTLS_SRTP), AC_MSG_ERROR([OpenSSL >= 1.0.1e and associated developement headers required]))
AC_CHECK_LIB(ssl, DTLSv1_method, AC_DEFINE_UNQUOTED(HAVE_OPENSSL_DTLS, 1, HAVE_OPENSSL_DTLS), AC_MSG_ERROR([OpenSSL >= 1.0.1e and associaed developement headers required]))
dnl DTLS_method is what the code calls from OpenSSL 1.1.0 on; DTLSv1_method is
dnl the pre 1.1.0 spelling, deprecated since and gone from OpenSSL 4.
AC_CHECK_LIB(ssl, DTLS_method, AC_DEFINE_UNQUOTED(HAVE_OPENSSL_DTLS, 1, HAVE_OPENSSL_DTLS),
[AC_CHECK_LIB(ssl, DTLSv1_method, AC_DEFINE_UNQUOTED(HAVE_OPENSSL_DTLS, 1, HAVE_OPENSSL_DTLS),
AC_MSG_ERROR([OpenSSL >= 1.0.1e and associated development headers required]))])
AC_CHECK_LIB(ssl, DTLSv1_2_method, AC_DEFINE_UNQUOTED(HAVE_OPENSSL_DTLSv1_2_method, 1, [DTLS version 1.2 is available]))
else
AC_MSG_ERROR([OpenSSL >= 1.0.1e and associated developement headers required])
@@ -2089,7 +2119,6 @@ AC_CONFIG_FILES([Makefile
src/mod/codecs/mod_b64/Makefile
src/mod/codecs/mod_bv/Makefile
src/mod/codecs/mod_codec2/Makefile
src/mod/codecs/mod_com_g729/Makefile
src/mod/codecs/mod_g723_1/Makefile
src/mod/codecs/mod_g729/Makefile
src/mod/codecs/mod_ilbc/Makefile
@@ -2179,7 +2208,6 @@ AC_CONFIG_FILES([Makefile
src/include/switch_am_config.h
build/getsounds.sh
build/getlib.sh
build/getg729.sh
build/freeswitch.pc
build/standalone_module/freeswitch.pc
build/modmake.rules
+4 -3
View File
@@ -38,7 +38,6 @@ avoid_mods=(
applications/mod_osp
applications/mod_skel
applications/mod_cluechoo
codecs/mod_com_g729
codecs/mod_openh264
codecs/mod_siren
codecs/mod_skel_codec
@@ -304,6 +303,8 @@ Build-Depends:
libedit-dev (>= 2.11),
libsqlite3-dev,
libtiff5-dev,
libminiupnpc-dev (>= 2.1),
libnatpmp-dev,
wget, pkg-config,
yasm,
# core codecs
@@ -318,7 +319,7 @@ 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.18),
bison, zlib1g-dev, libsofia-sip-ua-dev (>= 1.13.19),
libspandsp4-dev,
# used to format the private freeswitch apt-repo key properly
gnupg,
@@ -357,7 +358,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.18)
Depends: \${shlibs:Depends}, \${misc:Depends}, libsofia-sip-ua0 (>= 1.13.19)
Recommends:
Suggests: libfreeswitch1-dbg
Conflicts: freeswitch-all (<= 1.6.7)
-4
View File
@@ -263,10 +263,6 @@ Description: mod_codec2
Adds mod_codec2.
Build-Depends: libcodec2-dev
Module: codecs/mod_com_g729
Description: mod_com_g729
Adds mod_com_g729.
Module: codecs/mod_g723_1
Description: mod_g723_1
Adds mod_g723_1.
-12
View File
@@ -1246,14 +1246,6 @@ Copyright: 2000-2005 The Apache Software Foundation or its licensors
1992-1996 Regents of the University of Michigan
License: Apache-2.0 and OpenLDAP and BSD-like
Files: libs/miniupnpc/*
Copyright: 2005-2009, Thomas Bernard
License: BSD-3-clause
Files: libs/miniupnpc/bsdqueue.h
Copyright: 1991,1993, The Regents of the University of California
License: BSD-3-clause
Files: libs/js/*
Copyright: 1998-2006 Mozilla <http://www.mozilla.org/>
1996-2000 Netscape Communications Corporation
@@ -1557,10 +1549,6 @@ Files: libs/libtpl-1.5/src/tpl.[ch]
Copyright: 2005-2010, Troy D. Hanson
License: BSD-2-clause
Files: libs/libnatpmp/*
Copyright: 2007-2008, Thomas BERNARD <miniupnp@free.fr>
License: ISC
Files: libs/libwebsockets/*
Copyright: 2010-2011 Andy Green <andy@warmcat.com>
License: LGPL
-8
View File
@@ -1,13 +1,5 @@
Rules:
rules:
-
Glob: libs/miniupnpc/*
Matches: Thomas\sBERNARD
Copyright: Thomas Bernard
-
Glob: libs/miniupnpc/bsdqueue.h
Matches: The\sRegents\sof\sthe\sUniversity\sof\sCalifornia.\s+All\srights\sreserved.
Copyright: The Regents of the University of California.
-
Glob: libs/sofia-sip/libsofia-sip-ua/su/poll.c
Matches: Free\sSoftware\sFoundation,\sInc.
+3 -3
View File
@@ -100,9 +100,9 @@ getlib () {
getlibs () {
# get pinned libraries
getlib http://files.freeswitch.org/downloads/libs/sphinxbase-0.8.tar.gz
getlib http://files.freeswitch.org/downloads/libs/pocketsphinx-0.8.tar.gz
getlib http://files.freeswitch.org/downloads/libs/communicator_semi_6000_20080321.tar.gz
getlib https://github.com/freeswitch/windows-deps/releases/download/sphinxbase-0.8/sphinxbase-0.8.tar.gz
getlib https://github.com/freeswitch/windows-deps/releases/download/pocketsphinx-0.8/pocketsphinx-0.8.tar.gz
getlib https://github.com/freeswitch/windows-deps/releases/download/communicator_semi_6000_20080321/communicator_semi_6000_20080321.tar.gz
#getlib http://download.zeromq.org/zeromq-2.1.9.tar.gz \
# || getlib http://download.zeromq.org/historic/zeromq-2.1.9.tar.gz
#getlib http://files.freeswitch.org/downloads/libs/v8-3.24.14.tar.bz2
+2 -2
View File
@@ -1240,8 +1240,8 @@ SEARCH_INCLUDES = YES
# contain include files that are not input files but should be processed by
# the preprocessor.
INCLUDE_PATH =../libs/apr ../libs/apr-util ../libs/libnatpmp \
../libs/miniupnpc ../libs/sofia-sip ../libs/spandsp \
INCLUDE_PATH =../libs/apr ../libs/apr-util \
../libs/sofia-sip ../libs/spandsp \
../libs/srtp ../libs/win32 ../libs/xmlrpc-c
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+8 -4
View File
@@ -110,9 +110,9 @@ Vendor: http://www.freeswitch.org/
#
######################################################################################################################
Source0: http://files.freeswitch.org/%{name}-%{nonparsedversion}.tar.bz2
Source1: http://files.freeswitch.org/downloads/libs/communicator_semi_6000_20080321.tar.gz
Source2: http://files.freeswitch.org/downloads/libs/pocketsphinx-0.8.tar.gz
Source3: http://files.freeswitch.org/downloads/libs/sphinxbase-0.8.tar.gz
Source1: https://github.com/freeswitch/windows-deps/releases/download/communicator_semi_6000_20080321/communicator_semi_6000_20080321.tar.gz
Source2: https://github.com/freeswitch/windows-deps/releases/download/pocketsphinx-0.8/pocketsphinx-0.8.tar.gz
Source3: https://github.com/freeswitch/windows-deps/releases/download/sphinxbase-0.8/sphinxbase-0.8.tar.gz
Prefix: %{prefix}
@@ -131,10 +131,12 @@ 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.18
BuildRequires: sofia-sip-devel >= 1.13.19
BuildRequires: spandsp4-devel >= 3.1.1
BuildRequires: pcre2-devel
BuildRequires: speex-devel
BuildRequires: miniupnpc-devel >= 2.1
BuildRequires: libnatpmp-devel
BuildRequires: sqlite-devel >= 3.6.20
BuildRequires: libtiff-devel
BuildRequires: libedit-devel
@@ -149,6 +151,8 @@ BuildRequires: libsndfile-devel
Requires: curl >= 7.19
Requires: pcre2
Requires: speex
Requires: miniupnpc >= 2.1
Requires: libnatpmp
Requires: sqlite >= 3.6.20
Requires: libtiff
Requires: libedit
+2 -3
View File
@@ -52,7 +52,6 @@ opal
/broadvoice/src/Makefile.in
/broadvoice/src/stamp-h1
/broadvoice/tests/regression_tests.sh
/celt-*/
/Communicator_semi_40.cd_semi_6000/
/esl/Debug/
/esl/Release/
@@ -479,7 +478,6 @@ opal
/tiff-*/tools/tiffmedian
/tiff-*/tools/tiffset
/tiff-*/tools/tiffsplit
/win32/celt/*/*/libcelt.log
/win32/libg722_1/*/*/libg722_1.log
/win32/libshout/*/*/libshout.log
/win32/tmp*.bat
@@ -522,7 +520,6 @@ opal
/broadvoice/broadvoice.spec
/zeromq-*/
/jpeg-8d/
/libnode-*/
/libnode-*.zip
@@ -539,6 +536,7 @@ libg722_1/config/compile
srtp/build/compile
/pcre-*/
/speex-*/
/speexdsp-*/
/curl-*/
/sqlite-*.zip
/sqlite-*/
@@ -577,3 +575,4 @@ win32/spandsp/spandsp.h
win32/spandsp/win32
libcodec2-*
ffmpeg-*
opus-*
-43
View File
@@ -1,43 +0,0 @@
$Id: Changelog.txt,v 1.14 2009/03/10 10:15:30 nanard Exp $
2009/03/10:
Trying to have windows get gateway working if not using DHCP
2009/02/27:
dont include declspec.h if not under WIN32.
2009/01/23:
Prefixed the libraries name with lib
2008/10/06:
Fixed a memory leak in getdefaultgateway() (USE_SYSCTL_NET_ROUTE)
2008/07/03:
Adding WIN32 code from Robbie Hanson
2008/06/30:
added a Solaris implementation for getgateway().
added a LICENCE file to the distribution
2008/05/29:
Anonymous unions are forbidden in ANSI C. That was causing problems with
non-GCC compilers.
2008/04/28:
introduced strnatpmperr()
improved natpmpc.c sample
make install now install the binary
2007/12/13:
Fixed getgateway.c for working under OS X ;)
Fixed values for NATPMP_PROTOCOL_TCP and NATPMP_PROTOCOL_UDP
2007/12/11:
Fixed getgateway.c for compilation under Mac OS X
2007/12/01:
added some comments in .h
2007/11/30:
implemented almost everything
-26
View File
@@ -1,26 +0,0 @@
Copyright (c) 2007-2008, Thomas BERNARD
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-75
View File
@@ -1,75 +0,0 @@
# $Id: Makefile,v 1.7 2009/01/23 19:05:04 nanard Exp $
# This Makefile is designed for use with GNU make
# libnatpmp
# (c) 2007-2009 Thomas Bernard
# http://miniupnp.free.fr/libnatpmp.html
CC = gcc
INSTALL = install
# APIVERSION is used in soname
APIVERSION = 0
CFLAGS = -O -fPIC -Wall -DENABLE_STRNATPMPERR
LIBOBJS = natpmp.o getgateway.o
OBJS = $(LIBOBJS) testgetgateway.o natpmpc.o
STATICLIB = libnatpmp.a
SHAREDLIB = libnatpmp.so
SONAME = $(SHAREDLIB).$(APIVERSION)
HEADERS = natpmp.h
EXECUTABLES = testgetgateway natpmpc-shared natpmpc-static
INSTALLPREFIX ?= $(PREFIX)/usr
INSTALLDIRINC = $(INSTALLPREFIX)/include
INSTALLDIRLIB = $(INSTALLPREFIX)/lib
INSTALLDIRBIN = $(INSTALLPREFIX)/bin
.PHONY: all clean depend install cleaninstall
all: $(STATICLIB) $(SHAREDLIB) $(EXECUTABLES)
clean:
$(RM) $(OBJS) $(EXECUTABLES) $(STATICLIB) $(SHAREDLIB)
depend:
makedepend -f$(MAKEFILE_LIST) -Y $(OBJS:.o=.c) 2>/dev/null
install: $(HEADERS) $(STATICLIB) $(SHAREDLIB)
$(INSTALL) -d $(INSTALLDIRINC)
$(INSTALL) --mode=644 $(HEADERS) $(INSTALLDIRINC)
$(INSTALL) -d $(INSTALLDIRLIB)
$(INSTALL) --mode=644 $(STATICLIB) $(INSTALLDIRLIB)
$(INSTALL) --mode=644 $(SHAREDLIB) $(INSTALLDIRLIB)/$(SONAME)
$(INSTALL) --mode=755 natpmpc-shared $(INSTALLDIRBIN)/natpmpc
ln --symbolic --force $(SONAME) $(INSTALLDIRLIB)/$(SHAREDLIB)
cleaninstall:
$(RM) $(addprefix $(INSTALLDIRINC), $(HEADERS))
$(RM) $(INSTALLDIRLIB)/$(SONAME)
$(RM) $(INSTALLDIRLIB)/$(SHAREDLIB)
$(RM) $(INSTALLDIRLIB)/$(STATICLIB)
testgetgateway: testgetgateway.o getgateway.o
natpmpc-static: natpmpc.o $(STATICLIB)
$(CC) -o $@ $^
natpmpc-shared: natpmpc.o $(SHAREDLIB)
$(CC) -o $@ $^
$(STATICLIB): $(LIBOBJS)
$(AR) crs $@ $?
$(SHAREDLIB): $(LIBOBJS)
$(CC) -shared -Wl,-soname,$(SONAME) -o $@ $^
# DO NOT DELETE
natpmp.o: natpmp.h getgateway.h
getgateway.o: getgateway.h
testgetgateway.o: getgateway.h
natpmpc.o: natpmp.h
-17
View File
@@ -1,17 +0,0 @@
@echo Compile getgateway
gcc -c -Wall -Os -DWIN32 -DSTATICLIB -DENABLE_STRNATPMPERR getgateway.c
gcc -c -Wall -Os -DWIN32 -DSTATICLIB -DENABLE_STRNATPMPERR testgetgateway.c
gcc -o testgetgateway getgateway.o testgetgateway.o -lws2_32
@echo Compile natpmp:
gcc -c -Wall -Os -DWIN32 -DSTATICLIB -DENABLE_STRNATPMPERR getgateway.c
gcc -c -Wall -Os -DWIN32 -DSTATICLIB -DENABLE_STRNATPMPERR natpmp.c
gcc -c -Wall -Os -DWIN32 -DSTATICLIB -DENABLE_STRNATPMPERR natpmpc.c
gcc -c -Wall -Os -DWIN32 wingettimeofday.c
gcc -o natpmpc getgateway.o natpmp.o natpmpc.o wingettimeofday.o -lws2_32
@echo Create natpmp.dll:
gcc -c -Wall -Os -DWIN32 -DENABLE_STRNATPMPERR -DNATPMP_EXPORTS getgateway.c
gcc -c -Wall -Os -DWIN32 -DENABLE_STRNATPMPERR -DNATPMP_EXPORTS natpmp.c
dllwrap -k --driver-name gcc --def natpmp.def --output-def natpmp.dll.def --implib natpmp.lib -o natpmp.dll getgateway.o natpmp.o wingettimeofday.o -lws2_32
-15
View File
@@ -1,15 +0,0 @@
#ifndef __DECLSPEC_H__
#define __DECLSPEC_H__
#if defined(WIN32) && !defined(STATICLIB)
#ifdef NATPMP_EXPORTS
#define LIBSPEC __declspec(dllexport)
#else
#define LIBSPEC __declspec(dllimport)
#endif
#else
#define LIBSPEC
#endif
#endif
-425
View File
@@ -1,425 +0,0 @@
/* $Id: getgateway.c,v 1.13 2009/03/10 10:15:31 nanard Exp $ */
/* libnatpmp
* Copyright (c) 2007-2008, Thomas BERNARD <miniupnp@free.fr>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
#include <stdio.h>
#include <ctype.h>
#ifndef WIN32
#include <netinet/in.h>
#endif
#ifndef _MSC_VER
#include <sys/param.h>
#endif
/* There is no portable method to get the default route gateway.
* So below are three differents functions implementing this.
* Parsing /proc/net/route is for linux.
* sysctl is the way to access such informations on BSD systems.
* Many systems should provide route information through raw PF_ROUTE
* sockets. */
#ifdef __linux__
#define USE_PROC_NET_ROUTE
#undef USE_SOCKET_ROUTE
#undef USE_SYSCTL_NET_ROUTE
#endif
#ifdef BSD
#undef USE_PROC_NET_ROUTE
#define USE_SOCKET_ROUTE
#undef USE_SYSCTL_NET_ROUTE
#endif
#ifdef __APPLE__
#undef USE_PROC_NET_ROUTE
#undef USE_SOCKET_ROUTE
#define USE_SYSCTL_NET_ROUTE
#endif
#if ((defined(sun) || defined(__sun)) && defined(__SVR4))
#undef USE_PROC_NET_ROUTE
#define USE_SOCKET_ROUTE
#undef USE_SYSCTL_NET_ROUTE
#endif
#ifdef WIN32
#undef USE_PROC_NET_ROUTE
#undef USE_SOCKET_ROUTE
#undef USE_SYSCTL_NET_ROUTE
#define USE_WIN32_CODE
#endif
#ifdef USE_SYSCTL_NET_ROUTE
#include <stdlib.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#include <net/route.h>
#endif
#ifdef USE_SOCKET_ROUTE
#include <unistd.h>
#include <string.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/route.h>
#endif
#ifdef WIN32
#include <unknwn.h>
#include <winreg.h>
#define MAX_KEY_LENGTH 255
#define MAX_VALUE_LENGTH 16383
#endif
#include "getgateway.h"
#ifndef WIN32
#define SUCCESS (0)
#define FAILED (-1)
#endif
#ifdef USE_PROC_NET_ROUTE
int getdefaultgateway(in_addr_t * addr)
{
unsigned long d, g;
char buf[256];
int line = 0;
FILE * f;
char * p;
f = fopen("/proc/net/route", "r");
if(!f)
return FAILED;
while(fgets(buf, sizeof(buf), f)) {
if(line > 0) {
p = buf;
while(*p && !isspace(*p))
p++;
while(*p && isspace(*p))
p++;
if(sscanf(p, "%lx%lx", &d, &g)==2) {
if(d == 0) { /* default */
*addr = g;
fclose(f);
return SUCCESS;
}
}
}
line++;
}
/* default route not found ! */
if(f)
fclose(f);
return FAILED;
}
#endif /* #ifdef USE_PROC_NET_ROUTE */
#ifdef USE_SYSCTL_NET_ROUTE
#define ROUNDUP(a) \
((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
int getdefaultgateway(in_addr_t * addr)
{
#if 0
/* net.route.0.inet.dump.0.0 ? */
int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET,
NET_RT_DUMP, 0, 0/*tableid*/};
#endif
/* net.route.0.inet.flags.gateway */
int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET,
NET_RT_FLAGS, RTF_GATEWAY};
size_t l;
char * buf, * p;
struct rt_msghdr * rt;
struct sockaddr * sa;
struct sockaddr * sa_tab[RTAX_MAX];
int i;
int r = FAILED;
if(sysctl(mib, sizeof(mib)/sizeof(int), 0, &l, 0, 0) < 0) {
return FAILED;
}
if(l>0) {
buf = malloc(l);
if(sysctl(mib, sizeof(mib)/sizeof(int), buf, &l, 0, 0) < 0) {
free(buf);
return FAILED;
}
for(p=buf; p<buf+l; p+=rt->rtm_msglen) {
rt = (struct rt_msghdr *)p;
sa = (struct sockaddr *)(rt + 1);
for(i=0; i<RTAX_MAX; i++) {
if(rt->rtm_addrs & (1 << i)) {
sa_tab[i] = sa;
sa = (struct sockaddr *)((char *)sa + ROUNDUP(sa->sa_len));
} else {
sa_tab[i] = NULL;
}
}
if( ((rt->rtm_addrs & (RTA_DST|RTA_GATEWAY)) == (RTA_DST|RTA_GATEWAY))
&& sa_tab[RTAX_DST]->sa_family == AF_INET
&& sa_tab[RTAX_GATEWAY]->sa_family == AF_INET) {
if(((struct sockaddr_in *)sa_tab[RTAX_DST])->sin_addr.s_addr == 0) {
*addr = ((struct sockaddr_in *)(sa_tab[RTAX_GATEWAY]))->sin_addr.s_addr;
r = SUCCESS;
}
}
}
free(buf);
}
return r;
}
#endif /* #ifdef USE_SYSCTL_NET_ROUTE */
#ifdef USE_SOCKET_ROUTE
/* Thanks to Darren Kenny for this code */
#define NEXTADDR(w, u) \
if (rtm_addrs & (w)) {\
l = sizeof(struct sockaddr); memmove(cp, &(u), l); cp += l;\
}
#define rtm m_rtmsg.m_rtm
struct {
struct rt_msghdr m_rtm;
char m_space[512];
} m_rtmsg;
int getdefaultgateway(in_addr_t *addr)
{
int s, seq, l, rtm_addrs, i;
pid_t pid;
struct sockaddr so_dst, so_mask;
char *cp = m_rtmsg.m_space;
struct sockaddr *gate = NULL, *sa;
struct rt_msghdr *msg_hdr;
pid = getpid();
seq = 0;
rtm_addrs = RTA_DST | RTA_NETMASK;
memset(&so_dst, 0, sizeof(so_dst));
memset(&so_mask, 0, sizeof(so_mask));
memset(&rtm, 0, sizeof(struct rt_msghdr));
rtm.rtm_type = RTM_GET;
rtm.rtm_flags = RTF_UP | RTF_GATEWAY;
rtm.rtm_version = RTM_VERSION;
rtm.rtm_seq = ++seq;
rtm.rtm_addrs = rtm_addrs;
so_dst.sa_family = AF_INET;
so_mask.sa_family = AF_INET;
NEXTADDR(RTA_DST, so_dst);
NEXTADDR(RTA_NETMASK, so_mask);
rtm.rtm_msglen = l = cp - (char *)&m_rtmsg;
s = socket(PF_ROUTE, SOCK_RAW, 0);
if (write(s, (char *)&m_rtmsg, l) < 0) {
close(s);
return FAILED;
}
do {
l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg));
} while (l > 0 && (rtm.rtm_seq != seq || rtm.rtm_pid != pid));
close(s);
msg_hdr = &rtm;
cp = ((char *)(msg_hdr + 1));
if (msg_hdr->rtm_addrs) {
for (i = 1; i; i <<= 1)
if (i & msg_hdr->rtm_addrs) {
sa = (struct sockaddr *)cp;
if (i == RTA_GATEWAY )
gate = sa;
cp += sizeof(struct sockaddr);
}
} else {
return FAILED;
}
if (gate != NULL ) {
*addr = ((struct sockaddr_in *)gate)->sin_addr.s_addr;
return SUCCESS;
} else {
return FAILED;
}
}
#endif /* #ifdef USE_SOCKET_ROUTE */
#ifdef USE_WIN32_CODE
int getdefaultgateway(in_addr_t * addr)
{
HKEY networkCardsKey;
HKEY networkCardKey;
HKEY interfacesKey;
HKEY interfaceKey;
DWORD i = 0;
DWORD numSubKeys = 0;
TCHAR keyName[MAX_KEY_LENGTH];
DWORD keyNameLength = MAX_KEY_LENGTH;
BYTE keyValue[MAX_VALUE_LENGTH];
DWORD keyValueLength = MAX_VALUE_LENGTH;
DWORD keyValueType = REG_SZ;
BYTE gatewayValue[MAX_VALUE_LENGTH];
DWORD gatewayValueLength = MAX_VALUE_LENGTH;
DWORD gatewayValueType = REG_MULTI_SZ;
int done = 0;
char networkCardsPath[] = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\NetworkCards";
char interfacesPath[] = "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces";
// The windows registry lists its primary network devices in the following location:
// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards
//
// Each network device has its own subfolder, named with an index, with various properties:
// -NetworkCards
// -5
// -Description = Broadcom 802.11n Network Adapter
// -ServiceName = {E35A72F8-5065-4097-8DFE-C7790774EE4D}
// -8
// -Description = Marvell Yukon 88E8058 PCI-E Gigabit Ethernet Controller
// -ServiceName = {86226414-5545-4335-A9D1-5BD7120119AD}
//
// The above service name is the name of a subfolder within:
// HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
//
// There may be more subfolders in this interfaces path than listed in the network cards path above:
// -Interfaces
// -{3a539854-6a70-11db-887c-806e6f6e6963}
// -DhcpIPAddress = 0.0.0.0
// -[more]
// -{E35A72F8-5065-4097-8DFE-C7790774EE4D}
// -DhcpIPAddress = 10.0.1.4
// -DhcpDefaultGateway = 10.0.1.1
// -[more]
// -{86226414-5545-4335-A9D1-5BD7120119AD}
// -DhcpIpAddress = 10.0.1.5
// -DhcpDefaultGateay = 10.0.1.1
// -[more]
//
// In order to extract this information, we enumerate each network card, and extract the ServiceName value.
// This is then used to open the interface subfolder, and attempt to extract a DhcpDefaultGateway value.
// Once one is found, we're done.
//
// It may be possible to simply enumerate the interface folders until we find one with a DhcpDefaultGateway value.
// However, the technique used is the technique most cited on the web, and we assume it to be more correct.
if(ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, // Open registry key or predifined key
networkCardsPath, // Name of registry subkey to open
0, // Reserved - must be zero
KEY_READ, // Mask - desired access rights
&networkCardsKey)) // Pointer to output key
{
// Unable to open network cards keys
return -1;
}
if(ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, // Open registry key or predefined key
interfacesPath, // Name of registry subkey to open
0, // Reserved - must be zero
KEY_READ, // Mask - desired access rights
&interfacesKey)) // Pointer to output key
{
// Unable to open interfaces key
RegCloseKey(networkCardsKey);
return -1;
}
// Figure out how many subfolders are within the NetworkCards folder
RegQueryInfoKey(networkCardsKey, NULL, NULL, NULL, &numSubKeys, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
//printf( "Number of subkeys: %u\n", (unsigned int)numSubKeys);
// Enumrate through each subfolder within the NetworkCards folder
for(i = 0; i < numSubKeys && !done; i++)
{
keyNameLength = MAX_KEY_LENGTH;
if(ERROR_SUCCESS == RegEnumKeyEx(networkCardsKey, // Open registry key
i, // Index of subkey to retrieve
keyName, // Buffer that receives the name of the subkey
&keyNameLength, // Variable that receives the size of the above buffer
NULL, // Reserved - must be NULL
NULL, // Buffer that receives the class string
NULL, // Variable that receives the size of the above buffer
NULL)) // Variable that receives the last write time of subkey
{
if(RegOpenKeyEx(networkCardsKey, keyName, 0, KEY_READ, &networkCardKey) == ERROR_SUCCESS)
{
keyValueLength = MAX_VALUE_LENGTH;
if(ERROR_SUCCESS == RegQueryValueEx(networkCardKey, // Open registry key
"ServiceName", // Name of key to query
NULL, // Reserved - must be NULL
&keyValueType, // Receives value type
keyValue, // Receives value
&keyValueLength)) // Receives value length in bytes
{
//printf("keyValue: %s\n", keyValue);
if(RegOpenKeyEx(interfacesKey, (char *)keyValue, 0, KEY_READ, &interfaceKey) == ERROR_SUCCESS)
{
gatewayValueLength = MAX_VALUE_LENGTH;
if(ERROR_SUCCESS == RegQueryValueEx(interfaceKey, // Open registry key
"DhcpDefaultGateway", // Name of key to query
NULL, // Reserved - must be NULL
&gatewayValueType, // Receives value type
gatewayValue, // Receives value
&gatewayValueLength)) // Receives value length in bytes
{
// Check to make sure it's a string
if(gatewayValueType == REG_MULTI_SZ || gatewayValueType == REG_SZ)
{
//printf("gatewayValue: %s\n", gatewayValue);
done = 1;
}
}
else if(ERROR_SUCCESS == RegQueryValueEx(interfaceKey, // Open registry key
"DefaultGateway", // Name of key to query
NULL, // Reserved - must be NULL
&gatewayValueType, // Receives value type
gatewayValue, // Receives value
&gatewayValueLength)) // Receives value length in bytes
{
// Check to make sure it's a string
if(gatewayValueType == REG_MULTI_SZ || gatewayValueType == REG_SZ)
{
//printf("gatewayValue: %s\n", gatewayValue);
done = 1;
}
}
RegCloseKey(interfaceKey);
}
}
RegCloseKey(networkCardKey);
}
}
}
RegCloseKey(interfacesKey);
RegCloseKey(networkCardsKey);
if(done)
{
*addr = inet_addr((char *)gatewayValue);
return 0;
}
return -1;
}
#endif /* #ifdef USE_WIN32_CODE */
-35
View File
@@ -1,35 +0,0 @@
/* $Id: getgateway.h,v 1.3 2008/07/02 22:33:06 nanard Exp $ */
/* libnatpmp
* Copyright (c) 2007, Thomas BERNARD <miniupnp@free.fr>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
#ifndef __GETGATEWAY_H__
#define __GETGATEWAY_H__
#ifdef WIN32
#ifdef _MSC_VER
typedef unsigned __int32 uint32_t;
#else
#include <stdint.h>
#endif
#define in_addr_t uint32_t
#endif
#include "declspec.h"
/* getdefaultgateway() :
* return value :
* 0 : success
* -1 : failure */
LIBSPEC int getdefaultgateway(in_addr_t * addr);
#endif
-371
View File
@@ -1,371 +0,0 @@
/* $Id: natpmp.c,v 1.8 2008/07/02 22:33:06 nanard Exp $ */
/* libnatpmp
* Copyright (c) 2007-2008, Thomas BERNARD <miniupnp@free.fr>
* http://miniupnp.free.fr/libnatpmp.html
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
#ifdef __linux__
#ifndef _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
#endif
#define _BSD_SOURCE 1
#endif
#include <string.h>
#include <time.h>
#ifndef _MSC_VER
#include <sys/time.h>
#endif
#ifdef WIN32
#include <winsock2.h>
#include <Ws2tcpip.h>
#include <io.h>
#ifndef EWOULDBLOCK
#define EWOULDBLOCK WSAEWOULDBLOCK
#endif
#ifndef ECONNREFUSED
#define ECONNREFUSED WSAECONNREFUSED
#endif
static int gettimeofday(struct timeval* p, void* tz /* IGNORED */) {
union {
long long ns100; /*time since 1 Jan 1601 in 100ns units */
FILETIME ft;
} _now;
GetSystemTimeAsFileTime( &(_now.ft) );
p->tv_usec=(long)((_now.ns100 / 10LL) % 1000000LL );
p->tv_sec= (long)((_now.ns100-(116444736000000000LL))/10000000LL);
return 0;
}
#else
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#define closesocket close
#endif
#include "natpmp.h"
#include "getgateway.h"
int initnatpmp(natpmp_t * p)
{
#ifdef WIN32
u_long ioctlArg = 1;
#else
int flags;
#endif
struct sockaddr_in addr;
if(!p)
return NATPMP_ERR_INVALIDARGS;
memset(p, 0, sizeof(natpmp_t));
p->s = socket(PF_INET, SOCK_DGRAM, 0);
if(p->s < 0)
return NATPMP_ERR_SOCKETERROR;
#ifdef WIN32
if(ioctlsocket(p->s, FIONBIO, &ioctlArg) == SOCKET_ERROR)
return NATPMP_ERR_FCNTLERROR;
#else
if((flags = fcntl(p->s, F_GETFL, 0)) < 0)
return NATPMP_ERR_FCNTLERROR;
if(fcntl(p->s, F_SETFL, flags | O_NONBLOCK) < 0)
return NATPMP_ERR_FCNTLERROR;
#endif
if(getdefaultgateway(&(p->gateway)) < 0)
return NATPMP_ERR_CANNOTGETGATEWAY;
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(NATPMP_PORT);
addr.sin_addr.s_addr = p->gateway;
if(connect(p->s, (struct sockaddr *)&addr, sizeof(addr)) < 0)
return NATPMP_ERR_CONNECTERR;
return 0;
}
int closenatpmp(natpmp_t * p)
{
if(!p)
return NATPMP_ERR_INVALIDARGS;
if(closesocket(p->s) < 0)
return NATPMP_ERR_CLOSEERR;
return 0;
}
int sendpendingrequest(natpmp_t * p)
{
int r;
/* struct sockaddr_in addr;*/
if(!p)
return NATPMP_ERR_INVALIDARGS;
/* memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(NATPMP_PORT);
addr.sin_addr.s_addr = p->gateway;
r = (int)sendto(p->s, p->pending_request, p->pending_request_len, 0,
(struct sockaddr *)&addr, sizeof(addr));*/
r = (int)send(p->s, p->pending_request, p->pending_request_len, 0);
return (r<0) ? NATPMP_ERR_SENDERR : r;
}
int sendnatpmprequest(natpmp_t * p)
{
int n;
if(!p)
return NATPMP_ERR_INVALIDARGS;
/* TODO : check if no request is allready pending */
p->has_pending_request = 1;
p->try_number = 1;
n = sendpendingrequest(p);
gettimeofday(&p->retry_time, NULL); // check errors !
p->retry_time.tv_usec += 250000; /* add 250ms */
if(p->retry_time.tv_usec >= 1000000) {
p->retry_time.tv_usec -= 1000000;
p->retry_time.tv_sec++;
}
return n;
}
int getnatpmprequesttimeout(natpmp_t * p, struct timeval * timeout)
{
struct timeval now;
if(!p || !timeout)
return NATPMP_ERR_INVALIDARGS;
if(!p->has_pending_request)
return NATPMP_ERR_NOPENDINGREQ;
if(gettimeofday(&now, NULL) < 0)
return NATPMP_ERR_GETTIMEOFDAYERR;
timeout->tv_sec = p->retry_time.tv_sec - now.tv_sec;
timeout->tv_usec = p->retry_time.tv_usec - now.tv_usec;
if(timeout->tv_usec < 0) {
timeout->tv_usec += 1000000;
timeout->tv_sec--;
}
return 0;
}
int sendpublicaddressrequest(natpmp_t * p)
{
if(!p)
return NATPMP_ERR_INVALIDARGS;
//static const unsigned char request[] = { 0, 0 };
p->pending_request[0] = 0;
p->pending_request[1] = 0;
p->pending_request_len = 2;
// TODO: return 0 instead of sizeof(request) ??
return sendnatpmprequest(p);
}
int sendnewportmappingrequest(natpmp_t * p, int protocol,
uint16_t privateport, uint16_t publicport,
uint32_t lifetime)
{
uint16_t *n;
uint32_t *m;
if(!p || (protocol!=NATPMP_PROTOCOL_TCP && protocol!=NATPMP_PROTOCOL_UDP))
return NATPMP_ERR_INVALIDARGS;
p->pending_request[0] = 0;
p->pending_request[1] = (char)protocol;
p->pending_request[2] = 0;
p->pending_request[3] = 0;
n = (uint16_t *)(p->pending_request + 4); *n = htons(privateport);
n = (uint16_t *)(p->pending_request + 6); *n = htons(publicport);
m = (uint32_t *)(p->pending_request + 8); *m = htonl(lifetime);
//*((uint16_t *)(p->pending_request + 4)) = htons(privateport);
//*((uint16_t *)(p->pending_request + 6)) = htons(publicport);
//*((uint32_t *)(p->pending_request + 8)) = htonl(lifetime);
p->pending_request_len = 12;
return sendnatpmprequest(p);
}
int readnatpmpresponse(natpmp_t * p, natpmpresp_t * response)
{
unsigned char buf[16];
struct sockaddr_in addr = {0};
socklen_t addrlen = sizeof(addr);
int n;
if(!p)
return NATPMP_ERR_INVALIDARGS;
n = recvfrom(p->s, (char *)buf, sizeof(buf), 0,
(struct sockaddr *)&addr, &addrlen);
if(n<0)
switch(errno) {
/*case EAGAIN:*/
case EWOULDBLOCK:
n = NATPMP_TRYAGAIN;
break;
case ECONNREFUSED:
n = NATPMP_ERR_NOGATEWAYSUPPORT;
break;
default:
n = NATPMP_ERR_RECVFROM;
}
/* check that addr is correct (= gateway) */
else if(addr.sin_addr.s_addr != p->gateway)
n = NATPMP_ERR_WRONGPACKETSOURCE;
else {
response->resultcode = ntohs(*((uint16_t *)(buf + 2)));
response->epoch = ntohl(*((uint32_t *)(buf + 4)));
if(buf[0] != 0)
n = NATPMP_ERR_UNSUPPORTEDVERSION;
else if(buf[1] < 128 || buf[1] > 130)
n = NATPMP_ERR_UNSUPPORTEDOPCODE;
else if(response->resultcode != 0) {
switch(response->resultcode) {
case 1:
n = NATPMP_ERR_UNSUPPORTEDVERSION;
break;
case 2:
n = NATPMP_ERR_NOTAUTHORIZED;
break;
case 3:
n = NATPMP_ERR_NETWORKFAILURE;
break;
case 4:
n = NATPMP_ERR_OUTOFRESOURCES;
break;
case 5:
n = NATPMP_ERR_UNSUPPORTEDOPCODE;
break;
default:
n = NATPMP_ERR_UNDEFINEDERROR;
}
} else {
response->type = buf[1] & 0x7f;
if(buf[1] == 128)
//response->publicaddress.addr = *((uint32_t *)(buf + 8));
response->pnu.publicaddress.addr.s_addr = *((uint32_t *)(buf + 8));
else {
response->pnu.newportmapping.privateport = ntohs(*((uint16_t *)(buf + 8)));
response->pnu.newportmapping.mappedpublicport = ntohs(*((uint16_t *)(buf + 10)));
response->pnu.newportmapping.lifetime = ntohl(*((uint32_t *)(buf + 12)));
}
n = 0;
}
}
return n;
}
int readnatpmpresponseorretry(natpmp_t * p, natpmpresp_t * response)
{
int n;
if(!p || !response)
return NATPMP_ERR_INVALIDARGS;
if(!p->has_pending_request)
return NATPMP_ERR_NOPENDINGREQ;
n = readnatpmpresponse(p, response);
if(n<0) {
if(n==NATPMP_TRYAGAIN) {
struct timeval now;
gettimeofday(&now, NULL); // check errors !
if(timercmp(&now, &p->retry_time, >=)) {
int delay, r;
if(p->try_number >= 9) {
return NATPMP_ERR_NOGATEWAYSUPPORT;
}
/*printf("retry! %d\n", p->try_number);*/
delay = 250 * (1<<p->try_number); // ms
/*for(i=0; i<p->try_number; i++)
delay += delay;*/
p->retry_time.tv_sec += (delay / 1000);
p->retry_time.tv_usec += (delay % 1000) * 1000;
if(p->retry_time.tv_usec >= 1000000) {
p->retry_time.tv_usec -= 1000000;
p->retry_time.tv_sec++;
}
p->try_number++;
r = sendpendingrequest(p);
if(r<0)
return r;
}
}
} else {
p->has_pending_request = 0;
}
return n;
}
#ifdef ENABLE_STRNATPMPERR
const char * strnatpmperr(int r)
{
const char * s;
switch(r) {
case NATPMP_ERR_INVALIDARGS:
s = "invalid arguments";
break;
case NATPMP_ERR_SOCKETERROR:
s = "socket() failed";
break;
case NATPMP_ERR_CANNOTGETGATEWAY:
s = "cannot get default gateway ip address";
break;
case NATPMP_ERR_CLOSEERR:
#ifdef WIN32
s = "closesocket() failed";
#else
s = "close() failed";
#endif
break;
case NATPMP_ERR_RECVFROM:
s = "recvfrom() failed";
break;
case NATPMP_ERR_NOPENDINGREQ:
s = "no pending request";
break;
case NATPMP_ERR_NOGATEWAYSUPPORT:
s = "the gateway does not support nat-pmp";
break;
case NATPMP_ERR_CONNECTERR:
s = "connect() failed";
break;
case NATPMP_ERR_WRONGPACKETSOURCE:
s = "packet not received from the default gateway";
break;
case NATPMP_ERR_SENDERR:
s = "send() failed";
break;
case NATPMP_ERR_FCNTLERROR:
s = "fcntl() failed";
break;
case NATPMP_ERR_GETTIMEOFDAYERR:
s = "gettimeofday() failed";
break;
case NATPMP_ERR_UNSUPPORTEDVERSION:
s = "unsupported nat-pmp version error from server";
break;
case NATPMP_ERR_UNSUPPORTEDOPCODE:
s = "unsupported nat-pmp opcode error from server";
break;
case NATPMP_ERR_UNDEFINEDERROR:
s = "undefined nat-pmp server error";
break;
case NATPMP_ERR_NOTAUTHORIZED:
s = "not authorized";
break;
case NATPMP_ERR_NETWORKFAILURE:
s = "network failure";
break;
case NATPMP_ERR_OUTOFRESOURCES:
s = "nat-pmp server out of resources";
break;
default:
s = "Unknown libnatpmp error";
}
return s;
}
#endif
-11
View File
@@ -1,11 +0,0 @@
LIBRARY
; libnatpmp library
EXPORTS
initnatpmp
closenatpmp
sendpublicaddressrequest
sendnewportmappingrequest
getnatpmprequesttimeout
readnatpmpresponseorretry
strnatpmperr
-194
View File
@@ -1,194 +0,0 @@
/* $Id: natpmp.h,v 1.11 2009/02/27 22:38:05 nanard Exp $ */
/* libnatpmp
* Copyright (c) 2007-2008, Thomas BERNARD <miniupnp@free.fr>
* http://miniupnp.free.fr/libnatpmp.html
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
#ifndef __NATPMP_H__
#define __NATPMP_H__
/* NAT-PMP Port as defined by the NAT-PMP draft */
#define NATPMP_PORT (5351)
#include <time.h>
#ifndef _MSC_VER
#include <sys/time.h>
#endif
#ifdef WIN32
#include <winsock2.h>
#ifdef _MSC_VER
typedef unsigned __int32 uint32_t;
typedef unsigned __int16 uint16_t;
#else
#include <stdint.h>
#endif
#define in_addr_t uint32_t
#include "declspec.h"
#else
#define LIBSPEC
#include <netinet/in.h>
#endif
typedef struct {
int s; /* socket */
in_addr_t gateway; /* default gateway (IPv4) */
int has_pending_request;
char pending_request[12];
int pending_request_len;
int try_number;
struct timeval retry_time;
} natpmp_t;
typedef struct {
uint16_t type; /* NATPMP_RESPTYPE_* */
uint16_t resultcode; /* NAT-PMP response code */
uint32_t epoch; /* Seconds since start of epoch */
union {
struct {
//in_addr_t addr;
struct in_addr addr;
} publicaddress;
struct {
uint16_t privateport;
uint16_t mappedpublicport;
uint32_t lifetime;
} newportmapping;
} pnu;
} natpmpresp_t;
/* possible values for type field of natpmpresp_t */
#define NATPMP_RESPTYPE_PUBLICADDRESS (0)
#define NATPMP_RESPTYPE_UDPPORTMAPPING (1)
#define NATPMP_RESPTYPE_TCPPORTMAPPING (2)
/* Values to pass to sendnewportmappingrequest() */
#define NATPMP_PROTOCOL_UDP (1)
#define NATPMP_PROTOCOL_TCP (2)
/* return values */
/* NATPMP_ERR_INVALIDARGS : invalid arguments passed to the function */
#define NATPMP_ERR_INVALIDARGS (-1)
/* NATPMP_ERR_SOCKETERROR : socket() failed. check errno for details */
#define NATPMP_ERR_SOCKETERROR (-2)
/* NATPMP_ERR_CANNOTGETGATEWAY : can't get default gateway IP */
#define NATPMP_ERR_CANNOTGETGATEWAY (-3)
/* NATPMP_ERR_CLOSEERR : close() failed. check errno for details */
#define NATPMP_ERR_CLOSEERR (-4)
/* NATPMP_ERR_RECVFROM : recvfrom() failed. check errno for details */
#define NATPMP_ERR_RECVFROM (-5)
/* NATPMP_ERR_NOPENDINGREQ : readnatpmpresponseorretry() called while
* no NAT-PMP request was pending */
#define NATPMP_ERR_NOPENDINGREQ (-6)
/* NATPMP_ERR_NOGATEWAYSUPPORT : the gateway does not support NAT-PMP */
#define NATPMP_ERR_NOGATEWAYSUPPORT (-7)
/* NATPMP_ERR_CONNECTERR : connect() failed. check errno for details */
#define NATPMP_ERR_CONNECTERR (-8)
/* NATPMP_ERR_WRONGPACKETSOURCE : packet not received from the network gateway */
#define NATPMP_ERR_WRONGPACKETSOURCE (-9)
/* NATPMP_ERR_SENDERR : send() failed. check errno for details */
#define NATPMP_ERR_SENDERR (-10)
/* NATPMP_ERR_FCNTLERROR : fcntl() failed. check errno for details */
#define NATPMP_ERR_FCNTLERROR (-11)
/* NATPMP_ERR_GETTIMEOFDAYERR : gettimeofday() failed. check errno for details */
#define NATPMP_ERR_GETTIMEOFDAYERR (-12)
/* */
#define NATPMP_ERR_UNSUPPORTEDVERSION (-14)
#define NATPMP_ERR_UNSUPPORTEDOPCODE (-15)
/* Errors from the server : */
#define NATPMP_ERR_UNDEFINEDERROR (-49)
#define NATPMP_ERR_NOTAUTHORIZED (-51)
#define NATPMP_ERR_NETWORKFAILURE (-52)
#define NATPMP_ERR_OUTOFRESOURCES (-53)
/* NATPMP_TRYAGAIN : no data available for the moment. try again later */
#define NATPMP_TRYAGAIN (-100)
/* initnatpmp()
* initialize a natpmp_t object
* Return values :
* 0 = OK
* NATPMP_ERR_INVALIDARGS
* NATPMP_ERR_SOCKETERROR
* NATPMP_ERR_FCNTLERROR
* NATPMP_ERR_CANNOTGETGATEWAY
* NATPMP_ERR_CONNECTERR */
LIBSPEC int initnatpmp(natpmp_t * p);
/* closenatpmp()
* close resources associated with a natpmp_t object
* Return values :
* 0 = OK
* NATPMP_ERR_INVALIDARGS
* NATPMP_ERR_CLOSEERR */
LIBSPEC int closenatpmp(natpmp_t * p);
/* sendpublicaddressrequest()
* send a public address NAT-PMP request to the network gateway
* Return values :
* 2 = OK (size of the request)
* NATPMP_ERR_INVALIDARGS
* NATPMP_ERR_SENDERR */
LIBSPEC int sendpublicaddressrequest(natpmp_t * p);
/* sendnewportmappingrequest()
* send a new port mapping NAT-PMP request to the network gateway
* Arguments :
* protocol is either NATPMP_PROTOCOL_TCP or NATPMP_PROTOCOL_UDP,
* lifetime is in seconds.
* To remove a port mapping, set lifetime to zero.
* To remove all port mappings to the host, set lifetime and both ports
* to zero.
* Return values :
* 12 = OK (size of the request)
* NATPMP_ERR_INVALIDARGS
* NATPMP_ERR_SENDERR */
LIBSPEC int sendnewportmappingrequest(natpmp_t * p, int protocol,
uint16_t privateport, uint16_t publicport,
uint32_t lifetime);
/* getnatpmprequesttimeout()
* fills the timeval structure with the timeout duration of the
* currently pending NAT-PMP request.
* Return values :
* 0 = OK
* NATPMP_ERR_INVALIDARGS
* NATPMP_ERR_GETTIMEOFDAYERR
* NATPMP_ERR_NOPENDINGREQ */
LIBSPEC int getnatpmprequesttimeout(natpmp_t * p, struct timeval * timeout);
/* readnatpmpresponseorretry()
* fills the natpmpresp_t structure if possible
* Return values :
* 0 = OK
* NATPMP_TRYAGAIN
* NATPMP_ERR_INVALIDARGS
* NATPMP_ERR_NOPENDINGREQ
* NATPMP_ERR_NOGATEWAYSUPPORT
* NATPMP_ERR_RECVFROM
* NATPMP_ERR_WRONGPACKETSOURCE
* NATPMP_ERR_UNSUPPORTEDVERSION
* NATPMP_ERR_UNSUPPORTEDOPCODE
* NATPMP_ERR_NOTAUTHORIZED
* NATPMP_ERR_NETWORKFAILURE
* NATPMP_ERR_OUTOFRESOURCES
* NATPMP_ERR_UNSUPPORTEDOPCODE
* NATPMP_ERR_UNDEFINEDERROR */
LIBSPEC int readnatpmpresponseorretry(natpmp_t * p, natpmpresp_t * response);
#ifdef ENABLE_STRNATPMPERR
LIBSPEC const char * strnatpmperr(int t);
#endif
#endif
-202
View File
@@ -1,202 +0,0 @@
/* $Id: natpmpc.c,v 1.6 2008/07/02 22:33:06 nanard Exp $ */
/* libnatpmp
* Copyright (c) 2007-2008, Thomas BERNARD <miniupnp@free.fr>
* http://miniupnp.free.fr/libnatpmp.html
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#ifdef WIN32
#include <winsock2.h>
#else
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
#include "natpmp.h"
void usage(FILE * out, const char * argv0)
{
fprintf(out, "Usage :\n");
fprintf(out, " %s\n", argv0);
fprintf(out, "\tdisplay the public IP address.\n");
fprintf(out, " %s -h\n", argv0);
fprintf(out, "\tdisplay this help screen.\n");
fprintf(out, " %s -a <public port> <private port> <protocol> [lifetime]\n", argv0);
fprintf(out, "\tadd a port mapping.\n");
fprintf(out, "\n In order to remove a mapping, set it with a lifetime of 0 seconds.\n");
fprintf(out, " To remove all mappings for your machine, use 0 as private port and lifetime.\n");
}
/* sample code for using libnatpmp */
int main(int argc, char * * argv)
{
natpmp_t natpmp;
natpmpresp_t response;
int r;
int sav_errno;
struct timeval timeout;
fd_set fds;
int i;
int protocol = 0;
uint16_t privateport = 0;
uint16_t publicport = 0;
uint32_t lifetime = 3600;
int command = 0;
#ifdef WIN32
WSADATA wsaData;
int nResult = WSAStartup(MAKEWORD(2,2), &wsaData);
if(nResult != NO_ERROR)
{
fprintf(stderr, "WSAStartup() failed.\n");
return -1;
}
#endif
/* argument parsing */
for(i=1; i<argc; i++) {
if(argv[i][0] == '-') {
switch(argv[i][1]) {
case 'h':
usage(stdout, argv[0]);
return 0;
case 'a':
command = 'a';
if(argc < i + 3) {
fprintf(stderr, "Not enough arguments for option -a\n");
return 1;
}
i++;
if(1 != sscanf(argv[i], "%hu", &publicport)) {
fprintf(stderr, "%s is not a correct 16bits unsigned integer\n", argv[i]);
return 1;
}
i++;
if(1 != sscanf(argv[i], "%hu", &privateport)) {
fprintf(stderr, "%s is not a correct 16bits unsigned integer\n", argv[i]);
return 1;
}
i++;
if(0 == strcasecmp(argv[i], "tcp"))
protocol = NATPMP_PROTOCOL_TCP;
else if(0 == strcasecmp(argv[i], "udp"))
protocol = NATPMP_PROTOCOL_UDP;
else {
fprintf(stderr, "%s is not a valid protocol\n", argv[i]);
return 1;
}
if(argc >= i) {
i++;
if(1 != sscanf(argv[i], "%u", &lifetime)) {
fprintf(stderr, "%s is not a correct 32bits unsigned integer\n", argv[i]);
}
}
break;
default:
fprintf(stderr, "Unknown option %s\n", argv[i]);
usage(stderr, argv[0]);
return 1;
}
} else {
fprintf(stderr, "Unknown option %s\n", argv[i]);
usage(stderr, argv[0]);
return 1;
}
}
/* initnatpmp() */
r = initnatpmp(&natpmp);
printf("initnatpmp() returned %d (%s)\n", r, r?"FAILED":"SUCCESS");
if(r<0)
return 1;
/* sendpublicaddressrequest() */
r = sendpublicaddressrequest(&natpmp);
printf("sendpublicaddressrequest returned %d (%s)\n",
r, r==2?"SUCCESS":"FAILED");
if(r<0)
return 1;
do {
FD_ZERO(&fds);
FD_SET(natpmp.s, &fds);
getnatpmprequesttimeout(&natpmp, &timeout);
select(FD_SETSIZE, &fds, NULL, NULL, &timeout);
r = readnatpmpresponseorretry(&natpmp, &response);
sav_errno = errno;
printf("readnatpmpresponseorretry returned %d (%s)\n",
r, r==0?"OK":(r==NATPMP_TRYAGAIN?"TRY AGAIN":"FAILED"));
if(r<0 && r!=NATPMP_TRYAGAIN) {
#ifdef ENABLE_STRNATPMPERR
fprintf(stderr, "readnatpmpresponseorretry() failed : %s\n",
strnatpmperr(r));
#endif
fprintf(stderr, " errno=%d '%s'\n",
sav_errno, strerror(sav_errno));
}
} while(r==NATPMP_TRYAGAIN);
if(r<0)
return 1;
/* TODO : check that response.type == 0 */
printf("Public IP address : %s\n", inet_ntoa(response.pnu.publicaddress.addr));
printf("epoch = %u\n", response.epoch);
if(command == 'a') {
/* sendnewportmappingrequest() */
r = sendnewportmappingrequest(&natpmp, protocol,
privateport, publicport,
lifetime);
printf("sendnewportmappingrequest returned %d (%s)\n",
r, r==12?"SUCCESS":"FAILED");
if(r < 0)
return 1;
do {
FD_ZERO(&fds);
FD_SET(natpmp.s, &fds);
getnatpmprequesttimeout(&natpmp, &timeout);
select(FD_SETSIZE, &fds, NULL, NULL, &timeout);
r = readnatpmpresponseorretry(&natpmp, &response);
printf("readnatpmpresponseorretry returned %d (%s)\n",
r, r==0?"OK":(r==NATPMP_TRYAGAIN?"TRY AGAIN":"FAILED"));
} while(r==NATPMP_TRYAGAIN);
if(r<0) {
#ifdef ENABLE_STRNATPMPERR
fprintf(stderr, "readnatpmpresponseorretry() failed : %s\n",
strnatpmperr(r));
#endif
return 1;
}
printf("Mapped public port %hu protocol %s to local port %hu "
"liftime %u\n",
response.pnu.newportmapping.mappedpublicport,
response.type == NATPMP_RESPTYPE_UDPPORTMAPPING ? "UDP" :
(response.type == NATPMP_RESPTYPE_TCPPORTMAPPING ? "TCP" :
"UNKNOWN"),
response.pnu.newportmapping.privateport,
response.pnu.newportmapping.lifetime);
printf("epoch = %u\n", response.epoch);
}
r = closenatpmp(&natpmp);
printf("closenatpmp() returned %d (%s)\n", r, r==0?"SUCCESS":"FAILED");
if(r<0)
return 1;
return 0;
}
-42
View File
@@ -1,42 +0,0 @@
/* $Id: testgetgateway.c,v 1.4 2008/07/02 22:33:06 nanard Exp $ */
/* libnatpmp
* Copyright (c) 2007, Thomas BERNARD <miniupnp@free.fr>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
#include <stdio.h>
#ifdef WIN32
#include <winsock2.h>
#else
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
#include "getgateway.h"
int main(int argc, char * * argv)
{
struct in_addr gatewayaddr;
int r;
#ifdef WIN32
uint32_t temp = 0;
r = getdefaultgateway(&temp);
gatewayaddr.S_un.S_addr = temp;
#else
r = getdefaultgateway(&(gatewayaddr.s_addr));
#endif
if(r>=0)
printf("default gateway : %s\n", inet_ntoa(gatewayaddr));
else
fprintf(stderr, "getdefaultgateway() failed\n");
return 0;
}
+1 -1
View File
@@ -657,7 +657,7 @@ SCGI_DECLARE(scgi_status_t) scgi_parse(scgi_socket_t sock, scgi_handle_t *handle
handle->sock = sock;
handle->connected = 1;
sock_setup(handle);
if (sock_setup(handle) != SCGI_SUCCESS) goto end;
for(;;) {
+5 -2
View File
@@ -5,6 +5,7 @@ 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>
Bohan Li <bohanli@google.com>
Chris Cunningham <chcunningham@chromium.org>
Chi Yo Tsai <chiyotsai@google.com>
Daniele Castagna <dcastagna@chromium.org> <dcastagna@google.com>
@@ -20,11 +21,13 @@ 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> <johannkoenig@dhcp-172-19-7-52.mtv.corp.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>
Johann <johann@duck.com> <johann.koenig@gmail.com>
John Koleszar <jkoleszar@google.com>
Joshua Litt <joshualitt@google.com> <joshualitt@chromium.org>
Konstantinos Margaritis <konma@vectorcamp.gr> <konstantinos@vectorcamp.gr>
Marco Paniconi <marpan@google.com>
Marco Paniconi <marpan@google.com> <marpan@chromium.org>
Martin Storsjö <martin@martin.st>
@@ -52,4 +55,4 @@ 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>
Xiwei Gu <guxiwei-hf@loongson.cn>
+1 -1
View File
@@ -1 +1 @@
Mon Jul 06 01:46:10 UTC 2026
Mon 09 Nov 2026 11:33:20 PM UTC
+40 -1
View File
@@ -12,38 +12,53 @@ Alexander Potapenko <glider@google.com>
Alexander Voronov <avoronov@graphics.cs.msu.ru>
Alexandra Hájková <alexandra.khirnova@gmail.com>
Aℓex Converse <alexconv@twitch.tv>
Alex Davicenko <alex.davicenko@arm.com>
Alexis Ballier <aballier@gentoo.org>
Alok Ahuja <waveletcoeff@gmail.com>
Alpha Lam <hclam@google.com>
A.Mahfoodh <ab.mahfoodh@gmail.com>
Ami Fischman <fischman@chromium.org>
Andoni Morales Alastruey <ylatuya@gmail.com>
Andres Calderon Jaramillo <andrescj@chromium.org>
Andres Mejia <mcitadel@gmail.com>
Andrew Lewis <andrewlewis@google.com>
Andrew Russell <anrussell@google.com>
Andrew Salkeld <andrew.salkeld@arm.com>
Andrey Filipenkov <kambalaDecapitator@gmail.com>
Angie Chen <yunqi@google.com>
Angie Chiang <angiebird@google.com>
Anton Venema <anton.venema@liveswitch.com>
Anupam Pandey <anupam.pandey@ittiam.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>
Casey Smalley <casey.smalley@arm.com>
changjun.yang <changjun.yang@intel.com>
Charles 'Buck' Krasic <ckrasic@google.com>
Cheng Chen <chengchen@google.com>
Chen Wang <wangchen20@iscas.ac.cn>
Cherma Rajan A <cherma.rajan@ittiam.com>
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>
Chun-Min Chang <chun.m.chang@gmail.com>
Clement Courbet <courbet@google.com>
CodeByMoriarty <alacambradev@gmail.com>
Daniel Cheng <dcheng@chromium.org>
Daniele Castagna <dcastagna@chromium.org>
Daniel Kang <ddkang@google.com>
Daniel Sommermann <dcsommer@gmail.com>
Dan Zhu <zxdan@google.com>
Darryl Pogue <darryl@dpogue.ca>
David Benjamin <davidben@google.com>
Deb Mukherjee <debargha@google.com>
Deepa K G <deepa.kg@ittiam.com>
Diksha Singh <diksha.singh@ittiam.com>
Dim Temp <dimtemp0@gmail.com>
Dmitry Kovalev <dkovalev@google.com>
Dragan Mrdjan <dmrdjan@mips.com>
@@ -52,12 +67,16 @@ Ehsan Akhgari <ehsan.akhgari@gmail.com>
Elliott Karpilovsky <elliottk@google.com>
Erik Niemeyer <erik.a.niemeyer@intel.com>
Fabio Pedretti <fabio.ped@libero.it>
Feng, Feifei <Feifei.Feng@partner.bmw.de>
Florian Mayer <fmayer@google.com>
Frank Galligan <fgalligan@google.com>
Fredrik Söderquist <fs@opera.com>
Fritz Koenig <frkoenig@google.com>
Fyodor Kyslov <kyslov@google.com>
Gabriel Marin <gmx@chromium.org>
Gaute Strokkenes <gaute.strokkenes@broadcom.com>
George Steed <george.steed@arm.com>
Gerda Zsejke More <gerdazsejke.more@arm.com>
Geza Lore <gezalore@gmail.com>
Ghislain MARY <ghislainmary2@gmail.com>
Giuseppe Scrivano <gscrivano@gnu.org>
@@ -65,10 +84,12 @@ Gordana Cmiljanovic <gordana.cmiljanovic@imgtec.com>
Gregor Jasny <gjasny@gmail.com>
Guillaume Martres <gmartres@google.com>
Guillermo Ballester Valor <gbvalor@gmail.com>
Hang Nguyen <hnt@google.com>
Hangyu Kuang <hkuang@google.com>
Hanno Böck <hanno@hboeck.de>
Han Shen <shenhan@google.com>
Hao Chen <chenhao@loongson.cn>
Hari Limaye <hari.limaye@arm.com>
Harish Mahendrakar <harish.mahendrakar@ittiam.com>
Henrik Lundin <hlundin@google.com>
Hien Ho <hienho@google.com>
@@ -84,12 +105,14 @@ James Touton <bekenn@gmail.com>
James Yu <james.yu@linaro.org>
James Zern <jzern@google.com>
Jan Gerber <j@mailb.org>
Jan-Ivar Bruaroey <jbruaroey@mozilla.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
Janne Salonen <jsalonen@google.com>
Jean-Yves Avenard <jyavenard@mozilla.com>
Jeff Faust <jfaust@google.com>
Jeff Muizelaar <jmuizelaar@mozilla.com>
Jeff Petkau <jpet@chromium.org>
Jeremy Dorfman <jdorfman@google.com>
Jeremy Leconte <jleconte@google.com>
Jerome Jiang <jianj@google.com>
Jia Jia <jia.jia@linaro.org>
@@ -101,6 +124,7 @@ Jin Bo <jinbo@loongson.cn>
Jingning Han <jingning@google.com>
Joel Fernandes <joelaf@google.com>
Joey Parrish <joeyparrish@google.com>
Johann <johann@duck.com>
Johann Koenig <johannkoenig@google.com>
John Koleszar <jkoleszar@google.com>
Johnny Klonaris <google@jawknee.com>
@@ -114,12 +138,16 @@ Julia Robson <juliamrobson@gmail.com>
Justin Clift <justin@salasaga.org>
Justin Lebar <justin.lebar@gmail.com>
Kaustubh Raste <kaustubh.raste@imgtec.com>
Kexy Biscuit <kexybiscuit@aosc.io>
KO Myung-Hun <komh@chollian.net>
Konstantinos Margaritis <konma@vectorcamp.gr>
Kyle Siefring <kylesiefring@gmail.com>
Lawrence Velázquez <larryv@macports.org>
L. E. Segovia <amy@amyspark.me>
Linfeng Zhang <linfengz@google.com>
Lin Zheng <linzhen@google.com>
Liu Peng <pengliu.mail@gmail.com>
Li Zhang <li.zhang2@arm.com>
Lou Quillio <louquillio@google.com>
Luca Barbato <lu_zero@gentoo.org>
Luc Trudeau <luc@trud.ca>
@@ -134,6 +162,7 @@ Matthew Heaney <matthewjheaney@chromium.org>
Matthias Räncker <theonetruecamper@gmx.de>
Michael Horowitz <mhoro@webrtc.org>
Michael Kohler <michaelkohler@live.com>
Michał Janiszewski <janisozaur@gmail.com>
Mike Frysinger <vapier@chromium.org>
Mike Hommey <mhommey@mozilla.com>
Mikhal Shemer <mikhal@google.com>
@@ -145,6 +174,7 @@ Mirko Bonadei <mbonadei@google.com>
Moriyoshi Koizumi <mozo@mozo.jp>
Morton Jonuschat <yabawock@gmail.com>
Nathan E. Egge <negge@mozilla.com>
Neeraj Gadgil <neeraj.gadgil@ittiam.com>
Neil Birkbeck <neil.birkbeck@gmail.com>
Nico Weber <thakis@chromium.org>
Niveditha Rau <niveditha.rau@gmail.com>
@@ -160,12 +190,15 @@ Peter Collingbourne <pcc@chromium.org>
Peter de Rivaz <peter.derivaz@gmail.com>
Peter Kasting <pkasting@chromium.org>
Philip Jägenstedt <philipj@opera.com>
Philippe Antoine <p.antoine@catenacyber.fr>
Philipp Hancke <phancke@meta.com>
Priit Laes <plaes@plaes.org>
Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
Rafaël Carré <funman@videolan.org>
Rafael de Lucena Valle <rafaeldelucena@gmail.com>
Rahul Chaudhry <rahulchaudhry@google.com>
Ralph Giles <giles@xiph.org>
Ram Mohan M <ram.mohan@ittiam.com>
Ranjit Kumar Tulabandu <ranjit.tulabandu@ittiam.com>
Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Ravi Chaudhary <ravi.chaudhary@ittiam.com>
@@ -174,7 +207,9 @@ Rob Bradford <rob@linux.intel.com>
Ronald S. Bultje <rsbultje@gmail.com>
Rui Ueyama <ruiu@google.com>
Sai Deng <sdeng@google.com>
Salome Thirot <salome.thirot@arm.com>
Sami Pietilä <samipietila@google.com>
Sam James <sam@gentoo.org>
Sarah Parker <sarahparker@google.com>
Sasi Inguva <isasi@google.com>
Scott Graham <scottmg@chromium.org>
@@ -209,9 +244,11 @@ 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>
Xiahong Bao <xiahong.bao@nxp.com>
Xiwei Gu <guxiwei-hf@loongson.cn>
Yaowu Xu <yaowu@google.com>
Yi Luo <luoyi@google.com>
Yongseok Jeon <ysjeon741@gmail.com>
Yongzhe Wang <yongzhe@google.com>
yuanhecai <yuanhecai@loongson.cn>
Yue Chen <yuec@google.com>
@@ -219,6 +256,8 @@ Yun Liu <yliuyliu@google.com>
Yunqing Wang <yunqingwang@google.com>
Yury Gitman <yuryg@google.com>
Zoe Liu <zoeliu@google.com>
Zoltan Kuscsik <zoltan@s57.io>
zuxy <zuxy.meng@gmail.com>
Google Inc.
The Mozilla Foundation
The Xiph.Org Foundation
+366 -1
View File
@@ -1,3 +1,362 @@
2026-08-07 v1.17.0 "Yellowbilled Duck"
This release includes a new encoder control to validate high bitdepth input,
additional Neon and AVX2/AVX512 optimizations, support for the C11 standard,
and numerous bug fixes.
- Upgrading:
This release is ABI compatible with the previous release.
ISO C11 standard is now enforced for C files.
SVC is now strictly disallowed for 2-pass encoding; enabling it will return
VPX_CODEC_INVALID_PARAM.
VP9 High Bitdepth (HBD) input validation is now enabled by default. If the
input contains values outside the valid range, the encoder will return
VPX_CODEC_INVALID_PARAM. Use the new VP9E_SET_VALIDATE_HBD_INPUT control
(or vpxenc --validate-hbd-input=0) to disable this validation.
VP9 now sets the returned image width (w) and height (h) to the actual
width and height, rather than the stride and aligned height. This is a
behavior change that may affect applications relying on w being equal to the
stride or h being the aligned height.
Strict validation has been added to some APIs:
- Encoders (VP8/VP9) now reject input images with unequal U and V strides.
- vpx_img_alloc() and vpx_img_wrap() now strictly validate the image format.
- External rate control (RTC) API now validates configuration inputs.
- VP9 SVC now validates spatial layer ID input.
- Enhancement:
Added Arm Neon DotProd subpel variance paths.
Optimized Neon HBD sadx4d and sad_skipx4d functions.
Added AVX2/AVX512 implementations for various vpx_highbd predictor
functions.
Added support for MSVC v145 (Visual Studio 2026).
Added configure option --disable-x86-asm.
- Bug fixes:
Fix to heap buffer overflow / out-of-bounds write in vp9_postproc,
vp8-multi-res-encoding, vpx_setup_noise, set_mb_ssim_rdmult_scaling,
vp9_change_config (resolution change), vp9_dec_alloc_row_mt_mem (decode
coeffs), and vp8_sixtap_predict (LoongArch).
Fix to integer overflow in vp9-svc (layer resolution, duration),
set_mb_ssim_rdmult_scaling, vp8_encode_frame, calc_pframe_target_size,
y4minput buffer size calculations, and get_token_alloc.
Fix to VP8 decoder crash on flush with no fragments.
Fix to VP8 decoder potential hang/slowdown with corrupt partition 0 size.
Fix to VP9 decoder crash with invalid reference frame index.
Fix to VP9 highbitdepth encoder format mismatch.
Fix to VP9 float-to-int overflow in validate_config (EOS count) and with
zero bitrate.
Fix to VP8 decoder multithreading corruption flag reset at start of
frame.
Fix to VP8 decoder accepting inter frames on resolution change before
keyframe.
Fix to VP8 encoder reference frame dimension validation.
Fix to VP8 encoder temporal layer ID validation.
Fix to VP8 encoder missing setjmp in VP8E_SET_SCALEMODE.
Fix to VP9 SVC encoder crash with dynamic resize and cyclic refresh
(aq_mode=3).
Fix to VP9 1-pass rate control last_boosted_qindex clamping and
VP9E_SET_QUANTIZER_ONE_PASS validation.
Fix to NV12 x_chroma_shift calculation in vpx_image and image2yuvconfig.
Fix to AVX-512 CPU feature detection on older x86 CPUs.
Fix to x86_abi_support.asm placing read-only data tables in .rdata for
Windows.
Fix to configure disabling _FORTIFY_SOURCE on Linux.
Fix to file leaks on error paths in vpxdec and video reader/writer
utilities.
Fix to crash/undefined behavior in vpx_img_flip with formats without alpha.
2026-01-06 v1.16.0 "Xenonetta Duck"
This release includes Arm SVE2 and Neon optimizations for 12-tap filters,
AVX512 implementations for SAD, support for per-frame and per-spatial-layer
PSNR calculation, and numerous bug fixes.
- Upgrading:
This release is ABI incompatible with the previous release.
Unit tests require C++17 to build.
Support for 32-bit iOS targets (armv7, armv7s, and i386) has been removed.
- Enhancement:
Optimized Arm SVE2 and Neon implementations for 12-tap convolution filters.
Optimized Neon High Bitdepth (HBD) SAD and sad_avg functions.
Added Arm Neon DotProd and I8MM implementations for vpx_convolve12.
Added AVX512 implementations for SAD64 and sad_skip functions.
Added SSSE3 and AVX2 implementations for 12-tap temporal filter prediction.
Added support for per-frame and per-spatial-layer PSNR calculation.
Adjusted temporal filter strength to improve visual quality and reduce block
artifacts.
Added support for darwin24 (macOS 15) and darwin25 (macOS 26).
libwebm is upgraded to commit b4f01ea.
- Bug fixes:
Fix to heap buffer overflow in vp9_deblock, vp9_post_proc_frame, and
vp9_pack_bitstream.
Fix to integer overflow in vp9_highbd_post_proc, vp9_rc_regulate_q,
tiny_ssim, and vp9_calc_pframe_target_size_one_pass_cbr.
Fix to use-of-uninitialized-value in vp9_highbd_post_proc, mfqe, and
vp8_datarate_test.
Fix to out-of-bounds in log_tile_cols_from_picsize_level.
Fix to double free on initialization failure in vpx_codec_enc_init_multi.
Fix to division-by-zero crash in vpxenc with 0 FPS numerator input.
Fix to various build failures for Arm/SVE2, macOS cross-compilation, and
Xcode 16.
2025-05-28 v1.15.2 "Wigeon Duck"
This release fixes CVE-2025-5283 (bug webm:413411335), and is ABI compatible
with the previous release.
2025-01-09 v1.15.1 "Wigeon Duck"
This release bumps up the SO major version and fixes the language about ABI
compatibility in the previous release changelog.
2024-10-22 v1.15.0 "Wigeon Duck"
This release includes new codec control for key frame filtering, more Neon
optimizations, improvements to RTC encoding and bug fixes.
- Upgrading:
This release is ABI incompatible with the previous release.
It is strongly recommended to skip this release and upgrade to v1.15.1 since
the shared object was versioned incorrectly, as shown in
https://issues.webmproject.org/issues/384672478.
Temporal filtering improvement that can be turned on with the new codec
control VP9E_SET_KEY_FRAME_FILTERING, which gives 1+% BD-rate saving with
minimal encoder time increase.
libwebm is upgraded to libwebm-1.0.0.31-10-g3b63004
- Enhancement:
Neon optimization speed up
1-3% speed up across speed 5 to 10 for RTC
3% speed up for speed 0 and 1 for VoD in standard bitdepth
3% and 7% speed up for speed 0 and 1 respectively for VoD in high bitdepth
Scene detection is allowed for all RTC speeds (>=5)
Support profile guided optimizations
Delta quantization parameters for UV channels for vp8 is supported in RTC
rate control library
Rate control parameters are reset and maximum QP is enforced on scene
changes in SVC when there is no inter-layer prediction
- Bug fixes:
Fix to Uninitialized scalar variable in `vp9_rd_pick_inter_mode_sb()`
Fix to Integer-overflow in `resize_multistep`
Fix to Heap-buffer-overflow in `vpx_sad64x64_avx2`
Fix to Crash in `vpx_sad8x8_sse2`
Fix to Assertion in `write_modes`
Support profile guided optimizations
Fix to Integer-overflow in `encode_frame_to_data_rate`
Fix to Integer-overflow in `vp9_svc_check_reset_layer_rc_flag`
Fix to core dump error from /usr/bin/tools/tiny_ssim --help
Fix to use-of-uninitialized-value in `vp9_setup_tpl_stats`
Fix to Undefined-shift in `vp9_cyclic_refresh_setup`
Fix to redundant `&& __GNUC__` preproc check
Fix to valgrind warning in EncodeAPI.OssFuzz69906
Fix to Index-out-of-bounds in `vp8_rd_pick_inter_mode`
Fix to Integer-overflow in `vp8_pick_frame_size`
Fix to Use-of-uninitialized-value in `vpx_codec_peek_stream_info`
Fix to log clutters with the message "Warning: Desired height too large"
Fix to Integer-overflow in `vp9_svc_adjust_avg_frame_qindex`
Fix to integer overflows caused by huge target bitrate, frame rate, or
g_timebase numerator or denominator
Fix to missing license headers
Fix to build failure for Android Armv7
Fix to integer overflows in image helpers
Fix to Integer-overflow in `vp9_calc_iframe_target_size_one_pass_cbr`
Fix to Heap-buffer-overflow in `vp9_pick_inter_mode`
Fix to Segv in `vp9_multi_thread_tile_init`
Fix to Use-of-uninitialized-value in `vp9_row_mt_sync_mem_dealloc`
Fix to Crash in `mbloop_filter_vertical_edge_c`
Fix to Check failed in CheckUnwind
Fix to Heap-buffer-overflow in `write_modes_b` and `vpx_write`
Fix to Possible signed integer overflow found in `vpx_codec_encode`
Fix to build conflicts between Abseil and libaom/libvpx in Win ARM64 builds
Fix to build failures on aarch64
Fix to Data race in libvpx ARM NEON
Fix to Heap-buffer-overflow in `scale_plane_1_to_2_phase_0`
Fix to integer overflow in `encode_mb_row`
Fix to Floating-point-exception in `vp8_pick_frame_size`
Fix to Heap-buffer-overflow in `vp9_enc_setup_mi`
Fix to build failure with --target=arm64-win64-vs17
Fix to heap-buffer-overflow write in `vpx_img_read()`
Fix to C vs armv8-linux-gcc encode mismatches for `y4m_360p_10bit_input`
Fix to Null-dereference READ in `ml_predict_var_rd_partitioning`
Fix to Heap-buffer-overflow in `vpx_scaled_2d_ssse3`
Fix to Crash in `convolve_horiz`
Fix to Ill in `vpx_scaled_2d_ssse3`
Fix to Global-buffer-overflow in `cost_coeffs`
2024-05-21 v1.14.1 "Venetian Duck"
This release includes enhancements and bug fixes.
- Upgrading:
This release is ABI compatible with the previous release.
- Enhancement:
Improved the detection of compiler support for AArch64 extensions,
particularly SVE.
Added vpx_codec_get_global_headers() support for VP9.
- Bug fixes:
Added buffer bounds checks to vpx_writer and vpx_write_bit_buffer.
Fix to GetSegmentationData() crash in aq_mode=0 for RTC rate control.
Fix to alloc for row_base_thresh_freq_fac.
Free row mt memory before freeing cpi->tile_data.
Fix to buffer alloc for vp9_bitstream_worker_data.
Fix to VP8 race issue for multi-thread with pnsr_calc.
Fix to uv width/height in vp9_scale_and_extend_frame_ssse3.
Fix to integer division by zero and overflow in calc_pframe_target_size().
Fix to integer overflow in vpx_img_alloc() & vpx_img_wrap()(CVE-2024-5197).
Fix to UBSan error in vp9_rc_update_framerate().
Fix to UBSan errors in vp8_new_framerate().
Fix to integer overflow in vp8 encodeframe.c.
Handle EINTR from sem_wait().
2024-01-02 v1.14.0 "Venetian Duck"
This release drops support for old C compilers, such as Visual Studio 2012
and older, that disallow mixing variable declarations and statements (a C99
feature). It adds support for run-time CPU feature detection for Arm
platforms, as well as support for darwin23 (macOS 14).
- Upgrading:
This release is ABI incompatible with the previous release.
Various new features for rate control library for real-time: SVC parallel
encoding, loopfilter level, support for frame dropping, and screen content.
New callback function send_tpl_gop_stats for vp9 external rate control
library, which can be used to transmit TPL stats for a group of pictures. A
public header vpx_tpl.h is added for the definition of TPL stats used in
this callback.
libwebm is upgraded to libwebm-1.0.0.29-9-g1930e3c.
- Enhancement:
Improvements on Neon optimizations: VoD: 12-35% speed up for bitdepth 8,
68%-151% speed up for high bitdepth.
Improvements on AVX2 and SSE optimizations.
Improvements on LSX optimizations for LoongArch.
42-49% speedup on speed 0 VoD encoding.
Android API level predicates.
- Bug fixes:
Fix to missing prototypes from the rtcd header.
Fix to segfault when total size is enlarged but width is smaller.
Fix to the build for arm64ec using MSVC.
Fix to copy BLOCK_8X8's mi to PICK_MODE_CONTEXT::mic.
Fix to -Wshadow warnings.
Fix to heap overflow in vpx_get4x4sse_cs_neon.
Fix to buffer overrun in highbd Neon subpel variance filters.
Added bitexact encode test script.
Fix to -Wl,-z,defs with Clang's sanitizers.
Fix to decoder stability after error & continued decoding.
Fix to mismatch of VP9 encode with NEON intrinsics with C only version.
Fix to Arm64 MSVC compile vpx_highbd_fdct4x4_neon.
Fix to fragments count before use.
Fix to a case where target bandwidth is 0 for SVC.
Fix mask in vp9_quantize_avx2,highbd_get_max_lane_eob.
Fix to int overflow in vp9_calc_pframe_target_size_one_pass_cbr.
Fix to integer overflow in vp8,ratectrl.c.
Fix to integer overflow in vp9 svc.
Fix to avg_frame_bandwidth overflow.
Fix to per frame qp for temporal layers.
Fix to unsigned integer overflow in sse computation.
Fix to uninitialized mesh feature for BEST mode.
Fix to overflow in highbd temporal_filter.
Fix to unaligned loads w/w==4 in vpx_convolve_copy_neon.
Skip arm64_neon.h workaround w/VS >= 2019.
Fix to c vs avx mismatch of diamond_search_sad().
Fix to c vs intrinsic mismatch of vpx_hadamard_32x32() function.
Fix to a bug in vpx_hadamard_32x32_neon().
Fix to Clang -Wunreachable-code-aggressive warnings.
Fix to a bug in vpx_highbd_hadamard_32x32_neon().
Fix to -Wunreachable-code in mfqe_partition.
Force mode search on 64x64 if no mode is selected.
Fix to ubsan failure caused by left shift of negative.
Fix to integer overflow in calc_pframe_target_size.
Fix to float-cast-overflow in vp8_change_config().
Fix to a null ptr before use.
Conditionally skip using inter frames in speed features.
Remove invalid reference frames.
Disable intra mode search speed features conditionally.
Set nonrd keyframe under dynamic change of deadline for rtc.
Fix to scaled reference offsets.
Set skip_recode=0 in nonrd_pick_sb_modes.
Fix to an edge case when downsizing to one.
Fix to a bug in frame scaling.
Fix to pred buffer stride.
Fix to a bug in simple motion search.
Update frame size in actual encoding.
2023-09-29 v1.13.1 "Ugly Duckling"
This release contains two security related fixes. One each for VP8 and VP9.
- Upgrading:
This release is ABI compatible with the previous release.
- Bug fixes:
https://crbug.com/1486441 (CVE-2023-5217)
Fix to a crash related to VP9 encoding (#1642, CVE-2023-6349)
2023-01-31 v1.13.0 "Ugly Duckling"
This release includes more Neon and AVX2 optimizations, adds a new codec
control to set per frame QP, upgrades GoogleTest to v1.12.1, and includes
numerous bug fixes.
- Upgrading:
This release is ABI incompatible with the previous release.
New codec control VP9E_SET_QUANTIZER_ONE_PASS to set per frame QP.
GoogleTest is upgraded to v1.12.1.
.clang-format is upgraded to clang-format-11.
VPX_EXT_RATECTRL_ABI_VERSION was bumped due to incompatible changes to the
feature of using external rate control models for vp9.
- Enhancement:
Numerous improvements on Neon optimizations.
Numerous improvements on AVX2 optimizations.
Additional ARM targets added for Visual Studio.
- Bug fixes:
Fix to calculating internal stats when frame dropped.
Fix to segfault for external resize test in vp9.
Fix to build system with replacing egrep with grep -E.
Fix to a few bugs with external RTC rate control library.
Fix to make SVC work with VBR.
Fix to key frame setting in VP9 external RC.
Fix to -Wimplicit-int (Clang 16).
Fix to VP8 external RC for buffer levels.
Fix to VP8 external RC for dynamic update of layers.
Fix to VP9 auto level.
Fix to off-by-one error of max w/h in validate_config.
Fix to make SVC work for Profile 1.
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
@@ -36,6 +395,7 @@
levels, and includes several improvements to NEON and numerous bug fixes.
- Upgrading:
This release is ABI incompatible with the previous release.
New codec control is added to get quantization parameters and loop filter
levels.
@@ -61,6 +421,7 @@
well as numerous bug fixes.
- Upgrading:
This release is ABI incompatible with the previous release.
New codec control is added to disable loopfilter for VP9.
New encoder control is added to disable feature to increase Q on overshoot
@@ -91,6 +452,7 @@
well as incremental improvements.
- Upgrading:
This release is ABI compatible with the previous release.
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.
@@ -114,12 +476,14 @@
This release collects incremental improvements to many aspects of the library.
- Upgrading:
This release is ABI compatible with the previous release.
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.
- Upgrading:
This release is ABI incompatible with the previous release.
VP8E_SET_CPUUSED now accepts values up to 9 for vp9.
VPX_CTRL_VP9E_SET_MAX_INTER_BITRATE_PCT had a spelling fix (was VP8E).
The --sdk-path option has been removed. If you were using it to build for
@@ -138,7 +502,8 @@
This release focused on encoding performance for realtime and VOD use cases.
- Upgrading:
This adds and improves several vp9 controls. Most are related to SVC:
This release is ABI incompatible with the previous release. This adds and
improves several vp9 controls. Most are related to SVC:
VP9E_SET_SVC_FRAME_DROP_LAYER:
- Frame dropping in SVC.
VP9E_SET_SVC_INTER_LAYER_PRED:
+71 -5
View File
@@ -1,5 +1,3 @@
v1.12.0 Torrent Duck
Welcome to the WebM VP8/VP9 Codec SDK!
COMPILING THE APPLICATIONS/LIBRARIES:
@@ -9,7 +7,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
1. Prerequisites
* All x86 targets require the Yasm[1] assembler be installed[2].
* All x86 targets require the NASM[0] or Yasm[1] assembler be installed[2].
* 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.
@@ -20,11 +18,15 @@ COMPILING THE APPLICATIONS/LIBRARIES:
source[7]. These requirements are optional if not running the unit
tests.
[0]: https://www.nasm.us/
[1]: http://www.tortall.net/projects/yasm
[2]: For Visual Studio the base yasm binary (not vsyasm) should be in the
PATH for Visual Studio. For VS2017 it is sufficient to rename
yasm-<version>-<arch>.exe to yasm.exe and place it in:
Program Files (x86)/Microsoft Visual Studio/2017/<level>/Common7/Tools/
The MSYS2 version of the yasm binary can also be used and avoids an
issue caused by a missing Visual C++ Redistributable install (Visual
Studio 2010, MSVCR100.dll).
[3]: http://www.cygwin.com
[4]: http://www.msys2.org/
[5]: http://www.doxygen.org
@@ -64,9 +66,20 @@ COMPILING THE APPLICATIONS/LIBRARIES:
arm64-android-gcc
arm64-darwin-gcc
arm64-darwin20-gcc
arm64-darwin21-gcc
arm64-darwin22-gcc
arm64-darwin23-gcc
arm64-darwin24-gcc
arm64-darwin25-gcc
arm64-linux-gcc
arm64-win64-gcc
arm64-win64-vs15
arm64-win64-vs16
arm64-win64-vs16-clangcl
arm64-win64-vs17
arm64-win64-vs17-clangcl
arm64-win64-vs18
arm64-win64-vs18-clangcl
armv7-android-gcc
armv7-darwin-gcc
armv7-linux-rvct
@@ -75,8 +88,12 @@ COMPILING THE APPLICATIONS/LIBRARIES:
armv7-win32-gcc
armv7-win32-vs14
armv7-win32-vs15
armv7-win32-vs16
armv7-win32-vs17
armv7s-darwin-gcc
armv8-linux-gcc
loongarch32-linux-gcc
loongarch64-linux-gcc
mips32-linux-gcc
mips64-linux-gcc
ppc64le-linux-gcc
@@ -104,6 +121,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
x86-win32-vs15
x86-win32-vs16
x86-win32-vs17
x86-win32-vs18
x86_64-android-gcc
x86_64-darwin9-gcc
x86_64-darwin10-gcc
@@ -117,6 +135,11 @@ COMPILING THE APPLICATIONS/LIBRARIES:
x86_64-darwin18-gcc
x86_64-darwin19-gcc
x86_64-darwin20-gcc
x86_64-darwin21-gcc
x86_64-darwin22-gcc
x86_64-darwin23-gcc
x86_64-darwin24-gcc
x86_64-darwin25-gcc
x86_64-iphonesimulator-gcc
x86_64-linux-gcc
x86_64-linux-icc
@@ -126,6 +149,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
x86_64-win64-vs15
x86_64-win64-vs16
x86_64-win64-vs17
x86_64-win64-vs18
generic-gnu
The generic-gnu target, in conjunction with the CROSS environment variable,
@@ -138,8 +162,8 @@ COMPILING THE APPLICATIONS/LIBRARIES:
$ CROSS=mipsel-linux-uclibc- ../libvpx/configure
In addition, the executables to be invoked can be overridden by specifying the
environment variables: CC, AR, LD, AS, STRIP, NM. Additional flags can be
passed to these executables with CFLAGS, LDFLAGS, and ASFLAGS.
environment variables: AR, AS, CC, CXX, LD, STRIP. Additional flags can be
passed to these executables with ASFLAGS, CFLAGS, CXXFLAGS, and LDFLAGS.
6. Configuration errors
If the configuration step fails, the first step is to look in the error log.
@@ -169,7 +193,49 @@ CODE STYLE:
See also: http://clang.llvm.org/docs/ClangFormat.html
PROFILE GUIDED OPTIMIZATION (PGO)
Profile Guided Optimization can be enabled for Clang builds using the
commands:
$ export CC=clang
$ export CXX=clang++
$ ../libvpx/configure --enable-profile
$ make
Generate one or multiple PGO profile files by running vpxdec or vpxenc. For
example:
$ ./vpxdec ../vpx/out_ful/vp90-2-sintel_1280x546_tile_1x4_1257kbps.webm \
-o - > /dev/null
To convert and merge the raw profile files, use the llvm-profdata tool:
$ llvm-profdata merge -o perf.profdata default_8382761441159425451_0.profraw
Then, rebuild the project with the new profile file:
$ make clean
$ ../libvpx/configure --use-profile=perf.profdata
$ make
Note: Always use the llvm-profdata from the toolchain that is used for
compiling the PGO-enabled binary.
To observe the improvements from a PGO-enabled build, enable and compare the
list of failed optimizations by using the -Rpass-missed compiler flag. For
example, to list the failed loop vectorizations:
$ ../libvpx/configure --use-profile=perf.profdata \
--extra-cflags=-Rpass-missed=loop-vectorize
For guidance on utilizing PGO files to identify potential optimization
opportunities, see: tools/README.pgo.md
SUPPORT
This library is an open source project supported by its community. Please
email webm-discuss@webmproject.org for help.
BUG REPORTS
Bug reports can be filed in the libvpx component of the issue tracker:
https://issues.webmproject.org/issues/new?component=1618984&template=2023833.
For security reports, select 'Security report' from the Template dropdown.
+16 -12
View File
@@ -8,13 +8,13 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "args.h"
#include "vpx/vpx_integer.h"
#include "vpx_ports/msvc.h"
#if defined(__GNUC__)
__attribute__((noreturn)) extern void die(const char *fmt, ...);
@@ -24,7 +24,7 @@ __declspec(noreturn) extern void die(const char *fmt, ...);
extern void die(const char *fmt, ...);
#endif
struct arg arg_init(char **argv) {
static struct arg arg_init(char **argv) {
struct arg a;
a.argv = argv;
@@ -91,24 +91,31 @@ char **argv_dup(int argc, const char **argv) {
}
void arg_show_usage(FILE *fp, const struct arg_def *const *defs) {
char option_text[40] = { 0 };
for (; *defs; defs++) {
const struct arg_def *def = *defs;
char *short_val = def->has_val ? " <arg>" : "";
char *long_val = def->has_val ? "=<arg>" : "";
int n = 0;
// Short options are indented with two spaces. Long options are indented
// with 12 spaces.
if (def->short_name && def->long_name) {
char *comma = def->has_val ? "," : ", ";
snprintf(option_text, 37, "-%s%s%s --%s%6s", def->short_name, short_val,
comma, def->long_name, long_val);
n = fprintf(fp, " -%s%s%s --%s%s", def->short_name, short_val, comma,
def->long_name, long_val);
} else if (def->short_name)
snprintf(option_text, 37, "-%s%s", def->short_name, short_val);
n = fprintf(fp, " -%s%s", def->short_name, short_val);
else if (def->long_name)
snprintf(option_text, 37, " --%s%s", def->long_name, long_val);
n = fprintf(fp, " --%s%s", def->long_name, long_val);
fprintf(fp, " %-37s\t%s\n", option_text, def->desc);
// Descriptions are indented with 40 spaces. If an option is 40 characters
// or longer, its description starts on the next line.
if (n < 40)
for (int i = 0; i < 40 - n; i++) fputc(' ', fp);
else
fputs("\n ", fp);
fprintf(fp, "%s\n", def->desc);
if (def->enums) {
const struct arg_enum_list *listptr;
@@ -135,7 +142,6 @@ unsigned int arg_parse_uint(const struct arg *arg) {
}
die("Option %s: Invalid character '%c'\n", arg->name, *endptr);
return 0;
}
int arg_parse_int(const struct arg *arg) {
@@ -152,7 +158,6 @@ int arg_parse_int(const struct arg *arg) {
}
die("Option %s: Invalid character '%c'\n", arg->name, *endptr);
return 0;
}
struct vpx_rational {
@@ -209,7 +214,6 @@ int arg_parse_enum(const struct arg *arg) {
if (!strcmp(arg->val, listptr->name)) return listptr->val;
die("Option %s: Invalid value '%s'\n", arg->name, arg->val);
return 0;
}
int arg_parse_enum_or_int(const struct arg *arg) {
+5 -9
View File
@@ -28,8 +28,7 @@ struct arg_enum_list {
const char *name;
int val;
};
#define ARG_ENUM_LIST_END \
{ 0 }
#define ARG_ENUM_LIST_END { 0 }
typedef struct arg_def {
const char *short_name;
@@ -38,19 +37,16 @@ typedef struct arg_def {
const char *desc;
const struct arg_enum_list *enums;
} arg_def_t;
#define ARG_DEF(s, l, v, d) \
{ s, l, v, d, NULL }
#define ARG_DEF_ENUM(s, l, v, d, e) \
{ s, l, v, d, e }
#define ARG_DEF_LIST_END \
{ 0 }
#define ARG_DEF(s, l, v, d) { s, l, v, d, NULL }
#define ARG_DEF_ENUM(s, l, v, d, e) { s, l, v, d, e }
#define ARG_DEF_LIST_END { 0 }
struct arg arg_init(char **argv);
int arg_match(struct arg *arg_, const struct arg_def *def, char **argv);
const char *arg_next(struct arg *arg);
void arg_show_usage(FILE *fp, const struct arg_def *const *defs);
char **argv_dup(int argc, const char **argv);
// Note: arg_match() must be called before invoking these functions.
unsigned int arg_parse_uint(const struct arg *arg);
int arg_parse_int(const struct arg *arg);
struct vpx_rational arg_parse_rational(const struct arg *arg);
+12 -8
View File
@@ -8,18 +8,16 @@
## be found in the AUTHORS file in the root of the source tree.
##
# Ignore this file during non-NDK builds.
ifdef NDK_ROOT
#
# This file is to be used for compiling libvpx for Android using the NDK.
# In an Android project place a libvpx checkout in the jni directory.
# Run the configure script from the jni directory. Base libvpx
# encoder/decoder configuration will look similar to:
# ./libvpx/configure --target=armv7-android-gcc --disable-examples \
# ./libvpx/configure --target=arm64-android-gcc --disable-examples \
# --enable-external-build
#
# When targeting Android, realtime-only is enabled by default. This can
# be overridden by adding the command line flag:
# --disable-realtime-only
#
# This will create .mk files that contain variables that contain the
# source files to compile.
#
@@ -27,7 +25,7 @@
# Android.mk file in the libvpx directory:
# LOCAL_PATH := $(call my-dir)
# include $(CLEAR_VARS)
# include jni/libvpx/build/make/Android.mk
# include libvpx/build/make/Android.mk
#
# By default libvpx will use the 'cpufeatures' module from the NDK. This allows
# the library to be built with all available optimizations (SSE2->AVX512 for
@@ -36,11 +34,14 @@
# but the resulting library *must* be run on devices supporting all of the
# enabled extensions. They can be disabled individually with
# --disable-{sse2, sse3, ssse3, sse4_1, avx, avx2, avx512}
# --disable-neon[-asm]
# --disable-neon{, -asm, -neon-dotprod, -neon-i8mm}
# --disable-sve
# --disable-{dspr2, msa}
#
# Running ndk-build will build libvpx and include it in your project.
# Running ndk-build will build libvpx and include it in your project. Set
# APP_ABI to match the --target passed to configure:
# https://developer.android.com/ndk/guides/application_mk#app_abi.
#
CONFIG_DIR := $(LOCAL_PATH)/
@@ -83,6 +84,8 @@ include $(LIBVPX_PATH)/libs.mk
# Optimise the code. May want to revisit this setting in the future.
LOCAL_CFLAGS := -O3
LOCAL_CONLYFLAGS := -std=c11
# For x86, include the source code in the search path so it will find files
# like x86inc.asm and x86_abi_support.asm
LOCAL_ASMFLAGS := -I$(LIBVPX_PATH)
@@ -212,3 +215,4 @@ endif
ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
$(call import-module,android/cpufeatures)
endif
endif # NDK_ROOT
+32 -8
View File
@@ -21,9 +21,9 @@ all: .DEFAULT
clean:: .DEFAULT
exampletest: .DEFAULT
install:: .DEFAULT
test:: .DEFAULT
test-no-data-check:: .DEFAULT
testdata:: .DEFAULT
test: .DEFAULT
test-no-data-check: .DEFAULT
testdata: .DEFAULT
utiltest: .DEFAULT
exampletest-no-data-check utiltest-no-data-check: .DEFAULT
test_%: .DEFAULT ;
@@ -111,13 +111,13 @@ exampletest:
.PHONY: install
install::
.PHONY: test
test::
test:
.PHONY: testdata
testdata::
testdata:
.PHONY: utiltest
utiltest:
.PHONY: test-no-data-check exampletest-no-data-check utiltest-no-data-check
test-no-data-check::
test-no-data-check:
exampletest-no-data-check utiltest-no-data-check:
# Force to realign stack always on OS/2
@@ -143,6 +143,16 @@ $(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2
$(BUILD_PFX)%_avx512.c.d: CFLAGS += -mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl
$(BUILD_PFX)%_avx512.c.o: CFLAGS += -mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl
# AARCH64
$(BUILD_PFX)%_neon_dotprod.c.d: CFLAGS += -march=armv8.2-a+dotprod
$(BUILD_PFX)%_neon_dotprod.c.o: CFLAGS += -march=armv8.2-a+dotprod
$(BUILD_PFX)%_neon_i8mm.c.d: CFLAGS += -march=armv8.2-a+dotprod+i8mm
$(BUILD_PFX)%_neon_i8mm.c.o: CFLAGS += -march=armv8.2-a+dotprod+i8mm
$(BUILD_PFX)%_sve.c.d: CFLAGS += -march=armv8.2-a+dotprod+i8mm+sve
$(BUILD_PFX)%_sve.c.o: CFLAGS += -march=armv8.2-a+dotprod+i8mm+sve
$(BUILD_PFX)%_sve2.c.d: CFLAGS += -march=armv9-a+i8mm+sve2
$(BUILD_PFX)%_sve2.c.o: CFLAGS += -march=armv9-a+i8mm+sve2
# POWER
$(BUILD_PFX)%_vsx.c.d: CFLAGS += -maltivec -mvsx
$(BUILD_PFX)%_vsx.c.o: CFLAGS += -maltivec -mvsx
@@ -304,6 +314,19 @@ $(1):
$(qexec)$$(AR) $$(ARFLAGS) $$@ $$^
endef
# Don't use -Wl,-z,defs with Clang's sanitizers.
#
# Clang's AddressSanitizer documentation says "When linking shared libraries,
# the AddressSanitizer run-time is not linked, so -Wl,-z,defs may cause link
# errors (don't use it with AddressSanitizer)." See
# https://clang.llvm.org/docs/AddressSanitizer.html#usage.
NO_UNDEFINED := -Wl,-z,defs
ifeq ($(findstring clang,$(CC)),clang)
ifneq ($(filter -fsanitize=%,$(LDFLAGS)),)
NO_UNDEFINED :=
endif
endif
define so_template
# Not using a pattern rule here because we don't want to generate empty
# archives when they are listed as a dependency in files not responsible
@@ -313,7 +336,8 @@ define so_template
$(1):
$(if $(quiet),@echo " [LD] $$@")
$(qexec)$$(LD) -shared $$(LDFLAGS) \
-Wl,--no-undefined -Wl,-soname,$$(SONAME) \
$(NO_UNDEFINED) \
-Wl,-soname,$$(SONAME) \
-Wl,--version-script,$$(EXPORTS_FILE) -o $$@ \
$$(filter %.o,$$^) $$(extralibs)
endef
@@ -465,6 +489,6 @@ INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins
all: $(BUILD_TARGETS)
install:: $(INSTALL_TARGETS)
dist: $(INSTALL_TARGETS)
test::
test:
.SUFFIXES: # Delete default suffix rules
+152 -40
View File
@@ -74,6 +74,8 @@ Build options:
--cpu=CPU optimize for a specific cpu rather than a family
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
--extra-cxxflags=ECXXFLAGS add ECXXFLAGS to CXXFLAGS [$CXXFLAGS]
--use-profile=PROFILE_FILE
Use PROFILE_FILE for PGO
${toggle_extra_warnings} emit harmless warnings (always non-fatal)
${toggle_werror} treat warnings as errors, if possible
(not available with all compilers)
@@ -81,6 +83,7 @@ Build options:
${toggle_pic} turn on/off Position Independent Code
${toggle_ccache} turn on/off compiler cache
${toggle_debug} enable/disable debug mode
${toggle_profile} enable/disable profiling
${toggle_gprof} enable/disable gprof profiling instrumentation
${toggle_gcov} enable/disable gcov coverage instrumentation
${toggle_thumb} enable/disable building arm assembly in thumb mode
@@ -429,6 +432,42 @@ check_gcc_machine_options() {
fi
}
check_neon_sve_bridge_compiles() {
if enabled sve; then
check_cc -march=armv8.2-a+dotprod+i8mm+sve <<EOF
#ifndef __ARM_NEON_SVE_BRIDGE
#error 1
#endif
#include <arm_sve.h>
#include <arm_neon_sve_bridge.h>
EOF
compile_result=$?
if [ ${compile_result} -eq 0 ]; then
# Check whether the compiler can compile SVE functions that require
# backup/restore of SVE registers according to AAPCS. Clang for Windows
# used to fail this, see
# https://github.com/llvm/llvm-project/issues/80009.
check_cc -march=armv8.2-a+dotprod+i8mm+sve <<EOF
#include <arm_sve.h>
void other(void);
svfloat32_t func(svfloat32_t a) {
other();
return a;
}
EOF
compile_result=$?
fi
if [ ${compile_result} -ne 0 ]; then
log_echo " disabling sve: arm_neon_sve_bridge.h not supported by compiler"
log_echo " disabling sve2: arm_neon_sve_bridge.h not supported by compiler"
disable_feature sve
disable_feature sve2
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-sve --disable-sve2 "
fi
fi
}
check_gcc_avx512_compiles() {
if disabled gcc; then
return
@@ -442,13 +481,11 @@ 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() {
@@ -511,7 +548,6 @@ AR=${AR}
LD=${LD}
AS=${AS}
STRIP=${STRIP}
NM=${NM}
CFLAGS = ${CFLAGS}
CXXFLAGS = ${CXXFLAGS}
@@ -523,6 +559,7 @@ AS_SFX = ${AS_SFX:-.asm}
EXE_SFX = ${EXE_SFX}
VCPROJ_SFX = ${VCPROJ_SFX}
RTCD_OPTIONS = ${RTCD_OPTIONS}
LIBWEBM_CXXFLAGS = ${LIBWEBM_CXXFLAGS}
LIBYUV_CXXFLAGS = ${LIBYUV_CXXFLAGS}
EOF
@@ -612,6 +649,9 @@ process_common_cmdline() {
--extra-cxxflags=*)
extra_cxxflags="${optval}"
;;
--use-profile=*)
pgo_file=${optval}
;;
--enable-?*|--disable-?*)
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
if is_in ${option} ${ARCH_EXT_LIST}; then
@@ -708,7 +748,6 @@ setup_gnu_toolchain() {
LD=${LD:-${CROSS}${link_with_cc:-ld}}
AS=${AS:-${CROSS}as}
STRIP=${STRIP:-${CROSS}strip}
NM=${NM:-${CROSS}nm}
AS_SFX=.S
EXE_SFX=
}
@@ -793,7 +832,7 @@ process_common_toolchain() {
tgt_isa=x86_64
tgt_os=`echo $gcctarget | sed 's/.*\(darwin1[0-9]\).*/\1/'`
;;
*darwin2[0-1]*)
*darwin2[0-5]*)
tgt_isa=`uname -m`
tgt_os=`echo $gcctarget | sed 's/.*\(darwin2[0-9]\).*/\1/'`
;;
@@ -844,6 +883,10 @@ process_common_toolchain() {
# Enable the architecture family
case ${tgt_isa} in
arm64 | armv8)
enable_feature arm
enable_feature aarch64
;;
arm*)
enable_feature arm
;;
@@ -860,8 +903,14 @@ process_common_toolchain() {
;;
esac
# PIC is probably what we want when building shared libs
# Position independent code (PIC) is probably what we want when building
# shared libs or position independent executable (PIE) targets.
enabled shared && soft_enable pic
check_cpp << EOF || soft_enable pic
#if !(__pie__ || __PIE__)
#error Neither __pie__ or __PIE__ are set
#endif
EOF
# Minimum iOS version for all target platforms (darwin and iphonesimulator).
# Shared library framework builds are only possible on iOS 8 and later.
@@ -942,7 +991,7 @@ process_common_toolchain() {
add_cflags "-mmacosx-version-min=10.15"
add_ldflags "-mmacosx-version-min=10.15"
;;
*-darwin2[0-1]-*)
*-darwin2[0-5]-*)
add_cflags "-arch ${toolchain%%-*}"
add_ldflags "-arch ${toolchain%%-*}"
;;
@@ -967,27 +1016,30 @@ process_common_toolchain() {
;;
esac
# Process ARM architecture variants
# Process architecture variants
case ${toolchain} in
arm*)
# on arm, isa versions are supersets
case ${tgt_isa} in
arm64|armv8)
soft_enable neon
case ${toolchain} in
armv7*-darwin*)
# Runtime cpu detection is not defined for these targets.
enabled runtime_cpu_detect && disable_feature runtime_cpu_detect
;;
armv7|armv7s)
soft_enable neon
# Only enable neon_asm when neon is also enabled.
enabled neon && soft_enable neon_asm
# If someone tries to force it through, die.
if disabled neon && enabled neon_asm; then
die "Disabling neon while keeping neon-asm is not supported"
fi
*)
soft_enable runtime_cpu_detect
;;
esac
asm_conversion_cmd="cat"
if [ ${tgt_isa} = "armv7" ] || [ ${tgt_isa} = "armv7s" ]; then
soft_enable neon
# Only enable neon_asm when neon is also enabled.
enabled neon && soft_enable neon_asm
# If someone tries to force it through, die.
if disabled neon && enabled neon_asm; then
die "Disabling neon while keeping neon-asm is not supported"
fi
fi
asm_conversion_cmd="cat"
case ${tgt_cc} in
gcc)
link_with_cc=gcc
@@ -1068,8 +1120,11 @@ EOF
enable_feature win_arm64_neon_h_workaround
else
# If a probe is not possible, assume this is the pure Windows
# SDK and so the workaround is necessary.
enable_feature win_arm64_neon_h_workaround
# SDK and so the workaround is necessary when using Visual
# Studio < 2019.
if [ ${tgt_cc##vs} -lt 16 ]; then
enable_feature win_arm64_neon_h_workaround
fi
fi
fi
fi
@@ -1080,7 +1135,6 @@ EOF
AS=armasm
LD="${source_path}/build/make/armlink_adapter.sh"
STRIP=arm-none-linux-gnueabi-strip
NM=arm-none-linux-gnueabi-nm
tune_cflags="--cpu="
tune_asflags="--cpu="
if [ -z "${tune_cpu}" ]; then
@@ -1117,6 +1171,14 @@ EOF
echo "See build/make/Android.mk for details."
check_add_ldflags -static
soft_enable unit_tests
case "$AS" in
*clang)
# The GNU Assembler was removed in the r24 version of the NDK.
# clang's internal assembler works, but `-c` is necessary to
# avoid linking.
add_asflags -c
;;
esac
;;
darwin)
@@ -1127,8 +1189,6 @@ EOF
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)}"
@@ -1169,7 +1229,8 @@ EOF
;;
esac
if [ "$(show_darwin_sdk_major_version iphoneos)" -gt 8 ]; then
if [ "$(show_darwin_sdk_major_version iphoneos)" -gt 8 ] \
&& [ "$(show_xcode_version | cut -d. -f1)" -lt 16 ]; then
check_add_cflags -fembed-bitcode
check_add_asflags -fembed-bitcode
check_add_ldflags -fembed-bitcode
@@ -1203,6 +1264,38 @@ EOF
fi
;;
esac
# AArch64 ISA extensions are treated as supersets.
if [ ${tgt_isa} = "arm64" ] || [ ${tgt_isa} = "armv8" ]; then
aarch64_arch_flag_neon="arch=armv8-a"
aarch64_arch_flag_neon_dotprod="arch=armv8.2-a+dotprod"
aarch64_arch_flag_neon_i8mm="arch=armv8.2-a+dotprod+i8mm"
aarch64_arch_flag_sve="arch=armv8.2-a+dotprod+i8mm+sve"
aarch64_arch_flag_sve2="arch=armv9-a+sve2"
for ext in ${ARCH_EXT_LIST_AARCH64}; do
if [ "$disable_exts" = "yes" ]; then
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${ext} "
soft_disable $ext
else
# Check the compiler supports the -march flag for the extension.
# This needs to happen after toolchain/OS inspection so we handle
# $CROSS etc correctly when checking for flags, else these will
# always fail.
flag="$(eval echo \$"aarch64_arch_flag_${ext}")"
check_gcc_machine_option "${flag}" "${ext}"
if ! enabled $ext; then
# Disable higher order extensions to simplify dependencies.
disable_exts="yes"
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${ext} "
soft_disable $ext
fi
fi
done
if enabled sve; then
check_neon_sve_bridge_compiles
fi
fi
;;
mips*)
link_with_cc=gcc
@@ -1270,6 +1363,7 @@ EOF
fi
;;
x86*)
soft_enable x86_asm
case ${tgt_os} in
android)
soft_enable realtime_only
@@ -1288,6 +1382,10 @@ EOF
AS=${AS:-nasm}
add_ldflags -Zhigh-mem
;;
darwin*)
enabled x86 && darwin_arch="-arch i386" || darwin_arch="-arch x86_64"
add_cflags ${darwin_arch}
add_ldflags ${darwin_arch}
esac
AS="${alt_as:-${AS:-auto}}"
@@ -1410,9 +1508,6 @@ EOF
;;
darwin*)
add_asflags -f macho${bits}
enabled x86 && darwin_arch="-arch i386" || darwin_arch="-arch x86_64"
add_cflags ${darwin_arch}
add_ldflags ${darwin_arch}
# -mdynamic-no-pic is still a bit of voodoo -- it was required at
# one time, but does not seem to be now, and it breaks some of the
# code that still relies on inline assembly.
@@ -1459,6 +1554,14 @@ EOF
;;
esac
# Enable PGO
if [ -n "${pgo_file}" ]; then
check_add_cflags -fprofile-use=${pgo_file} || \
die "-fprofile-use is not supported by compiler"
check_add_ldflags -fprofile-use=${pgo_file} || \
die "-fprofile-use is not supported by linker"
fi
# Try to enable CPU specific tuning
if [ -n "${tune_cpu}" ]; then
if [ -n "${tune_cflags}" ]; then
@@ -1479,6 +1582,9 @@ EOF
else
check_add_cflags -DNDEBUG
fi
enabled profile &&
check_add_cflags -fprofile-generate &&
check_add_ldflags -fprofile-generate
enabled gprof && check_add_cflags -pg && check_add_ldflags -pg
enabled gcov &&
@@ -1497,10 +1603,6 @@ EOF
# shared objects
enabled gcc && enabled pic && check_add_cflags -fPIC
# Work around longjmp interception on glibc >= 2.11, to improve binary
# compatibility. See http://code.google.com/p/webm/issues/detail?id=166
enabled linux && check_add_cflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
# Check for strip utility variant
${STRIP} -V 2>/dev/null | grep GNU >/dev/null && enable_feature gnu_strip
@@ -1513,7 +1615,7 @@ EOF
# Try to find which inline keywords are supported
check_cc <<EOF && INLINE="inline"
static inline function() {}
static inline int function(void) {}
EOF
# Almost every platform uses pthreads.
@@ -1523,6 +1625,7 @@ EOF
;;
*-android-gcc)
# bionic includes basic pthread functionality, obviating -lpthread.
soft_enable pthread_setname_np
;;
*)
check_header pthread.h && check_lib -lpthread <<EOF && add_extralibs -lpthread || disable_feature pthread_h
@@ -1531,6 +1634,15 @@ EOF
void *thread_check (void *);
void *thread_check (void *obj){ return obj;};
int main(void) { pthread_t thread_id; return pthread_create(&thread_id, NULL, thread_check, NULL); }
EOF
enabled pthread_h && check_lib -lpthread <<EOF && enable_feature pthread_setname_np
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <pthread.h>
int main(void) { return &pthread_setname_np != 0; }
EOF
;;
esac
+1 -1
View File
@@ -42,7 +42,7 @@ done
[ -n "$srcfile" ] || show_help
sfx=${sfx:-asm}
includes=$(LC_ALL=C egrep -i "include +\"?[a-z0-9_/]+\.${sfx}" $srcfile |
includes=$(LC_ALL=C grep -E -i "include +\"?[a-z0-9_/]+\.${sfx}" $srcfile |
perl -p -e "s;.*?([a-z0-9_/]+.${sfx}).*;\1;")
#" restore editor state
for inc in ${includes}; do
+3 -2
View File
@@ -25,7 +25,7 @@ files.
Options:
--help Print this message
--out=outfile Redirect output to a file
--ver=version Version (14-17) of visual studio to generate for
--ver=version Version (14-18) of visual studio to generate for
--target=isa-os-cc Target specifier
EOF
exit 1
@@ -220,6 +220,7 @@ for opt in "$@"; do
15) vs_year=2017 ;;
16) vs_year=2019 ;;
17) vs_year=2022 ;;
18) vs_year=2026 ;;
*) die Unrecognized Visual Studio Version in $opt ;;
esac
;;
@@ -233,7 +234,7 @@ done
outfile=${outfile:-/dev/stdout}
mkoutfile=${mkoutfile:-/dev/stdout}
case "${vs_ver}" in
1[4-7])
1[4-8])
# VS has used Format Version 12.00 continuously since vs11.
sln_vers="12.00"
sln_vers_str="Visual Studio ${vs_year}"
+43 -16
View File
@@ -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 (14-16) of visual studio to generate for
--ver=version Version (14-18) 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
@@ -106,8 +106,12 @@ generate_filter() {
Include="$f"
# Separate file names with Condition?
tag_content ObjectFileName "\$(IntDir)$objf"
# Check for AVX and turn it on to avoid warnings.
if [[ $f =~ avx.?\.c$ ]]; then
# Set the appropriate /arch option for AVX/AVX2/AVX-512 files.
if [[ $f =~ avx512\.c$ ]]; then
tag_content AdditionalOptions "/arch:AVX512"
elif [[ $f =~ avx2\.c$ ]]; then
tag_content AdditionalOptions "/arch:AVX2"
elif [[ $f =~ avx\.c$ ]]; then
tag_content AdditionalOptions "/arch:AVX"
fi
close_tag ClCompile
@@ -141,7 +145,17 @@ for opt in "$@"; do
case "$opt" in
--help|-h) show_help
;;
--target=*) target="${optval}"
--target=*)
target="${optval}"
platform_toolset=$(echo ${target} | awk 'BEGIN{FS="-"}{print $4}')
case "$platform_toolset" in
clangcl) platform_toolset="ClangCl"
;;
"")
;;
*) die Unrecognized Visual Studio Platform Toolset in $opt
;;
esac
;;
--out=*) outfile="$optval"
;;
@@ -170,7 +184,7 @@ for opt in "$@"; do
--ver=*)
vs_ver="$optval"
case "$optval" in
1[4-7])
1[4-8])
;;
*) die Unrecognized Visual Studio Version in $opt
;;
@@ -259,6 +273,10 @@ case "$target" in
;;
arm64*)
platforms[0]="ARM64"
# As of Visual Studio 2022 17.5.5, clang-cl does not support ARM64EC.
if [ "$vs_ver" -ge 17 -a "$platform_toolset" != "ClangCl" ]; then
platforms[1]="ARM64EC"
fi
asm_Debug_cmdline="armasm64 -nologo -oldit &quot;%(FullPath)&quot;"
asm_Release_cmdline="armasm64 -nologo -oldit &quot;%(FullPath)&quot;"
;;
@@ -335,17 +353,24 @@ generate_vcxproj() {
else
tag_content ConfigurationType StaticLibrary
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
if [ -n "$platform_toolset" ]; then
tag_content PlatformToolset "$platform_toolset"
else
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
if [ "$vs_ver" = "18" ]; then
tag_content PlatformToolset v145
fi
fi
tag_content CharacterSet Unicode
if [ "$config" = "Release" ]; then
@@ -415,6 +440,8 @@ generate_vcxproj() {
tag_content Optimization $opt
tag_content AdditionalIncludeDirectories "$incs;%(AdditionalIncludeDirectories)"
tag_content PreprocessorDefinitions "WIN32;$debug;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE$extradefines;%(PreprocessorDefinitions)"
tag_content LanguageStandard_C stdc11
tag_content LanguageStandard stdcpp17
tag_content RuntimeLibrary $runtime
tag_content WarningLevel Level3
if ${werror:-false}; then
+3 -7
View File
@@ -30,13 +30,9 @@ SCRIPT_DIR=$(dirname "$0")
LIBVPX_SOURCE_DIR=$(cd ${SCRIPT_DIR}/../..; pwd)
LIPO=$(xcrun -sdk iphoneos${SDK} -find lipo)
ORIG_PWD="$(pwd)"
ARM_TARGETS="arm64-darwin-gcc
armv7-darwin-gcc
armv7s-darwin-gcc"
SIM_TARGETS="x86-iphonesimulator-gcc
x86_64-iphonesimulator-gcc"
OSX_TARGETS="x86-darwin16-gcc
x86_64-darwin16-gcc"
ARM_TARGETS="arm64-darwin-gcc"
SIM_TARGETS="x86_64-iphonesimulator-gcc"
OSX_TARGETS="x86_64-darwin16-gcc"
TARGETS="${ARM_TARGETS} ${SIM_TARGETS}"
# Configures for the target specified by $1, and invokes make with the dist
+40 -6
View File
@@ -73,6 +73,10 @@ sub vpx_config($) {
}
sub specialize {
if (@_ <= 1) {
die "'specialize' must be called with a function name and at least one ",
"architecture ('C' is implied): \n@_\n";
}
my $fn=$_[0];
shift;
foreach my $opt (@_) {
@@ -209,6 +213,16 @@ sub filter {
sub common_top() {
my $include_guard = uc($opts{sym})."_H_";
print <<EOF;
/*
* Copyright (c) 2017 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
// This file is generated. Do not edit.
#ifndef ${include_guard}
#define ${include_guard}
@@ -238,13 +252,14 @@ EOF
}
sub common_bottom() {
my $include_guard = uc($opts{sym})."_H_";
print <<EOF;
#ifdef __cplusplus
} // extern "C"
#endif
#endif
#endif // ${include_guard}
EOF
}
@@ -438,19 +453,35 @@ EOF
common_bottom;
}
# List of architectures in low-to-high preference order.
my @PRIORITY_ARCH = qw/
c
mmx sse sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512
arm_crc32 neon neon_dotprod neon_i8mm sve sve2
rvv
vsx
dspr2 msa
/;
my %PRIORITY_INDEX;
for (my $i = 0; $i < @PRIORITY_ARCH; $i++) {
$PRIORITY_INDEX{$PRIORITY_ARCH[$i]} = $i;
}
#
# Main Driver
#
&require("c");
&require(keys %required);
&require(sort { $PRIORITY_INDEX{$a} <=> $PRIORITY_INDEX{$b} } keys %required);
if ($opts{arch} eq 'x86') {
@ALL_ARCHS = filter(qw/mmx sse sse2 sse3 ssse3 sse4_1 avx avx2 avx512/);
x86;
} elsif ($opts{arch} eq 'x86_64') {
@ALL_ARCHS = filter(qw/mmx sse sse2 sse3 ssse3 sse4_1 avx avx2 avx512/);
@REQUIRES = filter(qw/mmx sse sse2/);
&require(@REQUIRES);
if (keys %required == 0) {
@REQUIRES = filter(qw/mmx sse sse2/);
&require(@REQUIRES);
}
x86;
} elsif ($opts{arch} eq 'mips32' || $opts{arch} eq 'mips64') {
my $have_dspr2 = 0;
@@ -487,8 +518,11 @@ if ($opts{arch} eq 'x86') {
@ALL_ARCHS = filter(qw/neon_asm neon/);
arm;
} elsif ($opts{arch} eq 'armv8' || $opts{arch} eq 'arm64' ) {
@ALL_ARCHS = filter(qw/neon/);
&require("neon");
@ALL_ARCHS = filter(qw/neon neon_dotprod neon_i8mm sve sve2/);
if (keys %required == 0) {
@REQUIRES = filter(qw/neon/);
&require(@REQUIRES);
}
arm;
} elsif ($opts{arch} =~ /^ppc/ ) {
@ALL_ARCHS = filter(qw/vsx/);
+3
View File
@@ -61,6 +61,8 @@ if [ ${bare} ]; then
else
cat<<EOF>$$.tmp
// This file is generated. Do not edit.
#ifndef VPX_VERSION_H_
#define VPX_VERSION_H_
#define VERSION_MAJOR $major_version
#define VERSION_MINOR $minor_version
#define VERSION_PATCH $patch_version
@@ -68,6 +70,7 @@ else
#define VERSION_PACKED ((VERSION_MAJOR<<16)|(VERSION_MINOR<<8)|(VERSION_PATCH))
#define ${id}_NOSP "${version_str}"
#define ${id} " ${version_str}"
#endif // VPX_VERSION_H_
EOF
fi
if [ -n "$out_file" ]; then
+61 -16
View File
@@ -101,9 +101,19 @@ 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-darwin22-gcc"
all_platforms="${all_platforms} arm64-darwin23-gcc"
all_platforms="${all_platforms} arm64-darwin24-gcc"
all_platforms="${all_platforms} arm64-darwin25-gcc"
all_platforms="${all_platforms} arm64-linux-gcc"
all_platforms="${all_platforms} arm64-win64-gcc"
all_platforms="${all_platforms} arm64-win64-vs15"
all_platforms="${all_platforms} arm64-win64-vs16"
all_platforms="${all_platforms} arm64-win64-vs16-clangcl"
all_platforms="${all_platforms} arm64-win64-vs17"
all_platforms="${all_platforms} arm64-win64-vs17-clangcl"
all_platforms="${all_platforms} arm64-win64-vs18"
all_platforms="${all_platforms} arm64-win64-vs18-clangcl"
all_platforms="${all_platforms} armv7-android-gcc" #neon Cortex-A8
all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8
all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8
@@ -112,6 +122,8 @@ all_platforms="${all_platforms} armv7-none-rvct" #neon Cortex-A8
all_platforms="${all_platforms} armv7-win32-gcc"
all_platforms="${all_platforms} armv7-win32-vs14"
all_platforms="${all_platforms} armv7-win32-vs15"
all_platforms="${all_platforms} armv7-win32-vs16"
all_platforms="${all_platforms} armv7-win32-vs17"
all_platforms="${all_platforms} armv7s-darwin-gcc"
all_platforms="${all_platforms} armv8-linux-gcc"
all_platforms="${all_platforms} loongarch32-linux-gcc"
@@ -143,6 +155,7 @@ 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-win32-vs18"
all_platforms="${all_platforms} x86_64-android-gcc"
all_platforms="${all_platforms} x86_64-darwin9-gcc"
all_platforms="${all_platforms} x86_64-darwin10-gcc"
@@ -157,6 +170,10 @@ 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-darwin22-gcc"
all_platforms="${all_platforms} x86_64-darwin23-gcc"
all_platforms="${all_platforms} x86_64-darwin24-gcc"
all_platforms="${all_platforms} x86_64-darwin25-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"
@@ -166,6 +183,7 @@ 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} x86_64-win64-vs18"
all_platforms="${all_platforms} generic-gnu"
# all_targets is a list of all targets that can be configured
@@ -237,12 +255,22 @@ CODEC_FAMILIES="
ARCH_LIST="
arm
aarch64
mips
x86
x86_64
ppc
loongarch
"
ARCH_EXT_LIST_AARCH64="
neon
neon_dotprod
neon_i8mm
sve
sve2
"
ARCH_EXT_LIST_X86="
mmx
sse
@@ -262,14 +290,15 @@ ARCH_EXT_LIST_LOONGSON="
"
ARCH_EXT_LIST="
neon
neon_asm
${ARCH_EXT_LIST_AARCH64}
mips32
dspr2
msa
mips64
x86_asm
${ARCH_EXT_LIST_X86}
vsx
@@ -280,13 +309,14 @@ HAVE_LIST="
${ARCH_EXT_LIST}
vpx_ports
pthread_h
pthread_setname_np
unistd_h
"
EXPERIMENT_LIST="
fp_mb_stats
emulate_hardware
non_greedy_mv
rate_ctrl
collect_component_timing
"
CONFIG_LIST="
dependency_tracking
@@ -336,7 +366,6 @@ CONFIG_LIST="
multi_res_encoding
temporal_denoising
vp9_temporal_denoising
consistent_recode
coefficient_range_checking
vp9_highbitdepth
better_hw_compatibility
@@ -357,6 +386,7 @@ CMDLINE_SELECT="
install_libs
install_srcs
debug
profile
gprof
gcov
pic
@@ -400,7 +430,6 @@ CMDLINE_SELECT="
multi_res_encoding
temporal_denoising
vp9_temporal_denoising
consistent_recode
coefficient_range_checking
better_hw_compatibility
vp9_highbitdepth
@@ -629,7 +658,6 @@ process_toolchain() {
if enabled gcc; then
enabled werror && check_add_cflags -Werror
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
@@ -643,8 +671,10 @@ process_toolchain() {
check_add_cflags -Wimplicit-function-declaration
check_add_cflags -Wmissing-declarations
check_add_cflags -Wmissing-prototypes
check_add_cflags -Wshadow
check_add_cflags -Wstrict-prototypes
check_add_cflags -Wuninitialized
check_add_cflags -Wunreachable-code-loop-increment
check_add_cflags -Wunreachable-code-aggressive
check_add_cflags -Wunused
check_add_cflags -Wextra
# check_add_cflags also adds to cxxflags. gtest does not do well with
@@ -655,24 +685,39 @@ process_toolchain() {
if enabled mips || [ -z "${INLINE}" ]; then
enabled extra_warnings || check_add_cflags -Wno-unused-function
fi
# Enforce c89 for c files. Don't be too strict about it though. Allow
# gnu extensions like "//" for comments.
check_cflags -std=gnu89 && add_cflags_only -std=gnu89
# Enforce C11 for C files. Allow GNU extensions.
check_cflags -std=gnu11 && add_cflags_only -std=gnu11
# Enforce C11 compatibility.
check_cflags -Wc23-extensions && add_cflags_only -Wc23-extensions
# Avoid this warning for third_party C++ sources. Some reorganization
# would be needed to apply this only to test/*.cc.
check_cflags -Wshorten-64-to-32 && add_cflags_only -Wshorten-64-to-32
# Do not allow implicit vector type conversions on Clang builds (this
# is already the default on GCC builds).
check_add_cflags -flax-vector-conversions=none
# Quiet gcc 6 vs 7 abi warnings:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728
if enabled arm; then
check_add_cxxflags -Wno-psabi
fi
# disable some warnings specific to libyuv.
# Enforce C++17 compatibility.
check_add_cxxflags -Wc++20-extensions
check_add_cxxflags -Wc++23-extensions
check_add_cxxflags -Wnon-virtual-dtor
# disable some warnings specific to libyuv / libwebm.
check_cxxflags -Wno-missing-declarations \
&& LIBYUV_CXXFLAGS="${LIBYUV_CXXFLAGS} -Wno-missing-declarations"
check_cxxflags -Wno-missing-prototypes \
&& LIBYUV_CXXFLAGS="${LIBYUV_CXXFLAGS} -Wno-missing-prototypes"
check_cxxflags -Wno-pass-failed \
&& LIBYUV_CXXFLAGS="${LIBYUV_CXXFLAGS} -Wno-pass-failed"
check_cxxflags -Wno-shadow \
&& LIBWEBM_CXXFLAGS="${LIBWEBM_CXXFLAGS} -Wno-shadow" \
&& LIBYUV_CXXFLAGS="${LIBYUV_CXXFLAGS} -Wno-shadow"
check_cxxflags -Wno-unused-parameter \
&& LIBYUV_CXXFLAGS="${LIBYUV_CXXFLAGS} -Wno-unused-parameter"
fi
@@ -745,33 +790,33 @@ process_toolchain() {
soft_enable libyuv
;;
*-android-*)
check_add_cxxflags -std=gnu++11 && soft_enable webm_io
check_add_cxxflags -std=gnu++17 && soft_enable webm_io
soft_enable libyuv
# GTestLog must be modified to use Android logging utilities.
;;
*-darwin-*)
check_add_cxxflags -std=gnu++11
check_add_cxxflags -std=gnu++17
# iOS/ARM builds do not work with gtest. This does not match
# x86 targets.
;;
*-iphonesimulator-*)
check_add_cxxflags -std=gnu++11 && soft_enable webm_io
check_add_cxxflags -std=gnu++17 && 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=gnu++11 && soft_enable unit_tests \
check_add_cxxflags -std=gnu++17 && soft_enable unit_tests \
&& soft_enable webm_io
check_cxx "$@" <<EOF && soft_enable libyuv
int z;
EOF
;;
*)
enabled pthread_h && check_add_cxxflags -std=gnu++11 \
enabled pthread_h && check_add_cxxflags -std=gnu++17 \
&& soft_enable unit_tests
check_add_cxxflags -std=gnu++11 && soft_enable webm_io
check_add_cxxflags -std=gnu++17 && soft_enable webm_io
check_cxx "$@" <<EOF && soft_enable libyuv
int z;
EOF
+8 -20
View File
@@ -57,6 +57,7 @@ LIBWEBM_PARSER_SRCS = third_party/libwebm/mkvparser/mkvparser.cc \
# Add compile flags and include path for libwebm sources.
ifeq ($(CONFIG_WEBM_IO),yes)
CXXFLAGS += -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
$(BUILD_PFX)third_party/libwebm/%.cc.o: CXXFLAGS += $(LIBWEBM_CXXFLAGS)
INC_PATH-yes += $(SRC_PATH_BARE)/third_party/libwebm
endif
@@ -68,7 +69,6 @@ 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
vpxdec.SRCS += vpx_ports/vpx_timer.h
vpxdec.SRCS += vpx/vpx_integer.h
vpxdec.SRCS += args.c args.h
@@ -81,8 +81,6 @@ ifeq ($(CONFIG_LIBYUV),yes)
$(BUILD_PFX)third_party/libyuv/%.cc.o: CXXFLAGS += ${LIBYUV_CXXFLAGS}
endif
ifeq ($(CONFIG_WEBM_IO),yes)
vpxdec.SRCS += $(LIBWEBM_COMMON_SRCS)
vpxdec.SRCS += $(LIBWEBM_MUXER_SRCS)
vpxdec.SRCS += $(LIBWEBM_PARSER_SRCS)
vpxdec.SRCS += webmdec.cc webmdec.h
endif
@@ -97,7 +95,6 @@ vpxenc.SRCS += tools_common.c tools_common.h
vpxenc.SRCS += warnings.c warnings.h
vpxenc.SRCS += vpx_ports/mem_ops.h
vpxenc.SRCS += vpx_ports/mem_ops_aligned.h
vpxenc.SRCS += vpx_ports/msvc.h
vpxenc.SRCS += vpx_ports/vpx_timer.h
vpxenc.SRCS += vpxstats.c vpxstats.h
ifeq ($(CONFIG_LIBYUV),yes)
@@ -119,24 +116,18 @@ vp9_spatial_svc_encoder.SRCS += y4minput.c y4minput.h
vp9_spatial_svc_encoder.SRCS += tools_common.c tools_common.h
vp9_spatial_svc_encoder.SRCS += video_common.h
vp9_spatial_svc_encoder.SRCS += video_writer.h video_writer.c
vp9_spatial_svc_encoder.SRCS += vpx_ports/msvc.h
vp9_spatial_svc_encoder.SRCS += vpxstats.c vpxstats.h
vp9_spatial_svc_encoder.SRCS += examples/svc_encodeframe.c
vp9_spatial_svc_encoder.SRCS += examples/svc_context.h
vp9_spatial_svc_encoder.GUID = 4A38598D-627D-4505-9C7B-D4020C84100D
vp9_spatial_svc_encoder.DESCRIPTION = VP9 Spatial SVC Encoder
ifneq ($(CONFIG_SHARED),yes)
EXAMPLES-$(CONFIG_VP9_ENCODER) += resize_util.c
endif
EXAMPLES-$(CONFIG_ENCODERS) += vpx_temporal_svc_encoder.c
vpx_temporal_svc_encoder.SRCS += ivfenc.c ivfenc.h
vpx_temporal_svc_encoder.SRCS += y4minput.c y4minput.h
vpx_temporal_svc_encoder.SRCS += tools_common.c tools_common.h
vpx_temporal_svc_encoder.SRCS += video_common.h
vpx_temporal_svc_encoder.SRCS += video_writer.h video_writer.c
vpx_temporal_svc_encoder.SRCS += vpx_ports/msvc.h
vpx_temporal_svc_encoder.GUID = B18C08F2-A439-4502-A78E-849BE3D60947
vpx_temporal_svc_encoder.DESCRIPTION = Temporal SVC Encoder
EXAMPLES-$(CONFIG_DECODERS) += simple_decoder.c
@@ -148,7 +139,6 @@ simple_decoder.SRCS += video_common.h
simple_decoder.SRCS += video_reader.h video_reader.c
simple_decoder.SRCS += vpx_ports/mem_ops.h
simple_decoder.SRCS += vpx_ports/mem_ops_aligned.h
simple_decoder.SRCS += vpx_ports/msvc.h
simple_decoder.DESCRIPTION = Simplified decoder loop
EXAMPLES-$(CONFIG_DECODERS) += postproc.c
postproc.SRCS += ivfdec.h ivfdec.c
@@ -158,7 +148,6 @@ postproc.SRCS += video_common.h
postproc.SRCS += video_reader.h video_reader.c
postproc.SRCS += vpx_ports/mem_ops.h
postproc.SRCS += vpx_ports/mem_ops_aligned.h
postproc.SRCS += vpx_ports/msvc.h
postproc.GUID = 65E33355-F35E-4088-884D-3FD4905881D7
postproc.DESCRIPTION = Decoder postprocessor control
EXAMPLES-$(CONFIG_DECODERS) += decode_to_md5.c
@@ -171,7 +160,6 @@ 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
decode_to_md5.GUID = 59120B9B-2735-4BFE-B022-146CA340FE42
decode_to_md5.DESCRIPTION = Frame by frame MD5 checksum
EXAMPLES-$(CONFIG_ENCODERS) += simple_encoder.c
@@ -180,7 +168,6 @@ simple_encoder.SRCS += y4minput.c y4minput.h
simple_encoder.SRCS += tools_common.h tools_common.c
simple_encoder.SRCS += video_common.h
simple_encoder.SRCS += video_writer.h video_writer.c
simple_encoder.SRCS += vpx_ports/msvc.h
simple_encoder.GUID = 4607D299-8A71-4D2C-9B1D-071899B6FBFD
simple_encoder.DESCRIPTION = Simplified encoder loop
EXAMPLES-$(CONFIG_VP9_ENCODER) += vp9_lossless_encoder.c
@@ -189,7 +176,6 @@ vp9_lossless_encoder.SRCS += y4minput.c y4minput.h
vp9_lossless_encoder.SRCS += tools_common.h tools_common.c
vp9_lossless_encoder.SRCS += video_common.h
vp9_lossless_encoder.SRCS += video_writer.h video_writer.c
vp9_lossless_encoder.SRCS += vpx_ports/msvc.h
vp9_lossless_encoder.GUID = B63C7C88-5348-46DC-A5A6-CC151EF93366
vp9_lossless_encoder.DESCRIPTION = Simplified lossless VP9 encoder
EXAMPLES-$(CONFIG_ENCODERS) += twopass_encoder.c
@@ -198,7 +184,6 @@ twopass_encoder.SRCS += y4minput.c y4minput.h
twopass_encoder.SRCS += tools_common.h tools_common.c
twopass_encoder.SRCS += video_common.h
twopass_encoder.SRCS += video_writer.h video_writer.c
twopass_encoder.SRCS += vpx_ports/msvc.h
twopass_encoder.GUID = 73494FA6-4AF9-4763-8FBB-265C92402FD8
twopass_encoder.DESCRIPTION = Two-pass encoder loop
EXAMPLES-$(CONFIG_DECODERS) += decode_with_drops.c
@@ -209,7 +194,6 @@ decode_with_drops.SRCS += video_common.h
decode_with_drops.SRCS += video_reader.h video_reader.c
decode_with_drops.SRCS += vpx_ports/mem_ops.h
decode_with_drops.SRCS += vpx_ports/mem_ops_aligned.h
decode_with_drops.SRCS += vpx_ports/msvc.h
decode_with_drops.GUID = CE5C53C4-8DDA-438A-86ED-0DDD3CDB8D26
decode_with_drops.DESCRIPTION = Drops frames while decoding
EXAMPLES-$(CONFIG_ENCODERS) += set_maps.c
@@ -218,7 +202,6 @@ set_maps.SRCS += y4minput.c y4minput.h
set_maps.SRCS += tools_common.h tools_common.c
set_maps.SRCS += video_common.h
set_maps.SRCS += video_writer.h video_writer.c
set_maps.SRCS += vpx_ports/msvc.h
set_maps.GUID = ECB2D24D-98B8-4015-A465-A4AF3DCC145F
set_maps.DESCRIPTION = Set active and ROI maps
EXAMPLES-$(CONFIG_VP8_ENCODER) += vp8cx_set_ref.c
@@ -227,7 +210,6 @@ vp8cx_set_ref.SRCS += y4minput.c y4minput.h
vp8cx_set_ref.SRCS += tools_common.h tools_common.c
vp8cx_set_ref.SRCS += video_common.h
vp8cx_set_ref.SRCS += video_writer.h video_writer.c
vp8cx_set_ref.SRCS += vpx_ports/msvc.h
vp8cx_set_ref.GUID = C5E31F7F-96F6-48BD-BD3E-10EBF6E8057A
vp8cx_set_ref.DESCRIPTION = VP8 set encoder reference frame
@@ -251,7 +233,6 @@ vp8_multi_resolution_encoder.SRCS += ivfenc.h ivfenc.c
vp8_multi_resolution_encoder.SRCS += y4minput.c y4minput.h
vp8_multi_resolution_encoder.SRCS += tools_common.h tools_common.c
vp8_multi_resolution_encoder.SRCS += video_writer.h video_writer.c
vp8_multi_resolution_encoder.SRCS += vpx_ports/msvc.h
vp8_multi_resolution_encoder.SRCS += $(LIBYUV_SRCS)
vp8_multi_resolution_encoder.GUID = 04f8738e-63c8-423b-90fa-7c2703a374de
vp8_multi_resolution_encoder.DESCRIPTION = VP8 Multiple-resolution Encoding
@@ -388,6 +369,13 @@ INSTALL-BINS-$(CONFIG_MSVS) += $(foreach p,$(VS_PLATFORMS),\
$(foreach proj,$(call enabled,PROJECTS),\
$(eval $(call vcproj_template,$(proj))))
# Generate a list of all enabled sources, in particular for exporting to gyp
# based build systems.
vpxdec_srcs.txt:
@echo " [CREATE] $@"
@echo $(vpxdec.SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@
CLEAN-OBJS += vpxdec_srcs.txt
#
# Documentation Rules
#
-123
View File
@@ -1,123 +0,0 @@
/*
* Copyright (c) 2014 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../tools_common.h"
#include "../vp9/encoder/vp9_resize.h"
static const char *exec_name = NULL;
static void usage() {
printf("Usage:\n");
printf("%s <input_yuv> <width>x<height> <target_width>x<target_height> ",
exec_name);
printf("<output_yuv> [<frames>]\n");
}
void usage_exit(void) {
usage();
exit(EXIT_FAILURE);
}
static int parse_dim(char *v, int *width, int *height) {
char *x = strchr(v, 'x');
if (x == NULL) x = strchr(v, 'X');
if (x == NULL) return 0;
*width = atoi(v);
*height = atoi(&x[1]);
if (*width <= 0 || *height <= 0)
return 0;
else
return 1;
}
int main(int argc, char *argv[]) {
char *fin, *fout;
FILE *fpin, *fpout;
uint8_t *inbuf, *outbuf;
uint8_t *inbuf_u, *outbuf_u;
uint8_t *inbuf_v, *outbuf_v;
int f, frames;
int width, height, target_width, target_height;
exec_name = argv[0];
if (argc < 5) {
printf("Incorrect parameters:\n");
usage();
return 1;
}
fin = argv[1];
fout = argv[4];
if (!parse_dim(argv[2], &width, &height)) {
printf("Incorrect parameters: %s\n", argv[2]);
usage();
return 1;
}
if (!parse_dim(argv[3], &target_width, &target_height)) {
printf("Incorrect parameters: %s\n", argv[3]);
usage();
return 1;
}
fpin = fopen(fin, "rb");
if (fpin == NULL) {
printf("Can't open file %s to read\n", fin);
usage();
return 1;
}
fpout = fopen(fout, "wb");
if (fpout == NULL) {
printf("Can't open file %s to write\n", fout);
usage();
return 1;
}
if (argc >= 6)
frames = atoi(argv[5]);
else
frames = INT_MAX;
printf("Input size: %dx%d\n", width, height);
printf("Target size: %dx%d, Frames: ", target_width, target_height);
if (frames == INT_MAX)
printf("All\n");
else
printf("%d\n", frames);
inbuf = (uint8_t *)malloc(width * height * 3 / 2);
outbuf = (uint8_t *)malloc(target_width * target_height * 3 / 2);
inbuf_u = inbuf + width * height;
inbuf_v = inbuf_u + width * height / 4;
outbuf_u = outbuf + target_width * target_height;
outbuf_v = outbuf_u + target_width * target_height / 4;
f = 0;
while (f < frames) {
if (fread(inbuf, width * height * 3 / 2, 1, fpin) != 1) break;
vp9_resize_frame420(inbuf, width, inbuf_u, inbuf_v, width / 2, height,
width, outbuf, target_width, outbuf_u, outbuf_v,
target_width / 2, target_height, target_width);
fwrite(outbuf, target_width * target_height * 3 / 2, 1, fpout);
f++;
}
printf("%d frames processed\n", f);
fclose(fpin);
fclose(fpout);
free(inbuf);
free(outbuf);
return 0;
}
+2 -1
View File
@@ -192,7 +192,8 @@ int main(int argc, char **argv) {
printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
if (res) die_codec(&codec, "Failed to get default codec config.");
if (res)
die("Failed to get default codec config: %s", vpx_codec_err_to_string(res));
cfg.g_w = info.frame_width;
cfg.g_h = info.frame_height;
+8 -1
View File
@@ -73,12 +73,15 @@
// This example does not special case any error return codes. If there was
// an error, a descriptive message is printed and the program exits. With
// few exceptions, vpx_codec functions return an enumerated error status,
// with the value `0` indicating success.
// with the value `0` indicating success. VP8 may return success for a
// corrupted frame, so the VP8D_GET_FRAME_CORRUPTED control is checked after
// every decode.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "vpx/vp8dx.h"
#include "vpx/vpx_decoder.h"
#include "../tools_common.h"
@@ -124,10 +127,14 @@ int main(int argc, char **argv) {
vpx_codec_iter_t iter = NULL;
vpx_image_t *img = NULL;
size_t frame_size = 0;
int corrupted = 0;
const unsigned char *frame =
vpx_video_reader_get_frame(reader, &frame_size);
if (vpx_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0))
die_codec(&codec, "Failed to decode frame.");
if (vpx_codec_control(&codec, VP8D_GET_FRAME_CORRUPTED, &corrupted))
die_codec(&codec, "Failed to get frame corrupted state.");
if (corrupted) die("Frame %d is corrupted.", frame_cnt);
while ((img = vpx_codec_get_frame(&codec, &iter)) != NULL) {
vpx_img_write(img, outfile);
+2 -1
View File
@@ -202,7 +202,8 @@ int main(int argc, char **argv) {
printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
if (res) die_codec(&codec, "Failed to get default codec config.");
if (res)
die("Failed to get default codec config: %s", vpx_codec_err_to_string(res));
cfg.g_w = info.frame_width;
cfg.g_h = info.frame_height;
+2 -1
View File
@@ -39,6 +39,7 @@ typedef struct {
int speed; // speed setting for codec
int threads;
int aqmode; // turns on aq-mode=3 (cyclic_refresh): 0=off, 1=on.
int use_psnr;
// private storage for vpx_svc_encode
void *internal;
} SvcContext;
@@ -58,6 +59,7 @@ typedef struct SvcInternal {
double psnr_sum[VPX_SS_MAX_LAYERS][COMPONENTS]; // total/Y/U/V
uint64_t sse_sum[VPX_SS_MAX_LAYERS][COMPONENTS];
uint32_t bytes_sum[VPX_SS_MAX_LAYERS];
int number_of_frames[VPX_SS_MAX_LAYERS];
// codec encoding values
int width; // width of highest layer
@@ -65,7 +67,6 @@ typedef struct SvcInternal {
int kf_dist; // distance between keyframes
// state variables
int psnr_pkt_received;
int layer;
int use_multiple_frame_contexts;
+21 -32
View File
@@ -279,7 +279,7 @@ vpx_codec_err_t vpx_svc_set_options(SvcContext *svc_ctx, const char *options) {
if (svc_ctx == NULL || options == NULL || si == NULL) {
return VPX_CODEC_INVALID_PARAM;
}
strncpy(si->options, options, sizeof(si->options));
strncpy(si->options, options, sizeof(si->options) - 1);
si->options[sizeof(si->options) - 1] = '\0';
return VPX_CODEC_OK;
}
@@ -381,7 +381,7 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
vpx_codec_iface_t *iface,
vpx_codec_enc_cfg_t *enc_cfg) {
vpx_codec_err_t res;
int i, sl, tl;
int sl, tl;
SvcInternal_t *const si = get_svc_internal(svc_ctx);
if (svc_ctx == NULL || codec_ctx == NULL || iface == NULL ||
enc_cfg == NULL) {
@@ -433,7 +433,7 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
}
for (tl = 0; tl < svc_ctx->temporal_layers; ++tl) {
for (sl = 0; sl < svc_ctx->spatial_layers; ++sl) {
i = sl * svc_ctx->temporal_layers + tl;
const int i = sl * svc_ctx->temporal_layers + tl;
si->svc_params.max_quantizers[i] = MAX_QUANTIZER;
si->svc_params.min_quantizers[i] = 0;
if (enc_cfg->rc_end_usage == VPX_CBR &&
@@ -503,7 +503,7 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
for (tl = 0; tl < svc_ctx->temporal_layers; ++tl) {
for (sl = 0; sl < svc_ctx->spatial_layers; ++sl) {
i = sl * svc_ctx->temporal_layers + tl;
const int i = sl * svc_ctx->temporal_layers + tl;
if (enc_cfg->rc_end_usage == VPX_CBR &&
enc_cfg->g_pass == VPX_RC_ONE_PASS) {
si->svc_params.max_quantizers[i] = enc_cfg->rc_max_quantizer;
@@ -516,7 +516,11 @@ vpx_codec_err_t vpx_svc_init(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
enc_cfg->g_error_resilient = 1;
// Initialize codec
res = vpx_codec_enc_init(codec_ctx, iface, enc_cfg, VPX_CODEC_USE_PSNR);
vpx_codec_flags_t flags = 0;
if (svc_ctx->use_psnr) {
flags |= VPX_CODEC_USE_PSNR;
}
res = vpx_codec_enc_init(codec_ctx, iface, enc_cfg, flags);
if (res != VPX_CODEC_OK) {
svc_log(svc_ctx, SVC_LOG_ERROR, "svc_enc_init error\n");
return res;
@@ -536,8 +540,6 @@ vpx_codec_err_t vpx_svc_encode(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
struct vpx_image *rawimg, vpx_codec_pts_t pts,
int64_t duration, int deadline) {
vpx_codec_err_t res;
vpx_codec_iter_t iter;
const vpx_codec_cx_pkt_t *cx_pkt;
SvcInternal_t *const si = get_svc_internal(svc_ctx);
if (svc_ctx == NULL || codec_ctx == NULL || si == NULL) {
return VPX_CODEC_INVALID_PARAM;
@@ -548,17 +550,6 @@ vpx_codec_err_t vpx_svc_encode(SvcContext *svc_ctx, vpx_codec_ctx_t *codec_ctx,
if (res != VPX_CODEC_OK) {
return res;
}
// save compressed data
iter = NULL;
while ((cx_pkt = vpx_codec_get_cx_data(codec_ctx, &iter))) {
switch (cx_pkt->kind) {
case VPX_CODEC_PSNR_PKT: {
}
++si->psnr_pkt_received;
break;
default: { break; }
}
}
return VPX_CODEC_OK;
}
@@ -570,7 +561,6 @@ static double calc_psnr(double d) {
// dump accumulated statistics and reset accumulated values
void vpx_svc_dump_statistics(SvcContext *svc_ctx) {
int number_of_frames;
int i, j;
uint32_t bytes_total = 0;
double scale[COMPONENTS];
@@ -581,19 +571,18 @@ void vpx_svc_dump_statistics(SvcContext *svc_ctx) {
SvcInternal_t *const si = get_svc_internal(svc_ctx);
if (svc_ctx == NULL || si == NULL) return;
number_of_frames = si->psnr_pkt_received;
if (number_of_frames <= 0) return;
svc_log(svc_ctx, SVC_LOG_INFO, "\n");
for (i = 0; i < svc_ctx->spatial_layers; ++i) {
svc_log(svc_ctx, SVC_LOG_INFO,
"Layer %d Average PSNR=[%2.3f, %2.3f, %2.3f, %2.3f], Bytes=[%u]\n",
i, si->psnr_sum[i][0] / number_of_frames,
si->psnr_sum[i][1] / number_of_frames,
si->psnr_sum[i][2] / number_of_frames,
si->psnr_sum[i][3] / number_of_frames, si->bytes_sum[i]);
"Layer %d Average PSNR=[%2.3f, %2.3f, %2.3f, %2.3f], Bytes=[%u], "
"Number_of_frames %d \n",
i, si->psnr_sum[i][0] / si->number_of_frames[i],
si->psnr_sum[i][1] / si->number_of_frames[i],
si->psnr_sum[i][2] / si->number_of_frames[i],
si->psnr_sum[i][3] / si->number_of_frames[i], si->bytes_sum[i],
si->number_of_frames[i]);
// the following psnr calculation is deduced from ffmpeg.c#print_report
y_scale = si->width * si->height * 255.0 * 255.0 * number_of_frames;
y_scale = si->width * si->height * 255.0 * 255.0 * si->number_of_frames[i];
scale[1] = y_scale;
scale[2] = scale[3] = y_scale / 4; // U or V
scale[0] = y_scale * 1.5; // total
@@ -610,17 +599,17 @@ void vpx_svc_dump_statistics(SvcContext *svc_ctx) {
mse[1], mse[2], mse[3]);
bytes_total += si->bytes_sum[i];
// Clear sums for next time.
}
// Clear sums for next time.
for (i = 0; i < svc_ctx->spatial_layers; ++i) {
si->bytes_sum[i] = 0;
si->number_of_frames[i] = 0;
for (j = 0; j < COMPONENTS; ++j) {
si->psnr_sum[i][j] = 0;
si->sse_sum[i][j] = 0;
}
}
// only display statistics once
si->psnr_pkt_received = 0;
svc_log(svc_ctx, SVC_LOG_INFO, "Total Bytes=[%u]\n", bytes_total);
}
+2 -2
View File
@@ -191,7 +191,6 @@ static void pass1(vpx_image_t *raw, FILE *infile, const char *outfile_name,
int main(int argc, char **argv) {
FILE *infile = NULL;
int w, h;
vpx_codec_ctx_t codec;
vpx_codec_enc_cfg_t cfg;
vpx_image_t raw;
vpx_codec_err_t res;
@@ -228,7 +227,8 @@ int main(int argc, char **argv) {
// Configuration
res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
if (res) die_codec(&codec, "Failed to get default codec config.");
if (res)
die("Failed to get default codec config: %s", vpx_codec_err_to_string(res));
cfg.g_w = w;
cfg.g_h = h;
@@ -25,7 +25,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <sys/time.h>
@@ -438,7 +437,7 @@ int main(int argc, char **argv) {
/* Other-resolution encoder settings */
for (i = 1; i < NUM_ENCODERS; i++) {
memcpy(&cfg[i], &cfg[0], sizeof(vpx_codec_enc_cfg_t));
cfg[i] = cfg[0];
cfg[i].rc_target_bitrate = target_bitrate[i];
+2 -1
View File
@@ -140,7 +140,8 @@ int main(int argc, char **argv) {
printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
if (res) die_codec(&codec, "Failed to get default codec config.");
if (res)
die("Failed to get default codec config: %s", vpx_codec_err_to_string(res));
cfg.g_w = info.frame_width;
cfg.g_h = info.frame_height;
+2 -1
View File
@@ -96,7 +96,8 @@ int main(int argc, char **argv) {
printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
if (res) die_codec(&codec, "Failed to get default codec config.");
if (res)
die("Failed to get default codec config: %s", vpx_codec_err_to_string(res));
cfg.g_w = info.frame_width;
cfg.g_h = info.frame_height;
+58 -22
View File
@@ -14,8 +14,11 @@
* that benefit from a scalable bitstream.
*/
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
@@ -24,14 +27,16 @@
#include "../tools_common.h"
#include "../video_writer.h"
#include "../vpx_ports/bitops.h"
#include "../vpx_ports/vpx_timer.h"
#include "./svc_context.h"
#include "vpx/vp8cx.h"
#include "vpx/vpx_decoder.h"
#include "vpx/vpx_encoder.h"
#include "../vpxstats.h"
#include "vp9/encoder/vp9_encoder.h"
#include "./y4minput.h"
#define OUTPUT_FRAME_STATS 0
#define OUTPUT_RC_STATS 1
#define SIMULCAST_MODE 0
@@ -88,6 +93,8 @@ static const arg_def_t bitrates_arg =
ARG_DEF("bl", "bitrates", 1, "bitrates[sl * num_tl + tl]");
static const arg_def_t dropframe_thresh_arg =
ARG_DEF(NULL, "drop-frame", 1, "Temporal resampling threshold (buf %)");
static const arg_def_t psnr_arg =
ARG_DEF(NULL, "psnr", 1, "Enable PSNR computation and statistics");
static const struct arg_enum_list tune_content_enum[] = {
{ "default", VP9E_CONTENT_DEFAULT },
{ "screen", VP9E_CONTENT_SCREEN },
@@ -141,6 +148,7 @@ static const arg_def_t *svc_args[] = { &frames_arg,
&dropframe_thresh_arg,
&tune_content_arg,
&inter_layer_pred_arg,
&psnr_arg,
NULL };
static const uint32_t default_frames_to_skip = 0;
@@ -200,6 +208,7 @@ static void parse_command_line(int argc, const char **argv_,
#endif
svc_ctx->speed = default_speed;
svc_ctx->threads = default_threads;
svc_ctx->use_psnr = 0;
// start with default encoder configuration
res = vpx_codec_enc_config_default(vpx_codec_vp9_cx(), enc_cfg, 0);
@@ -315,7 +324,6 @@ static void parse_command_line(int argc, const char **argv_,
break;
default:
die("Error: Invalid bit depth selected (%d)\n", enc_cfg->g_bit_depth);
break;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
} else if (arg_match(&arg, &dropframe_thresh_arg, argi)) {
@@ -324,6 +332,8 @@ static void parse_command_line(int argc, const char **argv_,
app_input->tune_content = arg_parse_uint(&arg);
} else if (arg_match(&arg, &inter_layer_pred_arg, argi)) {
app_input->inter_layer_pred = arg_parse_uint(&arg);
} else if (arg_match(&arg, &psnr_arg, argi)) {
svc_ctx->use_psnr = arg_parse_uint(&arg);
} else {
++argj;
}
@@ -776,8 +786,8 @@ static void svc_output_rc_stats(
int count = 0;
double sum_bitrate = 0.0;
double sum_bitrate2 = 0.0;
vp9_zero(sizes);
vp9_zero(sizes_parsed);
memset(sizes, 0, sizeof(sizes));
memset(sizes_parsed, 0, sizeof(sizes_parsed));
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);
@@ -880,7 +890,9 @@ int main(int argc, const char **argv) {
int pts = 0; /* PTS starts at 0 */
int frame_duration = 1; /* 1 timebase tick per frame */
int end_of_stream = 0;
#if OUTPUT_FRAME_STATS
int frames_received = 0;
#endif
#if OUTPUT_RC_STATS
VpxVideoWriter *outfile[VPX_SS_MAX_LAYERS] = { NULL };
struct RateControlStats rc;
@@ -1126,41 +1138,65 @@ int main(int argc, const char **argv) {
}
#endif
}
/*
#if OUTPUT_FRAME_STATS
printf("SVC frame: %d, kf: %d, size: %d, pts: %d\n", frames_received,
!!(cx_pkt->data.frame.flags & VPX_FRAME_IS_KEY),
(int)cx_pkt->data.frame.sz, (int)cx_pkt->data.frame.pts);
*/
if (enc_cfg.ss_number_layers == 1 && enc_cfg.ts_number_layers == 1)
si->bytes_sum[0] += (int)cx_pkt->data.frame.sz;
++frames_received;
#endif
if (enc_cfg.ss_number_layers > 1) {
uint64_t sizes[8] = { 0 };
int count = 0;
int num_layers_encoded = 0;
parse_superframe_index(cx_pkt->data.frame.buf,
cx_pkt->data.frame.sz, sizes, &count);
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
if (cx_pkt->data.frame.spatial_layer_encoded[sl]) {
si->bytes_sum[sl] += (int)sizes[num_layers_encoded];
num_layers_encoded++;
}
}
} else {
si->bytes_sum[0] += (int)cx_pkt->data.frame.sz;
}
#if CONFIG_VP9_DECODER && !SIMULCAST_MODE
if (vpx_codec_decode(&decoder, cx_pkt->data.frame.buf,
(unsigned int)cx_pkt->data.frame.sz, NULL, 0))
die_codec(&decoder, "Failed to decode frame.");
vpx_codec_control(&encoder, VP9E_GET_SVC_LAYER_ID, &layer_id);
// Don't look for mismatch on top spatial and top temporal layers as
// they are non reference frames. Don't look at frames whose top
// spatial layer is dropped.
if ((enc_cfg.ss_number_layers > 1 || enc_cfg.ts_number_layers > 1) &&
cx_pkt->data.frame
.spatial_layer_encoded[enc_cfg.ss_number_layers - 1] &&
!(layer_id.temporal_layer_id > 0 &&
layer_id.temporal_layer_id ==
(int)enc_cfg.ts_number_layers - 1)) {
test_decode(&encoder, &decoder, frame_cnt, &mismatch_seen);
}
#endif
break;
}
case VPX_CODEC_PSNR_PKT: {
SvcInternal_t *const si = (SvcInternal_t *)svc_ctx.internal;
sl = cx_pkt->data.psnr.spatial_layer_id;
si->number_of_frames[sl]++;
for (int j = 0; j < 4; ++j) {
si->psnr_sum[sl][j] += cx_pkt->data.psnr.psnr[j];
si->sse_sum[sl][j] += cx_pkt->data.psnr.sse[j];
}
break;
}
case VPX_CODEC_STATS_PKT: {
stats_write(&app_input.rc_stats, cx_pkt->data.twopass_stats.buf,
cx_pkt->data.twopass_stats.sz);
break;
}
default: { break; }
default: {
break;
}
}
#if CONFIG_VP9_DECODER && !SIMULCAST_MODE
vpx_codec_control(&encoder, VP9E_GET_SVC_LAYER_ID, &layer_id);
// Don't look for mismatch on top spatial and top temporal layers as they
// are non reference frames.
if ((enc_cfg.ss_number_layers > 1 || enc_cfg.ts_number_layers > 1) &&
!(layer_id.temporal_layer_id > 0 &&
layer_id.temporal_layer_id == (int)enc_cfg.ts_number_layers - 1 &&
cx_pkt->data.frame
.spatial_layer_encoded[enc_cfg.ss_number_layers - 1])) {
test_decode(&encoder, &decoder, frame_cnt, &mismatch_seen);
}
#endif
}
if (!end_of_stream) {
+1 -1
View File
@@ -60,7 +60,7 @@
static const char *exec_name;
void usage_exit() {
void usage_exit(void) {
fprintf(stderr,
"Usage: %s <width> <height> <infile> <outfile> "
"<frame> <limit(optional)>\n",
+42 -8
View File
@@ -41,8 +41,8 @@
$make -j32
* Build vp9 fuzzer
$ $CXX $CXXFLAGS -std=gnu++11 -DDECODER=vp9 \
-fsanitize=fuzzer -I../libvpx -I. -Wl,--start-group \
$ $CXX $CXXFLAGS -std=gnu++17 -Wall -Wextra -Wimplicit-fallthrough \
-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
@@ -69,6 +69,7 @@
#include <algorithm>
#include <memory>
#include "third_party/nalloc/nalloc.h"
#include "vpx/vp8dx.h"
#include "vpx/vpx_decoder.h"
#include "vpx_ports/mem_ops.h"
@@ -85,33 +86,64 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size <= IVF_FILE_HDR_SZ) {
return 0;
}
nalloc_init(nullptr);
vpx_codec_ctx_t codec;
// Set thread count in the range [1, 64].
const unsigned int threads = (data[IVF_FILE_HDR_SZ] & 0x3f) + 1;
vpx_codec_dec_cfg_t cfg = { threads, 0, 0 };
if (vpx_codec_dec_init(&codec, VPXD_INTERFACE(DECODER), &cfg, 0)) {
vpx_codec_flags_t flags = 0;
if ((data[IVF_FILE_HDR_SZ] & 0x40) != 0) {
flags |= VPX_CODEC_USE_POSTPROC;
}
vpx_codec_err_t err =
vpx_codec_dec_init(&codec, VPXD_INTERFACE(DECODER), &cfg, flags);
if (err == VPX_CODEC_INCAPABLE) {
// vpx_codec_dec_init may fail with VPX_CODEC_USE_POSTPROC
// if the library is configured with --disable-postproc.
flags = 0;
if (vpx_codec_dec_init(&codec, VPXD_INTERFACE(DECODER), &cfg, flags)) {
return 0;
}
} else if (err != 0) {
return 0;
}
nalloc_start(data, size);
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);
err = vpx_codec_control(&codec, VP9D_SET_LOOP_FILTER_OPT, enable);
}
data += IVF_FILE_HDR_SZ;
size -= IVF_FILE_HDR_SZ;
int frame_cnt = 0;
while (size > IVF_FRAME_HDR_SZ) {
size_t frame_size = mem_get_le32(data);
size -= IVF_FRAME_HDR_SZ;
data += IVF_FRAME_HDR_SZ;
frame_size = std::min(size, frame_size);
const vpx_codec_err_t err =
vpx_codec_decode(&codec, data, frame_size, nullptr, 0);
vpx_codec_stream_info_t stream_info;
stream_info.sz = sizeof(stream_info);
err = vpx_codec_peek_stream_info(VPXD_INTERFACE(DECODER), data, size,
&stream_info);
++frame_cnt;
if (flags & VPX_CODEC_USE_POSTPROC) {
if (frame_cnt % 16 == 4) {
vp8_postproc_cfg_t pp = { 0, 0, 0 };
if (vpx_codec_control(&codec, VP8_SET_POSTPROC, &pp)) goto fail;
} else if (frame_cnt % 16 == 12) {
vp8_postproc_cfg_t pp = { VP8_DEBLOCK | VP8_DEMACROBLOCK | VP8_MFQE, 4,
0 };
if (vpx_codec_control(&codec, VP8_SET_POSTPROC, &pp)) goto fail;
}
}
err = vpx_codec_decode(&codec, data, frame_size, nullptr, 0);
static_cast<void>(err);
vpx_codec_iter_t iter = nullptr;
vpx_image_t *img = nullptr;
@@ -120,6 +152,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
data += frame_size;
size -= frame_size;
}
fail:
vpx_codec_destroy(&codec);
nalloc_end();
return 0;
}
+256
View File
@@ -0,0 +1,256 @@
/*
* Copyright (c) 2025 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
/*
* Fuzzer for libvpx encoders
* ==========================
* Requirements
* --------------
* Requires Clang 6.0 or above as -fsanitize=fuzzer is used as a linker
* option.
* Steps to build
* --------------
* Clone libvpx repository
$git clone https://chromium.googlesource.com/webm/libvpx
* Create a directory in parallel to libvpx and change directory
$mkdir vpx_enc_fuzzer
$cd vpx_enc_fuzzer/
* Enable sanitizers (Supported: address integer memory thread undefined)
$source ../libvpx/tools/set_analyzer_env.sh address
* Configure libvpx.
* Note --size-limit and VPX_MAX_ALLOCABLE_MEMORY are defined to avoid
* Out of memory errors when running generated fuzzer binary
$../libvpx/configure --disable-unit-tests --size-limit=12288x12288 \
--extra-cflags="-fsanitize=fuzzer-no-link \
-DVPX_MAX_ALLOCABLE_MEMORY=1073741824" \
--disable-webm-io --enable-debug --enable-vp8-encoder \
--enable-vp9-encoder --disable-examples
* Build libvpx
$make -j32
* Build vp9 fuzzer
$ $CXX $CXXFLAGS -std=gnu++17 -Wall -Wextra -Wimplicit-fallthrough \
-DENCODER=vp9 -fsanitize=fuzzer -I../libvpx -I. -Wl,--start-group \
../libvpx/examples/vpx_enc_fuzzer.cc -o ./vpx_enc_fuzzer_vp9 \
./libvpx.a -Wl,--end-group
* ENCODER should be defined as vp9 or vp8 to enable vp9/vp8
*
* create a corpus directory and copy some ivf files there.
* Based on which codec (vp8/vp9) is being tested, it is recommended to
* have corresponding ivf files in corpus directory
* Empty corpus directory also is acceptable, though not recommended
$mkdir CORPUS && cp some-files CORPUS
* Run fuzzing:
$./vpx_enc_fuzzer_vp9 CORPUS
* References:
* http://llvm.org/docs/LibFuzzer.html
* https://github.com/google/oss-fuzz
*/
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "vpx/vp8cx.h"
#include "vpx/vpx_encoder.h"
#include "vpx_ports/mem_ops.h"
#include "third_party/nalloc/nalloc.h"
// fuzz header to have config options, before raw image data
#define FUZZ_HDR_SZ 32
#define VPXC_INTERFACE(name) VPXC_INTERFACE_(name)
#define VPXC_INTERFACE_(name) vpx_codec_##name##_cx()
extern "C" void usage_exit(void) { exit(EXIT_FAILURE); }
static int vpx_img_plane_width(const vpx_image_t *img, int plane) {
if (plane > 0 && img->x_chroma_shift > 0)
return (img->d_w + 1) >> img->x_chroma_shift;
else
return img->d_w;
}
static int vpx_img_plane_height(const vpx_image_t *img, int plane) {
if (plane > 0 && img->y_chroma_shift > 0)
return (img->d_h + 1) >> img->y_chroma_shift;
else
return img->d_h;
}
static int fuzz_vpx_img_read(vpx_image_t *img, const uint8_t *data,
size_t size) {
int plane;
// TODO: wtc - Need to clamp the sample values so that they are in range
// For example, if the bit depth is 10, the sample values must be <= 1023.
assert(img->bit_depth == 8);
const size_t bytespp = (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) ? 2 : 1;
if (size == 0) return 0;
size_t used = 0;
for (plane = 0; plane < 3; ++plane) {
unsigned char *buf = img->planes[plane];
const int stride = img->stride[plane];
int w = vpx_img_plane_width(img, plane);
const int h = vpx_img_plane_height(img, plane);
int y;
// Assuming that for nv12 we read all chroma data at once
if (img->fmt == VPX_IMG_FMT_NV12 && plane > 1) break;
// NV12 UV plane is interleaved, so it has twice the width of a subsampled
// plane.
if (img->fmt == VPX_IMG_FMT_NV12 && plane == 1) w = w * 2;
for (y = 0; y < h; ++y) {
size_t nb = bytespp * w;
if (nb > size - used) {
nb = size - used;
}
memcpy(buf, data, nb);
memset(buf + nb, 0, bytespp * w - nb);
buf += stride;
data += nb;
used += nb;
}
}
return used;
}
static int encode_frame(vpx_codec_ctx_t *codec, vpx_image_t *img,
int frame_index, int flags, FILE *out,
vpx_enc_deadline_t quality) {
int got_pkts = 0;
vpx_codec_iter_t iter = nullptr;
const vpx_codec_cx_pkt_t *pkt = nullptr;
const vpx_codec_err_t res =
vpx_codec_encode(codec, img, frame_index, 1, flags, quality);
if (res != VPX_CODEC_OK) return 0;
while ((pkt = vpx_codec_get_cx_data(codec, &iter)) != nullptr) {
got_pkts = 1;
if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) {
if (fwrite(pkt->data.frame.buf, 1, pkt->data.frame.sz, out) !=
pkt->data.frame.sz)
return 0;
}
}
return got_pkts;
}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size <= FUZZ_HDR_SZ) {
return 0;
}
nalloc_init(nullptr);
int keyframe_interval = 0;
int frame_count = 0;
vpx_codec_ctx_t codec;
vpx_image_t raw;
vpx_codec_enc_cfg_t cfg;
vpx_enc_deadline_t quality = VPX_DL_GOOD_QUALITY;
if ((data[0] & 0x80) != 0) {
keyframe_interval = 8;
}
if ((data[0] & 0x40) != 0) {
quality = VPX_DL_REALTIME;
} else if ((data[0] & 0x20) != 0) {
quality = VPX_DL_BEST_QUALITY;
}
const int max_frames = (quality == VPX_DL_BEST_QUALITY) ? 150 : 300;
if (vpx_codec_enc_config_default(VPXC_INTERFACE(ENCODER), &cfg, 0)) abort();
FILE *out = fopen("/dev/null", "wb");
switch (data[0] & 0x1F) {
case 0:
cfg.g_w = 64;
cfg.g_h = 1;
break;
case 1:
cfg.g_w = 1;
cfg.g_h = 48;
break;
case 2:
cfg.g_w = 1;
cfg.g_h = 1;
break;
case 3:
cfg.g_w = 4;
cfg.g_h = 4;
break;
case 4:
cfg.g_w = 16;
cfg.g_h = 16;
break;
default:
cfg.g_w = 64;
cfg.g_h = 48;
break;
}
cfg.g_timebase.num = 1;
cfg.g_timebase.den = 30; // fps
cfg.rc_target_bitrate = 200;
cfg.g_error_resilient = 1;
if (vpx_codec_enc_init(&codec, VPXC_INTERFACE(ENCODER), &cfg, 0)) {
return 0;
}
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, cfg.g_w, cfg.g_h, 1)) {
goto fail;
}
nalloc_start(data, size);
// We may want to add more config options (for more complex encoders as seen
// in the examples) in the future while still maintaining the same format (so
// that generated corpus is still valid). So we reserve FUZZ_HDR_SZ=32 bytes
// for this even if we just use one byte so far.
data += FUZZ_HDR_SZ;
size -= FUZZ_HDR_SZ;
// Encode frames.
for (int i = 0; i < max_frames; ++i) {
int flags = 0;
size_t size_read = fuzz_vpx_img_read(&raw, data, size);
if (size_read == 0) break;
data += size_read;
size -= size_read;
if (keyframe_interval > 0 && frame_count % keyframe_interval == 0)
flags |= VPX_EFLAG_FORCE_KF;
encode_frame(&codec, &raw, frame_count++, flags, out, quality);
}
// Flush encoder.
while (encode_frame(&codec, nullptr, -1, 0, out, quality)) {
}
fail:
nalloc_end();
vpx_img_free(&raw);
vpx_codec_destroy(&codec);
fclose(out);
return 0;
}
+17 -11
View File
@@ -32,8 +32,6 @@
#define zero(Dest) memset(&(Dest), 0, sizeof(Dest))
static const char *exec_name;
void usage_exit(void) { exit(EXIT_FAILURE); }
// Denoiser states for vp8, for temporal denoising.
@@ -607,19 +605,24 @@ static void set_temporal_layer_pattern(int layering_mode,
}
#if ROI_MAP
static void read_mask(FILE *mask_file, int *seg_map) {
static int read_mask(FILE *mask_file, int *seg_map, int allowed_mask_rows,
int allowed_mask_cols) {
int mask_rows, mask_cols, i, j;
int *map_start = seg_map;
fscanf(mask_file, "%d %d\n", &mask_cols, &mask_rows);
if (fscanf(mask_file, "%d %d\n", &mask_cols, &mask_rows) != 2) return 0;
if (mask_rows != allowed_mask_rows || mask_cols != allowed_mask_cols) {
return 0;
}
for (i = 0; i < mask_rows; i++) {
for (j = 0; j < mask_cols; j++) {
fscanf(mask_file, "%d ", &seg_map[j]);
if (fscanf(mask_file, "%d ", &seg_map[j]) != 1) return 0;
// reverse the bit
seg_map[j] = 1 - seg_map[j];
}
seg_map += mask_cols;
}
seg_map = map_start;
return 1;
}
#endif
@@ -679,7 +682,6 @@ int main(int argc, char **argv) {
input_ctx.only_i420 = 1;
input_ctx.bit_depth = 0;
exec_name = argv[0];
// Check usage and arguments.
if (argc < min_args) {
#if CONFIG_VP9_HIGHBITDEPTH
@@ -965,12 +967,16 @@ int main(int argc, char **argv) {
argv[argc - 1], frame_cnt);
mask_file = fopen(mask_file_name, "r");
if (mask_file != NULL) {
read_mask(mask_file, mask_map);
int mask_is_valid = read_mask(mask_file, mask_map, mask_rows, mask_cols);
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");
if (mask_is_valid) {
// 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");
} else {
die_codec(&codec, "Mask input is invalid for ROI map");
}
}
#endif
frame_avail = read_frame(&input_ctx, &raw);
+8 -40
View File
@@ -654,12 +654,6 @@ VERBATIM_HEADERS = YES
ALPHABETICAL_INDEX = NO
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
# in which this list will be split (can be a number in the range [1..20])
COLS_IN_ALPHA_INDEX = 5
# In case all classes in a project start with a common prefix, all
# classes will be put under the same header in the alphabetical index.
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
@@ -1099,32 +1093,10 @@ ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl').
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
# generate a inheritance diagram (in HTML, RTF and la_te_x) for classes with base
# or super classes. Setting the tag to NO turns the diagrams off. Note that
# this option is superseded by the HAVE_DOT option below. This is only a
# fallback. It is recommended to install and use dot, since it yields more
# powerful graphs.
CLASS_DIAGRAMS = YES
# You can define message sequence charts within doxygen comments using the \msc
# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
# be found in the default search path.
MSCGEN_PATH =
# If set to YES, the inheritance and collaboration graphs will hide
# inheritance and usage relations if the target is undocumented
# or is not a class.
@@ -1138,10 +1110,14 @@ HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for each documented class showing the direct and
# indirect inheritance relations. Setting this tag to YES will force the
# the CLASS_DIAGRAMS tag to NO.
# If the CLASS_GRAPH tag is set to YES (or GRAPH) then doxygen will generate a
# graph for each documented class showing the direct and indirect inheritance
# relations. In case HAVE_DOT is set as well dot will be used to draw the graph,
# otherwise the built-in generator will be used. If the CLASS_GRAPH tag is set
# to TEXT the direct and indirect inheritance relations will be shown as texts /
# links.
# Possible values are: NO, YES, TEXT and GRAPH.
# The default value is: YES.
CLASS_GRAPH = YES
@@ -1247,14 +1223,6 @@ DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
# background. This is disabled by default, which results in a white background.
# Warning: Depending on the platform used, enabling this option may lead to
# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
# read).
DOT_TRANSPARENT = YES
# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
# files in one run (i.e. multiple -o and -T options on the command line). This
# makes dot run faster, but since only newer versions of dot (>1.8.10)
+24 -48
View File
@@ -178,26 +178,21 @@ INSTALL-LIBS-yes += include/vpx/vpx_image.h
INSTALL-LIBS-yes += include/vpx/vpx_integer.h
INSTALL-LIBS-$(CONFIG_DECODERS) += include/vpx/vpx_decoder.h
INSTALL-LIBS-$(CONFIG_ENCODERS) += include/vpx/vpx_encoder.h
INSTALL-LIBS-$(CONFIG_ENCODERS) += include/vpx/vpx_tpl.h
ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
ifeq ($(CONFIG_MSVS),yes)
INSTALL-LIBS-yes += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB).lib)
ifeq ($(CONFIG_STATIC),yes)
INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB)d.lib)
endif
INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/vpx.dll)
INSTALL-LIBS-$(CONFIG_SHARED) += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/vpx.exp)
endif
else
INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libvpx.a
ifeq ($(CONFIG_STATIC),yes)
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)
@@ -213,6 +208,11 @@ libvpx_srcs.txt:
@echo $(CODEC_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@
CLEAN-OBJS += libvpx_srcs.txt
libvpxrc_srcs.txt:
@echo " [CREATE] $@"
@echo $(RC_RTC_SRCS) | xargs -n1 echo | LC_ALL=C sort -u > $@
CLEAN-OBJS += libvpxrc_srcs.txt
# Assembly files that are included, but don't define symbols themselves.
# Filtered out to avoid Windows build warnings.
ASM_INCLUDES := \
@@ -312,7 +312,7 @@ $(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
# 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_MAJOR := 12
SO_VERSION_MINOR := 1
SO_VERSION_PATCH := 0
ifeq ($(filter darwin%,$(TGT_OS)),$(TGT_OS))
@@ -418,13 +418,6 @@ ifeq ($(CONFIG_ENCODERS),yes)
$(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)
@@ -446,13 +439,13 @@ ifeq ($(VPX_ARCH_X86)$(VPX_ARCH_X86_64),yes)
# YASM
$(BUILD_PFX)vpx_config.asm: $(BUILD_PFX)vpx_config.h
@echo " [CREATE] $@"
@LC_ALL=C egrep "#define [A-Z0-9_]+ [01]" $< \
@LC_ALL=C grep -E "#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] $@"
@LC_ALL=C egrep "#define [A-Z0-9_]+ [01]" $< \
@LC_ALL=C grep -E "#define [A-Z0-9_]+ [01]" $< \
| awk '{print $$2 " EQU " $$3}' $(ADS2GAS) > $@
@echo " END" $(ADS2GAS) >> $@
CLEAN-OBJS += $(BUILD_PFX)vpx_config.asm
@@ -512,11 +505,6 @@ RC_INTERFACE_TEST_SRCS=$(call addprefix_clean,test/,\
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 > $@
@@ -536,7 +524,7 @@ $(LIBVPX_TEST_DATA): $(SRC_PATH_BARE)/test/test-data.sha1
esac \
)
testdata:: $(LIBVPX_TEST_DATA)
testdata: $(LIBVPX_TEST_DATA)
$(qexec)[ -x "$$(which sha1sum)" ] && sha1sum=sha1sum;\
[ -x "$$(which shasum)" ] && sha1sum=shasum;\
[ -x "$$(which sha1)" ] && sha1sum=sha1;\
@@ -545,7 +533,7 @@ testdata:: $(LIBVPX_TEST_DATA)
echo "Checking test data:";\
for f in $(call enabled,LIBVPX_TEST_DATA); do\
grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\
(cd $(LIBVPX_TEST_DATA_PATH); $${sha1sum} -c);\
(cd "$(LIBVPX_TEST_DATA_PATH)"; $${sha1sum} -c);\
done; \
else\
echo "Skipping test data integrity check, sha1sum not found.";\
@@ -631,8 +619,8 @@ test_rc_interface.$(VCPROJ_SFX): $(RC_INTERFACE_TEST_SRCS) vpx.$(VCPROJ_SFX) \
-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
endif # CONFIG_ENCODERS
endif # CONFIG_MSVS
else
include $(SRC_PATH_BARE)/third_party/googletest/gtest.mk
@@ -687,19 +675,7 @@ $(eval $(call linkerxx_template,$(RC_INTERFACE_TEST_BIN), \
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
endif # CONFIG_EXTERNAL_BUILD
# Install test sources only if codec source is included
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(patsubst $(SRC_PATH_BARE)/%,%,\
@@ -709,22 +685,22 @@ 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)
test-no-data-check:: test_shard_ndc.$(1)
test: test_shard.$(1)
test-no-data-check: test_shard_ndc.$(1)
test_shard.$(1) test_shard_ndc.$(1): $(LIBVPX_TEST_BIN)
@set -e; \
export GTEST_SHARD_INDEX=$(1); \
export GTEST_TOTAL_SHARDS=$(2); \
$(LIBVPX_TEST_BIN)
test_shard.$(1): testdata
.PHONY: test_shard.$(1)
.PHONY: test_shard.$(1) test_shard_ndc.$(1)
endef
NUM_SHARDS := 10
SHARDS := 0 1 2 3 4 5 6 7 8 9
$(foreach s,$(SHARDS),$(eval $(call test_shard_template,$(s),$(NUM_SHARDS))))
endif
endif # CONFIG_UNIT_TESTS
##
## documentation directives
@@ -764,10 +740,10 @@ TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH))
endif
utiltest utiltest-no-data-check:
$(qexec)$(SRC_PATH_BARE)/test/vpxdec.sh \
--test-data-path $(LIBVPX_TEST_DATA_PATH) \
--test-data-path "$(LIBVPX_TEST_DATA_PATH)" \
--bin-path $(TEST_BIN_PATH)
$(qexec)$(SRC_PATH_BARE)/test/vpxenc.sh \
--test-data-path $(LIBVPX_TEST_DATA_PATH) \
--test-data-path "$(LIBVPX_TEST_DATA_PATH)" \
--bin-path $(TEST_BIN_PATH)
utiltest: testdata
else
@@ -791,7 +767,7 @@ EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release
endif
exampletest exampletest-no-data-check: examples
$(qexec)$(SRC_PATH_BARE)/test/examples.sh \
--test-data-path $(LIBVPX_TEST_DATA_PATH) \
--test-data-path "$(LIBVPX_TEST_DATA_PATH)" \
--bin-path $(EXAMPLES_BIN_PATH)
exampletest: testdata
else
+2 -2
View File
@@ -151,8 +151,8 @@ void MD5Final(md5byte digest[16], struct MD5Context *ctx) {
* reflect the addition of 16 longwords of new data. MD5Update blocks
* the data and converts bytes into longwords for this routine.
*/
VPX_NO_UNSIGNED_OVERFLOW_CHECK void MD5Transform(UWORD32 buf[4],
UWORD32 const in[16]) {
VPX_NO_UNSIGNED_OVERFLOW_CHECK VPX_NO_UNSIGNED_SHIFT_CHECK void MD5Transform(
UWORD32 buf[4], UWORD32 const in[16]) {
UWORD32 a, b, c, d;
a = buf[0];
+5 -3
View File
@@ -9,10 +9,11 @@
*/
#include <assert.h>
#include <stdlib.h>
#include <limits.h>
#include <stdio.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "./rate_hist.h"
@@ -48,7 +49,8 @@ struct rate_hist *init_rate_histogram(const vpx_codec_enc_cfg_t *cfg,
// Determine the number of samples in the buffer. Use the file's framerate
// to determine the number of frames in rc_buf_sz milliseconds, with an
// adjustment (5/4) to account for alt-refs
hist->samples = cfg->rc_buf_sz * 5 / 4 * fps->num / fps->den / 1000;
hist->samples =
(int)((int64_t)cfg->rc_buf_sz * 5 / 4 * fps->num / fps->den / 1000);
// prevent division by zero
if (hist->samples == 0) hist->samples = 1;
+17 -15
View File
@@ -15,7 +15,7 @@
#include <limits>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "vpx/vpx_integer.h"
@@ -28,43 +28,45 @@ class ACMRandom {
explicit ACMRandom(int seed) : random_(seed) {}
void Reset(int seed) { random_.Reseed(seed); }
uint16_t Rand16(void) {
uint16_t Rand16() {
const uint32_t value =
random_.Generate(testing::internal::Random::kMaxRange);
return (value >> 15) & 0xffff;
}
int32_t Rand20Signed(void) {
int32_t Rand20Signed() {
// Use 20 bits: values between 524287 and -524288.
const uint32_t value = random_.Generate(1048576);
return static_cast<int32_t>(value) - 524288;
}
int16_t Rand16Signed(void) {
int16_t Rand16Signed() {
// Use 16 bits: values between 32767 and -32768.
return static_cast<int16_t>(random_.Generate(65536));
}
int16_t Rand13Signed(void) {
// Use 13 bits: values between 4095 and -4096.
const uint32_t value = random_.Generate(8192);
return static_cast<int16_t>(value) - 4096;
uint16_t Rand12() {
const uint32_t value =
random_.Generate(testing::internal::Random::kMaxRange);
// There's a bit more entropy in the upper bits of this implementation.
return (value >> 19) & 0xfff;
}
int16_t Rand9Signed(void) {
// Use 9 bits: values between 255 (0x0FF) and -256 (0x100).
const uint32_t value = random_.Generate(512);
return static_cast<int16_t>(value) - 256;
uint16_t Rand10() {
const uint32_t value =
random_.Generate(testing::internal::Random::kMaxRange);
// There's a bit more entropy in the upper bits of this implementation.
return (value >> 21) & 0x3ff;
}
uint8_t Rand8(void) {
uint8_t Rand8() {
const uint32_t value =
random_.Generate(testing::internal::Random::kMaxRange);
// There's a bit more entropy in the upper bits of this implementation.
return (value >> 23) & 0xff;
}
uint8_t Rand8Extremes(void) {
uint8_t Rand8Extremes() {
// Returns a random value near 0 or near 255, to better exercise
// saturation behavior.
const uint8_t r = Rand8();
@@ -82,7 +84,7 @@ class ACMRandom {
int operator()(int n) { return PseudoUniform(n); }
static int DeterministicSeed(void) { return 0xbaba; }
static int DeterministicSeed() { return 0xbaba; }
private:
testing::internal::Random random_;
+5 -5
View File
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <algorithm>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/util.h"
@@ -62,16 +62,16 @@ class ActiveMapRefreshTest
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
protected:
ActiveMapRefreshTest() : EncoderTest(GET_PARAM(0)) {}
virtual ~ActiveMapRefreshTest() {}
~ActiveMapRefreshTest() override = default;
virtual void SetUp() {
void SetUp() override {
InitializeConfig();
SetMode(GET_PARAM(1));
cpu_used_ = GET_PARAM(2);
}
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) {
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) override {
::libvpx_test::Y4mVideoSource *y4m_video =
static_cast<libvpx_test::Y4mVideoSource *>(video);
if (video->frame() == 0) {
+5 -5
View File
@@ -9,7 +9,7 @@
*/
#include <climits>
#include <vector>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/i420_video_source.h"
@@ -26,16 +26,16 @@ class ActiveMapTest
static const int kHeight = 144;
ActiveMapTest() : EncoderTest(GET_PARAM(0)) {}
virtual ~ActiveMapTest() {}
~ActiveMapTest() override = default;
virtual void SetUp() {
void SetUp() override {
InitializeConfig();
SetMode(GET_PARAM(1));
cpu_used_ = GET_PARAM(2);
}
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) {
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) override {
if (video->frame() == 0) {
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
encoder->Control(VP9E_SET_AQ_MODE, GET_PARAM(3));
+32 -27
View File
@@ -8,14 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <memory>
#include <tuple>
#include "gtest/gtest.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_dsp_rtcd.h"
#include "vpx/vpx_integer.h"
#include "vpx_config.h"
#include "vpx_dsp/postproc.h"
#include "vpx_mem/vpx_mem.h"
@@ -23,17 +26,17 @@ namespace {
static const int kNoiseSize = 3072;
typedef void (*AddNoiseFunc)(uint8_t *start, const int8_t *noise,
int blackclamp, int whiteclamp, int width,
int height, int pitch);
using AddNoiseFunc = void (*)(uint8_t *start, const int8_t *noise,
int blackclamp, int whiteclamp, int width,
int height, int pitch);
typedef std::tuple<double, AddNoiseFunc> AddNoiseTestFPParam;
using AddNoiseTestFPParam = std::tuple<double, AddNoiseFunc>;
class AddNoiseTest : public ::testing::Test,
public ::testing::WithParamInterface<AddNoiseTestFPParam> {
public:
virtual void TearDown() { libvpx_test::ClearSystemState(); }
virtual ~AddNoiseTest() {}
void TearDown() override { libvpx_test::ClearSystemState(); }
~AddNoiseTest() override = default;
};
double stddev6(char a, char b, char c, char d, char e, char f) {
@@ -97,33 +100,35 @@ TEST_P(AddNoiseTest, CheckNoiseAdded) {
}
TEST_P(AddNoiseTest, CheckCvsAssembly) {
const int width = 64;
static constexpr int kWidths[] = { 8, 18, 34, 64, 66 };
const int height = 64;
const int image_size = width * height;
int8_t noise[kNoiseSize];
const int clamp = vpx_setup_noise(4.4, noise, kNoiseSize);
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_NE(s, nullptr);
ASSERT_NE(d, nullptr);
for (int width : kWidths) {
const int image_size = width * height;
std::unique_ptr<uint8_t[], decltype(&vpx_free)> s(
reinterpret_cast<uint8_t *>(vpx_calloc(image_size, 1)), vpx_free);
std::unique_ptr<uint8_t[], decltype(&vpx_free)> d(
reinterpret_cast<uint8_t *>(vpx_calloc(image_size, 1)), vpx_free);
ASSERT_NE(s, nullptr);
ASSERT_NE(d, nullptr);
memset(s, 99, image_size);
memset(d, 99, image_size);
memset(s.get(), 99, image_size);
memset(d.get(), 99, image_size);
srand(0);
ASM_REGISTER_STATE_CHECK(
GET_PARAM(1)(s, noise, clamp, clamp, width, height, width));
srand(0);
ASM_REGISTER_STATE_CHECK(
vpx_plane_add_noise_c(d, noise, clamp, clamp, width, height, width));
srand(0);
ASM_REGISTER_STATE_CHECK(
GET_PARAM(1)(s.get(), noise, clamp, clamp, width, height, width));
srand(0);
ASM_REGISTER_STATE_CHECK(vpx_plane_add_noise_c(d.get(), noise, clamp, clamp,
width, height, width));
for (int i = 0; i < image_size; ++i) {
EXPECT_EQ(static_cast<int>(s[i]), static_cast<int>(d[i])) << "i = " << i;
for (int i = 0; i < image_size; ++i) {
EXPECT_EQ(static_cast<int>(s[i]), static_cast<int>(d[i]))
<< "width = " << width << ", idx = " << i;
}
}
vpx_free(d);
vpx_free(s);
}
using std::make_tuple;
@@ -133,7 +138,7 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(make_tuple(3.25, vpx_plane_add_noise_c),
make_tuple(4.4, vpx_plane_add_noise_c)));
#if HAVE_SSE2
#if HAVE_SSE2 && HAVE_X86_ASM
INSTANTIATE_TEST_SUITE_P(
SSE2, AddNoiseTest,
::testing::Values(make_tuple(3.25, vpx_plane_add_noise_sse2),
+5 -5
View File
@@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/i420_video_source.h"
@@ -20,9 +20,9 @@ class AltRefAqSegmentTest
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
protected:
AltRefAqSegmentTest() : EncoderTest(GET_PARAM(0)) {}
virtual ~AltRefAqSegmentTest() {}
~AltRefAqSegmentTest() override = default;
virtual void SetUp() {
void SetUp() override {
InitializeConfig();
SetMode(GET_PARAM(1));
set_cpu_used_ = GET_PARAM(2);
@@ -30,8 +30,8 @@ class AltRefAqSegmentTest
alt_ref_aq_mode_ = 0;
}
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) {
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) override {
if (video->frame() == 0) {
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
encoder->Control(VP9E_SET_ALT_REF_AQ, alt_ref_aq_mode_);
+13 -12
View File
@@ -7,11 +7,12 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/i420_video_source.h"
#include "test/util.h"
#include "vpx_config.h"
namespace {
#if CONFIG_VP8_ENCODER
@@ -24,24 +25,24 @@ class AltRefTest : public ::libvpx_test::EncoderTest,
public ::libvpx_test::CodecTestWithParam<int> {
protected:
AltRefTest() : EncoderTest(GET_PARAM(0)), altref_count_(0) {}
virtual ~AltRefTest() {}
~AltRefTest() override = default;
virtual void SetUp() {
void SetUp() override {
InitializeConfig();
SetMode(libvpx_test::kTwoPassGood);
}
virtual void BeginPassHook(unsigned int /*pass*/) { altref_count_ = 0; }
void BeginPassHook(unsigned int /*pass*/) override { altref_count_ = 0; }
virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
libvpx_test::Encoder *encoder) {
void PreEncodeFrameHook(libvpx_test::VideoSource *video,
libvpx_test::Encoder *encoder) override {
if (video->frame() == 0) {
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
encoder->Control(VP8E_SET_CPUUSED, 3);
}
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
if (pkt->data.frame.flags & VPX_FRAME_IS_INVISIBLE) ++altref_count_;
}
@@ -75,17 +76,17 @@ class AltRefForcedKeyTestLarge
AltRefForcedKeyTestLarge()
: EncoderTest(GET_PARAM(0)), encoding_mode_(GET_PARAM(1)),
cpu_used_(GET_PARAM(2)), forced_kf_frame_num_(1), frame_num_(0) {}
virtual ~AltRefForcedKeyTestLarge() {}
~AltRefForcedKeyTestLarge() override = default;
virtual void SetUp() {
void SetUp() override {
InitializeConfig();
SetMode(encoding_mode_);
cfg_.rc_end_usage = VPX_VBR;
cfg_.g_threads = 0;
}
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) {
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) override {
if (video->frame() == 0) {
encoder->Control(VP8E_SET_CPUUSED, cpu_used_);
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
@@ -100,7 +101,7 @@ class AltRefForcedKeyTestLarge
(video->frame() == forced_kf_frame_num_) ? VPX_EFLAG_FORCE_KF : 0;
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
if (frame_num_ == forced_kf_frame_num_) {
ASSERT_TRUE(!!(pkt->data.frame.flags & VPX_FRAME_IS_KEY))
<< "Frame #" << frame_num_ << " isn't a keyframe!";
+6
View File
@@ -10,6 +10,9 @@
# The test app itself runs on the command line through adb shell
# The paths are really messed up as the libvpx make file
# expects to be made from a parent directory.
# Ignore this file during non-NDK builds.
ifdef NDK_ROOT
CUR_WD := $(call my-dir)
BINDINGS_DIR := $(CUR_WD)/../../..
LOCAL_PATH := $(CUR_WD)/../../..
@@ -28,6 +31,7 @@ LOCAL_PATH := $(CUR_WD)/../..
#libgtest
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_CPPFLAGS := -std=c++17
LOCAL_CPP_EXTENSION := .cc
LOCAL_MODULE := gtest
LOCAL_C_INCLUDES := $(LOCAL_PATH)/third_party/googletest/src/
@@ -42,6 +46,7 @@ include $(BUILD_STATIC_LIBRARY)
#libvpx_test
include $(CLEAR_VARS)
LOCAL_ARM_MODE := arm
LOCAL_CPPFLAGS := -std=c++17
LOCAL_MODULE := libvpx_test
LOCAL_STATIC_LIBRARIES := gtest libwebm
@@ -61,3 +66,4 @@ LOCAL_SRC_FILES := $(addprefix ./test/, $(FILTERED_SRC))
# some test files depend on *_rtcd.h, ensure they're generated first.
$(eval $(call rtcd_dep_template))
include $(BUILD_EXECUTABLE)
endif # NDK_ROOT
+9 -8
View File
@@ -38,7 +38,7 @@ def get_file_sha(filename):
buf = file.read(HASH_CHUNK)
return sha_hash.hexdigest()
except IOError:
print "Error reading " + filename
print("Error reading " + filename)
# Downloads a file from a url, and then checks the sha against the passed
# in sha
@@ -67,7 +67,7 @@ try:
getopt.getopt(sys.argv[1:], \
"u:i:o:", ["url=", "input_csv=", "output_dir="])
except:
print 'get_files.py -u <url> -i <input_csv> -o <output_dir>'
print('get_files.py -u <url> -i <input_csv> -o <output_dir>')
sys.exit(2)
for opt, arg in opts:
@@ -79,7 +79,7 @@ for opt, arg in opts:
local_resource_path = os.path.join(arg)
if len(sys.argv) != 7:
print "Expects two paths and a url!"
print("Expects two paths and a url!")
exit(1)
if not os.path.isdir(local_resource_path):
@@ -89,7 +89,7 @@ file_list_csv = open(file_list_path, "rb")
# Our 'csv' file uses multiple spaces as a delimiter, python's
# csv class only uses single character delimiters, so we convert them below
file_list_reader = csv.reader((re.sub(' +', ' ', line) \
file_list_reader = csv.reader((re.sub(' +', ' ', line.decode('utf-8')) \
for line in file_list_csv), delimiter = ' ')
file_shas = []
@@ -104,15 +104,16 @@ for row in file_list_reader:
file_list_csv.close()
# Download files, only if they don't already exist and have correct shas
for filename, sha in itertools.izip(file_names, file_shas):
for filename, sha in zip(file_names, file_shas):
filename = filename.lstrip('*')
path = os.path.join(local_resource_path, filename)
if os.path.isfile(path) \
and get_file_sha(path) == sha:
print path + ' exists, skipping'
print(path + ' exists, skipping')
continue
for retry in range(0, ftp_retries):
print "Downloading " + path
print("Downloading " + path)
if not download_and_check_sha(url, filename, sha):
print "Sha does not match, retrying..."
print("Sha does not match, retrying...")
else:
break
+5 -5
View File
@@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/i420_video_source.h"
@@ -20,17 +20,17 @@ class AqSegmentTest
public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
protected:
AqSegmentTest() : EncoderTest(GET_PARAM(0)) {}
virtual ~AqSegmentTest() {}
~AqSegmentTest() override = default;
virtual void SetUp() {
void SetUp() override {
InitializeConfig();
SetMode(GET_PARAM(1));
set_cpu_used_ = GET_PARAM(2);
aq_mode_ = 0;
}
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) {
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) override {
if (video->frame() == 0) {
encoder->Control(VP8E_SET_CPUUSED, set_cpu_used_);
encoder->Control(VP9E_SET_AQ_MODE, aq_mode_);
+53 -29
View File
@@ -13,7 +13,7 @@
#include <string.h>
#include <tuple>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "./vp9_rtcd.h"
#include "./vpx_config.h"
@@ -38,7 +38,7 @@ class AverageTestBase : public ::testing::Test {
: width_(width), height_(height), source_data_(nullptr),
source_stride_(0), bit_depth_(8) {}
virtual void TearDown() {
void TearDown() override {
vpx_free(source_data_);
source_data_ = nullptr;
libvpx_test::ClearSystemState();
@@ -49,7 +49,7 @@ class AverageTestBase : public ::testing::Test {
static const int kDataAlignment = 16;
static const int kDataBlockSize = 64 * 128;
virtual void SetUp() {
void SetUp() override {
source_data_ = reinterpret_cast<Pixel *>(
vpx_memalign(kDataAlignment, kDataBlockSize * sizeof(source_data_[0])));
ASSERT_NE(source_data_, nullptr);
@@ -94,9 +94,9 @@ class AverageTestBase : public ::testing::Test {
ACMRandom rnd_;
};
typedef unsigned int (*AverageFunction)(const uint8_t *s, int pitch);
using AverageFunction = unsigned int (*)(const uint8_t *s, int pitch);
typedef std::tuple<int, int, int, int, AverageFunction> AvgFunc;
using AvgFunc = std::tuple<int, int, int, int, AverageFunction>;
class AverageTest : public AverageTestBase<uint8_t>,
public ::testing::WithParamInterface<AvgFunc> {
@@ -153,10 +153,10 @@ 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);
using IntProRowFunc = void (*)(int16_t hbuf[16], uint8_t const *ref,
const int ref_stride, const int height);
typedef std::tuple<int, IntProRowFunc, IntProRowFunc> IntProRowParam;
using IntProRowParam = std::tuple<int, IntProRowFunc, IntProRowFunc>;
class IntProRowTest : public AverageTestBase<uint8_t>,
public ::testing::WithParamInterface<IntProRowParam> {
@@ -169,7 +169,7 @@ class IntProRowTest : public AverageTestBase<uint8_t>,
}
protected:
virtual void SetUp() {
void SetUp() override {
source_data_ = reinterpret_cast<uint8_t *>(
vpx_memalign(kDataAlignment, kDataBlockSize * sizeof(source_data_[0])));
ASSERT_NE(source_data_, nullptr);
@@ -180,7 +180,7 @@ class IntProRowTest : public AverageTestBase<uint8_t>,
vpx_memalign(kDataAlignment, sizeof(*hbuf_c_) * 16));
}
virtual void TearDown() {
void TearDown() override {
vpx_free(source_data_);
source_data_ = nullptr;
vpx_free(hbuf_c_);
@@ -190,8 +190,9 @@ class IntProRowTest : public AverageTestBase<uint8_t>,
}
void RunComparison() {
ASM_REGISTER_STATE_CHECK(c_func_(hbuf_c_, source_data_, 0, height_));
ASM_REGISTER_STATE_CHECK(asm_func_(hbuf_asm_, source_data_, 0, height_));
ASM_REGISTER_STATE_CHECK(c_func_(hbuf_c_, source_data_, width_, height_));
ASM_REGISTER_STATE_CHECK(
asm_func_(hbuf_asm_, source_data_, width_, height_));
EXPECT_EQ(0, memcmp(hbuf_c_, hbuf_asm_, sizeof(*hbuf_c_) * 16))
<< "Output mismatch";
}
@@ -204,9 +205,9 @@ class IntProRowTest : public AverageTestBase<uint8_t>,
};
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(IntProRowTest);
typedef int16_t (*IntProColFunc)(uint8_t const *ref, const int width);
using IntProColFunc = int16_t (*)(uint8_t const *ref, const int width);
typedef std::tuple<int, IntProColFunc, IntProColFunc> IntProColParam;
using IntProColParam = std::tuple<int, IntProColFunc, IntProColFunc>;
class IntProColTest : public AverageTestBase<uint8_t>,
public ::testing::WithParamInterface<IntProColParam> {
@@ -232,13 +233,13 @@ class IntProColTest : public AverageTestBase<uint8_t>,
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;
using SatdFunc = int (*)(const tran_low_t *coeffs, int length);
using SatdTestParam = std::tuple<int, SatdFunc>;
class SatdTest : public ::testing::Test,
public ::testing::WithParamInterface<SatdTestParam> {
protected:
virtual void SetUp() {
void SetUp() override {
satd_size_ = GET_PARAM(0);
satd_func_ = GET_PARAM(1);
rnd_.Reset(ACMRandom::DeterministicSeed());
@@ -247,7 +248,7 @@ class SatdTest : public ::testing::Test,
ASSERT_NE(src_, nullptr);
}
virtual void TearDown() {
void TearDown() override {
libvpx_test::ClearSystemState();
vpx_free(src_);
}
@@ -276,7 +277,7 @@ class SatdTest : public ::testing::Test,
class SatdLowbdTest : public SatdTest {
protected:
virtual void FillRandom() {
void FillRandom() override {
for (int i = 0; i < satd_size_; ++i) {
const int16_t tmp = rnd_.Rand16Signed();
src_[i] = (tran_low_t)tmp;
@@ -284,15 +285,15 @@ class SatdLowbdTest : public SatdTest {
}
};
typedef int64_t (*BlockErrorFunc)(const tran_low_t *coeff,
const tran_low_t *dqcoeff, int block_size);
typedef std::tuple<int, BlockErrorFunc> BlockErrorTestFPParam;
using BlockErrorFunc = int64_t (*)(const tran_low_t *coeff,
const tran_low_t *dqcoeff, int block_size);
using BlockErrorTestFPParam = std::tuple<int, BlockErrorFunc>;
class BlockErrorTestFP
: public ::testing::Test,
public ::testing::WithParamInterface<BlockErrorTestFPParam> {
protected:
virtual void SetUp() {
void SetUp() override {
txfm_size_ = GET_PARAM(0);
block_error_func_ = GET_PARAM(1);
rnd_.Reset(ACMRandom::DeterministicSeed());
@@ -304,7 +305,7 @@ class BlockErrorTestFP
ASSERT_NE(dqcoeff_, nullptr);
}
virtual void TearDown() {
void TearDown() override {
libvpx_test::ClearSystemState();
vpx_free(coeff_);
vpx_free(dqcoeff_);
@@ -463,7 +464,7 @@ TEST_P(SatdLowbdTest, DISABLED_Speed) {
#if CONFIG_VP9_HIGHBITDEPTH
class SatdHighbdTest : public SatdTest {
protected:
virtual void FillRandom() {
void FillRandom() override {
for (int i = 0; i < satd_size_; ++i) {
src_[i] = rnd_.Rand20Signed();
}
@@ -582,6 +583,13 @@ INSTANTIATE_TEST_SUITE_P(
make_tuple(16, 16, 1, 4, &vpx_highbd_avg_4x4_sse2)));
#endif // HAVE_SSE2
#if HAVE_NEON
INSTANTIATE_TEST_SUITE_P(
NEON, AverageTestHBD,
::testing::Values(make_tuple(16, 16, 1, 8, &vpx_highbd_avg_8x8_neon),
make_tuple(16, 16, 1, 4, &vpx_highbd_avg_4x4_neon)));
#endif // HAVE_NEON
INSTANTIATE_TEST_SUITE_P(C, SatdHighbdTest,
::testing::Values(make_tuple(16, &vpx_satd_c),
make_tuple(64, &vpx_satd_c),
@@ -632,12 +640,14 @@ INSTANTIATE_TEST_SUITE_P(SSE2, SatdLowbdTest,
make_tuple(256, &vpx_satd_sse2),
make_tuple(1024, &vpx_satd_sse2)));
#if HAVE_X86_ASM
INSTANTIATE_TEST_SUITE_P(
SSE2, BlockErrorTestFP,
::testing::Values(make_tuple(16, &vp9_block_error_fp_sse2),
make_tuple(64, &vp9_block_error_fp_sse2),
make_tuple(256, &vp9_block_error_fp_sse2),
make_tuple(1024, &vp9_block_error_fp_sse2)));
#endif // HAVE_X86_ASM
#endif // HAVE_SSE2
#if HAVE_AVX2
@@ -694,18 +704,32 @@ INSTANTIATE_TEST_SUITE_P(NEON, SatdLowbdTest,
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
#if CONFIG_VP9_HIGHBITDEPTH
INSTANTIATE_TEST_SUITE_P(
NEON, SatdHighbdTest,
::testing::Values(make_tuple(16, &vpx_highbd_satd_neon),
make_tuple(64, &vpx_highbd_satd_neon),
make_tuple(256, &vpx_highbd_satd_neon),
make_tuple(1024, &vpx_highbd_satd_neon)));
#endif // CONFIG_VP9_HIGHBITDEPTH
INSTANTIATE_TEST_SUITE_P(
NEON, BlockErrorTestFP,
::testing::Values(make_tuple(16, &vp9_block_error_fp_neon),
make_tuple(64, &vp9_block_error_fp_neon),
make_tuple(256, &vp9_block_error_fp_neon),
make_tuple(1024, &vp9_block_error_fp_neon)));
#endif // !CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_NEON
#if HAVE_SVE
INSTANTIATE_TEST_SUITE_P(
SVE, BlockErrorTestFP,
::testing::Values(make_tuple(16, &vp9_block_error_fp_sve),
make_tuple(64, &vp9_block_error_fp_sve),
make_tuple(256, &vp9_block_error_fp_sve),
make_tuple(1024, &vp9_block_error_fp_sve)));
#endif // HAVE_SVE
#if HAVE_MSA
INSTANTIATE_TEST_SUITE_P(
MSA, AverageTest,
+1
View File
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <algorithm>
#include <cstdlib>
#include "test/bench.h"
#include "vpx_ports/vpx_timer.h"
+2
View File
@@ -16,6 +16,8 @@
class AbstractBench {
public:
virtual ~AbstractBench() = default;
void RunNTimes(int n);
void PrintMedian(const char *title);
+4 -4
View File
@@ -13,7 +13,7 @@
#include <string.h>
#include <tuple>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "./vpx_config.h"
#if CONFIG_VP9_ENCODER
@@ -49,14 +49,14 @@ class BlockinessTestBase : public ::testing::Test {
reference_data_ = nullptr;
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
void TearDown() override { libvpx_test::ClearSystemState(); }
protected:
// Handle frames up to 640x480
static const int kDataAlignment = 16;
static const int kDataBufferSize = 640 * 480;
virtual void SetUp() {
void SetUp() override {
source_stride_ = (width_ + 31) & ~31;
reference_stride_ = width_ * 2;
rnd_.Reset(ACMRandom::DeterministicSeed());
@@ -139,7 +139,7 @@ class BlockinessTestBase : public ::testing::Test {
};
#if CONFIG_VP9_ENCODER
typedef std::tuple<int, int> BlockinessParam;
using BlockinessParam = std::tuple<int, int>;
class BlockinessVP9Test
: public BlockinessTestBase,
public ::testing::WithParamInterface<BlockinessParam> {
+12 -6
View File
@@ -9,11 +9,12 @@
*/
#include <climits>
#include <vector>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/i420_video_source.h"
#include "test/util.h"
#include "vpx_config.h"
namespace {
@@ -22,15 +23,15 @@ class BordersTest
public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> {
protected:
BordersTest() : EncoderTest(GET_PARAM(0)) {}
virtual ~BordersTest() {}
~BordersTest() override = default;
virtual void SetUp() {
void SetUp() override {
InitializeConfig();
SetMode(GET_PARAM(1));
}
virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) {
void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
::libvpx_test::Encoder *encoder) override {
if (video->frame() == 0) {
encoder->Control(VP8E_SET_CPUUSED, 1);
encoder->Control(VP8E_SET_ENABLEAUTOALTREF, 1);
@@ -40,7 +41,7 @@ class BordersTest
}
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
void FramePktHook(const vpx_codec_cx_pkt_t *pkt) override {
if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) {
}
}
@@ -79,6 +80,11 @@ TEST_P(BordersTest, TestLowBitrate) {
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
}
#if CONFIG_REALTIME_ONLY
VP9_INSTANTIATE_TEST_SUITE(BordersTest,
::testing::Values(::libvpx_test::kRealTime));
#else
VP9_INSTANTIATE_TEST_SUITE(BordersTest,
::testing::Values(::libvpx_test::kTwoPassGood));
#endif
} // namespace
+1 -1
View File
@@ -15,7 +15,7 @@
#include <limits>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "test/acm_random.h"
#include "vpx/vpx_integer.h"
+2 -2
View File
@@ -58,7 +58,7 @@ class ByteAlignmentTest
ByteAlignmentTest()
: video_(nullptr), decoder_(nullptr), md5_file_(nullptr) {}
virtual void SetUp() {
void SetUp() override {
video_ = new libvpx_test::WebMVideoSource(kVP9TestFile);
ASSERT_NE(video_, nullptr);
video_->Init();
@@ -71,7 +71,7 @@ class ByteAlignmentTest
OpenMd5File(kVP9Md5File);
}
virtual void TearDown() {
void TearDown() override {
if (md5_file_ != nullptr) fclose(md5_file_);
delete decoder_;
+29 -27
View File
@@ -40,7 +40,7 @@ class CodecFactory {
const vpx_codec_flags_t flags) const = 0;
virtual Encoder *CreateEncoder(vpx_codec_enc_cfg_t cfg,
unsigned long deadline,
vpx_enc_deadline_t deadline,
const unsigned long init_flags,
TwopassStatsStore *stats) const = 0;
@@ -84,7 +84,7 @@ class VP8Decoder : public Decoder {
: Decoder(cfg, flag) {}
protected:
virtual vpx_codec_iface_t *CodecInterface() const {
vpx_codec_iface_t *CodecInterface() const override {
#if CONFIG_VP8_DECODER
return &vpx_codec_vp8_dx_algo;
#else
@@ -95,12 +95,12 @@ class VP8Decoder : public Decoder {
class VP8Encoder : public Encoder {
public:
VP8Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
VP8Encoder(vpx_codec_enc_cfg_t cfg, vpx_enc_deadline_t deadline,
const unsigned long init_flags, TwopassStatsStore *stats)
: Encoder(cfg, deadline, init_flags, stats) {}
protected:
virtual vpx_codec_iface_t *CodecInterface() const {
vpx_codec_iface_t *CodecInterface() const override {
#if CONFIG_VP8_ENCODER
return &vpx_codec_vp8_cx_algo;
#else
@@ -113,12 +113,12 @@ class VP8CodecFactory : public CodecFactory {
public:
VP8CodecFactory() : CodecFactory() {}
virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg) const {
Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg) const override {
return CreateDecoder(cfg, 0);
}
virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
const vpx_codec_flags_t flags) const {
Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
const vpx_codec_flags_t flags) const override {
#if CONFIG_VP8_DECODER
return new VP8Decoder(cfg, flags);
#else
@@ -128,10 +128,9 @@ class VP8CodecFactory : public CodecFactory {
#endif
}
virtual Encoder *CreateEncoder(vpx_codec_enc_cfg_t cfg,
unsigned long deadline,
const unsigned long init_flags,
TwopassStatsStore *stats) const {
Encoder *CreateEncoder(vpx_codec_enc_cfg_t cfg, vpx_enc_deadline_t deadline,
const unsigned long init_flags,
TwopassStatsStore *stats) const override {
#if CONFIG_VP8_ENCODER
return new VP8Encoder(cfg, deadline, init_flags, stats);
#else
@@ -143,8 +142,8 @@ class VP8CodecFactory : public CodecFactory {
#endif
}
virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
int usage) const {
vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
int usage) const override {
#if CONFIG_VP8_ENCODER
return vpx_codec_enc_config_default(&vpx_codec_vp8_cx_algo, cfg, usage);
#else
@@ -165,7 +164,9 @@ const libvpx_test::VP8CodecFactory kVP8;
&libvpx_test::kVP8)), \
__VA_ARGS__))
#else
#define VP8_INSTANTIATE_TEST_SUITE(test, ...)
// static_assert() is used to avoid warnings about an extra ';' outside of a
// function.
#define VP8_INSTANTIATE_TEST_SUITE(test, ...) static_assert(CONFIG_VP8 == 0, "")
#endif // CONFIG_VP8
/*
@@ -180,7 +181,7 @@ class VP9Decoder : public Decoder {
: Decoder(cfg, flag) {}
protected:
virtual vpx_codec_iface_t *CodecInterface() const {
vpx_codec_iface_t *CodecInterface() const override {
#if CONFIG_VP9_DECODER
return &vpx_codec_vp9_dx_algo;
#else
@@ -191,12 +192,12 @@ class VP9Decoder : public Decoder {
class VP9Encoder : public Encoder {
public:
VP9Encoder(vpx_codec_enc_cfg_t cfg, unsigned long deadline,
VP9Encoder(vpx_codec_enc_cfg_t cfg, vpx_enc_deadline_t deadline,
const unsigned long init_flags, TwopassStatsStore *stats)
: Encoder(cfg, deadline, init_flags, stats) {}
protected:
virtual vpx_codec_iface_t *CodecInterface() const {
vpx_codec_iface_t *CodecInterface() const override {
#if CONFIG_VP9_ENCODER
return &vpx_codec_vp9_cx_algo;
#else
@@ -209,12 +210,12 @@ class VP9CodecFactory : public CodecFactory {
public:
VP9CodecFactory() : CodecFactory() {}
virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg) const {
Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg) const override {
return CreateDecoder(cfg, 0);
}
virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
const vpx_codec_flags_t flags) const {
Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
const vpx_codec_flags_t flags) const override {
#if CONFIG_VP9_DECODER
return new VP9Decoder(cfg, flags);
#else
@@ -224,10 +225,9 @@ class VP9CodecFactory : public CodecFactory {
#endif
}
virtual Encoder *CreateEncoder(vpx_codec_enc_cfg_t cfg,
unsigned long deadline,
const unsigned long init_flags,
TwopassStatsStore *stats) const {
Encoder *CreateEncoder(vpx_codec_enc_cfg_t cfg, vpx_enc_deadline_t deadline,
const unsigned long init_flags,
TwopassStatsStore *stats) const override {
#if CONFIG_VP9_ENCODER
return new VP9Encoder(cfg, deadline, init_flags, stats);
#else
@@ -239,8 +239,8 @@ class VP9CodecFactory : public CodecFactory {
#endif
}
virtual vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
int usage) const {
vpx_codec_err_t DefaultEncoderConfig(vpx_codec_enc_cfg_t *cfg,
int usage) const override {
#if CONFIG_VP9_ENCODER
return vpx_codec_enc_config_default(&vpx_codec_vp9_cx_algo, cfg, usage);
#else
@@ -261,7 +261,9 @@ const libvpx_test::VP9CodecFactory kVP9;
&libvpx_test::kVP9)), \
__VA_ARGS__))
#else
#define VP9_INSTANTIATE_TEST_SUITE(test, ...)
// static_assert() is used to avoid warnings about an extra ';' outside of a
// function.
#define VP9_INSTANTIATE_TEST_SUITE(test, ...) static_assert(CONFIG_VP9 == 0, "")
#endif // CONFIG_VP9
} // namespace libvpx_test
+136 -51
View File
@@ -8,13 +8,14 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "test/buffer.h"
#include "test/register_state_check.h"
#include "vpx_config.h"
#include "vpx_ports/vpx_timer.h"
namespace {
@@ -22,13 +23,14 @@ namespace {
using ::libvpx_test::ACMRandom;
using ::libvpx_test::Buffer;
typedef void (*AvgPredFunc)(uint8_t *a, const uint8_t *b, int w, int h,
const uint8_t *c, int c_stride);
template <typename Pixel>
Pixel avg_with_rounding(Pixel a, Pixel b) {
return (a + b + 1) >> 1;
}
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) {
template <typename Pixel>
void reference_pred(const Buffer<Pixel> &pred, const Buffer<Pixel> &ref,
int width, int height, Buffer<Pixel> *avg) {
ASSERT_NE(avg->TopLeftPixel(), nullptr);
ASSERT_NE(pred.TopLeftPixel(), nullptr);
ASSERT_NE(ref.TopLeftPixel(), nullptr);
@@ -36,28 +38,36 @@ void reference_pred(const Buffer<uint8_t> &pred, const Buffer<uint8_t> &ref,
for (int y = 0; y < height; ++y) {
for (int x = 0; x < width; ++x) {
avg->TopLeftPixel()[y * avg->stride() + x] =
avg_with_rounding(pred.TopLeftPixel()[y * pred.stride() + x],
ref.TopLeftPixel()[y * ref.stride() + x]);
avg_with_rounding<Pixel>(pred.TopLeftPixel()[y * pred.stride() + x],
ref.TopLeftPixel()[y * ref.stride() + x]);
}
}
}
using AvgPredFunc = void (*)(uint8_t *a, const uint8_t *b, int w, int h,
const uint8_t *c, int c_stride);
template <int bitdepth, typename Pixel>
class AvgPredTest : public ::testing::TestWithParam<AvgPredFunc> {
public:
virtual void SetUp() {
void SetUp() override {
avg_pred_func_ = GetParam();
rnd_.Reset(ACMRandom::DeterministicSeed());
}
void TestSizeCombinations();
void TestCompareReferenceRandom();
void TestSpeed();
protected:
AvgPredFunc avg_pred_func_;
ACMRandom rnd_;
};
TEST_P(AvgPredTest, SizeCombinations) {
template <int bitdepth, typename Pixel>
void AvgPredTest<bitdepth, Pixel>::TestSizeCombinations() {
// This is called as part of the sub pixel variance. As such it must be one of
// the variance block sizes.
for (int width_pow = 2; width_pow <= 6; ++width_pow) {
for (int height_pow = width_pow - 1; height_pow <= width_pow + 1;
++height_pow) {
@@ -70,23 +80,30 @@ TEST_P(AvgPredTest, SizeCombinations) {
const int width = 1 << width_pow;
const int height = 1 << height_pow;
// Only the reference buffer may have a stride not equal to width.
Buffer<uint8_t> ref =
Buffer<uint8_t>(width, height, ref_padding ? 8 : 0);
Buffer<Pixel> ref = Buffer<Pixel>(width, height, ref_padding ? 8 : 0);
ASSERT_TRUE(ref.Init());
Buffer<uint8_t> pred = Buffer<uint8_t>(width, height, 0, 16);
Buffer<Pixel> pred = Buffer<Pixel>(width, height, 0, 32);
ASSERT_TRUE(pred.Init());
Buffer<uint8_t> avg_ref = Buffer<uint8_t>(width, height, 0, 16);
Buffer<Pixel> avg_ref = Buffer<Pixel>(width, height, 0, 32);
ASSERT_TRUE(avg_ref.Init());
Buffer<uint8_t> avg_chk = Buffer<uint8_t>(width, height, 0, 16);
Buffer<Pixel> avg_chk = Buffer<Pixel>(width, height, 0, 32);
ASSERT_TRUE(avg_chk.Init());
const int bitdepth_mask = (1 << bitdepth) - 1;
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
ref.TopLeftPixel()[w + h * width] = rnd_.Rand16() & bitdepth_mask;
}
}
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
pred.TopLeftPixel()[w + h * width] = rnd_.Rand16() & bitdepth_mask;
}
}
ref.Set(&rnd_, &ACMRandom::Rand8);
pred.Set(&rnd_, &ACMRandom::Rand8);
reference_pred(pred, ref, width, height, &avg_ref);
ASM_REGISTER_STATE_CHECK(
avg_pred_func_(avg_chk.TopLeftPixel(), pred.TopLeftPixel(), width,
height, ref.TopLeftPixel(), ref.stride()));
reference_pred<Pixel>(pred, ref, width, height, &avg_ref);
ASM_REGISTER_STATE_CHECK(avg_pred_func_(
(uint8_t *)avg_chk.TopLeftPixel(), (uint8_t *)pred.TopLeftPixel(),
width, height, (uint8_t *)ref.TopLeftPixel(), ref.stride()));
EXPECT_TRUE(avg_chk.CheckValues(avg_ref));
if (HasFailure()) {
@@ -99,26 +116,36 @@ TEST_P(AvgPredTest, SizeCombinations) {
}
}
TEST_P(AvgPredTest, CompareReferenceRandom) {
template <int bitdepth, typename Pixel>
void AvgPredTest<bitdepth, Pixel>::TestCompareReferenceRandom() {
const int width = 64;
const int height = 32;
Buffer<uint8_t> ref = Buffer<uint8_t>(width, height, 8);
Buffer<Pixel> ref = Buffer<Pixel>(width, height, 8);
ASSERT_TRUE(ref.Init());
Buffer<uint8_t> pred = Buffer<uint8_t>(width, height, 0, 16);
Buffer<Pixel> pred = Buffer<Pixel>(width, height, 0, 32);
ASSERT_TRUE(pred.Init());
Buffer<uint8_t> avg_ref = Buffer<uint8_t>(width, height, 0, 16);
Buffer<Pixel> avg_ref = Buffer<Pixel>(width, height, 0, 32);
ASSERT_TRUE(avg_ref.Init());
Buffer<uint8_t> avg_chk = Buffer<uint8_t>(width, height, 0, 16);
Buffer<Pixel> avg_chk = Buffer<Pixel>(width, height, 0, 32);
ASSERT_TRUE(avg_chk.Init());
for (int i = 0; i < 500; ++i) {
ref.Set(&rnd_, &ACMRandom::Rand8);
pred.Set(&rnd_, &ACMRandom::Rand8);
const int bitdepth_mask = (1 << bitdepth) - 1;
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
ref.TopLeftPixel()[w + h * width] = rnd_.Rand16() & bitdepth_mask;
}
}
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
pred.TopLeftPixel()[w + h * width] = rnd_.Rand16() & bitdepth_mask;
}
}
reference_pred(pred, ref, width, height, &avg_ref);
ASM_REGISTER_STATE_CHECK(avg_pred_func_(avg_chk.TopLeftPixel(),
pred.TopLeftPixel(), width, height,
ref.TopLeftPixel(), ref.stride()));
reference_pred<Pixel>(pred, ref, width, height, &avg_ref);
ASM_REGISTER_STATE_CHECK(avg_pred_func_(
(uint8_t *)avg_chk.TopLeftPixel(), (uint8_t *)pred.TopLeftPixel(),
width, height, (uint8_t *)ref.TopLeftPixel(), ref.stride()));
EXPECT_TRUE(avg_chk.CheckValues(avg_ref));
if (HasFailure()) {
printf("Width: %d Height: %d\n", width, height);
@@ -128,7 +155,8 @@ TEST_P(AvgPredTest, CompareReferenceRandom) {
}
}
TEST_P(AvgPredTest, DISABLED_Speed) {
template <int bitdepth, typename Pixel>
void AvgPredTest<bitdepth, Pixel>::TestSpeed() {
for (int width_pow = 2; width_pow <= 6; ++width_pow) {
for (int height_pow = width_pow - 1; height_pow <= width_pow + 1;
++height_pow) {
@@ -138,22 +166,30 @@ TEST_P(AvgPredTest, DISABLED_Speed) {
for (int ref_padding = 0; ref_padding < 2; ref_padding++) {
const int width = 1 << width_pow;
const int height = 1 << height_pow;
Buffer<uint8_t> ref =
Buffer<uint8_t>(width, height, ref_padding ? 8 : 0);
Buffer<Pixel> ref = Buffer<Pixel>(width, height, ref_padding ? 8 : 0);
ASSERT_TRUE(ref.Init());
Buffer<uint8_t> pred = Buffer<uint8_t>(width, height, 0, 16);
Buffer<Pixel> pred = Buffer<Pixel>(width, height, 0, 32);
ASSERT_TRUE(pred.Init());
Buffer<uint8_t> avg = Buffer<uint8_t>(width, height, 0, 16);
Buffer<Pixel> avg = Buffer<Pixel>(width, height, 0, 32);
ASSERT_TRUE(avg.Init());
ref.Set(&rnd_, &ACMRandom::Rand8);
pred.Set(&rnd_, &ACMRandom::Rand8);
const int bitdepth_mask = (1 << bitdepth) - 1;
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
ref.TopLeftPixel()[w + h * width] = rnd_.Rand16() & bitdepth_mask;
}
}
for (int h = 0; h < height; ++h) {
for (int w = 0; w < width; ++w) {
pred.TopLeftPixel()[w + h * width] = rnd_.Rand16() & bitdepth_mask;
}
}
vpx_usec_timer timer;
vpx_usec_timer_start(&timer);
for (int i = 0; i < 10000000 / (width * height); ++i) {
avg_pred_func_(avg.TopLeftPixel(), pred.TopLeftPixel(), width, height,
ref.TopLeftPixel(), ref.stride());
for (int i = 0; i < 100000000 / (width * height); ++i) {
avg_pred_func_((uint8_t *)avg.TopLeftPixel(),
(uint8_t *)pred.TopLeftPixel(), width, height,
(uint8_t *)ref.TopLeftPixel(), ref.stride());
}
vpx_usec_timer_mark(&timer);
@@ -166,26 +202,75 @@ TEST_P(AvgPredTest, DISABLED_Speed) {
}
}
INSTANTIATE_TEST_SUITE_P(C, AvgPredTest,
using AvgPredTestLBD = AvgPredTest<8, uint8_t>;
TEST_P(AvgPredTestLBD, SizeCombinations) { TestSizeCombinations(); }
TEST_P(AvgPredTestLBD, CompareReferenceRandom) { TestCompareReferenceRandom(); }
TEST_P(AvgPredTestLBD, DISABLED_Speed) { TestSpeed(); }
INSTANTIATE_TEST_SUITE_P(C, AvgPredTestLBD,
::testing::Values(&vpx_comp_avg_pred_c));
#if HAVE_SSE2
INSTANTIATE_TEST_SUITE_P(SSE2, AvgPredTest,
INSTANTIATE_TEST_SUITE_P(SSE2, AvgPredTestLBD,
::testing::Values(&vpx_comp_avg_pred_sse2));
#endif // HAVE_SSE2
#if HAVE_AVX2
INSTANTIATE_TEST_SUITE_P(AVX2, AvgPredTestLBD,
::testing::Values(&vpx_comp_avg_pred_avx2));
#endif // HAVE_AVX2
#if HAVE_NEON
INSTANTIATE_TEST_SUITE_P(NEON, AvgPredTest,
INSTANTIATE_TEST_SUITE_P(NEON, AvgPredTestLBD,
::testing::Values(&vpx_comp_avg_pred_neon));
#endif // HAVE_NEON
#if HAVE_VSX
INSTANTIATE_TEST_SUITE_P(VSX, AvgPredTest,
INSTANTIATE_TEST_SUITE_P(VSX, AvgPredTestLBD,
::testing::Values(&vpx_comp_avg_pred_vsx));
#endif // HAVE_VSX
#if HAVE_LSX
INSTANTIATE_TEST_SUITE_P(LSX, AvgPredTest,
INSTANTIATE_TEST_SUITE_P(LSX, AvgPredTestLBD,
::testing::Values(&vpx_comp_avg_pred_lsx));
#endif // HAVE_LSX
#if CONFIG_VP9_HIGHBITDEPTH
using HighbdAvgPredFunc = void (*)(uint16_t *a, const uint16_t *b, int w, int h,
const uint16_t *c, int c_stride);
template <HighbdAvgPredFunc fn>
void highbd_wrapper(uint8_t *a, const uint8_t *b, int w, int h,
const uint8_t *c, int c_stride) {
fn((uint16_t *)a, (const uint16_t *)b, w, h, (const uint16_t *)c, c_stride);
}
using AvgPredTestHBD = AvgPredTest<12, uint16_t>;
TEST_P(AvgPredTestHBD, SizeCombinations) { TestSizeCombinations(); }
TEST_P(AvgPredTestHBD, CompareReferenceRandom) { TestCompareReferenceRandom(); }
TEST_P(AvgPredTestHBD, DISABLED_Speed) { TestSpeed(); }
INSTANTIATE_TEST_SUITE_P(
C, AvgPredTestHBD,
::testing::Values(&highbd_wrapper<vpx_highbd_comp_avg_pred_c>));
#if HAVE_SSE2
INSTANTIATE_TEST_SUITE_P(
SSE2, AvgPredTestHBD,
::testing::Values(&highbd_wrapper<vpx_highbd_comp_avg_pred_sse2>));
#endif // HAVE_SSE2
#if HAVE_NEON
INSTANTIATE_TEST_SUITE_P(
NEON, AvgPredTestHBD,
::testing::Values(&highbd_wrapper<vpx_highbd_comp_avg_pred_neon>));
#endif // HAVE_NEON
#endif // CONFIG_VP9_HIGHBITDEPTH
} // namespace
+6 -6
View File
@@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
#include "test/util.h"
@@ -22,24 +22,24 @@ class ConfigTest
ConfigTest()
: EncoderTest(GET_PARAM(0)), frame_count_in_(0), frame_count_out_(0),
frame_count_max_(0) {}
virtual ~ConfigTest() {}
~ConfigTest() override = default;
virtual void SetUp() {
void SetUp() override {
InitializeConfig();
SetMode(GET_PARAM(1));
}
virtual void BeginPassHook(unsigned int /*pass*/) {
void BeginPassHook(unsigned int /*pass*/) override {
frame_count_in_ = 0;
frame_count_out_ = 0;
}
virtual void PreEncodeFrameHook(libvpx_test::VideoSource * /*video*/) {
void PreEncodeFrameHook(libvpx_test::VideoSource * /*video*/) override {
++frame_count_in_;
abort_ |= (frame_count_in_ >= frame_count_max_);
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t * /*pkt*/) {
void FramePktHook(const vpx_codec_cx_pkt_t * /*pkt*/) override {
++frame_count_out_;
}
+4 -4
View File
@@ -13,7 +13,7 @@
#include <string.h>
#include <tuple>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "./vpx_config.h"
#if CONFIG_VP9_ENCODER
@@ -65,14 +65,14 @@ class ConsistencyTestBase : public ::testing::Test {
delete[] ssim_array_;
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
void TearDown() override { libvpx_test::ClearSystemState(); }
protected:
// Handle frames up to 640x480
static const int kDataAlignment = 16;
static const int kDataBufferSize = 640 * 480;
virtual void SetUp() {
void SetUp() override {
source_stride_ = (width_ + 31) & ~31;
reference_stride_ = width_ * 2;
rnd_.Reset(ACMRandom::DeterministicSeed());
@@ -128,7 +128,7 @@ class ConsistencyTestBase : public ::testing::Test {
};
#if CONFIG_VP9_ENCODER
typedef std::tuple<int, int> ConsistencyParam;
using ConsistencyParam = std::tuple<int, int>;
class ConsistencyVP9Test
: public ConsistencyTestBase,
public ::testing::WithParamInterface<ConsistencyParam> {
+849 -25
View File
@@ -11,7 +11,7 @@
#include <string.h>
#include <tuple>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "gtest/gtest.h"
#include "./vp9_rtcd.h"
#include "./vpx_config.h"
@@ -32,17 +32,24 @@ namespace {
static const unsigned int kMaxDimension = 64;
typedef void (*ConvolveFunc)(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const InterpKernel *filter, int x0_q4,
int x_step_q4, int y0_q4, int y_step_q4, int w,
int h);
using ConvolveFunc = void (*)(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const InterpKernel *filter, int x0_q4,
int x_step_q4, int y0_q4, int y_step_q4, int w,
int h);
#if !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
using ConvolveFunc12Tap = void (*)(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const InterpKernel12 *filter, int x0_q4,
int x_step_q4, int y0_q4, int y_step_q4,
int w, int h);
#endif
typedef void (*WrapperFilterBlock2d8Func)(
const uint8_t *src_ptr, const unsigned int src_stride,
const int16_t *hfilter, const int16_t *vfilter, uint8_t *dst_ptr,
unsigned int dst_stride, unsigned int output_width,
unsigned int output_height, int use_highbd);
using WrapperFilterBlock2d8Func =
void (*)(const uint8_t *src_ptr, const unsigned int src_stride,
const int16_t *hfilter, const int16_t *vfilter, uint8_t *dst_ptr,
unsigned int dst_stride, unsigned int output_width,
unsigned int output_height, int use_highbd);
struct ConvolveFunctions {
ConvolveFunctions(ConvolveFunc copy, ConvolveFunc avg, ConvolveFunc h8,
@@ -78,7 +85,26 @@ struct ConvolveFunctions {
int use_highbd_; // 0 if high bitdepth not used, else the actual bit depth.
};
typedef std::tuple<int, int, const ConvolveFunctions *> ConvolveParam;
using ConvolveParam = std::tuple<int, int, const ConvolveFunctions *>;
#if !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
struct ConvolveFunctions12Tap {
ConvolveFunctions12Tap(ConvolveFunc12Tap h12, ConvolveFunc12Tap v12,
ConvolveFunc12Tap hv12, int bd)
: use_highbd_(bd) {
h12_ = h12;
v12_ = v12;
hv12_ = hv12;
}
ConvolveFunc12Tap h12_;
ConvolveFunc12Tap v12_;
ConvolveFunc12Tap hv12_;
int use_highbd_; // 0 if high bitdepth not used, else the actual bit depth.
};
using Convolve12TapParam = std::tuple<int, int, const ConvolveFunctions12Tap *>;
#endif
#define ALL_SIZES(convolve_fn) \
make_tuple(4, 4, &convolve_fn), make_tuple(8, 4, &convolve_fn), \
@@ -88,7 +114,13 @@ typedef std::tuple<int, int, const ConvolveFunctions *> ConvolveParam;
make_tuple(16, 32, &convolve_fn), make_tuple(32, 32, &convolve_fn), \
make_tuple(64, 32, &convolve_fn), make_tuple(32, 64, &convolve_fn), \
make_tuple(64, 64, &convolve_fn)
#if !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
#define ALL_SIZES_12TAP(convolve_fn) \
make_tuple(8, 8, &convolve_fn), make_tuple(16, 8, &convolve_fn), \
make_tuple(8, 16, &convolve_fn), make_tuple(16, 16, &convolve_fn), \
make_tuple(32, 16, &convolve_fn), make_tuple(16, 32, &convolve_fn), \
make_tuple(32, 32, &convolve_fn)
#endif
// Reference 8-tap subpixel filter, slightly modified to fit into this test.
#define VP9_FILTER_WEIGHT 128
#define VP9_FILTER_SHIFT 7
@@ -244,7 +276,7 @@ void highbd_filter_block2d_8_c(const uint16_t *src_ptr,
// Vertical pass (transposed intermediate -> dst).
{
uint16_t *src_ptr = intermediate_buffer;
src_ptr = intermediate_buffer;
const int dst_next_row_stride = dst_stride - output_width;
unsigned int i, j;
for (i = 0; i < output_height; ++i) {
@@ -361,7 +393,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
#endif
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
void TearDown() override { libvpx_test::ClearSystemState(); }
static void TearDownTestSuite() {
vpx_free(input_ - 1);
@@ -403,7 +435,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
i % kOuterBlockSize >= (BorderLeft() + Width()));
}
virtual void SetUp() {
void SetUp() override {
UUT_ = GET_PARAM(2);
#if CONFIG_VP9_HIGHBITDEPTH
if (UUT_->use_highbd_ != 0) {
@@ -549,6 +581,438 @@ uint16_t *ConvolveTest::input16_ = nullptr;
uint16_t *ConvolveTest::output16_ = nullptr;
uint16_t *ConvolveTest::output16_ref_ = nullptr;
#endif
#if !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
class ConvolveTest12Tap : public ::testing::TestWithParam<Convolve12TapParam> {
public:
static void SetUpTestSuite() {
// Force input_ to be unaligned, output to be 16 byte aligned.
input_ = reinterpret_cast<uint8_t *>(
vpx_memalign(kDataAlignment, kInputBufferSize + 1)) +
1;
output_ = reinterpret_cast<uint8_t *>(
vpx_memalign(kDataAlignment, kOutputBufferSize));
#if CONFIG_VP9_HIGHBITDEPTH
input16_ = reinterpret_cast<uint16_t *>(vpx_memalign(
kDataAlignment, (kInputBufferSize + 1) * sizeof(uint16_t))) +
1;
output16_ = reinterpret_cast<uint16_t *>(
vpx_memalign(kDataAlignment, (kOutputBufferSize) * sizeof(uint16_t)));
#endif
}
void TearDown() override { libvpx_test::ClearSystemState(); }
static void TearDownTestSuite() {
vpx_free(input_ - 1);
input_ = nullptr;
vpx_free(output_);
output_ = nullptr;
#if CONFIG_VP9_HIGHBITDEPTH
vpx_free(input16_ - 1);
input16_ = nullptr;
vpx_free(output16_);
output16_ = nullptr;
#endif
}
protected:
static const int kDataAlignment = 16;
static const int kOuterBlockSize = 256;
static const int kInputStride = kOuterBlockSize;
static const int kOutputStride = kOuterBlockSize;
static const int kInputBufferSize = kOuterBlockSize * kOuterBlockSize;
static const int kOutputBufferSize = kOuterBlockSize * kOuterBlockSize;
int Width() const { return GET_PARAM(0); }
int Height() const { return GET_PARAM(1); }
int BorderLeft() const {
const int center = (kOuterBlockSize - Width()) / 2;
return (center + (kDataAlignment - 1)) & ~(kDataAlignment - 1);
}
int BorderTop() const { return (kOuterBlockSize - Height()) / 2; }
bool IsIndexInBorder(int i) {
return (i < BorderTop() * kOuterBlockSize ||
i >= (BorderTop() + Height()) * kOuterBlockSize ||
i % kOuterBlockSize < BorderLeft() ||
i % kOuterBlockSize >= (BorderLeft() + Width()));
}
void SetUp() override {
UUT_ = GET_PARAM(2);
#if CONFIG_VP9_HIGHBITDEPTH
if (UUT_->use_highbd_ != 0) {
mask_ = (1 << UUT_->use_highbd_) - 1;
} else {
mask_ = 255;
}
#endif
/* Set up guard blocks for an inner block centered in the outer block */
for (int i = 0; i < kOutputBufferSize; ++i) {
if (IsIndexInBorder(i)) {
output_[i] = 255;
#if CONFIG_VP9_HIGHBITDEPTH
output16_[i] = mask_;
#endif
} else {
output_[i] = 0;
#if CONFIG_VP9_HIGHBITDEPTH
output16_[i] = 0;
#endif
}
}
::libvpx_test::ACMRandom prng;
for (int i = 0; i < kInputBufferSize; ++i) {
if (i & 1) {
input_[i] = 255;
#if CONFIG_VP9_HIGHBITDEPTH
input16_[i] = mask_;
#endif
} else {
input_[i] = prng.Rand8Extremes();
#if CONFIG_VP9_HIGHBITDEPTH
input16_[i] = prng.Rand16() & mask_;
#endif
}
}
}
void SetConstantInput(int value) {
memset(input_, value, kInputBufferSize);
#if CONFIG_VP9_HIGHBITDEPTH
vpx_memset16(input16_, value, kInputBufferSize);
#endif
}
void CheckGuardBlocks() {
for (int i = 0; i < kOutputBufferSize; ++i) {
if (IsIndexInBorder(i)) {
EXPECT_EQ(255, output_[i]);
}
}
}
uint8_t *input() const {
const int offset = BorderTop() * kOuterBlockSize + BorderLeft();
#if CONFIG_VP9_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return input_ + offset;
} else {
return CAST_TO_BYTEPTR(input16_ + offset);
}
#else
return input_ + offset;
#endif
}
uint8_t *output() const {
const int offset = BorderTop() * kOuterBlockSize + BorderLeft();
#if CONFIG_VP9_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return output_ + offset;
} else {
return CAST_TO_BYTEPTR(output16_ + offset);
}
#else
return output_ + offset;
#endif
}
uint16_t lookup(uint8_t *list, int index) const {
#if CONFIG_VP9_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return list[index];
} else {
return CAST_TO_SHORTPTR(list)[index];
}
#else
return list[index];
#endif
}
void assign_val(uint8_t *list, int index, uint16_t val) const {
#if CONFIG_VP9_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
list[index] = (uint8_t)val;
} else {
CAST_TO_SHORTPTR(list)[index] = val;
}
#else
list[index] = (uint8_t)val;
#endif
}
const ConvolveFunctions12Tap *UUT_;
static uint8_t *input_;
static uint8_t *output_;
#if CONFIG_VP9_HIGHBITDEPTH
static uint16_t *input16_;
static uint16_t *output16_;
int mask_;
#endif
};
uint8_t *ConvolveTest12Tap::input_ = nullptr;
uint8_t *ConvolveTest12Tap::output_ = nullptr;
#if CONFIG_VP9_HIGHBITDEPTH
uint16_t *ConvolveTest12Tap::input16_ = nullptr;
uint16_t *ConvolveTest12Tap::output16_ = nullptr;
#endif
TEST_P(ConvolveTest12Tap, MatchesReferenceSubpixelFilter) {
uint8_t *const in = input();
uint8_t *const out = output();
#if CONFIG_VP9_HIGHBITDEPTH
uint8_t ref8[kOutputStride * kMaxDimension];
uint16_t ref16[kOutputStride * kMaxDimension];
uint8_t *ref;
if (UUT_->use_highbd_ == 0) {
ref = ref8;
} else {
ref = CAST_TO_BYTEPTR(ref16);
}
#else
uint8_t ref[kOutputStride * kMaxDimension];
#endif
// Populate ref and out with some random data
::libvpx_test::ACMRandom prng;
for (int y = 0; y < Height(); ++y) {
for (int x = 0; x < Width(); ++x) {
uint16_t r;
#if CONFIG_VP9_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0 || UUT_->use_highbd_ == 8) {
r = prng.Rand8Extremes();
} else {
r = prng.Rand16() & mask_;
}
#else
r = prng.Rand8Extremes();
#endif
assign_val(out, y * kOutputStride + x, r);
assign_val(ref, y * kOutputStride + x, r);
}
}
const InterpKernel12 *filters = sub_pel_filters_12;
for (int filter_x = 0; filter_x < 16; ++filter_x) {
for (int filter_y = 0; filter_y < 16; ++filter_y) {
#if CONFIG_VP9_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
vpx_convolve12_c(in, kInputStride, ref, kOutputStride, filters,
filter_x, 16, filter_y, 16, Width(), Height());
} else {
vpx_highbd_convolve12_c(CAST_TO_SHORTPTR(in), kInputStride,
CAST_TO_SHORTPTR(ref), kOutputStride, filters,
filter_x, 16, filter_y, 16, Width(), Height(),
UUT_->use_highbd_);
}
#else
vpx_convolve12_c(in, kInputStride, ref, kOutputStride, filters, filter_x,
16, filter_y, 16, Width(), Height());
#endif
if (filter_x && filter_y)
ASM_REGISTER_STATE_CHECK(
UUT_->hv12_(in, kInputStride, out, kOutputStride, filters, filter_x,
16, filter_y, 16, Width(), Height()));
else if (filter_y)
ASM_REGISTER_STATE_CHECK(UUT_->v12_(in, kInputStride, out,
kOutputStride, filters, 0, 16,
filter_y, 16, Width(), Height()));
else if (filter_x)
ASM_REGISTER_STATE_CHECK(UUT_->h12_(in, kInputStride, out,
kOutputStride, filters, filter_x,
16, 0, 16, Width(), Height()));
else
continue;
CheckGuardBlocks();
for (int y = 0; y < Height(); ++y) {
for (int x = 0; x < Width(); ++x)
ASSERT_EQ(lookup(ref, y * kOutputStride + x),
lookup(out, y * kOutputStride + x))
<< "mismatch at (" << x << "," << y << "), "
<< "filters ("
<< "," << filter_x << "," << filter_y << ")";
}
}
}
}
TEST_P(ConvolveTest12Tap, FilterExtremes) {
uint8_t *const in = input();
uint8_t *const out = output();
#if CONFIG_VP9_HIGHBITDEPTH
uint8_t ref8[kOutputStride * kMaxDimension];
uint16_t ref16[kOutputStride * kMaxDimension];
uint8_t *ref;
if (UUT_->use_highbd_ == 0) {
ref = ref8;
} else {
ref = CAST_TO_BYTEPTR(ref16);
}
#else
uint8_t ref[kOutputStride * kMaxDimension];
#endif
// Populate ref and out with some random data
::libvpx_test::ACMRandom prng;
for (int y = 0; y < Height(); ++y) {
for (int x = 0; x < Width(); ++x) {
uint16_t r;
#if CONFIG_VP9_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0 || UUT_->use_highbd_ == 8) {
r = prng.Rand8Extremes();
} else {
r = prng.Rand16() & mask_;
}
#else
r = prng.Rand8Extremes();
#endif
assign_val(out, y * kOutputStride + x, r);
assign_val(ref, y * kOutputStride + x, r);
}
}
for (int axis = 0; axis < 2; axis++) {
int seed_val = 0;
while (seed_val < 256) {
for (int y = 0; y < 8; ++y) {
for (int x = 0; x < 8; ++x) {
#if CONFIG_VP9_HIGHBITDEPTH
assign_val(in, y * kOutputStride + x - MAX_FILTER_TAP / 2 + 1,
((seed_val >> (axis ? y : x)) & 1) * mask_);
#else
assign_val(in, y * kOutputStride + x - MAX_FILTER_TAP / 2 + 1,
((seed_val >> (axis ? y : x)) & 1) * 255);
#endif
if (axis) seed_val++;
}
if (axis) {
seed_val -= 8;
} else {
seed_val++;
}
}
if (axis) seed_val += 8;
const InterpKernel12 *filters = sub_pel_filters_12;
for (int filter_x = 0; filter_x < 16; ++filter_x) {
for (int filter_y = 0; filter_y < 16; ++filter_y) {
#if CONFIG_VP9_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
vpx_convolve12_c(in, kInputStride, ref, kOutputStride, filters,
filter_x, 16, filter_y, 16, Width(), Height());
} else {
vpx_highbd_convolve12_c(CAST_TO_SHORTPTR(in), kInputStride,
CAST_TO_SHORTPTR(ref), kOutputStride,
filters, filter_x, 16, filter_y, 16,
Width(), Height(), UUT_->use_highbd_);
}
#else
vpx_convolve12_c(in, kInputStride, ref, kOutputStride, filters,
filter_x, 16, filter_y, 16, Width(), Height());
#endif
if (filter_x && filter_y)
ASM_REGISTER_STATE_CHECK(
UUT_->hv12_(in, kInputStride, out, kOutputStride, filters,
filter_x, 16, filter_y, 16, Width(), Height()));
else if (filter_y)
ASM_REGISTER_STATE_CHECK(
UUT_->v12_(in, kInputStride, out, kOutputStride, filters, 0, 16,
filter_y, 16, Width(), Height()));
else if (filter_x)
ASM_REGISTER_STATE_CHECK(
UUT_->h12_(in, kInputStride, out, kOutputStride, filters,
filter_x, 16, 0, 16, Width(), Height()));
else
continue;
for (int y = 0; y < Height(); ++y) {
for (int x = 0; x < Width(); ++x)
ASSERT_EQ(lookup(ref, y * kOutputStride + x),
lookup(out, y * kOutputStride + x))
<< "mismatch at (" << x << "," << y << "), "
<< "filters ("
<< "," << filter_x << "," << filter_y << ")";
}
}
}
}
}
}
TEST_P(ConvolveTest12Tap, DISABLED_12Tap_Speed) {
const uint8_t *const in = input();
uint8_t *const out = output();
const InterpKernel12 *const twelvetap = sub_pel_filters_12;
const int kNumTests = 5000000;
const int width = Width();
const int height = Height();
vpx_usec_timer timer;
SetConstantInput(127);
vpx_usec_timer_start(&timer);
for (int n = 0; n < kNumTests; ++n) {
UUT_->hv12_(in, kInputStride, out, kOutputStride, twelvetap, 8, 16, 8, 16,
width, height);
}
vpx_usec_timer_mark(&timer);
const int elapsed_time = static_cast<int>(vpx_usec_timer_elapsed(&timer));
printf("convolve12_%dx%d_%d: %d us\n", width, height,
UUT_->use_highbd_ ? UUT_->use_highbd_ : 8, elapsed_time);
}
TEST_P(ConvolveTest12Tap, DISABLED_12Tap_Horiz_Speed) {
const uint8_t *const in = input();
uint8_t *const out = output();
const InterpKernel12 *const twelvetap = sub_pel_filters_12;
const int kNumTests = 5000000;
const int width = Width();
const int height = Height();
vpx_usec_timer timer;
SetConstantInput(127);
vpx_usec_timer_start(&timer);
for (int n = 0; n < kNumTests; ++n) {
UUT_->h12_(in, kInputStride, out, kOutputStride, twelvetap, 8, 16, 8, 16,
width, height);
}
vpx_usec_timer_mark(&timer);
const int elapsed_time = static_cast<int>(vpx_usec_timer_elapsed(&timer));
printf("convolve12_horiz_%dx%d_%d: %d us\n", width, height,
UUT_->use_highbd_ ? UUT_->use_highbd_ : 8, elapsed_time);
}
TEST_P(ConvolveTest12Tap, DISABLED_12Tap_Vert_Speed) {
const uint8_t *const in = input();
uint8_t *const out = output();
const InterpKernel12 *const twelvetap = sub_pel_filters_12;
const int kNumTests = 5000000;
const int width = Width();
const int height = Height();
vpx_usec_timer timer;
SetConstantInput(127);
vpx_usec_timer_start(&timer);
for (int n = 0; n < kNumTests; ++n) {
UUT_->v12_(in, kInputStride, out, kOutputStride, twelvetap, 8, 16, 8, 16,
width, height);
}
vpx_usec_timer_mark(&timer);
const int elapsed_time = static_cast<int>(vpx_usec_timer_elapsed(&timer));
printf("convolve12_vert_%dx%d_%d: %d us\n", width, height,
UUT_->use_highbd_ ? UUT_->use_highbd_ : 8, elapsed_time);
}
#endif
TEST_P(ConvolveTest, GuardBlocks) { CheckGuardBlocks(); }
@@ -1135,7 +1599,7 @@ using std::make_tuple;
x0_q4, x_step_q4, y0_q4, y_step_q4, w, h, bd); \
}
#if HAVE_SSE2 && VPX_ARCH_X86_64
#if HAVE_SSE2 && VPX_ARCH_X86_64 && HAVE_X86_ASM
WRAP(convolve_copy_sse2, 8)
WRAP(convolve_avg_sse2, 8)
WRAP(convolve_copy_sse2, 10)
@@ -1160,9 +1624,9 @@ WRAP(convolve8_vert_sse2, 12)
WRAP(convolve8_avg_vert_sse2, 12)
WRAP(convolve8_sse2, 12)
WRAP(convolve8_avg_sse2, 12)
#endif // HAVE_SSE2 && VPX_ARCH_X86_64
#endif // HAVE_SSE2 && VPX_ARCH_X86_64 && HAVE_X86_ASM
#if HAVE_AVX2
#if HAVE_AVX2 && HAVE_X86_ASM
WRAP(convolve_copy_avx2, 8)
WRAP(convolve_avg_avx2, 8)
WRAP(convolve8_horiz_avx2, 8)
@@ -1189,7 +1653,7 @@ WRAP(convolve8_vert_avx2, 12)
WRAP(convolve8_avg_avx2, 12)
WRAP(convolve8_avg_horiz_avx2, 12)
WRAP(convolve8_avg_vert_avx2, 12)
#endif // HAVE_AVX2
#endif // HAVE_AVX2 && HAVE_X86_ASM
#if HAVE_NEON
WRAP(convolve_copy_neon, 8)
@@ -1218,6 +1682,30 @@ WRAP(convolve8_neon, 12)
WRAP(convolve8_avg_neon, 12)
#endif // HAVE_NEON
#if HAVE_SVE
WRAP(convolve8_horiz_sve, 8)
WRAP(convolve8_avg_horiz_sve, 8)
WRAP(convolve8_horiz_sve, 10)
WRAP(convolve8_avg_horiz_sve, 10)
WRAP(convolve8_horiz_sve, 12)
WRAP(convolve8_avg_horiz_sve, 12)
#endif // HAVE_SVE
#if HAVE_SVE2
WRAP(convolve8_sve2, 8)
WRAP(convolve8_avg_sve2, 8)
WRAP(convolve8_vert_sve2, 8)
WRAP(convolve8_avg_vert_sve2, 8)
WRAP(convolve8_sve2, 10)
WRAP(convolve8_avg_sve2, 10)
WRAP(convolve8_vert_sve2, 10)
WRAP(convolve8_avg_vert_sve2, 10)
WRAP(convolve8_sve2, 12)
WRAP(convolve8_avg_sve2, 12)
WRAP(convolve8_vert_sve2, 12)
WRAP(convolve8_avg_vert_sve2, 12)
#endif // HAVE_SVE2
WRAP(convolve_copy_c, 8)
WRAP(convolve_avg_c, 8)
WRAP(convolve8_horiz_c, 8)
@@ -1280,9 +1768,107 @@ const ConvolveParam kArrayConvolve_c[] = { ALL_SIZES(convolve8_c) };
#endif
INSTANTIATE_TEST_SUITE_P(C, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_c));
#if !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
#if CONFIG_VP9_HIGHBITDEPTH
#define WRAP12TAP(func, bd) \
void wrap_##func##_##bd( \
const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, \
ptrdiff_t dst_stride, const InterpKernel12 *filter, int x0_q4, \
int x_step_q4, int y0_q4, int y_step_q4, int w, int h) { \
vpx_highbd_##func(reinterpret_cast<const uint16_t *>(src), src_stride, \
reinterpret_cast<uint16_t *>(dst), dst_stride, filter, \
x0_q4, x_step_q4, y0_q4, y_step_q4, w, h, bd); \
}
#if HAVE_AVX2 && HAVE_X86_ASM
WRAP12TAP(convolve12_horiz_avx2, 8)
WRAP12TAP(convolve12_vert_avx2, 8)
WRAP12TAP(convolve12_avx2, 8)
WRAP12TAP(convolve12_horiz_avx2, 10)
WRAP12TAP(convolve12_vert_avx2, 10)
WRAP12TAP(convolve12_avx2, 10)
WRAP12TAP(convolve12_horiz_avx2, 12)
WRAP12TAP(convolve12_vert_avx2, 12)
WRAP12TAP(convolve12_avx2, 12)
#endif // HAVE_AVX2
#if HAVE_SSSE3 && HAVE_X86_ASM
WRAP12TAP(convolve12_horiz_ssse3, 8)
WRAP12TAP(convolve12_vert_ssse3, 8)
WRAP12TAP(convolve12_ssse3, 8)
WRAP12TAP(convolve12_horiz_ssse3, 10)
WRAP12TAP(convolve12_vert_ssse3, 10)
WRAP12TAP(convolve12_ssse3, 10)
WRAP12TAP(convolve12_horiz_ssse3, 12)
WRAP12TAP(convolve12_vert_ssse3, 12)
WRAP12TAP(convolve12_ssse3, 12)
#endif // HAVE_SSSE3 && HAVE_X86_ASM
#if HAVE_NEON
WRAP12TAP(convolve12_horiz_neon, 8)
WRAP12TAP(convolve12_vert_neon, 8)
WRAP12TAP(convolve12_neon, 8)
WRAP12TAP(convolve12_horiz_neon, 10)
WRAP12TAP(convolve12_vert_neon, 10)
WRAP12TAP(convolve12_neon, 10)
WRAP12TAP(convolve12_horiz_neon, 12)
WRAP12TAP(convolve12_vert_neon, 12)
WRAP12TAP(convolve12_neon, 12)
#endif // HAVE_NEON
#if HAVE_SVE2
WRAP12TAP(convolve12_horiz_sve2, 8)
WRAP12TAP(convolve12_vert_sve2, 8)
WRAP12TAP(convolve12_sve2, 8)
WRAP12TAP(convolve12_horiz_sve2, 10)
WRAP12TAP(convolve12_vert_sve2, 10)
WRAP12TAP(convolve12_sve2, 10)
WRAP12TAP(convolve12_horiz_sve2, 12)
WRAP12TAP(convolve12_vert_sve2, 12)
WRAP12TAP(convolve12_sve2, 12)
#endif // HAVE_SVE2
WRAP12TAP(convolve12_horiz_c, 8)
WRAP12TAP(convolve12_vert_c, 8)
WRAP12TAP(convolve12_c, 8)
WRAP12TAP(convolve12_horiz_c, 10)
WRAP12TAP(convolve12_vert_c, 10)
WRAP12TAP(convolve12_c, 10)
WRAP12TAP(convolve12_horiz_c, 12)
WRAP12TAP(convolve12_vert_c, 12)
WRAP12TAP(convolve12_c, 12)
#undef WRAP12TAP
const ConvolveFunctions12Tap convolve12tap_8bit_c(wrap_convolve12_horiz_c_8,
wrap_convolve12_vert_c_8,
wrap_convolve12_c_8, 8);
const ConvolveFunctions12Tap convolve12tap_10bit_c(wrap_convolve12_horiz_c_10,
wrap_convolve12_vert_c_10,
wrap_convolve12_c_10, 10);
const ConvolveFunctions12Tap convolve12tap_12bit_c(wrap_convolve12_horiz_c_12,
wrap_convolve12_vert_c_12,
wrap_convolve12_c_12, 12);
const Convolve12TapParam kArrayConvolve12Tap_c[] = {
ALL_SIZES_12TAP(convolve12tap_8bit_c), ALL_SIZES_12TAP(convolve12tap_10bit_c),
ALL_SIZES_12TAP(convolve12tap_12bit_c)
};
#else
const ConvolveFunctions12Tap convolve12Tap_c(vpx_convolve12_horiz_c,
vpx_convolve12_vert_c,
vpx_convolve12_c, 0);
const Convolve12TapParam kArrayConvolve12Tap_c[] = { ALL_SIZES_12TAP(
convolve12Tap_c) };
#endif
INSTANTIATE_TEST_SUITE_P(C, ConvolveTest12Tap,
::testing::ValuesIn(kArrayConvolve12Tap_c));
#endif
#if HAVE_SSE2 && VPX_ARCH_X86_64
#if CONFIG_VP9_HIGHBITDEPTH
#if HAVE_X86_ASM
const ConvolveFunctions convolve8_sse2(
wrap_convolve_copy_sse2_8, wrap_convolve_avg_sse2_8,
wrap_convolve8_horiz_sse2_8, wrap_convolve8_avg_horiz_sse2_8,
@@ -1310,6 +1896,9 @@ const ConvolveFunctions convolve12_sse2(
const ConvolveParam kArrayConvolve_sse2[] = { ALL_SIZES(convolve8_sse2),
ALL_SIZES(convolve10_sse2),
ALL_SIZES(convolve12_sse2) };
INSTANTIATE_TEST_SUITE_P(SSE2, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_sse2));
#endif // HAVE_X86_ASM
#else
const ConvolveFunctions convolve8_sse2(
vpx_convolve_copy_sse2, vpx_convolve_avg_sse2, vpx_convolve8_horiz_sse2,
@@ -1319,12 +1908,12 @@ const ConvolveFunctions convolve8_sse2(
vpx_scaled_avg_vert_c, vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
const ConvolveParam kArrayConvolve_sse2[] = { ALL_SIZES(convolve8_sse2) };
#endif // CONFIG_VP9_HIGHBITDEPTH
INSTANTIATE_TEST_SUITE_P(SSE2, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_sse2));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif
#if HAVE_SSSE3
#if HAVE_SSSE3 && HAVE_X86_ASM
const ConvolveFunctions convolve8_ssse3(
vpx_convolve_copy_c, vpx_convolve_avg_c, vpx_convolve8_horiz_ssse3,
vpx_convolve8_avg_horiz_ssse3, vpx_convolve8_vert_ssse3,
@@ -1335,9 +1924,40 @@ const ConvolveFunctions convolve8_ssse3(
const ConvolveParam kArrayConvolve8_ssse3[] = { ALL_SIZES(convolve8_ssse3) };
INSTANTIATE_TEST_SUITE_P(SSSE3, ConvolveTest,
::testing::ValuesIn(kArrayConvolve8_ssse3));
#endif
#if HAVE_AVX2
#if !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
#if CONFIG_VP9_HIGHBITDEPTH
const ConvolveFunctions12Tap convolve12tap_8bit_ssse3(
wrap_convolve12_horiz_ssse3_8, wrap_convolve12_vert_ssse3_8,
wrap_convolve12_ssse3_8, 8);
const ConvolveFunctions12Tap convolve12tap_10bit_ssse3(
wrap_convolve12_horiz_ssse3_10, wrap_convolve12_vert_ssse3_10,
wrap_convolve12_ssse3_10, 10);
const ConvolveFunctions12Tap convolve12tap_12bit_ssse3(
wrap_convolve12_horiz_ssse3_12, wrap_convolve12_vert_ssse3_12,
wrap_convolve12_ssse3_12, 12);
const Convolve12TapParam kArrayConvolve12Tap_ssse3[] = {
ALL_SIZES_12TAP(convolve12tap_8bit_ssse3),
ALL_SIZES_12TAP(convolve12tap_10bit_ssse3),
ALL_SIZES_12TAP(convolve12tap_12bit_ssse3)
};
#else
const ConvolveFunctions12Tap convolve12_ssse3(vpx_convolve12_horiz_ssse3,
vpx_convolve12_vert_ssse3,
vpx_convolve12_ssse3, 0);
const Convolve12TapParam kArrayConvolve12Tap_ssse3[] = { ALL_SIZES_12TAP(
convolve12_ssse3) };
#endif // CONFIG_VP9_HIGHBITDEPTH
INSTANTIATE_TEST_SUITE_P(SSSE3, ConvolveTest12Tap,
::testing::ValuesIn(kArrayConvolve12Tap_ssse3));
#endif // !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
#endif // HAVE_SSSE3 && HAVE_X86_ASM
#if HAVE_AVX2 && HAVE_X86_ASM
#if CONFIG_VP9_HIGHBITDEPTH
const ConvolveFunctions convolve8_avx2(
wrap_convolve_copy_avx2_8, wrap_convolve_avg_avx2_8,
@@ -1378,7 +1998,37 @@ const ConvolveParam kArrayConvolve8_avx2[] = { ALL_SIZES(convolve8_avx2) };
INSTANTIATE_TEST_SUITE_P(AVX2, ConvolveTest,
::testing::ValuesIn(kArrayConvolve8_avx2));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_AVX2
#if !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
#if CONFIG_VP9_HIGHBITDEPTH
const ConvolveFunctions12Tap convolve12Tap_8bit_avx2(
wrap_convolve12_horiz_avx2_8, wrap_convolve12_vert_avx2_8,
wrap_convolve12_avx2_8, 8);
const ConvolveFunctions12Tap convolve12Tap_10bit_avx2(
wrap_convolve12_horiz_avx2_10, wrap_convolve12_vert_avx2_10,
wrap_convolve12_avx2_10, 10);
const ConvolveFunctions12Tap convolve12Tap_12bit_avx2(
wrap_convolve12_horiz_avx2_12, wrap_convolve12_vert_avx2_12,
wrap_convolve12_avx2_12, 12);
const Convolve12TapParam kArrayConvolve12Tap_avx2[] = {
ALL_SIZES_12TAP(convolve12Tap_8bit_avx2),
ALL_SIZES_12TAP(convolve12Tap_10bit_avx2),
ALL_SIZES_12TAP(convolve12Tap_12bit_avx2)
};
#else
const ConvolveFunctions12Tap convolve12Tap_avx2(vpx_convolve12_horiz_avx2,
vpx_convolve12_vert_avx2,
vpx_convolve12_avx2, 0);
const Convolve12TapParam kArrayConvolve12Tap_avx2[] = { ALL_SIZES_12TAP(
convolve12Tap_avx2) };
#endif
INSTANTIATE_TEST_SUITE_P(AVX2, ConvolveTest12Tap,
::testing::ValuesIn(kArrayConvolve12Tap_avx2));
#endif
#endif // HAVE_AVX2 && HAVE_X86_ASM
#if HAVE_NEON
#if CONFIG_VP9_HIGHBITDEPTH
@@ -1421,8 +2071,182 @@ const ConvolveParam kArrayConvolve_neon[] = { ALL_SIZES(convolve8_neon) };
#endif // CONFIG_VP9_HIGHBITDEPTH
INSTANTIATE_TEST_SUITE_P(NEON, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_neon));
#if !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
#if CONFIG_VP9_HIGHBITDEPTH
const ConvolveFunctions12Tap convolve12tap_8bit_neon(
wrap_convolve12_horiz_neon_8, wrap_convolve12_vert_neon_8,
wrap_convolve12_neon_8, 8);
const ConvolveFunctions12Tap convolve12tap_10bit_neon(
wrap_convolve12_horiz_neon_10, wrap_convolve12_vert_neon_10,
wrap_convolve12_neon_10, 10);
const ConvolveFunctions12Tap convolve12tap_12bit_neon(
wrap_convolve12_horiz_neon_12, wrap_convolve12_vert_neon_12,
wrap_convolve12_neon_12, 12);
const Convolve12TapParam kArrayConvolve12Tap_neon[] = {
ALL_SIZES_12TAP(convolve12tap_8bit_neon),
ALL_SIZES_12TAP(convolve12tap_10bit_neon),
ALL_SIZES_12TAP(convolve12tap_12bit_neon)
};
#else
const ConvolveFunctions12Tap convolve12Tap_neon(vpx_convolve12_horiz_neon,
vpx_convolve12_vert_neon,
vpx_convolve12_neon, 0);
const Convolve12TapParam kArrayConvolve12Tap_neon[] = { ALL_SIZES_12TAP(
convolve12Tap_neon) };
#endif // CONFIG_VP9_HIGHBITDEPTH
INSTANTIATE_TEST_SUITE_P(NEON, ConvolveTest12Tap,
::testing::ValuesIn(kArrayConvolve12Tap_neon));
#endif // !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
#endif // HAVE_NEON
#if HAVE_NEON_DOTPROD
const ConvolveFunctions convolve8_neon_dotprod(
vpx_convolve_copy_c, vpx_convolve_avg_c, vpx_convolve8_horiz_neon_dotprod,
vpx_convolve8_avg_horiz_neon_dotprod, vpx_convolve8_vert_neon_dotprod,
vpx_convolve8_avg_vert_neon_dotprod, vpx_convolve8_neon_dotprod,
vpx_convolve8_avg_neon_dotprod, 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_neon_dotprod[] = { ALL_SIZES(
convolve8_neon_dotprod) };
INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_neon_dotprod));
#if !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
const ConvolveFunctions12Tap convolve12Tap_neon_dotprod(
vpx_convolve12_horiz_neon_dotprod, vpx_convolve12_vert_neon_dotprod,
vpx_convolve12_neon_dotprod, 0);
const Convolve12TapParam kArrayConvolve12Tap_neon_dotprod[] = { ALL_SIZES_12TAP(
convolve12Tap_neon_dotprod) };
INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, ConvolveTest12Tap,
::testing::ValuesIn(kArrayConvolve12Tap_neon_dotprod));
#endif
#endif // HAVE_NEON_DOTPROD
#if HAVE_SVE
#if CONFIG_VP9_HIGHBITDEPTH
const ConvolveFunctions convolve8_sve(
wrap_convolve_copy_c_8, wrap_convolve_avg_c_8, wrap_convolve8_horiz_sve_8,
wrap_convolve8_avg_horiz_sve_8, wrap_convolve8_vert_c_8,
wrap_convolve8_avg_vert_c_8, wrap_convolve8_c_8, wrap_convolve8_avg_c_8,
wrap_convolve8_horiz_c_8, wrap_convolve8_avg_horiz_c_8,
wrap_convolve8_vert_c_8, wrap_convolve8_avg_vert_c_8, wrap_convolve8_c_8,
wrap_convolve8_avg_c_8, 8);
const ConvolveFunctions convolve10_sve(
wrap_convolve_copy_c_10, wrap_convolve_avg_c_10,
wrap_convolve8_horiz_sve_10, wrap_convolve8_avg_horiz_sve_10,
wrap_convolve8_vert_c_10, wrap_convolve8_avg_vert_c_10, wrap_convolve8_c_10,
wrap_convolve8_avg_c_10, wrap_convolve8_horiz_c_10,
wrap_convolve8_avg_horiz_c_10, wrap_convolve8_vert_c_10,
wrap_convolve8_avg_vert_c_10, wrap_convolve8_c_10, wrap_convolve8_avg_c_10,
10);
const ConvolveFunctions convolve12_sve(
wrap_convolve_copy_c_12, wrap_convolve_avg_c_12,
wrap_convolve8_horiz_sve_12, wrap_convolve8_avg_horiz_sve_12,
wrap_convolve8_vert_c_12, wrap_convolve8_avg_vert_c_12, wrap_convolve8_c_12,
wrap_convolve8_avg_c_12, wrap_convolve8_horiz_c_12,
wrap_convolve8_avg_horiz_c_12, wrap_convolve8_vert_c_12,
wrap_convolve8_avg_vert_c_12, wrap_convolve8_c_12, wrap_convolve8_avg_c_12,
12);
const ConvolveParam kArrayConvolve_sve[] = { ALL_SIZES(convolve8_sve),
ALL_SIZES(convolve10_sve),
ALL_SIZES(convolve12_sve) };
INSTANTIATE_TEST_SUITE_P(SVE, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_sve));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_SVE
#if HAVE_SVE2
#if CONFIG_VP9_HIGHBITDEPTH
const ConvolveFunctions convolve8_sve2(
wrap_convolve_copy_c_8, wrap_convolve_avg_c_8, wrap_convolve8_horiz_c_8,
wrap_convolve8_avg_horiz_c_8, wrap_convolve8_vert_sve2_8,
wrap_convolve8_avg_vert_sve2_8, wrap_convolve8_sve2_8,
wrap_convolve8_avg_sve2_8, wrap_convolve8_horiz_c_8,
wrap_convolve8_avg_horiz_c_8, wrap_convolve8_vert_c_8,
wrap_convolve8_avg_vert_c_8, wrap_convolve8_c_8, wrap_convolve8_avg_c_8, 8);
const ConvolveFunctions convolve10_sve2(
wrap_convolve_copy_c_10, wrap_convolve_avg_c_10, wrap_convolve8_horiz_c_10,
wrap_convolve8_avg_horiz_c_10, wrap_convolve8_vert_sve2_10,
wrap_convolve8_avg_vert_sve2_10, wrap_convolve8_sve2_10,
wrap_convolve8_avg_sve2_10, wrap_convolve8_horiz_c_10,
wrap_convolve8_avg_horiz_c_10, wrap_convolve8_vert_c_10,
wrap_convolve8_avg_vert_c_10, wrap_convolve8_c_10, wrap_convolve8_avg_c_10,
10);
const ConvolveFunctions convolve12_sve2(
wrap_convolve_copy_c_12, wrap_convolve_avg_c_12, wrap_convolve8_horiz_c_12,
wrap_convolve8_avg_horiz_c_12, wrap_convolve8_vert_sve2_12,
wrap_convolve8_avg_vert_sve2_12, wrap_convolve8_sve2_12,
wrap_convolve8_avg_sve2_12, wrap_convolve8_horiz_c_12,
wrap_convolve8_avg_horiz_c_12, wrap_convolve8_vert_c_12,
wrap_convolve8_avg_vert_c_12, wrap_convolve8_c_12, wrap_convolve8_avg_c_12,
12);
const ConvolveParam kArrayConvolve_sve2[] = { ALL_SIZES(convolve8_sve2),
ALL_SIZES(convolve10_sve2),
ALL_SIZES(convolve12_sve2) };
INSTANTIATE_TEST_SUITE_P(SVE2, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_sve2));
#if !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
const ConvolveFunctions12Tap convolve12tap_8bit_sve2(
wrap_convolve12_horiz_sve2_8, wrap_convolve12_vert_sve2_8,
wrap_convolve12_sve2_8, 8);
const ConvolveFunctions12Tap convolve12tap_10bit_sve2(
wrap_convolve12_horiz_sve2_10, wrap_convolve12_vert_sve2_10,
wrap_convolve12_sve2_10, 10);
const ConvolveFunctions12Tap convolve12tap_12bit_sve2(
wrap_convolve12_horiz_sve2_12, wrap_convolve12_vert_sve2_12,
wrap_convolve12_sve2_12, 12);
const Convolve12TapParam kArrayConvolve12Tap_sve2[] = {
ALL_SIZES_12TAP(convolve12tap_8bit_sve2),
ALL_SIZES_12TAP(convolve12tap_10bit_sve2),
ALL_SIZES_12TAP(convolve12tap_12bit_sve2)
};
INSTANTIATE_TEST_SUITE_P(SVE2, ConvolveTest12Tap,
::testing::ValuesIn(kArrayConvolve12Tap_sve2));
#endif // !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_SVE2
#if HAVE_NEON_I8MM
const ConvolveFunctions convolve8_neon_i8mm(
vpx_convolve_copy_c, vpx_convolve_avg_c, vpx_convolve8_horiz_neon_i8mm,
vpx_convolve8_avg_horiz_neon_i8mm, vpx_convolve8_vert_neon_i8mm,
vpx_convolve8_avg_vert_neon_i8mm, vpx_convolve8_neon_i8mm,
vpx_convolve8_avg_neon_i8mm, 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_neon_i8mm[] = { ALL_SIZES(
convolve8_neon_i8mm) };
INSTANTIATE_TEST_SUITE_P(NEON_I8MM, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_neon_i8mm));
#if !CONFIG_REALTIME_ONLY && CONFIG_VP9_ENCODER
const ConvolveFunctions12Tap convolve12Tap_neon_i8mm(
vpx_convolve12_horiz_neon_i8mm, vpx_convolve12_vert_neon_i8mm,
vpx_convolve12_neon_i8mm, 0);
const Convolve12TapParam kArrayConvolve12Tap_neon_i8mm[] = { ALL_SIZES_12TAP(
convolve12Tap_neon_i8mm) };
INSTANTIATE_TEST_SUITE_P(NEON_I8MM, ConvolveTest12Tap,
::testing::ValuesIn(kArrayConvolve12Tap_neon_i8mm));
#endif
#endif // HAVE_NEON_I8MM
#if HAVE_DSPR2
const ConvolveFunctions convolve8_dspr2(
vpx_convolve_copy_dspr2, vpx_convolve_avg_dspr2, vpx_convolve8_horiz_dspr2,
Loaded 100 of 1133 files, more files were not shown because too many files have changed in this diff. Show more