mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-10-11 22:49:56 +00:00
Deps: Build ffmpeg for WoA
This commit is contained in:
@@ -25,6 +25,9 @@ if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
|
||||
|
||||
set SEVENZIP="C:\Program Files\7-Zip\7z.exe"
|
||||
set PATCH="C:\Program Files\Git\usr\bin\patch.exe"
|
||||
set BASH="C:\Program Files\Git\usr\bin\bash.exe"
|
||||
|
||||
set "UNIX_TOOLS=C:\Program Files\Git\usr\bin\"
|
||||
|
||||
if defined DEBUG (
|
||||
echo DEBUG=%DEBUG%
|
||||
@@ -58,6 +61,15 @@ set QT=6.11.2
|
||||
set QTMINOR=6.11
|
||||
set QTAPNG=1.3.0
|
||||
|
||||
set FFMPEG=9.0.1
|
||||
set GAS_PREPROC=ac1836309c2e77023c228b7184485597286289d3
|
||||
set MAKE=4.4.1
|
||||
set MESON=1.10.2
|
||||
set PKGCONF=2.5.1
|
||||
set LIBOPUS=1.6.1
|
||||
set LIBSVTAV1=4.2.0
|
||||
set LIBX264=b35605ace3ddf7c1a5d67a2eb553f034aef41d55
|
||||
|
||||
set FREETYPE=2.14.3
|
||||
set HARFBUZZ=14.2.0
|
||||
set SDL=SDL3-3.4.16
|
||||
@@ -90,6 +102,15 @@ call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/off
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 850bc1b316149086512c17a77da51fec94933846fa84944508feb6dd9cbb35aa || goto error
|
||||
call :downloadfile "QtApng-%QTAPNG%.zip" "https://github.com/jurplel/QtApng/archive/refs/tags/%QTAPNG%.zip" 5176082cdd468047a7eb1ec1f106b032f57df207aa318d559b29606b00d159ac || goto error
|
||||
|
||||
call :downloadfile "ffmpeg-%FFMPEG%.tar.xz" "https://ffmpeg.org/releases/ffmpeg-%FFMPEG%.tar.xz" cf38e0e28c7e5605942c4a77755349b0145804a397af37eb1fb4c77cb237f635 || goto error
|
||||
call :downloadfile "gas-preprocessor.pl" "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/%GAS_PREPROC%/gas-preprocessor.pl" 7124d70cdecba7c5612f9a71fbf3f28514dd9c2ca3022f58ad793f88bb925fcf || goto error
|
||||
call :downloadfile "make-%MAKE%-without-guile-w32-bin.zip" "https://sourceforge.net/projects/ezwinports/files/make-%MAKE%-without-guile-w32-bin.zip/download" fb66a02b530f7466f6222ce53c0b602c5288e601547a034e4156a512dd895ee7 || goto error
|
||||
call :downloadfile "meson-%MESON%.tar.gz" "https://github.com/mesonbuild/meson/releases/download/%MESON%/meson-%MESON%.tar.gz" 7890287d911dd4ee1ebd0efb61ed0321bfcd87c725df923a837cf90c6508f96b || goto error
|
||||
call :downloadfile "pkgconf-pkgconf-%PKGCONF%.zip" "https://github.com/pkgconf/pkgconf/archive/refs/tags/pkgconf-%PKGCONF%.zip" c5b5f88a2ca2324dc5d857e35bb145e24290e326357ea94a86d47b8d7fa15477 || goto error
|
||||
call :downloadfile "opus-%LIBOPUS%.tar.gz" "https://downloads.xiph.org/releases/opus/opus-%LIBOPUS%.tar.gz" 6ffcb593207be92584df15b32466ed64bbec99109f007c82205f0194572411a1 || goto error
|
||||
call :downloadfile "SVT-AV1-v%LIBSVTAV1%.zip" "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v%LIBSVTAV1%/SVT-AV1-v%LIBSVTAV1%.zip" 007d1bd64ae85eaeea51db7465c4b360d115dc2d33d2ad42491c7d2ae7a9124e || goto error
|
||||
call :downloadfile "x264-%LIBX264%.zip" "https://code.videolan.org/videolan/x264/-/archive/%LIBX264%.zip" d95d059eff81cc565165cd058b66e208f0cc9874106a8fe94a811a66cf8a85a2 || goto error
|
||||
|
||||
call :downloadfile "freetype-%FREETYPE%.tar.gz" https://sourceforge.net/projects/freetype/files/freetype2/%FREETYPE%/freetype-%FREETYPE%.tar.gz/download e61b31ab26358b946e767ed7eb7f4bb2e507da1cfefeb7a8861ace7fd5c899a1 || goto error
|
||||
call :downloadfile "harfbuzz-%HARFBUZZ%.zip" https://github.com/harfbuzz/harfbuzz/archive/refs/tags/%HARFBUZZ%.zip bb2f83255706b1c92d731541c7cefaf98bb5b93e8f76d16f6deda05225ff20ee || goto error
|
||||
call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lpng1658.zip b32f170855dbbe3e6d9e645af40b538137041773672c3ba3e02db5816c82d376 || goto error
|
||||
@@ -122,6 +143,86 @@ if %DEBUG%==1 (
|
||||
set FORCEPDB=-DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/DEBUG" -DCMAKE_SHARED_LINKER_FLAGS_MINSIZEREL="/DEBUG"
|
||||
set ARM64TOOLCHAIN=-DCMAKE_TOOLCHAIN_FILE="%SCRIPTDIR%\cmake-toolchain-windows-arm64.cmake"
|
||||
|
||||
if not "%INSTALLDIR%"=="%INSTALLDIR: =%" (
|
||||
echo FFmpeg does not support building in paths with spaces.
|
||||
goto error
|
||||
)
|
||||
|
||||
echo "Installing libopus"
|
||||
rmdir /S /Q "opus-%LIBOPUS%"
|
||||
tar -xf "opus-%LIBOPUS%.tar.gz" || goto error
|
||||
cd "opus-%LIBOPUS%" || goto error
|
||||
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=OFF -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -B build -G Ninja || goto error
|
||||
cmake --build build --parallel || goto error
|
||||
ninja -C build install || goto error
|
||||
cd .. || goto error
|
||||
|
||||
echo "Installing gas-preprocessor..."
|
||||
if not exist "%INSTALLDIR%\bin\" mkdir "%INSTALLDIR%\bin"
|
||||
copy "gas-preprocessor.pl" "%INSTALLDIR%\bin\gas-preprocessor.pl" || goto error
|
||||
echo.
|
||||
|
||||
echo "Installing libsvtav1"
|
||||
rmdir /S /Q "SVT-AV1-v%LIBSVTAV1%"
|
||||
tar -xf "SVT-AV1-v%LIBSVTAV1%.zip" || goto error
|
||||
cd "SVT-AV1-v%LIBSVTAV1%" || goto error
|
||||
%PATCH% -p1 < "%SCRIPTDIR%\libsvtav1-arm64-msvc.patch" || goto error
|
||||
cmake %ARM64TOOLCHAIN% -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_APPS=OFF -DSVT_AV1_LTO=ON -B build -G Ninja ^
|
||||
-DCMAKE_ASM_COMPILER="%SCRIPTDIR%\libsvtav1-gas-preprocessor.bat" -DCMAKE_ASM_COMPILER_ID="MSVC" -DCMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL="" || goto error
|
||||
cmake --build build --parallel || goto error
|
||||
ninja -C build install || goto error
|
||||
cd .. || goto error
|
||||
|
||||
set PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
|
||||
set PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
|
||||
Set "PKG_CONFIG_PATH=%INSTALLDIR%\lib\pkgconfig"
|
||||
|
||||
set MAKE_EXE="%X64INSTALLDIR%\bin\make.exe"
|
||||
|
||||
set "OLD_PATH=%PATH%"
|
||||
rem Also add INSTALLDIR to add gas-preprocessor.pl to path
|
||||
set "PATH=%PATH%;%UNIX_TOOLS%;%INSTALLDIR%\bin"
|
||||
|
||||
set CC=cl
|
||||
set CXX=cl
|
||||
|
||||
echo "Installing libx264"
|
||||
rmdir /S /Q "x264-%LIBX264%"
|
||||
%SEVENZIP% x "x264-%LIBX264%.zip" || goto error
|
||||
cd "x264-%LIBX264%" || goto error
|
||||
%BASH% configure --prefix="%INSTALLDIR%" --disable-cli --enable-static --extra-cflags="-MD -w -Os -GL" || goto error
|
||||
!MAKE_EXE! -j%NUMBER_OF_PROCESSORS% || goto error
|
||||
!MAKE_EXE! install || goto error
|
||||
cd .. || goto error
|
||||
echo.
|
||||
|
||||
echo "Installing FFmpeg..."
|
||||
rmdir /S /Q "ffmpeg-%FFMPEG%"
|
||||
tar xf "ffmpeg-%FFMPEG%.tar.xz" || goto error
|
||||
cd "ffmpeg-%FFMPEG%"
|
||||
%PATCH% -p1 < "%SCRIPTDIR%\ffmpeg-configure-escape.patch" || goto error
|
||||
rem FFmpeg's build seems to choke when extra-cflags contain `\`, so use `/` as the path separator.
|
||||
set HOST_CC_PATH=%SCRIPTDIR:\=/%/ffmpeg-host-cl.bat
|
||||
set HOST_LD_PATH=%SCRIPTDIR:\=/%/ffmpeg-host-link.bat
|
||||
rem --enable-small removes the display names of codecs, so instead we specify optflag for minsize
|
||||
%BASH% configure --prefix="%INSTALLDIR%" --disable-all --disable-autodetect --disable-static --enable-shared --disable-debug ^
|
||||
--toolchain=msvc --extra-ldflags="-LTCG" --pkg-config="%X64INSTALLDIR%\bin\pkgconf.exe" ^
|
||||
--enable-cross-compile --arch=aarch64 --host-cc="%HOST_CC_PATH%" --host-ld="%HOST_LD_PATH%" ^
|
||||
--extra-cflags="-MD -GL" --extra-cxxflags="-MD -GL" --optflags="-O1" ^
|
||||
--enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale ^
|
||||
--enable-gpl --enable-libx264 --enable-libsvtav1 --enable-libopus ^
|
||||
--enable-d3d11va --enable-mediafoundation ^
|
||||
--enable-encoder=ffv1,qtrle,libx264*,libsvtav1,aac,flac,libopus,pcm_s16be,pcm_s16le ^
|
||||
--enable-encoder=h264_mf,hevc_mf,av1_mf ^
|
||||
--enable-muxer=avi,matroska,mov,mp3,mp4,wav ^
|
||||
--enable-protocol=file || goto error
|
||||
!MAKE_EXE! -j%NUMBER_OF_PROCESSORS% || goto error
|
||||
!MAKE_EXE! install || goto error
|
||||
cd ..
|
||||
echo.
|
||||
|
||||
set "PATH=!OLD_PATH!"
|
||||
|
||||
echo Building Zlib...
|
||||
rmdir /S /Q "zlib-%ZLIB%"
|
||||
%SEVENZIP% x "zlib%ZLIBSHORT%.zip" || goto error
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
call "%VSINSTPATH%\VC\Auxiliary\Build\vcvars64.bat"
|
||||
cl %*
|
||||
@@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
call "%VSINSTPATH%\VC\Auxiliary\Build\vcvars64.bat"
|
||||
link %*
|
||||
@@ -0,0 +1,605 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d3f849d0a..dda046372 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -170,9 +170,8 @@ svfloat32_t func(svfloat32_t a) {
|
||||
endforeach()
|
||||
|
||||
add_definitions(-DARCH_AARCH64=1)
|
||||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-lax-vector-conversions")
|
||||
# Prevents missmatch between arm and x86 bitstreams
|
||||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffp-contract=off")
|
||||
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:precise")
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
diff --git a/Source/Lib/ASM_NEON/cdef_filter_block_neon.c b/Source/Lib/ASM_NEON/cdef_filter_block_neon.c
|
||||
index 92eb8a50c..eaf169a51 100644
|
||||
--- a/Source/Lib/ASM_NEON/cdef_filter_block_neon.c
|
||||
+++ b/Source/Lib/ASM_NEON/cdef_filter_block_neon.c
|
||||
@@ -465,33 +465,33 @@ void svt_av1_cdef_filter_block_4xn_8_native_neon(uint8_t* dst, int32_t dstride,
|
||||
int16x8_t suma = vdupq_n_s16(0), sumb = vdupq_n_s16(0);
|
||||
int8x16_t c0, c1, c2, c3, csum;
|
||||
|
||||
-#define NAT4_TAP(OFF) \
|
||||
- ({ \
|
||||
+#define NAT4_TAP(VAR,OFF) \
|
||||
+ { \
|
||||
uint32x4_t _t = vdupq_n_u32(0); \
|
||||
_t = vld1q_lane_u32((const uint32_t*)(r0 + (OFF)), _t, 0); \
|
||||
_t = vld1q_lane_u32((const uint32_t*)(r1 + (OFF)), _t, 1); \
|
||||
_t = vld1q_lane_u32((const uint32_t*)(r2 + (OFF)), _t, 2); \
|
||||
_t = vld1q_lane_u32((const uint32_t*)(r3 + (OFF)), _t, 3); \
|
||||
- vreinterpretq_u8_u32(_t); \
|
||||
- })
|
||||
+ VAR = vreinterpretq_u8_u32(_t); \
|
||||
+ }
|
||||
|
||||
if (pri_strength) {
|
||||
- tap8 = NAT4_TAP(po1);
|
||||
+ NAT4_TAP(tap8, po1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c0 = constrain8x16(tap8, row8, prithr8, pridamp8);
|
||||
- tap8 = NAT4_TAP(-po1);
|
||||
+ NAT4_TAP(tap8, -po1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c1 = constrain8x16(tap8, row8, prithr8, pridamp8);
|
||||
csum = vaddq_s8(c0, c1);
|
||||
suma = vmlal_s8(suma, pri_t0, vget_low_s8(csum));
|
||||
sumb = vmlal_s8(sumb, pri_t0, vget_high_s8(csum));
|
||||
- tap8 = NAT4_TAP(po2);
|
||||
+ NAT4_TAP(tap8, po2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c0 = constrain8x16(tap8, row8, prithr8, pridamp8);
|
||||
- tap8 = NAT4_TAP(-po2);
|
||||
+ NAT4_TAP(tap8, -po2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c1 = constrain8x16(tap8, row8, prithr8, pridamp8);
|
||||
@@ -500,38 +500,38 @@ void svt_av1_cdef_filter_block_4xn_8_native_neon(uint8_t* dst, int32_t dstride,
|
||||
sumb = vmlal_s8(sumb, pri_t1, vget_high_s8(csum));
|
||||
}
|
||||
if (sec_strength) {
|
||||
- tap8 = NAT4_TAP(s1o1);
|
||||
+ NAT4_TAP(tap8, s1o1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c0 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT4_TAP(-s1o1);
|
||||
+ NAT4_TAP(tap8, -s1o1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c1 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT4_TAP(s2o1);
|
||||
+ NAT4_TAP(tap8, s2o1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c2 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT4_TAP(-s2o1);
|
||||
+ NAT4_TAP(tap8, -s2o1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c3 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
csum = vaddq_s8(vaddq_s8(c0, c1), vaddq_s8(c2, c3));
|
||||
suma = vmlal_s8(suma, sec_t0, vget_low_s8(csum));
|
||||
sumb = vmlal_s8(sumb, sec_t0, vget_high_s8(csum));
|
||||
- tap8 = NAT4_TAP(s1o2);
|
||||
+ NAT4_TAP(tap8, s1o2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c0 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT4_TAP(-s1o2);
|
||||
+ NAT4_TAP(tap8, -s1o2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c1 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT4_TAP(s2o2);
|
||||
+ NAT4_TAP(tap8, s2o2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c2 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT4_TAP(-s2o2);
|
||||
+ NAT4_TAP(tap8, -s2o2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c3 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
@@ -561,30 +561,30 @@ void svt_av1_cdef_filter_block_4xn_8_native_neon(uint8_t* dst, int32_t dstride,
|
||||
uint8x16_t min8 = row8, max8 = row8, tap8;
|
||||
int16x8_t suma = vdupq_n_s16(0);
|
||||
int8x16_t c0, c1, c2, c3, csum;
|
||||
-#define NAT2_TAP(OFF) \
|
||||
- ({ \
|
||||
+#define NAT2_TAP(VAR, OFF) \
|
||||
+ { \
|
||||
uint32x2_t _t = vdup_n_u32(0); \
|
||||
_t = vld1_lane_u32((const uint32_t*)(ra + (OFF)), _t, 0); \
|
||||
_t = vld1_lane_u32((const uint32_t*)(rb + (OFF)), _t, 1); \
|
||||
const uint8x8_t _l = vreinterpret_u8_u32(_t); \
|
||||
- vcombine_u8(_l, _l); \
|
||||
- })
|
||||
+ VAR = vcombine_u8(_l, _l); \
|
||||
+ }
|
||||
if (pri_strength) {
|
||||
- tap8 = NAT2_TAP(po1);
|
||||
+ NAT2_TAP(tap8, po1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c0 = constrain8x16(tap8, row8, prithr8, pridamp8);
|
||||
- tap8 = NAT2_TAP(-po1);
|
||||
+ NAT2_TAP(tap8, -po1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c1 = constrain8x16(tap8, row8, prithr8, pridamp8);
|
||||
csum = vaddq_s8(c0, c1);
|
||||
suma = vmlal_s8(suma, pri_t0, vget_low_s8(csum));
|
||||
- tap8 = NAT2_TAP(po2);
|
||||
+ NAT2_TAP(tap8, po2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c0 = constrain8x16(tap8, row8, prithr8, pridamp8);
|
||||
- tap8 = NAT2_TAP(-po2);
|
||||
+ NAT2_TAP(tap8, -po2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c1 = constrain8x16(tap8, row8, prithr8, pridamp8);
|
||||
@@ -592,37 +592,37 @@ void svt_av1_cdef_filter_block_4xn_8_native_neon(uint8_t* dst, int32_t dstride,
|
||||
suma = vmlal_s8(suma, pri_t1, vget_low_s8(csum));
|
||||
}
|
||||
if (sec_strength) {
|
||||
- tap8 = NAT2_TAP(s1o1);
|
||||
+ NAT2_TAP(tap8, s1o1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c0 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT2_TAP(-s1o1);
|
||||
+ NAT2_TAP(tap8, -s1o1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c1 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT2_TAP(s2o1);
|
||||
+ NAT2_TAP(tap8, s2o1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c2 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT2_TAP(-s2o1);
|
||||
+ NAT2_TAP(tap8, -s2o1);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c3 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
csum = vaddq_s8(vaddq_s8(c0, c1), vaddq_s8(c2, c3));
|
||||
suma = vmlal_s8(suma, sec_t0, vget_low_s8(csum));
|
||||
- tap8 = NAT2_TAP(s1o2);
|
||||
+ NAT2_TAP(tap8, s1o2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c0 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT2_TAP(-s1o2);
|
||||
+ NAT2_TAP(tap8, -s1o2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c1 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT2_TAP(s2o2);
|
||||
+ NAT2_TAP(tap8, s2o2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c2 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
- tap8 = NAT2_TAP(-s2o2);
|
||||
+ NAT2_TAP(tap8, -s2o2);
|
||||
min8 = vminq_u8(min8, tap8);
|
||||
max8 = vmaxq_u8(max8, tap8);
|
||||
c3 = constrain8x16(tap8, row8, secthr8, secdamp8);
|
||||
@@ -1285,20 +1285,20 @@ static void cdef_filter_block_4xn_8_bounded_neon(uint8_t* dst, int32_t dstride,
|
||||
uint8x16_t min8 = row8, max8 = row8, tap8, av;
|
||||
int16x8_t suma = vdupq_n_s16(0), sumb = vdupq_n_s16(0);
|
||||
int8x16_t c0, c1, c2, c3, csum;
|
||||
-#define NAT4_TAP(OFF) \
|
||||
- ({ \
|
||||
+#define NAT4_TAP(VAR, OFF) \
|
||||
+ { \
|
||||
uint32x4_t _t = vdupq_n_u32(0); \
|
||||
_t = vld1q_lane_u32((const uint32_t*)(r0 + (OFF)), _t, 0); \
|
||||
_t = vld1q_lane_u32((const uint32_t*)(r1 + (OFF)), _t, 1); \
|
||||
_t = vld1q_lane_u32((const uint32_t*)(r2 + (OFF)), _t, 2); \
|
||||
_t = vld1q_lane_u32((const uint32_t*)(r3 + (OFF)), _t, 3); \
|
||||
- vreinterpretq_u8_u32(_t); \
|
||||
- })
|
||||
+ VAR = vreinterpretq_u8_u32(_t); \
|
||||
+ }
|
||||
#define B4(B, SGN, THR, DAMP, CACC) \
|
||||
do { \
|
||||
const int _need = (SGN) > 0 ? needp[B] : needn[B]; \
|
||||
const int _rs = (SGN) > 0 ? rsensp[B] : rsensn[B]; \
|
||||
- tap8 = NAT4_TAP((SGN) * off_b[B]); \
|
||||
+ NAT4_TAP(tap8, (SGN) * off_b[B]); \
|
||||
if (!_need) { \
|
||||
max8 = vmaxq_u8(max8, tap8); \
|
||||
min8 = vminq_u8(min8, tap8); \
|
||||
@@ -1361,19 +1361,19 @@ static void cdef_filter_block_4xn_8_bounded_neon(uint8_t* dst, int32_t dstride,
|
||||
uint8x16_t min8 = row8, max8 = row8, tap8, av;
|
||||
int16x8_t suma = vdupq_n_s16(0);
|
||||
int8x16_t c0, c1, c2, c3, csum;
|
||||
-#define NAT2_TAP(OFF) \
|
||||
- ({ \
|
||||
+#define NAT2_TAP(VAR, OFF) \
|
||||
+ { \
|
||||
uint32x2_t _t = vdup_n_u32(0); \
|
||||
_t = vld1_lane_u32((const uint32_t*)(ra + (OFF)), _t, 0); \
|
||||
_t = vld1_lane_u32((const uint32_t*)(rb + (OFF)), _t, 1); \
|
||||
const uint8x8_t _l = vreinterpret_u8_u32(_t); \
|
||||
- vcombine_u8(_l, _l); \
|
||||
- })
|
||||
+ VAR = vcombine_u8(_l, _l); \
|
||||
+ }
|
||||
#define B2(B, SGN, THR, DAMP, CACC) \
|
||||
do { \
|
||||
const int _need = (SGN) > 0 ? needp[B] : needn[B]; \
|
||||
const int _rs = (SGN) > 0 ? rsensp[B] : rsensn[B]; \
|
||||
- tap8 = NAT2_TAP((SGN) * off_b[B]); \
|
||||
+ NAT2_TAP(tap8, (SGN) * off_b[B]); \
|
||||
if (!_need) { \
|
||||
max8 = vmaxq_u8(max8, tap8); \
|
||||
min8 = vminq_u8(min8, tap8); \
|
||||
diff --git a/Source/Lib/ASM_NEON/cdef_neon.c b/Source/Lib/ASM_NEON/cdef_neon.c
|
||||
index 1d0a8a506..f0b96a2c7 100644
|
||||
--- a/Source/Lib/ASM_NEON/cdef_neon.c
|
||||
+++ b/Source/Lib/ASM_NEON/cdef_neon.c
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "cdef.h"
|
||||
#include "definitions.h"
|
||||
#include "mem_neon.h"
|
||||
+#include <malloc.h>
|
||||
|
||||
/* 8-bit MSE (no FEAT_DotProd): abs-diff fits u8 and d*d fits u16 (255^2=65025), so use
|
||||
* vabdq_u8 (16-lane abs in one op) + vmull_u8/vmull2 (square 8 lanes each into u16) +
|
||||
@@ -234,7 +235,7 @@ uint64_t svt_search_one_dual_neon(int* lev0, int* lev1, int nb_strengths, uint64
|
||||
}
|
||||
|
||||
size_t stride = ((end_gi + 3) & ~3);
|
||||
- uint64_t tot_mse[end_gi * stride];
|
||||
+ uint64_t* tot_mse = (uint64_t*)_malloca(sizeof(uint64_t) * (end_gi * stride));
|
||||
size_t start_idx = start_gi;
|
||||
size_t end_idx = end_gi;
|
||||
|
||||
@@ -362,5 +363,6 @@ uint64_t svt_search_one_dual_neon(int* lev0, int* lev1, int nb_strengths, uint64
|
||||
|
||||
lev0[nb_strengths] = best_id0; // Add the identified luma strength to the list of selected luma strengths
|
||||
lev1[nb_strengths] = best_id1; // Add the identified chroma strength to the list of selected chroma strengths
|
||||
+ _freea(tot_mse);
|
||||
return best_tot_mse;
|
||||
}
|
||||
diff --git a/Source/Lib/ASM_NEON/compound_convolve_neon.c b/Source/Lib/ASM_NEON/compound_convolve_neon.c
|
||||
index 3814b697b..7bfed2305 100644
|
||||
--- a/Source/Lib/ASM_NEON/compound_convolve_neon.c
|
||||
+++ b/Source/Lib/ASM_NEON/compound_convolve_neon.c
|
||||
@@ -250,7 +250,7 @@ void svt_av1_jnt_convolve_2d_neon(const uint8_t* src, int32_t src_stride, uint8_
|
||||
|
||||
if (clamped_y_taps == 6) {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_2d_vert_6tap_dist_wtd_avg_neon(
|
||||
im_block, im_stride, dst8, dst8_stride, conv_params, y_filter, h, w);
|
||||
} else {
|
||||
@@ -262,7 +262,7 @@ void svt_av1_jnt_convolve_2d_neon(const uint8_t* src, int32_t src_stride, uint8_
|
||||
}
|
||||
} else {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_2d_vert_8tap_dist_wtd_avg_neon(
|
||||
im_block, im_stride, dst8, dst8_stride, conv_params, y_filter, h, w);
|
||||
} else {
|
||||
@@ -557,7 +557,7 @@ void svt_av1_jnt_convolve_2d_copy_neon(const uint8_t* src, int src_stride, uint8
|
||||
}
|
||||
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_2d_copy_dist_wtd_avg_neon(src, src_stride, dst8, dst8_stride, w, h, conv_params);
|
||||
} else {
|
||||
dist_wtd_convolve_2d_copy_avg_neon(src, src_stride, dst8, dst8_stride, w, h, conv_params);
|
||||
@@ -1202,7 +1202,7 @@ void svt_av1_jnt_convolve_x_neon(const uint8_t* src, int32_t src_stride, uint8_t
|
||||
}
|
||||
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_x_dist_wtd_avg_neon(
|
||||
src, src_stride, dst8, dst8_stride, w, h, filter_params_x, subpel_x_qn, conv_params);
|
||||
} else {
|
||||
@@ -2360,7 +2360,7 @@ void svt_av1_jnt_convolve_y_neon(const uint8_t* src, int32_t src_stride, uint8_t
|
||||
|
||||
if (get_filter_tap(filter_params_y, subpel_y_qn) <= 6) {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_y_6tap_dist_wtd_avg_neon(
|
||||
src_ptr + src_stride, src_stride, dst8, dst8_stride, w, h, y_filter, conv_params);
|
||||
} else {
|
||||
@@ -2372,7 +2372,7 @@ void svt_av1_jnt_convolve_y_neon(const uint8_t* src, int32_t src_stride, uint8_t
|
||||
}
|
||||
} else {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_y_8tap_dist_wtd_avg_neon(
|
||||
src_ptr, src_stride, dst8, dst8_stride, w, h, y_filter, conv_params);
|
||||
} else {
|
||||
diff --git a/Source/Lib/ASM_NEON/compound_convolve_neon.h b/Source/Lib/ASM_NEON/compound_convolve_neon.h
|
||||
index a2d26dc9d..b89a5c480 100644
|
||||
--- a/Source/Lib/ASM_NEON/compound_convolve_neon.h
|
||||
+++ b/Source/Lib/ASM_NEON/compound_convolve_neon.h
|
||||
@@ -12,13 +12,12 @@
|
||||
#ifndef AOM_AV1_COMMON_ARM_COMPOUND_CONVOLVE_NEON_H_
|
||||
#define AOM_AV1_COMMON_ARM_COMPOUND_CONVOLVE_NEON_H_
|
||||
|
||||
+#include "definitions.h"
|
||||
#include "mem_neon.h"
|
||||
#include "convolve.h"
|
||||
#include "filter.h"
|
||||
|
||||
#define __builtin_prefetch(x)
|
||||
-#define LIKELY(v) __builtin_expect(v, 1)
|
||||
-#define UNLIKELY(v) __builtin_expect(v, 0)
|
||||
|
||||
static inline void compute_dist_wtd_avg_4x4(uint16x4_t dd0, uint16x4_t dd1, uint16x4_t dd2, uint16x4_t dd3,
|
||||
uint16x4_t d0, uint16x4_t d1, uint16x4_t d2, uint16x4_t d3,
|
||||
diff --git a/Source/Lib/ASM_NEON/convolve_neon.c b/Source/Lib/ASM_NEON/convolve_neon.c
|
||||
index b8b47e808..8efe03ee8 100644
|
||||
--- a/Source/Lib/ASM_NEON/convolve_neon.c
|
||||
+++ b/Source/Lib/ASM_NEON/convolve_neon.c
|
||||
@@ -20,6 +20,10 @@
|
||||
#include "transpose_neon.h"
|
||||
#include "utility.h"
|
||||
|
||||
+#if _MSC_VER
|
||||
+#define __builtin_prefetch(x) __prefetch(x)
|
||||
+#endif
|
||||
+
|
||||
// Sign mask for is_fast_path: +1 = tap must be >= 0, -1 = tap must be <= 0,
|
||||
// 0 = tap must be zero/unused. This is the EIGHTTAP_REGULAR 6-tap pattern.
|
||||
static const int8_t kRegularSignMask6Tap[8] = {0, 1, -1, 1, 1, -1, 1, 0};
|
||||
diff --git a/Source/Lib/ASM_NEON/convolve_scale_neon.c b/Source/Lib/ASM_NEON/convolve_scale_neon.c
|
||||
index 5c56294fe..53672a4c0 100644
|
||||
--- a/Source/Lib/ASM_NEON/convolve_scale_neon.c
|
||||
+++ b/Source/Lib/ASM_NEON/convolve_scale_neon.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "common_dsp_rtcd.h"
|
||||
#include "compound_convolve_neon.h"
|
||||
#include "convolve_scale_neon.h"
|
||||
+#include "definitions.h"
|
||||
#include "filter.h"
|
||||
#include "mem_neon.h"
|
||||
#include "transpose_neon.h"
|
||||
@@ -668,7 +669,7 @@ void svt_av1_convolve_2d_scale_neon(const uint8_t* src, int src_stride, uint8_t*
|
||||
|
||||
// Vertical filter
|
||||
if (filter_params_y->interp_filter == MULTITAP_SHARP) {
|
||||
- if (LIKELY(!conv_params->is_compound)) {
|
||||
+ if (EB_LIKELY(!conv_params->is_compound)) {
|
||||
convolve_vert_scale_8tap_neon(
|
||||
im_block, im_stride, dst, dst_stride, w, h, filter_params_y->filter_ptr, subpel_y_qn, y_step_qn);
|
||||
} else if (!conv_params->do_average) {
|
||||
@@ -701,7 +702,7 @@ void svt_av1_convolve_2d_scale_neon(const uint8_t* src, int src_stride, uint8_t*
|
||||
y_step_qn);
|
||||
}
|
||||
} else {
|
||||
- if (LIKELY(!conv_params->is_compound)) {
|
||||
+ if (EB_LIKELY(!conv_params->is_compound)) {
|
||||
convolve_vert_scale_6tap_neon(im_block + im_stride,
|
||||
im_stride,
|
||||
dst,
|
||||
diff --git a/Source/Lib/ASM_NEON/sad_neon.c b/Source/Lib/ASM_NEON/sad_neon.c
|
||||
index 5abf5e9ab..150ac5946 100644
|
||||
--- a/Source/Lib/ASM_NEON/sad_neon.c
|
||||
+++ b/Source/Lib/ASM_NEON/sad_neon.c
|
||||
@@ -15,6 +15,19 @@
|
||||
#include "mem_neon.h"
|
||||
#include "sum_neon.h"
|
||||
|
||||
+#if _MSC_VER
|
||||
+#include <intrin.h>
|
||||
+// rw -> read 0, write 1, shared read 2
|
||||
+// PLD 0, PLI 1, PST 2
|
||||
+// L1 0, l2 1, L3 2
|
||||
+// locality -> no temporal 0, max temporal 3
|
||||
+// KEEP 0, STRM 1
|
||||
+#define __builtin_prefetch(addr,rw,locality) __prefetch2(addr, \
|
||||
+ (((rw & 1) * 2) << 3) | \
|
||||
+ ((rw & 2) << 1) | \
|
||||
+ (locality > 0 ? 0 : 1))
|
||||
+#endif
|
||||
+
|
||||
int svt_aom_satd_neon(const TranLow* coeff, int length) {
|
||||
const int32x4_t zero = vdupq_n_s32(0);
|
||||
int32x4_t accum = zero;
|
||||
diff --git a/Source/Lib/ASM_NEON/sad_x4d_neon.c b/Source/Lib/ASM_NEON/sad_x4d_neon.c
|
||||
index 36bc4ada3..38a10bd9c 100644
|
||||
--- a/Source/Lib/ASM_NEON/sad_x4d_neon.c
|
||||
+++ b/Source/Lib/ASM_NEON/sad_x4d_neon.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <arm_neon.h>
|
||||
|
||||
#include "aom_dsp_rtcd.h"
|
||||
+#include "definitions.h"
|
||||
#include "mem_neon.h"
|
||||
|
||||
// svt_aom_sad<W>x<H>x4d() computes the SAD of one source block against four
|
||||
@@ -99,7 +100,7 @@ static inline void sadwxhx4d_neon(const uint8_t* src, int src_stride, const uint
|
||||
// cost is a single tail-branch, which microbenchmarks at parity with the fully
|
||||
// specialized form.
|
||||
#define SAD_WXHX4D_NEON(w) \
|
||||
- static void __attribute__((noinline)) sad##w##xhx4d_neon(const uint8_t* src, \
|
||||
+ static void NOINLINE sad##w##xhx4d_neon(const uint8_t* src, \
|
||||
int src_stride, \
|
||||
const uint8_t* const ref_array[], \
|
||||
int ref_stride, \
|
||||
diff --git a/Source/Lib/ASM_NEON_DOTPROD/convolve_scale_neon_dotprod.c b/Source/Lib/ASM_NEON_DOTPROD/convolve_scale_neon_dotprod.c
|
||||
index 0f83a116d..f64828a39 100644
|
||||
--- a/Source/Lib/ASM_NEON_DOTPROD/convolve_scale_neon_dotprod.c
|
||||
+++ b/Source/Lib/ASM_NEON_DOTPROD/convolve_scale_neon_dotprod.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "common_dsp_rtcd.h"
|
||||
#include "compound_convolve_neon.h"
|
||||
#include "convolve_scale_neon.h"
|
||||
+#include "definitions.h"
|
||||
#include "filter.h"
|
||||
#include "mem_neon.h"
|
||||
#include "transpose_neon.h"
|
||||
@@ -349,7 +350,7 @@ void svt_av1_convolve_2d_scale_neon_dotprod(const uint8_t* src, int src_stride,
|
||||
|
||||
// Vertical filter
|
||||
if (filter_params_y->interp_filter == MULTITAP_SHARP) {
|
||||
- if (LIKELY(!conv_params->is_compound)) {
|
||||
+ if (EB_LIKELY(!conv_params->is_compound)) {
|
||||
convolve_vert_scale_8tap_neon(
|
||||
im_block, im_stride, dst, dst_stride, w, h, filter_params_y->filter_ptr, subpel_y_qn, y_step_qn);
|
||||
} else if (!conv_params->do_average) {
|
||||
@@ -382,7 +383,7 @@ void svt_av1_convolve_2d_scale_neon_dotprod(const uint8_t* src, int src_stride,
|
||||
y_step_qn);
|
||||
}
|
||||
} else {
|
||||
- if (LIKELY(!conv_params->is_compound)) {
|
||||
+ if (EB_LIKELY(!conv_params->is_compound)) {
|
||||
convolve_vert_scale_6tap_neon(im_block + im_stride,
|
||||
im_stride,
|
||||
dst,
|
||||
diff --git a/Source/Lib/ASM_NEON_DOTPROD/jnt_convolve_neon_dotprod.c b/Source/Lib/ASM_NEON_DOTPROD/jnt_convolve_neon_dotprod.c
|
||||
index 4154280e5..ca84f1f5d 100644
|
||||
--- a/Source/Lib/ASM_NEON_DOTPROD/jnt_convolve_neon_dotprod.c
|
||||
+++ b/Source/Lib/ASM_NEON_DOTPROD/jnt_convolve_neon_dotprod.c
|
||||
@@ -601,7 +601,7 @@ void svt_av1_jnt_convolve_2d_neon_dotprod(const uint8_t* src, int src_stride, ui
|
||||
|
||||
if (clamped_y_taps == 6) {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_2d_vert_6tap_dist_wtd_avg_neon(
|
||||
im_block, im_stride, dst8, dst8_stride, conv_params, y_filter, h, w);
|
||||
} else {
|
||||
@@ -613,7 +613,7 @@ void svt_av1_jnt_convolve_2d_neon_dotprod(const uint8_t* src, int src_stride, ui
|
||||
}
|
||||
} else {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_2d_vert_8tap_dist_wtd_avg_neon(
|
||||
im_block, im_stride, dst8, dst8_stride, conv_params, y_filter, h, w);
|
||||
} else {
|
||||
@@ -1737,7 +1737,7 @@ void svt_av1_jnt_convolve_y_neon_dotprod(const uint8_t* src, int32_t src_stride,
|
||||
|
||||
if (get_filter_tap(filter_params_y, subpel_y_qn) <= 4) {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_y_4tap_dist_wtd_avg_neon_dotprod(
|
||||
src - src_stride, src_stride, dst8, dst8_stride, w, h, y_filter_ptr, conv_params);
|
||||
} else {
|
||||
@@ -1749,7 +1749,7 @@ void svt_av1_jnt_convolve_y_neon_dotprod(const uint8_t* src, int32_t src_stride,
|
||||
}
|
||||
} else {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_y_8tap_dist_wtd_avg_neon_dotprod(
|
||||
src - 3 * src_stride, src_stride, dst8, dst8_stride, w, h, y_filter_ptr, conv_params);
|
||||
} else {
|
||||
diff --git a/Source/Lib/ASM_NEON_DOTPROD/ssim_neon_dotprod.c b/Source/Lib/ASM_NEON_DOTPROD/ssim_neon_dotprod.c
|
||||
index 6b6ad948c..89af35cea 100644
|
||||
--- a/Source/Lib/ASM_NEON_DOTPROD/ssim_neon_dotprod.c
|
||||
+++ b/Source/Lib/ASM_NEON_DOTPROD/ssim_neon_dotprod.c
|
||||
@@ -46,8 +46,10 @@ double svt_ssim_4x4_neon_dotprod(const uint8_t* s, uint32_t sp, const uint8_t* r
|
||||
memcpy(&r1, r + rp, 4);
|
||||
memcpy(&r2, r + 2 * rp, 4);
|
||||
memcpy(&r3, r + 3 * rp, 4);
|
||||
- const uint8x16_t vs = vreinterpretq_u8_u32((uint32x4_t){s0, s1, s2, s3});
|
||||
- const uint8x16_t vr = vreinterpretq_u8_u32((uint32x4_t){r0, r1, r2, r3});
|
||||
+ const uint32x4_t ts = (uint32x4_t){.n128_u32 = {s0, s1, s2, s3}};
|
||||
+ const uint8x16_t vs = vreinterpretq_u8_u32(ts);
|
||||
+ const uint32x4_t tr = (uint32x4_t){.n128_u32 = {r0, r1, r2, r3}};
|
||||
+ const uint8x16_t vr = vreinterpretq_u8_u32(tr);
|
||||
const uint8x16_t ones = vdupq_n_u8(1);
|
||||
return svt_aom_similarity(vaddvq_u32(vdotq_u32(vdupq_n_u32(0), vs, ones)),
|
||||
vaddvq_u32(vdotq_u32(vdupq_n_u32(0), vr, ones)),
|
||||
diff --git a/Source/Lib/ASM_NEON_I8MM/convolve_scale_neon_i8mm.c b/Source/Lib/ASM_NEON_I8MM/convolve_scale_neon_i8mm.c
|
||||
index bf298b5fd..09b244d0d 100644
|
||||
--- a/Source/Lib/ASM_NEON_I8MM/convolve_scale_neon_i8mm.c
|
||||
+++ b/Source/Lib/ASM_NEON_I8MM/convolve_scale_neon_i8mm.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "compound_convolve_neon.h"
|
||||
#include "convolve_scale_neon.h"
|
||||
#include "convolve_scale_neon_dotprod.h"
|
||||
+#include "definitions.h"
|
||||
#include "filter.h"
|
||||
#include "mem_neon.h"
|
||||
#include "transpose_neon.h"
|
||||
@@ -316,7 +317,7 @@ void svt_av1_convolve_2d_scale_neon_i8mm(const uint8_t* src, int src_stride, uin
|
||||
|
||||
// Vertical filter
|
||||
if (filter_params_y->interp_filter == MULTITAP_SHARP) {
|
||||
- if (LIKELY(!conv_params->is_compound)) {
|
||||
+ if (EB_LIKELY(!conv_params->is_compound)) {
|
||||
convolve_vert_scale_8tap_neon(
|
||||
im_block, im_stride, dst, dst_stride, w, h, filter_params_y->filter_ptr, subpel_y_qn, y_step_qn);
|
||||
} else if (!conv_params->do_average) {
|
||||
@@ -349,7 +350,7 @@ void svt_av1_convolve_2d_scale_neon_i8mm(const uint8_t* src, int src_stride, uin
|
||||
y_step_qn);
|
||||
}
|
||||
} else {
|
||||
- if (LIKELY(!conv_params->is_compound)) {
|
||||
+ if (EB_LIKELY(!conv_params->is_compound)) {
|
||||
convolve_vert_scale_6tap_neon(im_block + im_stride,
|
||||
im_stride,
|
||||
dst,
|
||||
diff --git a/Source/Lib/ASM_NEON_I8MM/jnt_convolve_neon_i8mm.c b/Source/Lib/ASM_NEON_I8MM/jnt_convolve_neon_i8mm.c
|
||||
index d1a0f1781..d78b95063 100644
|
||||
--- a/Source/Lib/ASM_NEON_I8MM/jnt_convolve_neon_i8mm.c
|
||||
+++ b/Source/Lib/ASM_NEON_I8MM/jnt_convolve_neon_i8mm.c
|
||||
@@ -575,7 +575,7 @@ void svt_av1_jnt_convolve_x_neon_i8mm(const uint8_t* src, int src_stride, uint8_
|
||||
src -= (SUBPEL_TAPS / 2 - 1);
|
||||
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
if (filter_taps < 8) {
|
||||
dist_wtd_convolve_x_dist_wtd_avg_6tap_neon_i8mm(src + 1,
|
||||
src_stride,
|
||||
@@ -898,7 +898,7 @@ void svt_av1_jnt_convolve_2d_neon_i8mm(const uint8_t* src, int src_stride, uint8
|
||||
|
||||
if (clamped_y_taps == 6) {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_2d_vert_6tap_dist_wtd_avg_neon(
|
||||
im_block, im_stride, dst8, dst8_stride, conv_params, y_filter, h, w);
|
||||
} else {
|
||||
@@ -910,7 +910,7 @@ void svt_av1_jnt_convolve_2d_neon_i8mm(const uint8_t* src, int src_stride, uint8
|
||||
}
|
||||
} else {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_2d_vert_8tap_dist_wtd_avg_neon(
|
||||
im_block, im_stride, dst8, dst8_stride, conv_params, y_filter, h, w);
|
||||
} else {
|
||||
@@ -1874,7 +1874,7 @@ void svt_av1_jnt_convolve_y_neon_i8mm(const uint8_t* src, int32_t src_stride, ui
|
||||
|
||||
if (get_filter_tap(filter_params_y, subpel_y_qn) <= 4) {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_y_4tap_dist_wtd_avg_neon_i8mm(
|
||||
src - src_stride, src_stride, dst8, dst8_stride, w, h, y_filter_ptr, conv_params);
|
||||
} else {
|
||||
@@ -1886,7 +1886,7 @@ void svt_av1_jnt_convolve_y_neon_i8mm(const uint8_t* src, int32_t src_stride, ui
|
||||
}
|
||||
} else {
|
||||
if (conv_params->do_average) {
|
||||
- if (UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
+ if (EB_UNLIKELY(conv_params->use_jnt_comp_avg)) {
|
||||
dist_wtd_convolve_y_8tap_dist_wtd_avg_neon_i8mm(
|
||||
src - 3 * src_stride, src_stride, dst8, dst8_stride, w, h, y_filter_ptr, conv_params);
|
||||
} else {
|
||||
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
"%UNIX_TOOLS%\perl.exe" "%INSTALLDIR%\bin\gas-preprocessor.pl" -arch aarch64 -as-type armasm -- armasm64 -nologo %*
|
||||
Reference in New Issue
Block a user