mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
ffmpeg: bump version (#7092)
This commit is contained in:
@@ -4,11 +4,11 @@ and stream audio and video. It includes libavcodec - the leading audio/video \
|
||||
codec library."
|
||||
HOMEPAGE="https://ffmpeg.org/"
|
||||
COPYRIGHT="2000-2003 Fabrice Bellard
|
||||
2003-2020 the FFmpeg developers"
|
||||
2003-2022 the FFmpeg developers"
|
||||
LICENSE="GNU LGPL v3"
|
||||
REVISION="10"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="cb754255ab0ee2ea5f66f8850e1bd6ad5cac1cd855d0a2f4990fb8c668b0d29c"
|
||||
CHECKSUM_SHA256="95e357e8b147bd236fa1cedf30ce009273261ebb0bf5dd6ee75807341322292b"
|
||||
PATCHES="ffmpeg-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="gcc_runtime.c"
|
||||
|
||||
@@ -1,294 +0,0 @@
|
||||
SUMMARY="Audio and video recording, conversion, and streaming library"
|
||||
DESCRIPTION="FFmpeg is a complete, cross-platform solution to record, convert \
|
||||
and stream audio and video. It includes libavcodec - the leading audio/video \
|
||||
codec library."
|
||||
HOMEPAGE="https://ffmpeg.org/"
|
||||
COPYRIGHT="2000-2003 Fabrice Bellard
|
||||
2003-2020 the FFmpeg developers"
|
||||
LICENSE="GNU LGPL v3"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="1d0ad06484f44bcb97eba5e93c40bcb893890f9f64aeb43e46cd9bb4cbd6795d"
|
||||
PATCHES="ffmpeg-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="gcc_runtime.c"
|
||||
|
||||
ARCHITECTURES="!all x86"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 !x86"
|
||||
|
||||
ffmpegLibs="\
|
||||
libavcodec \
|
||||
libavdevice \
|
||||
libavfilter \
|
||||
libavformat \
|
||||
libavutil \
|
||||
libswresample \
|
||||
libswscale \
|
||||
"
|
||||
# Do not sort alphabetically
|
||||
libavutilVersion="56.51.100"
|
||||
libavcodecVersion="58.91.100"
|
||||
libavformatVersion="58.45.100"
|
||||
libavdeviceVersion="58.10.100"
|
||||
libavfilterVersion="7.85.100"
|
||||
libswscaleVersion="5.7.100"
|
||||
libswresampleVersion="3.7.100"
|
||||
portVersionCompat="$portVersion compat >= 4"
|
||||
for i in $ffmpegLibs; do
|
||||
eval "${i}VersionCompat=\"\$${i}Version compat >= \${${i}Version%%.*}\""
|
||||
done
|
||||
|
||||
PROVIDES="
|
||||
ffmpeg$secondaryArchSuffix = $portVersionCompat
|
||||
lib:libavcodec$secondaryArchSuffix = $libavcodecVersionCompat
|
||||
lib:libavfilter$secondaryArchSuffix = $libavfilterVersionCompat
|
||||
lib:libavformat$secondaryArchSuffix = $libavformatVersionCompat
|
||||
lib:libavutil$secondaryArchSuffix = $libavutilVersionCompat
|
||||
lib:libswresample$secondaryArchSuffix = $libswresampleVersionCompat
|
||||
lib:libswscale$secondaryArchSuffix = $libswscaleVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libmp3lame$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libspeex$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libtheoradec$secondaryArchSuffix
|
||||
lib:libtheoraenc$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
lib:libvorbisenc$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
REQUIRES+="
|
||||
lib:libopenmpt$secondaryArchSuffix
|
||||
lib:libvpx$secondaryArchSuffix
|
||||
"
|
||||
fi
|
||||
CONFLICTS="
|
||||
ffmpeg_legacy$secondaryArchSuffix
|
||||
ffmpeg${secondaryArchSuffix}_bin
|
||||
ffmpeg2${secondaryArchSuffix}_bin
|
||||
"
|
||||
|
||||
PROVIDES_avdevice="
|
||||
ffmpeg${secondaryArchSuffix}_avdevice = $portVersionCompat
|
||||
lib:libavdevice$secondaryArchSuffix = $libavdeviceVersionCompat
|
||||
"
|
||||
REQUIRES_avdevice="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libavcodec$secondaryArchSuffix == $libavcodecVersion
|
||||
lib:libavfilter$secondaryArchSuffix == $libavfilterVersion
|
||||
lib:libavformat$secondaryArchSuffix == $libavformatVersion
|
||||
lib:libavutil$secondaryArchSuffix == $libavutilVersion
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_tools="
|
||||
ffmpeg${secondaryArchSuffix}_tools = $portVersion
|
||||
cmd:ffmpeg = $portVersionCompat
|
||||
cmd:ffplay = $portVersionCompat
|
||||
cmd:ffprobe = $portVersionCompat
|
||||
"
|
||||
REQUIRES_tools="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libavcodec$secondaryArchSuffix == $libavcodecVersion
|
||||
lib:libavdevice$secondaryArchSuffix == $libavdeviceVersion
|
||||
lib:libavfilter$secondaryArchSuffix == $libavfilterVersion
|
||||
lib:libavformat$secondaryArchSuffix == $libavformatVersion
|
||||
lib:libavutil$secondaryArchSuffix == $libavutilVersion
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
ffmpeg${secondaryArchSuffix}_devel = $portVersionCompat
|
||||
devel:libavcodec$secondaryArchSuffix = $libavcodecVersionCompat
|
||||
devel:libavdevice$secondaryArchSuffix = $libavdeviceVersionCompat
|
||||
devel:libavfilter$secondaryArchSuffix = $libavfilterVersionCompat
|
||||
devel:libavformat$secondaryArchSuffix = $libavformatVersionCompat
|
||||
devel:libavutil$secondaryArchSuffix = $libavutilVersionCompat
|
||||
devel:libswresample$secondaryArchSuffix = $libswresampleVersionCompat
|
||||
devel:libswscale$secondaryArchSuffix = $libswscaleVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
ffmpeg$secondaryArchSuffix == $portVersion base
|
||||
ffmpeg${secondaryArchSuffix}_avdevice == $portVersion
|
||||
devel:libspeex$secondaryArchSuffix
|
||||
"
|
||||
CONFLICTS_devel="
|
||||
ffmpeg_legacy${secondaryArchSuffix}_devel
|
||||
ffmpeg${secondaryArchSuffix}_devel
|
||||
ffmpeg2${secondaryArchSuffix}_devel
|
||||
"
|
||||
|
||||
# -- HACK! --
|
||||
# ffmpeg ~0.10 has perpetually had & caused problems when compiled with GCC 2.
|
||||
# (Later versions do not compile with GCC 2 at all.) So instead, we now compile
|
||||
# FFmpeg for x86_gcc2 with a modern GCC.
|
||||
#
|
||||
# This works because GCC's C ABI has not changed between 2 and 7; only the C++
|
||||
# ABI has, and no BeOS applications expect a system FFmpeg at all, so we can
|
||||
# break its ABI all we like.
|
||||
if [ "$effectiveTargetArchitecture" = x86_gcc2 ] && \
|
||||
[ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
gccSuffix="_x86"
|
||||
elif [ "$effectiveTargetArchitecture" = x86_gcc2 ] && \
|
||||
[ "$targetArchitecture" = x86 ]; then
|
||||
gccSuffix=""
|
||||
else
|
||||
gccSuffix="$secondaryArchSuffix"
|
||||
fi
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libmp3lame$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libsdl2$secondaryArchSuffix
|
||||
devel:libspeex$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libtheora$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
BUILD_REQUIRES+="
|
||||
devel:libopenmpt$secondaryArchSuffix
|
||||
devel:libvpx$secondaryArchSuffix
|
||||
"
|
||||
fi
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:awk
|
||||
cmd:cmp
|
||||
cmd:gcc$gccSuffix >= 7
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:ld$gccSuffix
|
||||
cmd:grep
|
||||
cmd:make
|
||||
cmd:perl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:sed
|
||||
cmd:texi2html
|
||||
cmd:yasm
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
# patch hard-coded paths to perl
|
||||
sed -i "s,/usr/bin/perl,$portPackageLinksDir/cmd~perl/bin/perl," \
|
||||
doc/Doxyfile \
|
||||
doc/texi2pod.pl
|
||||
# force no-undefined-symbols
|
||||
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
||||
sed -i "s/SHFLAGS='-shared/SHFLAGS='-shared -Wl,--no-undefined/g" \
|
||||
configure
|
||||
fi
|
||||
}
|
||||
|
||||
defineDebugInfoPackage ffmpeg$secondaryArchSuffix \
|
||||
$libDir/libavcodec.so.$libavcodecVersion \
|
||||
$libDir/libavfilter.so.$libavfilterVersion \
|
||||
$libDir/libavformat.so.$libavformatVersion \
|
||||
$libDir/libavutil.so.$libavutilVersion \
|
||||
$libDir/libswresample.so.$libswresampleVersion \
|
||||
$libDir/libswscale.so.$libswscaleVersion \
|
||||
"$(getPackagePrefix avdevice)/$relativeLibDir"/libavdevice.so.$libavdeviceVersion \
|
||||
"$(getPackagePrefix tools)/$relativeBinDir"/ffmpeg \
|
||||
"$(getPackagePrefix tools)/$relativeBinDir"/ffplay \
|
||||
"$(getPackagePrefix tools)/$relativeBinDir"/ffprobe
|
||||
|
||||
BUILD()
|
||||
{
|
||||
ccArgs=""
|
||||
extraArgs=""
|
||||
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
||||
cc="gcc${gccSuffix/_/-}"
|
||||
ccArgs="--cc=$cc --cxx=g++${secondaryArchSuffix/_/-}
|
||||
--ld=gcc${secondaryArchSuffix/_/-}
|
||||
--host-ld=gcc${secondaryArchSuffix/_/-}"
|
||||
|
||||
# Hack up base headers to make them think we're on GCC2 ABI
|
||||
mkdir -p include_hacks include_hacks/os include_hacks/config
|
||||
pushd include_hacks
|
||||
rm -f os/BeBuild.h config/HaikuConfig.h
|
||||
cp /system/develop/headers/os/BeBuild.h os
|
||||
cp /system/develop/headers/config/HaikuConfig.h config
|
||||
sed -i 's/__GNUC__ == 2/1/g' os/BeBuild.h config/HaikuConfig.h
|
||||
popd
|
||||
|
||||
# Compile gcc_runtime.c (subset of libgcc that GCC 7 utilizes here)
|
||||
$cc -fvisibility=hidden -c $portDir/additional-files/gcc_runtime.c \
|
||||
-o gcc_runtime.o
|
||||
|
||||
baseLDFLAGS="-B/system/bin/${gccSuffix/_/}"
|
||||
ccArgs="$ccArgs --host-ldflags=\"${baseLDFLAGS}\""
|
||||
export CFLAGS="-isystem$(pwd) -isystem$(pwd)/os -isystem$(pwd)/config"
|
||||
export LDFLAGS="$baseLDFLAGS $(pwd)/gcc_runtime.o"
|
||||
else
|
||||
extraArgs="--enable-libvpx --enable-libopenmpt"
|
||||
fi
|
||||
|
||||
# not an autotools configure
|
||||
./configure \
|
||||
$ccArgs \
|
||||
--prefix=$prefix \
|
||||
--bindir=$binDir \
|
||||
--datadir=$dataDir/$portName \
|
||||
--incdir=$includeDir \
|
||||
--libdir=$libDir \
|
||||
--shlibdir=$libDir \
|
||||
--mandir=$manDir \
|
||||
--disable-debug \
|
||||
--disable-stripping \
|
||||
--disable-static \
|
||||
--enable-shared \
|
||||
--enable-version3 \
|
||||
--enable-openssl \
|
||||
--enable-libvorbis \
|
||||
--enable-libspeex \
|
||||
--enable-libtheora \
|
||||
--enable-libmp3lame \
|
||||
$extraArgs
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLibs $ffmpegLibs
|
||||
fixPkgconfig
|
||||
|
||||
# The pkgconfig file reference other libraries using the wrong paths, which
|
||||
# creates a lot of confusion. Fix them so correct paths are used.
|
||||
local develPackageName="${portName}_devel-$portFullVersion"
|
||||
local packageLinksDir=$(dirname $portPackageLinksDir)
|
||||
local linksDir="$packageLinksDir/${develPackageName}/devel~libspeex$secondaryArchSuffix/$relativeDevelopLibDir"
|
||||
sed -i -e "s,^\(Libs.private.*\)-L.*speex.* \(-lspeex.*\),\1-L$linksDir \2," \
|
||||
$developLibDir/pkgconfig/libavcodec.pc \
|
||||
$developLibDir/pkgconfig/libavdevice.pc \
|
||||
$developLibDir/pkgconfig/libavfilter.pc \
|
||||
$developLibDir/pkgconfig/libavformat.pc
|
||||
|
||||
# Move html docs to the right place.
|
||||
mkdir -p $docDir
|
||||
mv $prefix/share/doc/ffmpeg $docDir
|
||||
rm -r $prefix/share
|
||||
|
||||
# Split out libs and executables which need libSDL
|
||||
packageEntries tools $binDir
|
||||
packageEntries avdevice $libDir/libavdevice*
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$dataDir/ffmpeg$secondaryArchSuffix/examples \
|
||||
$manDir/man3 \
|
||||
$docDir \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
@@ -1,371 +0,0 @@
|
||||
SUMMARY="Audio and video recording, conversion, and streaming library"
|
||||
DESCRIPTION="FFmpeg is a complete, cross-platform solution to record, convert \
|
||||
and stream audio and video. It includes libavcodec - the leading audio/video \
|
||||
codec library."
|
||||
HOMEPAGE="https://ffmpeg.org/"
|
||||
COPYRIGHT="2000-2003 Fabrice Bellard
|
||||
2003-2022 the FFmpeg developers"
|
||||
LICENSE="GNU LGPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="af419a7f88adbc56c758ab19b4c708afbcae15ef09606b82b855291f6a6faa93"
|
||||
PATCHES="ffmpeg-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="gcc_runtime.c"
|
||||
|
||||
# disabled: has ABI differences vs 4.2
|
||||
ARCHITECTURES="!all"
|
||||
SECONDARY_ARCHITECTURES="!x86_gcc2 !x86"
|
||||
|
||||
ffmpegLibs="\
|
||||
libavcodec \
|
||||
libavdevice \
|
||||
libavfilter \
|
||||
libavformat \
|
||||
libavutil \
|
||||
libswresample \
|
||||
libswscale \
|
||||
"
|
||||
# Do not sort alphabetically
|
||||
libavutilVersion="56.70.100"
|
||||
libavcodecVersion="58.134.100"
|
||||
libavformatVersion="58.76.100"
|
||||
libavdeviceVersion="58.13.100"
|
||||
libavfilterVersion="7.110.100"
|
||||
libswscaleVersion="5.9.100"
|
||||
libswresampleVersion="3.9.100"
|
||||
portVersionCompat="$portVersion compat >= 4"
|
||||
for i in $ffmpegLibs; do
|
||||
eval "${i}VersionCompat=\"\$${i}Version compat >= \${${i}Version%%.*}\""
|
||||
done
|
||||
|
||||
PROVIDES="
|
||||
ffmpeg$secondaryArchSuffix = $portVersionCompat
|
||||
lib:libavcodec$secondaryArchSuffix = $libavcodecVersionCompat
|
||||
lib:libavfilter$secondaryArchSuffix = $libavfilterVersionCompat
|
||||
lib:libavformat$secondaryArchSuffix = $libavformatVersionCompat
|
||||
lib:libavutil$secondaryArchSuffix = $libavutilVersionCompat
|
||||
lib:libswresample$secondaryArchSuffix = $libswresampleVersionCompat
|
||||
lib:libswscale$secondaryArchSuffix = $libswscaleVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libmp3lame$secondaryArchSuffix
|
||||
lib:libogg$secondaryArchSuffix
|
||||
lib:libopus$secondaryArchSuffix
|
||||
lib:libspeex$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libtheoradec$secondaryArchSuffix
|
||||
lib:libtheoraenc$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
lib:libvorbisenc$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
REQUIRES+="
|
||||
lib:libass$secondaryArchSuffix
|
||||
# lib:libbluray$secondaryArchSuffix
|
||||
# lib:libbs2b$secondaryArchSuffix
|
||||
# lib:libcaca$secondaryArchSuffix
|
||||
# lib:libcairo$secondaryArchSuffix
|
||||
# lib:libdav1d$secondaryArchSuffix
|
||||
lib:libfdk_aac$secondaryArchSuffix
|
||||
lib:libfontconfig$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libfribidi$secondaryArchSuffix
|
||||
# lib:libgdk_pixbuf_2.0$secondaryArchSuffix
|
||||
lib:libgme$secondaryArchSuffix
|
||||
lib:libgmp$secondaryArchSuffix
|
||||
# lib:libglib_2.0$secondaryArchSuffix
|
||||
# lib:libgobject_2.0$secondaryArchSuffix
|
||||
lib:libopenjp2$secondaryArchSuffix
|
||||
lib:libopenmpt$secondaryArchSuffix
|
||||
# lib:librsvg_2$secondaryArchSuffix
|
||||
# lib:librubberband$secondaryArchSuffix
|
||||
lib:libsnappy$secondaryArchSuffix
|
||||
lib:libsoxr$secondaryArchSuffix
|
||||
# lib:libSvtAv1Dec$secondaryArchSuffix
|
||||
# lib:libtesseract$secondaryArchSuffix
|
||||
# lib:libvmaf$secondaryArchSuffix
|
||||
lib:libvpx$secondaryArchSuffix
|
||||
lib:libwavpack$secondaryArchSuffix
|
||||
lib:libwebp$secondaryArchSuffix
|
||||
# lib:libx264$secondaryArchSuffix
|
||||
# lib:libx265$secondaryArchSuffix
|
||||
lib:libxml2$secondaryArchSuffix
|
||||
lib:liblzma$secondaryArchSuffix
|
||||
"
|
||||
fi
|
||||
CONFLICTS="
|
||||
ffmpeg_legacy$secondaryArchSuffix
|
||||
ffmpeg${secondaryArchSuffix}_bin
|
||||
ffmpeg2${secondaryArchSuffix}_bin
|
||||
"
|
||||
|
||||
PROVIDES_avdevice="
|
||||
ffmpeg${secondaryArchSuffix}_avdevice = $portVersionCompat
|
||||
lib:libavdevice$secondaryArchSuffix = $libavdeviceVersionCompat
|
||||
"
|
||||
REQUIRES_avdevice="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libavcodec$secondaryArchSuffix == $libavcodecVersion
|
||||
lib:libavfilter$secondaryArchSuffix == $libavfilterVersion
|
||||
lib:libavformat$secondaryArchSuffix == $libavformatVersion
|
||||
lib:libavutil$secondaryArchSuffix == $libavutilVersion
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_tools="
|
||||
ffmpeg${secondaryArchSuffix}_tools = $portVersion
|
||||
cmd:ffmpeg$secondaryArchSuffix = $portVersionCompat
|
||||
cmd:ffplay$secondaryArchSuffix = $portVersionCompat
|
||||
cmd:ffprobe$secondaryArchSuffix = $portVersionCompat
|
||||
"
|
||||
REQUIRES_tools="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libavcodec$secondaryArchSuffix == $libavcodecVersion
|
||||
lib:libavdevice$secondaryArchSuffix == $libavdeviceVersion
|
||||
lib:libavfilter$secondaryArchSuffix == $libavfilterVersion
|
||||
lib:libavformat$secondaryArchSuffix == $libavformatVersion
|
||||
lib:libavutil$secondaryArchSuffix == $libavutilVersion
|
||||
lib:libSDL2_2.0$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
ffmpeg${secondaryArchSuffix}_devel = $portVersionCompat
|
||||
devel:libavcodec$secondaryArchSuffix = $libavcodecVersionCompat
|
||||
devel:libavdevice$secondaryArchSuffix = $libavdeviceVersionCompat
|
||||
devel:libavfilter$secondaryArchSuffix = $libavfilterVersionCompat
|
||||
devel:libavformat$secondaryArchSuffix = $libavformatVersionCompat
|
||||
devel:libavutil$secondaryArchSuffix = $libavutilVersionCompat
|
||||
devel:libswresample$secondaryArchSuffix = $libswresampleVersionCompat
|
||||
devel:libswscale$secondaryArchSuffix = $libswscaleVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
ffmpeg$secondaryArchSuffix == $portVersion base
|
||||
ffmpeg${secondaryArchSuffix}_avdevice == $portVersion
|
||||
devel:libspeex$secondaryArchSuffix
|
||||
"
|
||||
CONFLICTS_devel="
|
||||
ffmpeg_legacy${secondaryArchSuffix}_devel
|
||||
ffmpeg${secondaryArchSuffix}_devel
|
||||
ffmpeg2${secondaryArchSuffix}_devel
|
||||
"
|
||||
|
||||
# -- HACK! --
|
||||
# ffmpeg ~0.10 has perpetually had & caused problems when compiled with GCC 2.
|
||||
# (Later versions do not compile with GCC 2 at all.) So instead, we now compile
|
||||
# FFmpeg for x86_gcc2 with a modern GCC.
|
||||
#
|
||||
# This works because GCC's C ABI has not changed between 2 and 7; only the C++
|
||||
# ABI has, and no BeOS applications expect a system FFmpeg at all, so we can
|
||||
# break its ABI all we like.
|
||||
if [ "$effectiveTargetArchitecture" = x86_gcc2 ] && \
|
||||
[ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
gccSuffix="_x86"
|
||||
elif [ "$effectiveTargetArchitecture" = x86_gcc2 ] && \
|
||||
[ "$targetArchitecture" = x86 ]; then
|
||||
gccSuffix=""
|
||||
else
|
||||
gccSuffix="$secondaryArchSuffix"
|
||||
fi
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libmp3lame$secondaryArchSuffix
|
||||
devel:libogg$secondaryArchSuffix
|
||||
devel:libopus$secondaryArchSuffix
|
||||
devel:libsdl2$secondaryArchSuffix
|
||||
devel:libspeex$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libtheora$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
BUILD_REQUIRES+="
|
||||
devel:libass$secondaryArchSuffix
|
||||
# devel:libbluray$secondaryArchSuffix
|
||||
# devel:libbs2b$secondaryArchSuffix
|
||||
# devel:libcaca$secondaryArchSuffix
|
||||
# devel:libcairo$secondaryArchSuffix
|
||||
# devel:libdav1d$secondaryArchSuffix
|
||||
devel:libfdk_aac$secondaryArchSuffix
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libfribidi$secondaryArchSuffix
|
||||
# devel:libgdk_pixbuf_2.0$secondaryArchSuffix
|
||||
devel:libgme$secondaryArchSuffix
|
||||
devel:libgmp$secondaryArchSuffix
|
||||
devel:libopenjp2$secondaryArchSuffix
|
||||
devel:libopenmpt$secondaryArchSuffix
|
||||
# devel:librsvg_2$secondaryArchSuffix
|
||||
# devel:librubberband$secondaryArchSuffix
|
||||
devel:libsnappy$secondaryArchSuffix
|
||||
devel:libsoxr$secondaryArchSuffix
|
||||
# devel:libSvtAv1Dec$secondaryArchSuffix
|
||||
# devel:libtesseract$secondaryArchSuffix
|
||||
# devel:libvmaf$secondaryArchSuffix
|
||||
devel:libvpx$secondaryArchSuffix
|
||||
devel:libwavpack$secondaryArchSuffix
|
||||
devel:libwebp$secondaryArchSuffix
|
||||
# devel:libx264$secondaryArchSuffix
|
||||
# devel:libx265$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:liblzma$secondaryArchSuffix
|
||||
"
|
||||
fi
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:awk
|
||||
cmd:cmp
|
||||
cmd:gcc$gccSuffix >= 7
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:ld$gccSuffix
|
||||
cmd:grep
|
||||
cmd:make
|
||||
cmd:perl
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:sed
|
||||
cmd:texi2html
|
||||
cmd:yasm
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
# patch hard-coded paths to perl
|
||||
sed -i "s,/usr/bin/perl,$portPackageLinksDir/cmd~perl/bin/perl," \
|
||||
doc/Doxyfile \
|
||||
doc/texi2pod.pl
|
||||
# force no-undefined-symbols
|
||||
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
||||
sed -i "s/SHFLAGS='-shared/SHFLAGS='-shared -Wl,--no-undefined/g" \
|
||||
configure
|
||||
fi
|
||||
}
|
||||
|
||||
defineDebugInfoPackage ffmpeg$secondaryArchSuffix \
|
||||
$libDir/libavcodec.so.$libavcodecVersion \
|
||||
$libDir/libavfilter.so.$libavfilterVersion \
|
||||
$libDir/libavformat.so.$libavformatVersion \
|
||||
$libDir/libavutil.so.$libavutilVersion \
|
||||
$libDir/libswresample.so.$libswresampleVersion \
|
||||
$libDir/libswscale.so.$libswscaleVersion \
|
||||
"$(getPackagePrefix avdevice)/$relativeLibDir"/libavdevice.so.$libavdeviceVersion \
|
||||
"$(getPackagePrefix tools)/$relativeBinDir"/ffmpeg \
|
||||
"$(getPackagePrefix tools)/$relativeBinDir"/ffplay \
|
||||
"$(getPackagePrefix tools)/$relativeBinDir"/ffprobe
|
||||
|
||||
BUILD()
|
||||
{
|
||||
ccArgs=""
|
||||
extraArgs=""
|
||||
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
||||
cc="gcc${gccSuffix/_/-}"
|
||||
ccArgs="--cc=$cc --cxx=g++${secondaryArchSuffix/_/-}
|
||||
--ld=gcc${secondaryArchSuffix/_/-}
|
||||
--host-ld=gcc${secondaryArchSuffix/_/-}"
|
||||
|
||||
# Hack up base headers to make them think we're on GCC2 ABI
|
||||
mkdir -p include_hacks include_hacks/os include_hacks/config
|
||||
pushd include_hacks
|
||||
rm -f os/BeBuild.h config/HaikuConfig.h
|
||||
cp /system/develop/headers/os/BeBuild.h os
|
||||
cp /system/develop/headers/config/HaikuConfig.h config
|
||||
sed -i 's/__GNUC__ == 2/1/g' os/BeBuild.h config/HaikuConfig.h
|
||||
popd
|
||||
|
||||
# Compile gcc_runtime.c (subset of libgcc that GCC 7 utilizes here)
|
||||
$cc -fvisibility=hidden -c $portDir/additional-files/gcc_runtime.c \
|
||||
-o gcc_runtime.o
|
||||
|
||||
baseLDFLAGS="-B/system/bin/${gccSuffix/_/}"
|
||||
ccArgs="$ccArgs --host-ldflags=\"${baseLDFLAGS}\""
|
||||
export CFLAGS="-isystem$(pwd) -isystem$(pwd)/os -isystem$(pwd)/config"
|
||||
export LDFLAGS="$baseLDFLAGS $(pwd)/gcc_runtime.o"
|
||||
else
|
||||
extraArgs="--enable-libass \
|
||||
--enable-libfdk-aac \
|
||||
--enable-fontconfig \
|
||||
--enable-libfreetype \
|
||||
--enable-libfribidi \
|
||||
--enable-libgme \
|
||||
--enable-gmp \
|
||||
--enable-libopenjpeg \
|
||||
--enable-libopenmpt \
|
||||
--enable-libsnappy \
|
||||
--enable-libsoxr \
|
||||
--enable-libvpx \
|
||||
--enable-libwavpack \
|
||||
--enable-libwebp \
|
||||
--enable-libxml2 \
|
||||
--enable-lzma"
|
||||
fi
|
||||
|
||||
# not an autotools configure
|
||||
./configure \
|
||||
$ccArgs \
|
||||
--prefix=$prefix \
|
||||
--bindir=$binDir \
|
||||
--datadir=$dataDir/$portName \
|
||||
--incdir=$includeDir \
|
||||
--libdir=$libDir \
|
||||
--shlibdir=$libDir \
|
||||
--mandir=$manDir \
|
||||
--disable-debug \
|
||||
--disable-stripping \
|
||||
--disable-static \
|
||||
--enable-shared \
|
||||
--enable-version3 \
|
||||
--enable-openssl \
|
||||
--enable-libvorbis \
|
||||
--enable-libspeex \
|
||||
--enable-libtheora \
|
||||
--enable-libmp3lame \
|
||||
--enable-libopus \
|
||||
$extraArgs
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLibs $ffmpegLibs
|
||||
fixPkgconfig
|
||||
|
||||
# The pkgconfig file reference other libraries using the wrong paths, which
|
||||
# creates a lot of confusion. Fix them so correct paths are used.
|
||||
local develPackageName="${portName}_devel-$portFullVersion"
|
||||
local packageLinksDir=$(dirname $portPackageLinksDir)
|
||||
local linksDir="$packageLinksDir/${develPackageName}/devel~libspeex$secondaryArchSuffix/$relativeDevelopLibDir"
|
||||
sed -i -e "s,^\(Libs.private.*\)-L.*speex.* \(-lspeex.*\),\1-L$linksDir \2," \
|
||||
$developLibDir/pkgconfig/libavcodec.pc \
|
||||
$developLibDir/pkgconfig/libavdevice.pc \
|
||||
$developLibDir/pkgconfig/libavfilter.pc \
|
||||
$developLibDir/pkgconfig/libavformat.pc
|
||||
|
||||
# Move html docs to the right place.
|
||||
mkdir -p $docDir
|
||||
mv $prefix/share/doc/ffmpeg $docDir
|
||||
rm -r $prefix/share
|
||||
|
||||
# Split out libs and executables which need libSDL
|
||||
packageEntries tools $binDir
|
||||
packageEntries avdevice $libDir/libavdevice*
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$dataDir/ffmpeg$secondaryArchSuffix/examples \
|
||||
$manDir/man3 \
|
||||
$docDir \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
@@ -8,7 +8,7 @@ COPYRIGHT="2000-2003 Fabrice Bellard
|
||||
LICENSE="GNU LGPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://ffmpeg.org/releases/ffmpeg-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b"
|
||||
CHECKSUM_SHA256="55eb6aab5ee235550fa54a33eaf8bf1b4ec66c01453182b12f6a993d75698b03"
|
||||
PATCHES="ffmpeg-$portVersion.patchset"
|
||||
SOURCE_DIR="ffmpeg-$portVersion"
|
||||
ADDITIONAL_FILES="gcc_runtime.c"
|
||||
@@ -26,13 +26,13 @@ ffmpegLibs="\
|
||||
libswscale \
|
||||
"
|
||||
# Do not sort alphabetically
|
||||
libavutilVersion="57.17.100"
|
||||
libavcodecVersion="59.18.100"
|
||||
libavformatVersion="59.16.100"
|
||||
libavdeviceVersion="59.4.100"
|
||||
libavfilterVersion="8.24.100"
|
||||
libswscaleVersion="6.4.100"
|
||||
libswresampleVersion="4.3.100"
|
||||
libavutilVersion="57.28.100"
|
||||
libavcodecVersion="59.37.100"
|
||||
libavformatVersion="59.27.100"
|
||||
libavdeviceVersion="59.7.100"
|
||||
libavfilterVersion="8.44.100"
|
||||
libswscaleVersion="6.7.100"
|
||||
libswresampleVersion="4.7.100"
|
||||
portVersionCompat="$portVersion compat >= 5"
|
||||
for i in $ffmpegLibs; do
|
||||
eval "${i}VersionCompat=\"\$${i}Version compat >= \${${i}Version%%.*}\""
|
||||
@@ -65,10 +65,6 @@ REQUIRES="
|
||||
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
REQUIRES+="
|
||||
lib:libass$secondaryArchSuffix
|
||||
# lib:libbluray$secondaryArchSuffix
|
||||
# lib:libbs2b$secondaryArchSuffix
|
||||
# lib:libcaca$secondaryArchSuffix
|
||||
# lib:libcairo$secondaryArchSuffix
|
||||
lib:libdav1d$secondaryArchSuffix
|
||||
lib:libfdk_aac$secondaryArchSuffix
|
||||
lib:libfontconfig$secondaryArchSuffix
|
||||
@@ -78,12 +74,8 @@ if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
lib:libgmp$secondaryArchSuffix
|
||||
lib:libopenjp2$secondaryArchSuffix
|
||||
lib:libopenmpt$secondaryArchSuffix
|
||||
# lib:librubberband$secondaryArchSuffix
|
||||
lib:libsnappy$secondaryArchSuffix
|
||||
lib:libsoxr$secondaryArchSuffix
|
||||
# lib:libSvtAv1Dec$secondaryArchSuffix
|
||||
# lib:libtesseract$secondaryArchSuffix
|
||||
# lib:libvmaf$secondaryArchSuffix
|
||||
lib:libvpx$secondaryArchSuffix
|
||||
lib:libwebp$secondaryArchSuffix
|
||||
# lib:libx264$secondaryArchSuffix
|
||||
@@ -186,10 +178,6 @@ BUILD_REQUIRES="
|
||||
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
BUILD_REQUIRES+="
|
||||
devel:libass$secondaryArchSuffix
|
||||
# devel:libbluray$secondaryArchSuffix
|
||||
# devel:libbs2b$secondaryArchSuffix
|
||||
# devel:libcaca$secondaryArchSuffix
|
||||
# devel:libcairo$secondaryArchSuffix
|
||||
devel:libdav1d$secondaryArchSuffix
|
||||
devel:libfdk_aac$secondaryArchSuffix
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
@@ -199,12 +187,8 @@ if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
devel:libgmp$secondaryArchSuffix
|
||||
devel:libopenjp2$secondaryArchSuffix
|
||||
devel:libopenmpt$secondaryArchSuffix
|
||||
# devel:librubberband$secondaryArchSuffix
|
||||
devel:libsnappy$secondaryArchSuffix
|
||||
devel:libsoxr$secondaryArchSuffix
|
||||
# devel:libSvtAv1Dec$secondaryArchSuffix
|
||||
# devel:libtesseract$secondaryArchSuffix
|
||||
# devel:libvmaf$secondaryArchSuffix
|
||||
devel:libvpx$secondaryArchSuffix
|
||||
devel:libwebp$secondaryArchSuffix
|
||||
# devel:libx264$secondaryArchSuffix
|
||||
@@ -1,14 +1,14 @@
|
||||
From 44a9e0dfeb696ba37406d0d078283da29542a05e Mon Sep 17 00:00:00 2001
|
||||
From d17c1a9ac9e1299707271a5467544d2e09a849cb Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 7 Aug 2019 16:21:12 +0300
|
||||
Subject: disable ebx on x86.
|
||||
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 8569a60..e3a0c31 100755
|
||||
index 927857f..9248007 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7039,6 +7039,7 @@ case $target_os in
|
||||
@@ -6923,6 +6923,7 @@ case $target_os in
|
||||
haiku)
|
||||
disable memalign
|
||||
disable posix_memalign
|
||||
@@ -17,10 +17,10 @@ index 8569a60..e3a0c31 100755
|
||||
*-dos|freedos|opendos)
|
||||
if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR__ == 5"; then
|
||||
--
|
||||
2.27.0
|
||||
2.36.1
|
||||
|
||||
|
||||
From 984fba03b111be8ad8adf67e131576b198658921 Mon Sep 17 00:00:00 2001
|
||||
From 97105db6c1fc57cf2ba5528a7969cef161daa41a Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 7 Aug 2019 16:21:32 +0300
|
||||
Subject: Re-enable memalign for Haiku
|
||||
@@ -32,10 +32,10 @@ If there are still problems with it we should rather fix them on Haiku
|
||||
side.
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index e3a0c31..35a4dc9 100755
|
||||
index 9248007..00eca65 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7037,8 +7037,6 @@ enabled avresample && warn "Building with deprecated library libavresample"
|
||||
@@ -6921,8 +6921,6 @@ enabled avresample && warn "Building with deprecated library libavresample"
|
||||
|
||||
case $target_os in
|
||||
haiku)
|
||||
@@ -45,5 +45,5 @@ index e3a0c31..35a4dc9 100755
|
||||
;;
|
||||
*-dos|freedos|opendos)
|
||||
--
|
||||
2.27.0
|
||||
2.36.1
|
||||
|
||||
@@ -1,352 +0,0 @@
|
||||
From 44a9e0dfeb696ba37406d0d078283da29542a05e Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 7 Aug 2019 16:21:12 +0300
|
||||
Subject: disable ebx on x86.
|
||||
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 8569a60..e3a0c31 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7039,6 +7039,7 @@ case $target_os in
|
||||
haiku)
|
||||
disable memalign
|
||||
disable posix_memalign
|
||||
+ enabled x86_32 && enabled shared && disable ebx_available
|
||||
;;
|
||||
*-dos|freedos|opendos)
|
||||
if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR__ == 5"; then
|
||||
--
|
||||
2.27.0
|
||||
|
||||
|
||||
From 984fba03b111be8ad8adf67e131576b198658921 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 7 Aug 2019 16:21:32 +0300
|
||||
Subject: Re-enable memalign for Haiku
|
||||
|
||||
This had been disabled in 2011:
|
||||
https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2011-June/038362.html
|
||||
|
||||
If there are still problems with it we should rather fix them on Haiku
|
||||
side.
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index e3a0c31..35a4dc9 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7037,8 +7037,6 @@ enabled avresample && warn "Building with deprecated library libavresample"
|
||||
|
||||
case $target_os in
|
||||
haiku)
|
||||
- disable memalign
|
||||
- disable posix_memalign
|
||||
enabled x86_32 && enabled shared && disable ebx_available
|
||||
;;
|
||||
*-dos|freedos|opendos)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
|
||||
From d84c5b8eaa14eb8339d426b4bb8d9a0c36cd4d8b Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Sat, 20 Jun 2020 17:52:36 +0000
|
||||
Subject: Revert libswscale/x86/yuv2rgb: add ssse3 version
|
||||
|
||||
* this reverts fc6a5883d6af8cae0e96af84dda0ad74b360a084
|
||||
* fixes a General protection fault in ff_yuv_420_rgb32_ssse3
|
||||
|
||||
diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
|
||||
index c12e88c..c7668f4 100644
|
||||
--- a/libswscale/x86/yuv2rgb.c
|
||||
+++ b/libswscale/x86/yuv2rgb.c
|
||||
@@ -67,15 +67,6 @@ DECLARE_ASM_CONST(8, uint64_t, pb_07) = 0x0707070707070707ULL;
|
||||
#include "yuv2rgb_template.c"
|
||||
#endif /* HAVE_MMXEXT */
|
||||
|
||||
-//SSSE3 versions
|
||||
-#if HAVE_SSSE3
|
||||
-#undef RENAME
|
||||
-#undef COMPILE_TEMPLATE_MMXEXT
|
||||
-#define COMPILE_TEMPLATE_MMXEXT 0
|
||||
-#define RENAME(a) a ## _ssse3
|
||||
-#include "yuv2rgb_template.c"
|
||||
-#endif
|
||||
-
|
||||
#endif /* HAVE_X86ASM */
|
||||
|
||||
av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
|
||||
@@ -83,35 +74,6 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
|
||||
#if HAVE_X86ASM
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
- if (EXTERNAL_SSSE3(cpu_flags)) {
|
||||
- switch (c->dstFormat) {
|
||||
- case AV_PIX_FMT_RGB32:
|
||||
- if (c->srcFormat == AV_PIX_FMT_YUVA420P) {
|
||||
-#if CONFIG_SWSCALE_ALPHA
|
||||
- return yuva420_rgb32_ssse3;
|
||||
-#endif
|
||||
- break;
|
||||
- } else
|
||||
- return yuv420_rgb32_ssse3;
|
||||
- case AV_PIX_FMT_BGR32:
|
||||
- if (c->srcFormat == AV_PIX_FMT_YUVA420P) {
|
||||
-#if CONFIG_SWSCALE_ALPHA
|
||||
- return yuva420_bgr32_ssse3;
|
||||
-#endif
|
||||
- break;
|
||||
- } else
|
||||
- return yuv420_bgr32_ssse3;
|
||||
- case AV_PIX_FMT_RGB24:
|
||||
- return yuv420_rgb24_ssse3;
|
||||
- case AV_PIX_FMT_BGR24:
|
||||
- return yuv420_bgr24_ssse3;
|
||||
- case AV_PIX_FMT_RGB565:
|
||||
- return yuv420_rgb16_ssse3;
|
||||
- case AV_PIX_FMT_RGB555:
|
||||
- return yuv420_rgb15_ssse3;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
if (EXTERNAL_MMXEXT(cpu_flags)) {
|
||||
switch (c->dstFormat) {
|
||||
case AV_PIX_FMT_RGB24:
|
||||
diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm
|
||||
index 575a84d..36a7baa 100644
|
||||
--- a/libswscale/x86/yuv_2_rgb.asm
|
||||
+++ b/libswscale/x86/yuv_2_rgb.asm
|
||||
@@ -25,18 +25,11 @@
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
-; below variables are named like mask_dwXY, which means to preserve dword No.X & No.Y
|
||||
-mask_dw036 : db -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0
|
||||
-mask_dw147 : db 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1
|
||||
-mask_dw25 : db 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0
|
||||
-rgb24_shuf1: db 0, 1, 6, 7, 12, 13, 2, 3, 8, 9, 14, 15, 4, 5, 10, 11
|
||||
-rgb24_shuf2: db 10, 11, 0, 1, 6, 7, 12, 13, 2, 3, 8, 9, 14, 15, 4, 5
|
||||
-rgb24_shuf3: db 4, 5, 10, 11, 0, 1, 6, 7, 12, 13, 2, 3, 8, 9, 14, 15
|
||||
-pw_00ff: times 8 dw 255
|
||||
-pb_f8: times 16 db 248
|
||||
-pb_e0: times 16 db 224
|
||||
-pb_03: times 16 db 3
|
||||
-pb_07: times 16 db 7
|
||||
+pw_00ff: times 4 dw 255
|
||||
+pb_f8: times 8 db 248
|
||||
+pb_e0: times 8 db 224
|
||||
+pb_03: times 8 db 3
|
||||
+pb_07: times 8 db 7
|
||||
|
||||
mask_1101: dw -1, -1, 0, -1
|
||||
mask_0010: dw 0, 0, -1, 0
|
||||
@@ -56,11 +49,7 @@ SECTION .text
|
||||
;-----------------------------------------------------------------------------
|
||||
|
||||
%macro MOV_H2L 1
|
||||
-%if mmsize == 8
|
||||
- psrlq %1, 32
|
||||
-%else ; mmsize == 16
|
||||
- psrldq %1, 8
|
||||
-%endif
|
||||
+psrlq %1, 32
|
||||
%endmacro
|
||||
|
||||
%macro yuv2rgb_fn 3
|
||||
@@ -88,7 +77,6 @@ SECTION .text
|
||||
%define m_blue m1
|
||||
%endif
|
||||
|
||||
-%if mmsize == 8
|
||||
%define time_num 1
|
||||
%define reg_num 8
|
||||
%define y_offset [pointer_c_ditherq + 8 * 8]
|
||||
@@ -99,45 +87,11 @@ SECTION .text
|
||||
%define y_coff [pointer_c_ditherq + 3 * 8]
|
||||
%define ub_coff [pointer_c_ditherq + 5 * 8]
|
||||
%define vr_coff [pointer_c_ditherq + 4 * 8]
|
||||
-%elif mmsize == 16
|
||||
-%define time_num 2
|
||||
-%if ARCH_X86_32
|
||||
-%define reg_num 8
|
||||
-%define my_offset [pointer_c_ditherq + 8 * 8]
|
||||
-%define mu_offset [pointer_c_ditherq + 9 * 8]
|
||||
-%define mv_offset [pointer_c_ditherq + 10 * 8]
|
||||
-%define mug_coff [pointer_c_ditherq + 7 * 8]
|
||||
-%define mvg_coff [pointer_c_ditherq + 6 * 8]
|
||||
-%define my_coff [pointer_c_ditherq + 3 * 8]
|
||||
-%define mub_coff [pointer_c_ditherq + 5 * 8]
|
||||
-%define mvr_coff [pointer_c_ditherq + 4 * 8]
|
||||
-%else ; ARCH_X86_64
|
||||
-%define reg_num 16
|
||||
-%define y_offset m8
|
||||
-%define u_offset m9
|
||||
-%define v_offset m10
|
||||
-%define ug_coff m11
|
||||
-%define vg_coff m12
|
||||
-%define y_coff m13
|
||||
-%define ub_coff m14
|
||||
-%define vr_coff m15
|
||||
-%endif ; ARCH_X86_32/64
|
||||
-%endif ; coeff define mmsize == 8/16
|
||||
|
||||
cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
|
||||
%if ARCH_X86_64
|
||||
movsxd indexq, indexd
|
||||
-%if mmsize == 16
|
||||
- VBROADCASTSD y_offset, [pointer_c_ditherq + 8 * 8]
|
||||
- VBROADCASTSD u_offset, [pointer_c_ditherq + 9 * 8]
|
||||
- VBROADCASTSD v_offset, [pointer_c_ditherq + 10 * 8]
|
||||
- VBROADCASTSD ug_coff, [pointer_c_ditherq + 7 * 8]
|
||||
- VBROADCASTSD vg_coff, [pointer_c_ditherq + 6 * 8]
|
||||
- VBROADCASTSD y_coff, [pointer_c_ditherq + 3 * 8]
|
||||
- VBROADCASTSD ub_coff, [pointer_c_ditherq + 5 * 8]
|
||||
- VBROADCASTSD vr_coff, [pointer_c_ditherq + 4 * 8]
|
||||
-%endif
|
||||
%endif
|
||||
movu m_y, [py_2indexq + 2 * indexq]
|
||||
movh m_u, [pu_indexq + indexq]
|
||||
@@ -154,30 +108,10 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
psllw m1, 3
|
||||
psllw m6, 3
|
||||
psllw m7, 3
|
||||
-%if (ARCH_X86_32 && mmsize == 16)
|
||||
- VBROADCASTSD m2, mu_offset
|
||||
- VBROADCASTSD m3, mv_offset
|
||||
- VBROADCASTSD m4, my_offset
|
||||
- psubsw m0, m2 ; U = U - 128
|
||||
- psubsw m1, m3 ; V = V - 128
|
||||
- psubw m6, m4
|
||||
- psubw m7, m4
|
||||
- VBROADCASTSD m2, mug_coff
|
||||
- VBROADCASTSD m3, mvg_coff
|
||||
- VBROADCASTSD m4, my_coff
|
||||
- VBROADCASTSD m5, mub_coff
|
||||
- pmulhw m2, m0
|
||||
- pmulhw m3, m1
|
||||
- pmulhw m6, m4
|
||||
- pmulhw m7, m4
|
||||
- pmulhw m0, m5
|
||||
- VBROADCASTSD m4, mvr_coff
|
||||
- pmulhw m1, m4
|
||||
-%else ; ARCH_X86_64 || mmsize == 8
|
||||
psubsw m0, u_offset ; U = U - 128
|
||||
psubsw m1, v_offset ; V = V - 128
|
||||
- psubw m6, y_offset
|
||||
- psubw m7, y_offset
|
||||
+ psubw m6, y_offset
|
||||
+ psubw m7, y_offset
|
||||
mova m2, m0
|
||||
mova m3, m1
|
||||
pmulhw m2, ug_coff
|
||||
@@ -186,7 +120,6 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
pmulhw m7, y_coff
|
||||
pmulhw m0, ub_coff
|
||||
pmulhw m1, vr_coff
|
||||
-%endif
|
||||
paddsw m2, m3
|
||||
mova m3, m7
|
||||
mova m5, m7
|
||||
@@ -209,7 +142,6 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
punpcklbw m6, m_red ; B0 R1 B2 R3 B4 R5 B6 R7 B8 R9 ...
|
||||
mova m5, m3
|
||||
punpckhbw m2, m_blue ; G1 B1 G3 B3 G5 B5 G7 B7 G9 B9 ...
|
||||
-%if mmsize == 8
|
||||
punpcklwd m3 ,m6 ; R0 G0 B0 R1 R2 G2 B2 R3
|
||||
punpckhwd m5, m6 ; R4 G4 B4 R5 R6 G6 B6 R7
|
||||
%if cpuflag(mmxext)
|
||||
@@ -245,33 +177,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
psrlq m5, 32
|
||||
movd [imageq + 20], m2 ; -- -- G7 B7
|
||||
movd [imageq + 18], m5 ; R6 G6 B6 R7
|
||||
-%endif ; mmsize = 8
|
||||
-%else ; mmsize == 16
|
||||
- pshufb m3, [rgb24_shuf1] ; r0 g0 r6 g6 r12 g12 r2 g2 r8 g8 r14 g14 r4 g4 r10 g10
|
||||
- pshufb m6, [rgb24_shuf2] ; b10 r11 b0 r1 b6 r7 b12 r13 b2 r3 b8 r9 b14 r15 b4 r5
|
||||
- pshufb m2, [rgb24_shuf3] ; g5 b5 g11 b11 g1 b1 g7 b7 g13 b13 g3 b3 g9 b9 g15 b15
|
||||
- mova m7, [mask_dw036]
|
||||
- mova m4, [mask_dw147]
|
||||
- mova m5, [mask_dw25]
|
||||
- pand m0, m7, m3 ; r0 g0 --- --- --- --- r2 g2 --- --- --- --- r4 g4 --- ---
|
||||
- pand m1, m4, m6 ; --- --- b0 r1 --- --- --- --- b2 r3 --- --- --- --- b4 r5
|
||||
- por m0, m1
|
||||
- pand m1, m5, m2 ; --- --- --- --- g1 b1 --- --- --- --- g3 b3 --- --- --- ---
|
||||
- por m0, m1 ; r0 g0 b0 r1 g1 b1 r2 g2 b2 r3 g3 b3 r4 g4 b4 r5
|
||||
- pand m1, m7, m2 ; g5 b5 --- --- --- --- g7 b7 --- --- --- --- g9 b9 --- ---
|
||||
- pand m7, m6 ; b10 r11 --- --- --- --- b12 r13 --- --- --- --- b14 r15 --- ---
|
||||
- pand m6, m5 ; --- --- --- --- b6 r7 --- --- --- --- b8 r9 --- --- --- ---
|
||||
- por m1, m6
|
||||
- pand m6, m4, m3 ; --- --- r6 g6 --- --- --- --- r8 g8 --- --- --- --- r10 g10
|
||||
- pand m2, m4 ; --- --- g11 b11 --- --- --- --- g13 b13 --- --- --- --- g15 b15
|
||||
- pand m3, m5 ; --- --- --- --- r12 g12 --- --- --- --- r14 g14 --- --- --- ---
|
||||
- por m2, m7
|
||||
- por m1, m6 ; g5 b5 r6 g6 b6 r7 g7 b7 r8 g8 b8 r9 g9 b9 r10 g10
|
||||
- por m2, m3 ; b10 r11 g11 b11 r12 g12 b12 r13 g13 b13 r14 g14 b14 r15 g15 b15
|
||||
- mova [imageq], m0
|
||||
- mova [imageq + 16], m1
|
||||
- mova [imageq + 32], m2
|
||||
-%endif ; mmsize = 16
|
||||
+%endif
|
||||
%else ; PACK RGB15/16/32
|
||||
packuswb m0, m1
|
||||
packuswb m3, m5
|
||||
@@ -290,10 +196,10 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
%endif
|
||||
mova m5, m_blue
|
||||
mova m6, m_red
|
||||
- punpckhbw m5, m_green
|
||||
+ punpckhbw m5, m_green
|
||||
punpcklbw m_blue, m_green
|
||||
- punpckhbw m6, m_alpha
|
||||
- punpcklbw m_red, m_alpha
|
||||
+ punpckhbw m6, m_alpha
|
||||
+ punpcklbw m_red, m_alpha
|
||||
mova m_green, m_blue
|
||||
mova m_alpha, m5
|
||||
punpcklwd m_blue, m_red
|
||||
@@ -301,23 +207,14 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
punpcklwd m5, m6
|
||||
punpckhwd m_alpha, m6
|
||||
mova [imageq + 0], m_blue
|
||||
- mova [imageq + 8 * time_num], m_green
|
||||
+ mova [imageq + 8 * time_num], m_green
|
||||
mova [imageq + 16 * time_num], m5
|
||||
mova [imageq + 24 * time_num], m_alpha
|
||||
%else ; PACK RGB15/16
|
||||
%define depth 2
|
||||
-%if cpuflag(ssse3)
|
||||
- %define red_dither m3
|
||||
- %define green_dither m4
|
||||
- %define blue_dither m5
|
||||
- VBROADCASTSD red_dither, [pointer_c_ditherq + 0 * 8]
|
||||
- VBROADCASTSD green_dither, [pointer_c_ditherq + 1 * 8]
|
||||
- VBROADCASTSD blue_dither, [pointer_c_ditherq + 2 * 8]
|
||||
-%else ; cpuflag(mmx/mmxext)
|
||||
-%define blue_dither [pointer_c_ditherq + 2 * 8]
|
||||
-%define green_dither [pointer_c_ditherq + 1 * 8]
|
||||
-%define red_dither [pointer_c_ditherq + 0 * 8]
|
||||
-%endif
|
||||
+%define blue_dither [pointer_c_ditherq + 2 * 8]
|
||||
+%define green_dither [pointer_c_ditherq + 1 * 8]
|
||||
+%define red_dither [pointer_c_ditherq + 0 * 8]
|
||||
%if %3 == 15
|
||||
%define gmask pb_03
|
||||
%define isRGB15 1
|
||||
@@ -371,13 +268,3 @@ yuv2rgb_fn yuv, rgb, 16
|
||||
INIT_MMX mmxext
|
||||
yuv2rgb_fn yuv, rgb, 24
|
||||
yuv2rgb_fn yuv, bgr, 24
|
||||
-
|
||||
-INIT_XMM ssse3
|
||||
-yuv2rgb_fn yuv, rgb, 24
|
||||
-yuv2rgb_fn yuv, bgr, 24
|
||||
-yuv2rgb_fn yuv, rgb, 32
|
||||
-yuv2rgb_fn yuv, bgr, 32
|
||||
-yuv2rgb_fn yuva, rgb, 32
|
||||
-yuv2rgb_fn yuva, bgr, 32
|
||||
-yuv2rgb_fn yuv, rgb, 15
|
||||
-yuv2rgb_fn yuv, rgb, 16
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@@ -1,350 +0,0 @@
|
||||
From a18284b9266d2ed88327be013315b47208c92285 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 7 Aug 2019 16:21:12 +0300
|
||||
Subject: disable ebx on x86.
|
||||
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index d7a3f50..ed8e049 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7108,6 +7108,7 @@ case $target_os in
|
||||
haiku)
|
||||
disable memalign
|
||||
disable posix_memalign
|
||||
+ enabled x86_32 && enabled shared && disable ebx_available
|
||||
;;
|
||||
*-dos|freedos|opendos)
|
||||
if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR__ == 5"; then
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 8326f12daa8410e319daa70cabc6bdcfdbee7250 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 7 Aug 2019 16:21:32 +0300
|
||||
Subject: Re-enable memalign for Haiku
|
||||
|
||||
This had been disabled in 2011:
|
||||
https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2011-June/038362.html
|
||||
|
||||
If there are still problems with it we should rather fix them on Haiku
|
||||
side.
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index ed8e049..50f26c1 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7106,8 +7106,6 @@ enabled avresample && warn "Building with deprecated library libavresample"
|
||||
|
||||
case $target_os in
|
||||
haiku)
|
||||
- disable memalign
|
||||
- disable posix_memalign
|
||||
enabled x86_32 && enabled shared && disable ebx_available
|
||||
;;
|
||||
*-dos|freedos|opendos)
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 6d318a6b06b5838d3bcfff6457789f63ab7a18cd Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Sat, 20 Jun 2020 17:52:36 +0000
|
||||
Subject: Revert libswscale/x86/yuv2rgb: add ssse3 version
|
||||
|
||||
* this reverts fc6a5883d6af8cae0e96af84dda0ad74b360a084
|
||||
* fixes a General protection fault in ff_yuv_420_rgb32_ssse3
|
||||
|
||||
diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
|
||||
index 47f45bd..5452318 100644
|
||||
--- a/libswscale/x86/yuv2rgb.c
|
||||
+++ b/libswscale/x86/yuv2rgb.c
|
||||
@@ -57,13 +57,6 @@
|
||||
#define RENAME(a) a ## _mmxext
|
||||
#include "yuv2rgb_template.c"
|
||||
|
||||
-//SSSE3 versions
|
||||
-#undef RENAME
|
||||
-#undef COMPILE_TEMPLATE_MMXEXT
|
||||
-#define COMPILE_TEMPLATE_MMXEXT 0
|
||||
-#define RENAME(a) a ## _ssse3
|
||||
-#include "yuv2rgb_template.c"
|
||||
-
|
||||
#endif /* HAVE_X86ASM */
|
||||
|
||||
av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
|
||||
@@ -71,35 +64,6 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
|
||||
#if HAVE_X86ASM
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
- if (EXTERNAL_SSSE3(cpu_flags)) {
|
||||
- switch (c->dstFormat) {
|
||||
- case AV_PIX_FMT_RGB32:
|
||||
- if (c->srcFormat == AV_PIX_FMT_YUVA420P) {
|
||||
-#if CONFIG_SWSCALE_ALPHA
|
||||
- return yuva420_rgb32_ssse3;
|
||||
-#endif
|
||||
- break;
|
||||
- } else
|
||||
- return yuv420_rgb32_ssse3;
|
||||
- case AV_PIX_FMT_BGR32:
|
||||
- if (c->srcFormat == AV_PIX_FMT_YUVA420P) {
|
||||
-#if CONFIG_SWSCALE_ALPHA
|
||||
- return yuva420_bgr32_ssse3;
|
||||
-#endif
|
||||
- break;
|
||||
- } else
|
||||
- return yuv420_bgr32_ssse3;
|
||||
- case AV_PIX_FMT_RGB24:
|
||||
- return yuv420_rgb24_ssse3;
|
||||
- case AV_PIX_FMT_BGR24:
|
||||
- return yuv420_bgr24_ssse3;
|
||||
- case AV_PIX_FMT_RGB565:
|
||||
- return yuv420_rgb16_ssse3;
|
||||
- case AV_PIX_FMT_RGB555:
|
||||
- return yuv420_rgb15_ssse3;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
if (EXTERNAL_MMXEXT(cpu_flags)) {
|
||||
switch (c->dstFormat) {
|
||||
case AV_PIX_FMT_RGB24:
|
||||
diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm
|
||||
index 2f0b413..43e63e8 100644
|
||||
--- a/libswscale/x86/yuv_2_rgb.asm
|
||||
+++ b/libswscale/x86/yuv_2_rgb.asm
|
||||
@@ -25,18 +25,11 @@
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
-; below variables are named like mask_dwXY, which means to preserve dword No.X & No.Y
|
||||
-mask_dw036 : db -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0
|
||||
-mask_dw147 : db 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1
|
||||
-mask_dw25 : db 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0
|
||||
-rgb24_shuf1: db 0, 1, 6, 7, 12, 13, 2, 3, 8, 9, 14, 15, 4, 5, 10, 11
|
||||
-rgb24_shuf2: db 10, 11, 0, 1, 6, 7, 12, 13, 2, 3, 8, 9, 14, 15, 4, 5
|
||||
-rgb24_shuf3: db 4, 5, 10, 11, 0, 1, 6, 7, 12, 13, 2, 3, 8, 9, 14, 15
|
||||
-pw_00ff: times 8 dw 255
|
||||
-pb_f8: times 16 db 248
|
||||
-pb_e0: times 16 db 224
|
||||
-pb_03: times 16 db 3
|
||||
-pb_07: times 16 db 7
|
||||
+pw_00ff: times 4 dw 255
|
||||
+pb_f8: times 8 db 248
|
||||
+pb_e0: times 8 db 224
|
||||
+pb_03: times 8 db 3
|
||||
+pb_07: times 8 db 7
|
||||
|
||||
mask_1101: dw -1, -1, 0, -1
|
||||
mask_0010: dw 0, 0, -1, 0
|
||||
@@ -56,11 +49,7 @@ SECTION .text
|
||||
;-----------------------------------------------------------------------------
|
||||
|
||||
%macro MOV_H2L 1
|
||||
-%if mmsize == 8
|
||||
- psrlq %1, 32
|
||||
-%else ; mmsize == 16
|
||||
- psrldq %1, 8
|
||||
-%endif
|
||||
+psrlq %1, 32
|
||||
%endmacro
|
||||
|
||||
%macro yuv2rgb_fn 3
|
||||
@@ -88,7 +77,6 @@ SECTION .text
|
||||
%define m_blue m1
|
||||
%endif
|
||||
|
||||
-%if mmsize == 8
|
||||
%define time_num 1
|
||||
%define reg_num 8
|
||||
%define y_offset [pointer_c_ditherq + 8 * 8]
|
||||
@@ -99,45 +87,11 @@ SECTION .text
|
||||
%define y_coff [pointer_c_ditherq + 3 * 8]
|
||||
%define ub_coff [pointer_c_ditherq + 5 * 8]
|
||||
%define vr_coff [pointer_c_ditherq + 4 * 8]
|
||||
-%elif mmsize == 16
|
||||
-%define time_num 2
|
||||
-%if ARCH_X86_32
|
||||
-%define reg_num 8
|
||||
-%define my_offset [pointer_c_ditherq + 8 * 8]
|
||||
-%define mu_offset [pointer_c_ditherq + 9 * 8]
|
||||
-%define mv_offset [pointer_c_ditherq + 10 * 8]
|
||||
-%define mug_coff [pointer_c_ditherq + 7 * 8]
|
||||
-%define mvg_coff [pointer_c_ditherq + 6 * 8]
|
||||
-%define my_coff [pointer_c_ditherq + 3 * 8]
|
||||
-%define mub_coff [pointer_c_ditherq + 5 * 8]
|
||||
-%define mvr_coff [pointer_c_ditherq + 4 * 8]
|
||||
-%else ; ARCH_X86_64
|
||||
-%define reg_num 16
|
||||
-%define y_offset m8
|
||||
-%define u_offset m9
|
||||
-%define v_offset m10
|
||||
-%define ug_coff m11
|
||||
-%define vg_coff m12
|
||||
-%define y_coff m13
|
||||
-%define ub_coff m14
|
||||
-%define vr_coff m15
|
||||
-%endif ; ARCH_X86_32/64
|
||||
-%endif ; coeff define mmsize == 8/16
|
||||
|
||||
cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
|
||||
%if ARCH_X86_64
|
||||
movsxd indexq, indexd
|
||||
-%if mmsize == 16
|
||||
- VBROADCASTSD y_offset, [pointer_c_ditherq + 8 * 8]
|
||||
- VBROADCASTSD u_offset, [pointer_c_ditherq + 9 * 8]
|
||||
- VBROADCASTSD v_offset, [pointer_c_ditherq + 10 * 8]
|
||||
- VBROADCASTSD ug_coff, [pointer_c_ditherq + 7 * 8]
|
||||
- VBROADCASTSD vg_coff, [pointer_c_ditherq + 6 * 8]
|
||||
- VBROADCASTSD y_coff, [pointer_c_ditherq + 3 * 8]
|
||||
- VBROADCASTSD ub_coff, [pointer_c_ditherq + 5 * 8]
|
||||
- VBROADCASTSD vr_coff, [pointer_c_ditherq + 4 * 8]
|
||||
-%endif
|
||||
%endif
|
||||
movu m_y, [py_2indexq + 2 * indexq]
|
||||
movh m_u, [pu_indexq + indexq]
|
||||
@@ -154,30 +108,10 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
psllw m1, 3
|
||||
psllw m6, 3
|
||||
psllw m7, 3
|
||||
-%if (ARCH_X86_32 && mmsize == 16)
|
||||
- VBROADCASTSD m2, mu_offset
|
||||
- VBROADCASTSD m3, mv_offset
|
||||
- VBROADCASTSD m4, my_offset
|
||||
- psubsw m0, m2 ; U = U - 128
|
||||
- psubsw m1, m3 ; V = V - 128
|
||||
- psubw m6, m4
|
||||
- psubw m7, m4
|
||||
- VBROADCASTSD m2, mug_coff
|
||||
- VBROADCASTSD m3, mvg_coff
|
||||
- VBROADCASTSD m4, my_coff
|
||||
- VBROADCASTSD m5, mub_coff
|
||||
- pmulhw m2, m0
|
||||
- pmulhw m3, m1
|
||||
- pmulhw m6, m4
|
||||
- pmulhw m7, m4
|
||||
- pmulhw m0, m5
|
||||
- VBROADCASTSD m4, mvr_coff
|
||||
- pmulhw m1, m4
|
||||
-%else ; ARCH_X86_64 || mmsize == 8
|
||||
psubsw m0, u_offset ; U = U - 128
|
||||
psubsw m1, v_offset ; V = V - 128
|
||||
- psubw m6, y_offset
|
||||
- psubw m7, y_offset
|
||||
+ psubw m6, y_offset
|
||||
+ psubw m7, y_offset
|
||||
mova m2, m0
|
||||
mova m3, m1
|
||||
pmulhw m2, ug_coff
|
||||
@@ -186,7 +120,6 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
pmulhw m7, y_coff
|
||||
pmulhw m0, ub_coff
|
||||
pmulhw m1, vr_coff
|
||||
-%endif
|
||||
paddsw m2, m3
|
||||
mova m3, m7
|
||||
mova m5, m7
|
||||
@@ -209,7 +142,6 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
punpcklbw m6, m_red ; B0 R1 B2 R3 B4 R5 B6 R7 B8 R9 ...
|
||||
mova m5, m3
|
||||
punpckhbw m2, m_blue ; G1 B1 G3 B3 G5 B5 G7 B7 G9 B9 ...
|
||||
-%if mmsize == 8
|
||||
punpcklwd m3 ,m6 ; R0 G0 B0 R1 R2 G2 B2 R3
|
||||
punpckhwd m5, m6 ; R4 G4 B4 R5 R6 G6 B6 R7
|
||||
%if cpuflag(mmxext)
|
||||
@@ -245,33 +177,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
psrlq m5, 32
|
||||
movd [imageq + 20], m2 ; -- -- G7 B7
|
||||
movd [imageq + 18], m5 ; R6 G6 B6 R7
|
||||
-%endif ; mmsize = 8
|
||||
-%else ; mmsize == 16
|
||||
- pshufb m3, [rgb24_shuf1] ; r0 g0 r6 g6 r12 g12 r2 g2 r8 g8 r14 g14 r4 g4 r10 g10
|
||||
- pshufb m6, [rgb24_shuf2] ; b10 r11 b0 r1 b6 r7 b12 r13 b2 r3 b8 r9 b14 r15 b4 r5
|
||||
- pshufb m2, [rgb24_shuf3] ; g5 b5 g11 b11 g1 b1 g7 b7 g13 b13 g3 b3 g9 b9 g15 b15
|
||||
- mova m7, [mask_dw036]
|
||||
- mova m4, [mask_dw147]
|
||||
- mova m5, [mask_dw25]
|
||||
- pand m0, m7, m3 ; r0 g0 --- --- --- --- r2 g2 --- --- --- --- r4 g4 --- ---
|
||||
- pand m1, m4, m6 ; --- --- b0 r1 --- --- --- --- b2 r3 --- --- --- --- b4 r5
|
||||
- por m0, m1
|
||||
- pand m1, m5, m2 ; --- --- --- --- g1 b1 --- --- --- --- g3 b3 --- --- --- ---
|
||||
- por m0, m1 ; r0 g0 b0 r1 g1 b1 r2 g2 b2 r3 g3 b3 r4 g4 b4 r5
|
||||
- pand m1, m7, m2 ; g5 b5 --- --- --- --- g7 b7 --- --- --- --- g9 b9 --- ---
|
||||
- pand m7, m6 ; b10 r11 --- --- --- --- b12 r13 --- --- --- --- b14 r15 --- ---
|
||||
- pand m6, m5 ; --- --- --- --- b6 r7 --- --- --- --- b8 r9 --- --- --- ---
|
||||
- por m1, m6
|
||||
- pand m6, m4, m3 ; --- --- r6 g6 --- --- --- --- r8 g8 --- --- --- --- r10 g10
|
||||
- pand m2, m4 ; --- --- g11 b11 --- --- --- --- g13 b13 --- --- --- --- g15 b15
|
||||
- pand m3, m5 ; --- --- --- --- r12 g12 --- --- --- --- r14 g14 --- --- --- ---
|
||||
- por m2, m7
|
||||
- por m1, m6 ; g5 b5 r6 g6 b6 r7 g7 b7 r8 g8 b8 r9 g9 b9 r10 g10
|
||||
- por m2, m3 ; b10 r11 g11 b11 r12 g12 b12 r13 g13 b13 r14 g14 b14 r15 g15 b15
|
||||
- movu [imageq], m0
|
||||
- movu [imageq + 16], m1
|
||||
- movu [imageq + 32], m2
|
||||
-%endif ; mmsize = 16
|
||||
+%endif
|
||||
%else ; PACK RGB15/16/32
|
||||
packuswb m0, m1
|
||||
packuswb m3, m5
|
||||
@@ -290,10 +196,10 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
%endif
|
||||
mova m5, m_blue
|
||||
mova m6, m_red
|
||||
- punpckhbw m5, m_green
|
||||
+ punpckhbw m5, m_green
|
||||
punpcklbw m_blue, m_green
|
||||
- punpckhbw m6, m_alpha
|
||||
- punpcklbw m_red, m_alpha
|
||||
+ punpckhbw m6, m_alpha
|
||||
+ punpcklbw m_red, m_alpha
|
||||
mova m_green, m_blue
|
||||
mova m_alpha, m5
|
||||
punpcklwd m_blue, m_red
|
||||
@@ -301,23 +207,14 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
punpcklwd m5, m6
|
||||
punpckhwd m_alpha, m6
|
||||
movu [imageq + 0], m_blue
|
||||
- movu [imageq + 8 * time_num], m_green
|
||||
+ movu [imageq + 8 * time_num], m_green
|
||||
movu [imageq + 16 * time_num], m5
|
||||
movu [imageq + 24 * time_num], m_alpha
|
||||
%else ; PACK RGB15/16
|
||||
%define depth 2
|
||||
-%if cpuflag(ssse3)
|
||||
- %define red_dither m3
|
||||
- %define green_dither m4
|
||||
- %define blue_dither m5
|
||||
- VBROADCASTSD red_dither, [pointer_c_ditherq + 0 * 8]
|
||||
- VBROADCASTSD green_dither, [pointer_c_ditherq + 1 * 8]
|
||||
- VBROADCASTSD blue_dither, [pointer_c_ditherq + 2 * 8]
|
||||
-%else ; cpuflag(mmx/mmxext)
|
||||
-%define blue_dither [pointer_c_ditherq + 2 * 8]
|
||||
-%define green_dither [pointer_c_ditherq + 1 * 8]
|
||||
-%define red_dither [pointer_c_ditherq + 0 * 8]
|
||||
-%endif
|
||||
+%define blue_dither [pointer_c_ditherq + 2 * 8]
|
||||
+%define green_dither [pointer_c_ditherq + 1 * 8]
|
||||
+%define red_dither [pointer_c_ditherq + 0 * 8]
|
||||
%if %3 == 15
|
||||
%define gmask pb_03
|
||||
%define isRGB15 1
|
||||
@@ -371,13 +268,3 @@ yuv2rgb_fn yuv, rgb, 16
|
||||
INIT_MMX mmxext
|
||||
yuv2rgb_fn yuv, rgb, 24
|
||||
yuv2rgb_fn yuv, bgr, 24
|
||||
-
|
||||
-INIT_XMM ssse3
|
||||
-yuv2rgb_fn yuv, rgb, 24
|
||||
-yuv2rgb_fn yuv, bgr, 24
|
||||
-yuv2rgb_fn yuv, rgb, 32
|
||||
-yuv2rgb_fn yuv, bgr, 32
|
||||
-yuv2rgb_fn yuva, rgb, 32
|
||||
-yuv2rgb_fn yuva, bgr, 32
|
||||
-yuv2rgb_fn yuv, rgb, 15
|
||||
-yuv2rgb_fn yuv, rgb, 16
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -1,350 +0,0 @@
|
||||
From 44a9e0dfeb696ba37406d0d078283da29542a05e Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 7 Aug 2019 16:21:12 +0300
|
||||
Subject: disable ebx on x86.
|
||||
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 6b5ef63..1d9e305 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7284,6 +7284,7 @@ case $target_os in
|
||||
haiku)
|
||||
disable memalign
|
||||
disable posix_memalign
|
||||
+ enabled x86_32 && enabled shared && disable ebx_available
|
||||
;;
|
||||
*-dos|freedos|opendos)
|
||||
if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR__ == 5"; then
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From 984fba03b111be8ad8adf67e131576b198658921 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 7 Aug 2019 16:21:32 +0300
|
||||
Subject: Re-enable memalign for Haiku
|
||||
|
||||
This had been disabled in 2011:
|
||||
https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2011-June/038362.html
|
||||
|
||||
If there are still problems with it we should rather fix them on Haiku
|
||||
side.
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 1d9e305..a619bca 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7282,8 +7282,6 @@ enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pt
|
||||
|
||||
case $target_os in
|
||||
haiku)
|
||||
- disable memalign
|
||||
- disable posix_memalign
|
||||
enabled x86_32 && enabled shared && disable ebx_available
|
||||
;;
|
||||
*-dos|freedos|opendos)
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
From d84c5b8eaa14eb8339d426b4bb8d9a0c36cd4d8b Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Sat, 20 Jun 2020 17:52:36 +0000
|
||||
Subject: Revert libswscale/x86/yuv2rgb: add ssse3 version
|
||||
|
||||
* this reverts fc6a5883d6af8cae0e96af84dda0ad74b360a084
|
||||
* fixes a General protection fault in ff_yuv_420_rgb32_ssse3
|
||||
|
||||
diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
|
||||
index 47f45bd..5452318 100644
|
||||
--- a/libswscale/x86/yuv2rgb.c
|
||||
+++ b/libswscale/x86/yuv2rgb.c
|
||||
@@ -57,13 +57,6 @@
|
||||
#define RENAME(a) a ## _mmxext
|
||||
#include "yuv2rgb_template.c"
|
||||
|
||||
-//SSSE3 versions
|
||||
-#undef RENAME
|
||||
-#undef COMPILE_TEMPLATE_MMXEXT
|
||||
-#define COMPILE_TEMPLATE_MMXEXT 0
|
||||
-#define RENAME(a) a ## _ssse3
|
||||
-#include "yuv2rgb_template.c"
|
||||
-
|
||||
#endif /* HAVE_X86ASM */
|
||||
|
||||
av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
|
||||
@@ -71,35 +64,6 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
|
||||
#if HAVE_X86ASM
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
- if (EXTERNAL_SSSE3(cpu_flags)) {
|
||||
- switch (c->dstFormat) {
|
||||
- case AV_PIX_FMT_RGB32:
|
||||
- if (c->srcFormat == AV_PIX_FMT_YUVA420P) {
|
||||
-#if CONFIG_SWSCALE_ALPHA
|
||||
- return yuva420_rgb32_ssse3;
|
||||
-#endif
|
||||
- break;
|
||||
- } else
|
||||
- return yuv420_rgb32_ssse3;
|
||||
- case AV_PIX_FMT_BGR32:
|
||||
- if (c->srcFormat == AV_PIX_FMT_YUVA420P) {
|
||||
-#if CONFIG_SWSCALE_ALPHA
|
||||
- return yuva420_bgr32_ssse3;
|
||||
-#endif
|
||||
- break;
|
||||
- } else
|
||||
- return yuv420_bgr32_ssse3;
|
||||
- case AV_PIX_FMT_RGB24:
|
||||
- return yuv420_rgb24_ssse3;
|
||||
- case AV_PIX_FMT_BGR24:
|
||||
- return yuv420_bgr24_ssse3;
|
||||
- case AV_PIX_FMT_RGB565:
|
||||
- return yuv420_rgb16_ssse3;
|
||||
- case AV_PIX_FMT_RGB555:
|
||||
- return yuv420_rgb15_ssse3;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
if (EXTERNAL_MMXEXT(cpu_flags)) {
|
||||
switch (c->dstFormat) {
|
||||
case AV_PIX_FMT_RGB24:
|
||||
diff --git a/libswscale/x86/yuv_2_rgb.asm b/libswscale/x86/yuv_2_rgb.asm
|
||||
index 2f0b413..43e63e8 100644
|
||||
--- a/libswscale/x86/yuv_2_rgb.asm
|
||||
+++ b/libswscale/x86/yuv_2_rgb.asm
|
||||
@@ -25,18 +25,11 @@
|
||||
|
||||
SECTION_RODATA
|
||||
|
||||
-; below variables are named like mask_dwXY, which means to preserve dword No.X & No.Y
|
||||
-mask_dw036 : db -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0
|
||||
-mask_dw147 : db 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1
|
||||
-mask_dw25 : db 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0
|
||||
-rgb24_shuf1: db 0, 1, 6, 7, 12, 13, 2, 3, 8, 9, 14, 15, 4, 5, 10, 11
|
||||
-rgb24_shuf2: db 10, 11, 0, 1, 6, 7, 12, 13, 2, 3, 8, 9, 14, 15, 4, 5
|
||||
-rgb24_shuf3: db 4, 5, 10, 11, 0, 1, 6, 7, 12, 13, 2, 3, 8, 9, 14, 15
|
||||
-pw_00ff: times 8 dw 255
|
||||
-pb_f8: times 16 db 248
|
||||
-pb_e0: times 16 db 224
|
||||
-pb_03: times 16 db 3
|
||||
-pb_07: times 16 db 7
|
||||
+pw_00ff: times 4 dw 255
|
||||
+pb_f8: times 8 db 248
|
||||
+pb_e0: times 8 db 224
|
||||
+pb_03: times 8 db 3
|
||||
+pb_07: times 8 db 7
|
||||
|
||||
mask_1101: dw -1, -1, 0, -1
|
||||
mask_0010: dw 0, 0, -1, 0
|
||||
@@ -56,11 +49,7 @@ SECTION .text
|
||||
;-----------------------------------------------------------------------------
|
||||
|
||||
%macro MOV_H2L 1
|
||||
-%if mmsize == 8
|
||||
- psrlq %1, 32
|
||||
-%else ; mmsize == 16
|
||||
- psrldq %1, 8
|
||||
-%endif
|
||||
+psrlq %1, 32
|
||||
%endmacro
|
||||
|
||||
%macro yuv2rgb_fn 3
|
||||
@@ -88,7 +77,6 @@ SECTION .text
|
||||
%define m_blue m1
|
||||
%endif
|
||||
|
||||
-%if mmsize == 8
|
||||
%define time_num 1
|
||||
%define reg_num 8
|
||||
%define y_offset [pointer_c_ditherq + 8 * 8]
|
||||
@@ -99,45 +87,11 @@ SECTION .text
|
||||
%define y_coff [pointer_c_ditherq + 3 * 8]
|
||||
%define ub_coff [pointer_c_ditherq + 5 * 8]
|
||||
%define vr_coff [pointer_c_ditherq + 4 * 8]
|
||||
-%elif mmsize == 16
|
||||
-%define time_num 2
|
||||
-%if ARCH_X86_32
|
||||
-%define reg_num 8
|
||||
-%define my_offset [pointer_c_ditherq + 8 * 8]
|
||||
-%define mu_offset [pointer_c_ditherq + 9 * 8]
|
||||
-%define mv_offset [pointer_c_ditherq + 10 * 8]
|
||||
-%define mug_coff [pointer_c_ditherq + 7 * 8]
|
||||
-%define mvg_coff [pointer_c_ditherq + 6 * 8]
|
||||
-%define my_coff [pointer_c_ditherq + 3 * 8]
|
||||
-%define mub_coff [pointer_c_ditherq + 5 * 8]
|
||||
-%define mvr_coff [pointer_c_ditherq + 4 * 8]
|
||||
-%else ; ARCH_X86_64
|
||||
-%define reg_num 16
|
||||
-%define y_offset m8
|
||||
-%define u_offset m9
|
||||
-%define v_offset m10
|
||||
-%define ug_coff m11
|
||||
-%define vg_coff m12
|
||||
-%define y_coff m13
|
||||
-%define ub_coff m14
|
||||
-%define vr_coff m15
|
||||
-%endif ; ARCH_X86_32/64
|
||||
-%endif ; coeff define mmsize == 8/16
|
||||
|
||||
cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
|
||||
%if ARCH_X86_64
|
||||
movsxd indexq, indexd
|
||||
-%if mmsize == 16
|
||||
- VBROADCASTSD y_offset, [pointer_c_ditherq + 8 * 8]
|
||||
- VBROADCASTSD u_offset, [pointer_c_ditherq + 9 * 8]
|
||||
- VBROADCASTSD v_offset, [pointer_c_ditherq + 10 * 8]
|
||||
- VBROADCASTSD ug_coff, [pointer_c_ditherq + 7 * 8]
|
||||
- VBROADCASTSD vg_coff, [pointer_c_ditherq + 6 * 8]
|
||||
- VBROADCASTSD y_coff, [pointer_c_ditherq + 3 * 8]
|
||||
- VBROADCASTSD ub_coff, [pointer_c_ditherq + 5 * 8]
|
||||
- VBROADCASTSD vr_coff, [pointer_c_ditherq + 4 * 8]
|
||||
-%endif
|
||||
%endif
|
||||
movu m_y, [py_2indexq + 2 * indexq]
|
||||
movh m_u, [pu_indexq + indexq]
|
||||
@@ -154,30 +108,10 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
psllw m1, 3
|
||||
psllw m6, 3
|
||||
psllw m7, 3
|
||||
-%if (ARCH_X86_32 && mmsize == 16)
|
||||
- VBROADCASTSD m2, mu_offset
|
||||
- VBROADCASTSD m3, mv_offset
|
||||
- VBROADCASTSD m4, my_offset
|
||||
- psubsw m0, m2 ; U = U - 128
|
||||
- psubsw m1, m3 ; V = V - 128
|
||||
- psubw m6, m4
|
||||
- psubw m7, m4
|
||||
- VBROADCASTSD m2, mug_coff
|
||||
- VBROADCASTSD m3, mvg_coff
|
||||
- VBROADCASTSD m4, my_coff
|
||||
- VBROADCASTSD m5, mub_coff
|
||||
- pmulhw m2, m0
|
||||
- pmulhw m3, m1
|
||||
- pmulhw m6, m4
|
||||
- pmulhw m7, m4
|
||||
- pmulhw m0, m5
|
||||
- VBROADCASTSD m4, mvr_coff
|
||||
- pmulhw m1, m4
|
||||
-%else ; ARCH_X86_64 || mmsize == 8
|
||||
psubsw m0, u_offset ; U = U - 128
|
||||
psubsw m1, v_offset ; V = V - 128
|
||||
- psubw m6, y_offset
|
||||
- psubw m7, y_offset
|
||||
+ psubw m6, y_offset
|
||||
+ psubw m7, y_offset
|
||||
mova m2, m0
|
||||
mova m3, m1
|
||||
pmulhw m2, ug_coff
|
||||
@@ -186,7 +120,6 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
pmulhw m7, y_coff
|
||||
pmulhw m0, ub_coff
|
||||
pmulhw m1, vr_coff
|
||||
-%endif
|
||||
paddsw m2, m3
|
||||
mova m3, m7
|
||||
mova m5, m7
|
||||
@@ -209,7 +142,6 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
punpcklbw m6, m_red ; B0 R1 B2 R3 B4 R5 B6 R7 B8 R9 ...
|
||||
mova m5, m3
|
||||
punpckhbw m2, m_blue ; G1 B1 G3 B3 G5 B5 G7 B7 G9 B9 ...
|
||||
-%if mmsize == 8
|
||||
punpcklwd m3 ,m6 ; R0 G0 B0 R1 R2 G2 B2 R3
|
||||
punpckhwd m5, m6 ; R4 G4 B4 R5 R6 G6 B6 R7
|
||||
%if cpuflag(mmxext)
|
||||
@@ -245,33 +177,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
psrlq m5, 32
|
||||
movd [imageq + 20], m2 ; -- -- G7 B7
|
||||
movd [imageq + 18], m5 ; R6 G6 B6 R7
|
||||
-%endif ; mmsize = 8
|
||||
-%else ; mmsize == 16
|
||||
- pshufb m3, [rgb24_shuf1] ; r0 g0 r6 g6 r12 g12 r2 g2 r8 g8 r14 g14 r4 g4 r10 g10
|
||||
- pshufb m6, [rgb24_shuf2] ; b10 r11 b0 r1 b6 r7 b12 r13 b2 r3 b8 r9 b14 r15 b4 r5
|
||||
- pshufb m2, [rgb24_shuf3] ; g5 b5 g11 b11 g1 b1 g7 b7 g13 b13 g3 b3 g9 b9 g15 b15
|
||||
- mova m7, [mask_dw036]
|
||||
- mova m4, [mask_dw147]
|
||||
- mova m5, [mask_dw25]
|
||||
- pand m0, m7, m3 ; r0 g0 --- --- --- --- r2 g2 --- --- --- --- r4 g4 --- ---
|
||||
- pand m1, m4, m6 ; --- --- b0 r1 --- --- --- --- b2 r3 --- --- --- --- b4 r5
|
||||
- por m0, m1
|
||||
- pand m1, m5, m2 ; --- --- --- --- g1 b1 --- --- --- --- g3 b3 --- --- --- ---
|
||||
- por m0, m1 ; r0 g0 b0 r1 g1 b1 r2 g2 b2 r3 g3 b3 r4 g4 b4 r5
|
||||
- pand m1, m7, m2 ; g5 b5 --- --- --- --- g7 b7 --- --- --- --- g9 b9 --- ---
|
||||
- pand m7, m6 ; b10 r11 --- --- --- --- b12 r13 --- --- --- --- b14 r15 --- ---
|
||||
- pand m6, m5 ; --- --- --- --- b6 r7 --- --- --- --- b8 r9 --- --- --- ---
|
||||
- por m1, m6
|
||||
- pand m6, m4, m3 ; --- --- r6 g6 --- --- --- --- r8 g8 --- --- --- --- r10 g10
|
||||
- pand m2, m4 ; --- --- g11 b11 --- --- --- --- g13 b13 --- --- --- --- g15 b15
|
||||
- pand m3, m5 ; --- --- --- --- r12 g12 --- --- --- --- r14 g14 --- --- --- ---
|
||||
- por m2, m7
|
||||
- por m1, m6 ; g5 b5 r6 g6 b6 r7 g7 b7 r8 g8 b8 r9 g9 b9 r10 g10
|
||||
- por m2, m3 ; b10 r11 g11 b11 r12 g12 b12 r13 g13 b13 r14 g14 b14 r15 g15 b15
|
||||
- movu [imageq], m0
|
||||
- movu [imageq + 16], m1
|
||||
- movu [imageq + 32], m2
|
||||
-%endif ; mmsize = 16
|
||||
+%endif
|
||||
%else ; PACK RGB15/16/32
|
||||
packuswb m0, m1
|
||||
packuswb m3, m5
|
||||
@@ -290,10 +196,10 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
%endif
|
||||
mova m5, m_blue
|
||||
mova m6, m_red
|
||||
- punpckhbw m5, m_green
|
||||
+ punpckhbw m5, m_green
|
||||
punpcklbw m_blue, m_green
|
||||
- punpckhbw m6, m_alpha
|
||||
- punpcklbw m_red, m_alpha
|
||||
+ punpckhbw m6, m_alpha
|
||||
+ punpcklbw m_red, m_alpha
|
||||
mova m_green, m_blue
|
||||
mova m_alpha, m5
|
||||
punpcklwd m_blue, m_red
|
||||
@@ -301,23 +207,14 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters
|
||||
punpcklwd m5, m6
|
||||
punpckhwd m_alpha, m6
|
||||
movu [imageq + 0], m_blue
|
||||
- movu [imageq + 8 * time_num], m_green
|
||||
+ movu [imageq + 8 * time_num], m_green
|
||||
movu [imageq + 16 * time_num], m5
|
||||
movu [imageq + 24 * time_num], m_alpha
|
||||
%else ; PACK RGB15/16
|
||||
%define depth 2
|
||||
-%if cpuflag(ssse3)
|
||||
- %define red_dither m3
|
||||
- %define green_dither m4
|
||||
- %define blue_dither m5
|
||||
- VBROADCASTSD red_dither, [pointer_c_ditherq + 0 * 8]
|
||||
- VBROADCASTSD green_dither, [pointer_c_ditherq + 1 * 8]
|
||||
- VBROADCASTSD blue_dither, [pointer_c_ditherq + 2 * 8]
|
||||
-%else ; cpuflag(mmx/mmxext)
|
||||
-%define blue_dither [pointer_c_ditherq + 2 * 8]
|
||||
-%define green_dither [pointer_c_ditherq + 1 * 8]
|
||||
-%define red_dither [pointer_c_ditherq + 0 * 8]
|
||||
-%endif
|
||||
+%define blue_dither [pointer_c_ditherq + 2 * 8]
|
||||
+%define green_dither [pointer_c_ditherq + 1 * 8]
|
||||
+%define red_dither [pointer_c_ditherq + 0 * 8]
|
||||
%if %3 == 15
|
||||
%define gmask pb_03
|
||||
%define isRGB15 1
|
||||
@@ -371,13 +268,3 @@ yuv2rgb_fn yuv, rgb, 16
|
||||
INIT_MMX mmxext
|
||||
yuv2rgb_fn yuv, rgb, 24
|
||||
yuv2rgb_fn yuv, bgr, 24
|
||||
-
|
||||
-INIT_XMM ssse3
|
||||
-yuv2rgb_fn yuv, rgb, 24
|
||||
-yuv2rgb_fn yuv, bgr, 24
|
||||
-yuv2rgb_fn yuv, rgb, 32
|
||||
-yuv2rgb_fn yuv, bgr, 32
|
||||
-yuv2rgb_fn yuva, rgb, 32
|
||||
-yuv2rgb_fn yuva, bgr, 32
|
||||
-yuv2rgb_fn yuv, rgb, 15
|
||||
-yuv2rgb_fn yuv, rgb, 16
|
||||
--
|
||||
2.30.2
|
||||
|
||||
79
media-video/ffmpeg/patches/ffmpeg-5.1.patchset
Normal file
79
media-video/ffmpeg/patches/ffmpeg-5.1.patchset
Normal file
@@ -0,0 +1,79 @@
|
||||
From 540379760d2a606b746e1f9ee823123205684ec2 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 7 Aug 2019 16:21:12 +0300
|
||||
Subject: disable ebx on x86.
|
||||
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 9d6457d..f03ca87 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7309,6 +7309,7 @@ case $target_os in
|
||||
haiku)
|
||||
disable memalign
|
||||
disable posix_memalign
|
||||
+ enabled x86_32 && enabled shared && disable ebx_available
|
||||
;;
|
||||
*-dos|freedos|opendos)
|
||||
if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR__ == 5"; then
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
||||
From cbc46662c2d0d4876bec2b78a995b6322c32ff97 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Wed, 7 Aug 2019 16:21:32 +0300
|
||||
Subject: Re-enable memalign for Haiku
|
||||
|
||||
This had been disabled in 2011:
|
||||
https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2011-June/038362.html
|
||||
|
||||
If there are still problems with it we should rather fix them on Haiku
|
||||
side.
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index f03ca87..698b0e5 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7307,8 +7307,6 @@ enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pt
|
||||
|
||||
case $target_os in
|
||||
haiku)
|
||||
- disable memalign
|
||||
- disable posix_memalign
|
||||
enabled x86_32 && enabled shared && disable ebx_available
|
||||
;;
|
||||
*-dos|freedos|opendos)
|
||||
--
|
||||
2.36.1
|
||||
|
||||
|
||||
From 92bf5fe9747fbbfbbba801e0bb861ceb793eaf3d Mon Sep 17 00:00:00 2001
|
||||
From: Ken Mays <kmays2000@gmail.com>
|
||||
Date: Sat, 13 Aug 2022 05:01:14 +0300
|
||||
Subject: Check for SSSE3
|
||||
|
||||
|
||||
diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
|
||||
index 6754062..9ad4f20 100644
|
||||
--- a/libswscale/x86/yuv2rgb.c
|
||||
+++ b/libswscale/x86/yuv2rgb.c
|
||||
@@ -70,6 +70,7 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
|
||||
#if HAVE_X86ASM
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
||||
+#if HAVE_SSSE3
|
||||
if (EXTERNAL_SSSE3(cpu_flags)) {
|
||||
switch (c->dstFormat) {
|
||||
case AV_PIX_FMT_RGB32:
|
||||
@@ -98,6 +99,7 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
|
||||
return yuv420_rgb15_ssse3;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (EXTERNAL_MMXEXT(cpu_flags)) {
|
||||
switch (c->dstFormat) {
|
||||
--
|
||||
2.36.1
|
||||
|
||||
Reference in New Issue
Block a user