From 6472be12a035f99e08fbd133fe257b85ddb2ffd0 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 11 Sep 2014 08:45:29 +0200 Subject: only use kodi, remove xbmc --- package/xbmc/Makefile | 198 - package/xbmc/files/xbmc.init | 30 - package/xbmc/files/xbmc.postinst | 3 - package/xbmc/patches/patch-Makefile_in | 92 - package/xbmc/patches/patch-Makefile_include_in | 10 - package/xbmc/patches/patch-configure_in | 76 - package/xbmc/patches/patch-lib_cpluff_Makefile_am | 11 - package/xbmc/patches/patch-lib_cpluff_autogen_sh | 10 - package/xbmc/patches/patch-lib_cpluff_configure_ac | 11 - .../patches/patch-lib_cpluff_libcpluff_Makefile_am | 11 - package/xbmc/patches/patch-m4_ax_python_devel_m4 | 11 - package/xbmc/patches/patch-tools_Linux_xbmc_sh_in | 82 - package/xbmc/patches/patch-xbmc_Application_cpp | 41 - .../xbmc/patches/xbmc-gotham_rbp_backports.patch | 20665 ------------------- .../powermanagement/linux/LinuxPowerSyscall.cpp | 56 - .../xbmc/powermanagement/linux/LinuxPowerSyscall.h | 45 - 16 files changed, 21352 deletions(-) delete mode 100644 package/xbmc/Makefile delete mode 100644 package/xbmc/files/xbmc.init delete mode 100644 package/xbmc/files/xbmc.postinst delete mode 100644 package/xbmc/patches/patch-Makefile_in delete mode 100644 package/xbmc/patches/patch-Makefile_include_in delete mode 100644 package/xbmc/patches/patch-configure_in delete mode 100644 package/xbmc/patches/patch-lib_cpluff_Makefile_am delete mode 100644 package/xbmc/patches/patch-lib_cpluff_autogen_sh delete mode 100644 package/xbmc/patches/patch-lib_cpluff_configure_ac delete mode 100644 package/xbmc/patches/patch-lib_cpluff_libcpluff_Makefile_am delete mode 100644 package/xbmc/patches/patch-m4_ax_python_devel_m4 delete mode 100644 package/xbmc/patches/patch-tools_Linux_xbmc_sh_in delete mode 100644 package/xbmc/patches/patch-xbmc_Application_cpp delete mode 100644 package/xbmc/patches/xbmc-gotham_rbp_backports.patch delete mode 100644 package/xbmc/src/xbmc/powermanagement/linux/LinuxPowerSyscall.cpp delete mode 100644 package/xbmc/src/xbmc/powermanagement/linux/LinuxPowerSyscall.h (limited to 'package/xbmc') diff --git a/package/xbmc/Makefile b/package/xbmc/Makefile deleted file mode 100644 index 25c82297a..000000000 --- a/package/xbmc/Makefile +++ /dev/null @@ -1,198 +0,0 @@ -# This file is part of the OpenADK project. OpenADK is copyrighted -# material, please see the LICENCE file in the top-level directory. - -include $(ADK_TOPDIR)/rules.mk - -PKG_NAME:= xbmc -PKG_VERSION:= 13.2 -PKG_RELEASE:= 1 -PKG_MD5SUM:= d80153b2cc78b88966458ab136e9494f -PKG_DESCR:= software media player -PKG_SECTION:= mm/video -PKG_DEPENDS:= boost python2 libstdcxx glibc-gconv -PKG_DEPENDS+= libglew mesalib libass libmpeg2 libmad libdbus -PKG_DEPENDS+= libjpeg-turbo libogg libvorbis libmodplug libcurl -PKG_DEPENDS+= libflac libopenssl libbz2 libtiff liblzo -PKG_DEPENDS+= yajl tinyxml libsqlite libpcrecpp libpng libncurses -PKG_DEPENDS+= libpcre libcdio libfreetype libsamplerate -PKG_DEPENDS+= taglib libjasper libmp3lame libmicrohttpd -PKG_DEPENDS+= libgpg-error libudev python2-mod-sqlite -PKG_DEPENDS+= libxslt libvorbisenc alsa-lib glib libglu librt -PKG_BUILDDEP:= boost python2 mesalib libglew libass -PKG_BUILDDEP+= libmpeg2 libmad libjpeg-turbo libogg libvorbis -PKG_BUILDDEP+= curl flac openssl bzip2 libtiff liblzo yajl -PKG_BUILDDEP+= tinyxml sqlite pcre libpng libcdio freetype -PKG_BUILDDEP+= libsamplerate taglib libjasper lame libmicrohttpd -PKG_BUILDDEP+= eudev alsa-lib glib glu libmodplug -PKG_BUILDDEP+= libgpg-error dbus libxslt libvorbis -PKG_BUILDDEP+= swig-host sdl-host sdl-image-host liblzo-host -PKG_BUILDDEP+= zip-host unzip-host -PKG_URL:= http://xbmc.org/ -PKG_SITES:= https://github.com/xbmc/xbmc/archive/ - -DISTFILES:= ${PKG_VERSION}-Gotham.tar.gz -WRKDIST= $(WRKDIR)/$(PKG_NAME)-${PKG_VERSION}-Gotham - -PKG_FLAVOURS_XBMC:= WITH_SMB WITH_NFS WITH_SSH WITH_AVAHI WITH_CEC -PKG_FLAVOURS_XBMC+= WITH_AFP WITH_WEBSERVER WITH_RTMP WITH_BLURAY - -PKGFD_WITH_SMB:= enable samba support -PKGFB_WITH_SMB:= samba -PKGFS_WITH_SMB:= samba-lib -PKGFD_WITH_NFS:= enable nfs support -PKGFB_WITH_NFS:= libnfs -PKGFS_WITH_NFS:= libnfs -PKGFD_WITH_SSH:= enable ssh support -PKGFB_WITH_SSH:= libssh -PKGFS_WITH_SSH:= libssh -PKGFD_WITH_AVAHI:= enable avahi support -PKGFB_WITH_AVAHI:= avahi -PKGFS_WITH_AVAHI:= libavahi -PKGFD_WITH_CEC:= enable cec support -PKGFB_WITH_CEC:= libcec -PKGFS_WITH_CEC:= libcec -PKGFD_WITH_AFP:= enable afp support -PKGFB_WITH_AFP:= afpfs-ng -PKGFS_WITH_AFP:= libafpclient -PKGFD_WITH_RTMP:= enable rtmp support -PKGFB_WITH_RTMP:= rtmpdump -PKGFS_WITH_RTMP:= librtmp -PKGFD_WITH_BLURAY:= enable bluray support -PKGFB_WITH_BLURAY:= libbluray -PKGFS_WITH_BLURAY:= libbluray -PKGFD_WITH_WEBSERVER:= enable internal webserver support - -PKG_DEPENDS_IBM_X40:= libsdl libsdl-image libxshmfence libx11 libxext libxt libsm libice -PKG_DEPENDS_VBOX_X86:= libsdl libsdl-image libxshmfence libx11 libxext libxt libsm libice -PKG_BUILDDEP_IBM_X40:= nasm-host sdl sdl-image -PKG_BUILDDEP_VBOX_X86:= nasm-host sdl sdl-image -PKG_DEPENDS_RASPBERRY_PI:= bcm2835-vc -PKG_BUILDDEP_RASPBERRY_PI:= bcm2835-vc -PKG_SYSTEM_DEPENDS:= raspberry-pi ibm-x40 vbox-x86 - -DIFF_IGNOREFILES:= configure missing depcomp install-sh INSTALL \ - aclocal.m4 config.h.in - -include $(ADK_TOPDIR)/mk/package.mk - -$(eval $(call PKG_template,XBMC,xbmc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -HOST_CXXFLAGS+= $(HOST_CPPFLAGS) -XAKE_FLAGS+= V=1 TIXML_USE_STL=1 GCC_HONOUR_COPTS=s -TARGET_CPPFLAGS+= -I. -I./utils \ - -I$(STAGING_TARGET_DIR)/usr/include/afpfs-ng \ - -DTIXML_USE_STL=1 -DHAS_SIMPLEPM=1 -DLINUX - -ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) -TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/opt/vc/include \ - -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vcos/pthreads \ - -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vmcs_host/linux -TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/opt/vc/lib -lkhrn_static -endif - -AUTOTOOL_STYLE:= autoreconf -CONFIGURE_ENV+= DESTDIR='${WRKINST}' \ - TEXTUREPACKER_NATIVE_ROOT='$(STAGING_HOST_DIR)/usr' -CONFIGURE_ARGS+= --disable-optical-drive \ - --disable-optimizations \ - --disable-mysql \ - --disable-rsxs \ - --disable-projectm \ - --disable-crystalhd \ - --disable-mdnsembedded \ - --disable-libusb \ - --disable-libcap \ - --disable-joystick \ - --disable-dvdcss \ - --disable-debug \ - --disable-gtest \ - --disable-ccache \ - --disable-wayland \ - --disable-pulse \ - --disable-mid \ - --enable-alsa \ - --enable-libmp3lame \ - --enable-libvorbisenc \ - --enable-udev \ - --enable-external-libraries - -ifneq ($(ADK_PACKAGE_XBMC_WITH_BLURAY),) -CONFIGURE_ARGS+= --enable-libbluray -else -CONFIGURE_ARGS+= --disable-libbluray -endif -ifneq ($(ADK_PACKAGE_XBMC_WITH_AFP),) -CONFIGURE_ARGS+= --enable-afpclient -else -CONFIGURE_ARGS+= --disable-afpclient -endif -ifneq ($(ADK_PACKAGE_XBMC_WITH_SMB),) -CONFIGURE_ARGS+= --enable-samba -else -CONFIGURE_ARGS+= --disable-samba -endif -ifneq ($(ADK_PACKAGE_XBMC_WITH_SSH),) -CONFIGURE_ARGS+= --enable-ssh -else -CONFIGURE_ARGS+= --disable-ssh -endif -ifneq ($(ADK_PACKAGE_XBMC_WITH_NFS),) -CONFIGURE_ARGS+= --enable-nfs -else -CONFIGURE_ARGS+= --disable-nfs -endif -ifneq ($(ADK_PACKAGE_XBMC_WITH_CEC),) -CONFIGURE_ARGS+= --enable-libcec -else -CONFIGURE_ARGS+= --disable-libcec -endif -ifneq ($(ADK_PACKAGE_XBMC_WITH_RTMP),) -CONFIGURE_ARGS+= --enable-rtmp -else -CONFIGURE_ARGS+= --disable-rtmp -endif -ifneq ($(ADK_PACKAGE_XBMC_WITH_AVAHI),) -CONFIGURE_ARGS+= --enable-avahi -else -CONFIGURE_ARGS+= --disable-avahi -endif -ifneq ($(ADK_PACKAGE_XBMC_WITH_WEBSERVER),) -CONFIGURE_ARGS+= --enable-webserver -else -CONFIGURE_ARGS+= --disable-webserver -endif - -ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y) -CONFIGURE_ARGS+= --with-platform=raspberry-pi \ - --enable-player=omxplayer \ - --enable-gles \ - --disable-sdl \ - --disable-x11 -else -ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y) -CONFIGURE_ARGS+= --disable-x11 \ - --disable-sdl \ - --disable-gles \ - --enable-neon \ - --enable-codec=imxvpu -else -CONFIGURE_ARGS+= --enable-x11 \ - --enable-sdl -endif -endif - -pre-configure: - (cd $(WRKBUILD)/lib/cpluff && env PATH=$(AUTOTOOL_PATH) ./autogen.sh) - -xbmc-install: - $(INSTALL_DIR) $(IDIR_XBMC)/usr/lib/xbmc/addons - $(CP) $(WRKINST)/usr/lib/xbmc/* \ - $(IDIR_XBMC)/usr/lib/xbmc - $(INSTALL_DIR) $(IDIR_XBMC)/usr/share/xbmc - $(CP) $(WRKINST)/usr/share/xbmc/* \ - $(IDIR_XBMC)/usr/share/xbmc - $(INSTALL_DIR) $(IDIR_XBMC)/usr/bin - $(INSTALL_BIN) $(WRKINST)/usr/bin/xbmc \ - $(IDIR_XBMC)/usr/bin - -include ${ADK_TOPDIR}/mk/pkg-bottom.mk diff --git a/package/xbmc/files/xbmc.init b/package/xbmc/files/xbmc.init deleted file mode 100644 index bbe65c1c2..000000000 --- a/package/xbmc/files/xbmc.init +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -#PKG xbmc -#INIT 95 - -. /etc/rc.conf - -case $1 in -autostop) ;; -autostart) - test x"${xbmc:-NO}" = x"NO" && exit 0 - test x"$xbmc" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start - exec sh $0 start - ;; -start) - export LD_LIBRARY_PATH=/opt/vc/lib - xbmc & - ;; -stop) - kill $(pgrep -f /usr/lib/xbmc/xbmc.bin) - ;; -restart) - sh $0 stop - sh $0 start - ;; -*) - echo "Usage: $0 {start | stop | restart}" - exit 1 - ;; -esac -exit $? diff --git a/package/xbmc/files/xbmc.postinst b/package/xbmc/files/xbmc.postinst deleted file mode 100644 index 45274da68..000000000 --- a/package/xbmc/files/xbmc.postinst +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -. $IPKG_INSTROOT/etc/functions.sh -add_rcconf xbmc NO diff --git a/package/xbmc/patches/patch-Makefile_in b/package/xbmc/patches/patch-Makefile_in deleted file mode 100644 index e2c85f7a2..000000000 --- a/package/xbmc/patches/patch-Makefile_in +++ /dev/null @@ -1,92 +0,0 @@ ---- xbmc-13.1.orig/Makefile.in 2014-06-12 10:26:27.000000000 +0200 -+++ xbmc-13.1/Makefile.in 2014-06-26 15:18:53.463409058 +0200 -@@ -191,13 +191,7 @@ ifeq (@USE_LIBAV_HACKS@,1) - DIRECTORY_ARCHIVES += lib/xbmc-libav-hacks/dll-libavhacks.a - endif - --PAPCODECS_DIRS= \ -- lib/nosefart \ -- lib/timidity \ -- lib/libsidplay2 \ -- lib/stsound/StSoundLibrary \ -- lib/snesapu/SNES/SNESAPU \ -- lib/vgmstream -+PAPCODECS_DIRS= - - ifeq (@USE_ASAP_CODEC@,1) - PAPCODECS_DIRS+= \ -@@ -419,21 +413,11 @@ libhdhomerun: dllloader - $(MAKE) -C lib/libhdhomerun - papcodecs: dllloader dvdpcodecs - test -d system/players/paplayer || mkdir system/players/paplayer -- $(MAKE) -C lib/vgmstream -- $(MAKE) -C lib/timidity -- $(MAKE) -C lib/nosefart --ifneq ($(findstring arm-osx,@ARCH@), arm-osx) -- $(MAKE) -C lib/libsidplay2 --endif - ifeq (@USE_ASAP_CODEC@,1) - ifneq ($(findstring osx,@ARCH@), osx) - $(MAKE) -C lib/asap asap-xbmc - endif - endif -- $(MAKE) -C lib/stsound/StSoundLibrary --ifeq ($(or $(findstring powerpc,@ARCH@),$(findstring x86_64-linux,@ARCH@),$(findstring arm, @ARCH@),$(findstring freebsd,@ARCH@)),) -- $(MAKE) -C lib/snesapu/SNES/SNESAPU --endif - imagelib: dllloader - $(MAKE) -C lib/cximage-6.0 - -@@ -586,25 +570,7 @@ install-arch: - ifeq (@USE_PVR_ADDONS@,1) - $(MAKE) -C pvr-addons install - endif --ifeq ($(findstring freebsd,@ARCH@), freebsd) -- @find -E system addons -type f -not -iregex ".*svn.*" \ -- -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \ -- -exec sh -c "install -d \"$(DESTDIR)$(libdir)/xbmc/\`dirname '{}'\`\"" \; \ -- -and \ -- -exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \ -- -exec printf " -- %-75.75s\r" "{}" \; --else --ifeq ($(findstring Darwin,$(shell uname -s)),Darwin) -- @find -E system addons -type f -not -iregex ".*svn.*" \ -- -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs" \ -- -exec sh -c "install -d \"$(DESTDIR)$(libdir)/xbmc/\`dirname '{}'\`\"" \; \ -- -and \ -- -exec install "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; \ -- -exec printf " -- %-75.75s\r" "{}" \; --else - @find system addons -regextype posix-extended -type f -not -iregex ".*svn.*" -iregex ".*\.so|.*\.vis|.*\.xbs|.*\.pvr" -exec install -D "{}" $(DESTDIR)$(libdir)/xbmc/"{}" \; -printf " -- %-75.75f\r" --endif --endif - - install-scripts: - @install -d $(DESTDIR)$(bindir) -@@ -624,26 +590,7 @@ install-datas: install-scripts - @echo "Done!" - @echo "Copying system files to $(DESTDIR)$(datarootdir)/xbmc" - @install -d $(DESTDIR)$(datarootdir)/xbmc -- @# Arch independent files --ifeq ($(findstring bsd,@ARCH@), bsd) -- @find -E addons language media sounds userdata system -type f \ -- -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll|$(subst ${space},|,$(INSTALL_FILTER))" \ -- -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/xbmc/\`dirname '{}'\`\"" \; \ -- -and \ -- -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \ -- -exec printf " -- %-75.75s\r" "{}" \; --else --ifeq ($(findstring Darwin,$(shell uname -s)),Darwin) -- @find -E addons language media sounds userdata system -type f \ -- -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll|$(subst ${space},|,$(INSTALL_FILTER))" \ -- -exec sh -c "install -d \"$(DESTDIR)$(datarootdir)/xbmc/\`dirname '{}'\`\"" \; \ -- -and \ -- -exec install -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; \ -- -exec printf " -- %-75.75s\r" "{}" \; --else - @find addons language media sounds userdata system -regextype posix-extended -type f -not -iregex ".*@ARCH@.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll|.*\.pvr|$(subst ${space},|,$(INSTALL_FILTER))" -exec install -D -m 0644 "{}" $(DESTDIR)$(datarootdir)/xbmc/"{}" \; -printf " -- %-75.75f\r" --endif --endif - @# Icons and links - @install -d $(DESTDIR)$(datarootdir)/applications - @install tools/Linux/xbmc.desktop $(DESTDIR)$(datarootdir)/applications/xbmc.desktop diff --git a/package/xbmc/patches/patch-Makefile_include_in b/package/xbmc/patches/patch-Makefile_include_in deleted file mode 100644 index d73f62de2..000000000 --- a/package/xbmc/patches/patch-Makefile_include_in +++ /dev/null @@ -1,10 +0,0 @@ ---- xbmc-13.1.orig/Makefile.include.in 2014-06-08 08:40:24.000000000 +0200 -+++ xbmc-13.1/Makefile.include.in 2014-06-11 13:17:49.354722974 +0200 -@@ -37,6 +37,7 @@ CFLAGS+=@CFLAGS@ - CFLAGS_FOR_BUILD+=@CFLAGS_FOR_BUILD@ - LDFLAGS+=@LDFLAGS@ - LDFLAGS_FOR_BUILD+=@LDFLAGS_FOR_BUILD@ -+INCLUDES+=@CPPFLAGS@ - INCLUDES+=-I@abs_top_srcdir@/lib - INCLUDES+=-I@abs_top_srcdir@/xbmc - INCLUDES+=-I@abs_top_srcdir@/addons/library.xbmc.gui diff --git a/package/xbmc/patches/patch-configure_in b/package/xbmc/patches/patch-configure_in deleted file mode 100644 index ed9d8fa83..000000000 --- a/package/xbmc/patches/patch-configure_in +++ /dev/null @@ -1,76 +0,0 @@ ---- xbmc-13.1.orig/configure.in 2014-06-12 10:25:21.000000000 +0200 -+++ xbmc-13.1/configure.in 2014-06-26 20:29:26.343281621 +0200 -@@ -601,7 +601,7 @@ MAKE="${MAKE:-make}" - OBJDUMP="${OBJDUMP:-objdump}" - - use_external_ffmpeg=no --use_static_ffmpeg=no -+use_static_ffmpeg=yes - - # ffmpeg needs the output of uname -s (e.x. linux, darwin) for the target_os - # there is no autoconf variable which will give -@@ -609,7 +609,7 @@ use_static_ffmpeg=no - # so we have to use our own var here - # defaults to the build side target_os - # and should be overridden for cross below (see android) --ffmpeg_target_os=$(tolower $(uname -s)) -+ffmpeg_target_os=linux - - # host detection and setup - case $host in -@@ -626,7 +626,7 @@ case $host in - use_x11=no - build_shared_lib=yes - ;; -- i*86*-linux-gnu*|i*86*-*-linux-uclibc*) -+ i*86*-linux-*) - ARCH="i486-linux" - if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then - use_arch="x86" -@@ -634,7 +634,7 @@ case $host in - fi - use_static_ffmpeg=yes - ;; -- x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*) -+ x86_64-*-linux-*) - ARCH="x86_64-linux" - if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then - use_arch="x86_64" -@@ -680,13 +680,13 @@ case $host in - ARCH="powerpc-osx" - use_arch="ppc" - ;; -- powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*) -+ powerpc-*-linux-*) - ARCH="powerpc-linux" - ;; -- powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*) -+ powerpc64-*-linux-*) - ARCH="powerpc64-linux" - ;; -- arm*-*-linux-gnu*|arm*-*-linux-uclibc*) -+ arm*-*-linux-*) - ARCH="arm" - use_arch="arm" - ffmpeg_target_os=linux -@@ -1048,7 +1048,7 @@ if test "$use_gles" = "yes"; then - AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."]) - AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."]) - AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.) -- LIBS="$LIBS -lEGL -lGLESv2 -lbcm_host -lvcos -lvchiq_arm" -+ LIBS="$LIBS -lEGL -lGLESv2 -lbcm_host -lvcos -lvchiq_arm -lkhrn_static -lpthread -lm" - else - AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library)) - AC_CHECK_LIB([GLESv2],[main],, AC_MSG_ERROR($missing_library)) -@@ -2532,11 +2532,8 @@ OUTPUT_FILES="Makefile \ - xbmc/cores/AudioEngine/Makefile \ - xbmc/cores/paplayer/Makefile \ - xbmc/cores/omxplayer/Makefile \ -- lib/timidity/Makefile \ - lib/asap/Makefile \ -- lib/nosefart/Makefile \ - lib/libsidplay2/Makefile \ -- lib/vgmstream/Makefile \ - lib/snesapu/SNES/SNESAPU/Makefile \ - lib/stsound/StSoundLibrary/Makefile \ - xbmc/cores/playercorefactory/Makefile \ diff --git a/package/xbmc/patches/patch-lib_cpluff_Makefile_am b/package/xbmc/patches/patch-lib_cpluff_Makefile_am deleted file mode 100644 index fb70c6993..000000000 --- a/package/xbmc/patches/patch-lib_cpluff_Makefile_am +++ /dev/null @@ -1,11 +0,0 @@ ---- xbmc-13.0rc1.orig/lib/cpluff/Makefile.am 2014-04-30 15:43:53.000000000 +0200 -+++ xbmc-13.0rc1/lib/cpluff/Makefile.am 2014-05-05 13:03:15.329450196 +0200 -@@ -6,7 +6,7 @@ - - ACLOCAL_AMFLAGS = -I m4 - --SUBDIRS = libcpluff loader console po test docsrc doc -+SUBDIRS = libcpluff loader console test docsrc doc - DIST_SUBDIRS = $(SUBDIRS) examples - - EXTRA_DIST = COPYRIGHT.txt INSTALL.txt ChangeLog.txt Roadmap.txt autogen.sh plugin.xsd diff --git a/package/xbmc/patches/patch-lib_cpluff_autogen_sh b/package/xbmc/patches/patch-lib_cpluff_autogen_sh deleted file mode 100644 index 24a84ea38..000000000 --- a/package/xbmc/patches/patch-lib_cpluff_autogen_sh +++ /dev/null @@ -1,10 +0,0 @@ ---- xbmc-13.0rc1.orig/lib/cpluff/autogen.sh 2014-04-30 15:43:53.000000000 +0200 -+++ xbmc-13.0rc1/lib/cpluff/autogen.sh 2014-05-05 12:15:29.307227206 +0200 -@@ -15,7 +15,6 @@ fi - - # Generate files in top level directory - cd "$basedir" --autopoint - rm -f ABOUT-NLS - test -d auxliary || mkdir auxliary - libtoolize --automake -f diff --git a/package/xbmc/patches/patch-lib_cpluff_configure_ac b/package/xbmc/patches/patch-lib_cpluff_configure_ac deleted file mode 100644 index d38754bfd..000000000 --- a/package/xbmc/patches/patch-lib_cpluff_configure_ac +++ /dev/null @@ -1,11 +0,0 @@ ---- xbmc-13.0rc1.orig/lib/cpluff/configure.ac 2014-04-30 15:43:53.000000000 +0200 -+++ xbmc-13.0rc1/lib/cpluff/configure.ac 2014-05-05 13:03:32.437577723 +0200 -@@ -46,8 +46,6 @@ AC_SUBST([CP_CXX_LIB_VERSION]) - # ----------------------- - AM_INIT_AUTOMAKE([foreign]) - m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) --AM_GNU_GETTEXT([external]) --AM_GNU_GETTEXT_VERSION([0.16.1]) - - # C/C++ compiler settings - # ------------------- diff --git a/package/xbmc/patches/patch-lib_cpluff_libcpluff_Makefile_am b/package/xbmc/patches/patch-lib_cpluff_libcpluff_Makefile_am deleted file mode 100644 index ffa9a1529..000000000 --- a/package/xbmc/patches/patch-lib_cpluff_libcpluff_Makefile_am +++ /dev/null @@ -1,11 +0,0 @@ ---- xbmc-13.0rc1.orig/lib/cpluff/libcpluff/Makefile.am 2014-04-30 15:43:53.000000000 +0200 -+++ xbmc-13.0rc1/lib/cpluff/libcpluff/Makefile.am 2014-05-05 13:53:11.766461900 +0200 -@@ -6,7 +6,7 @@ - - SUBDIRS = docsrc - --LIBS = @LIBS_LIBCPLUFF@ @LTLIBINTL@ @LIBS@ -+LIBS = @LIBS_LIBCPLUFF@ @LIBS@ - - CPPFLAGS = @CPPFLAGS@ - CPPFLAGS += -I. -DCP_C_API=CP_EXPORT -DCP_HOST="\"$(host)\"" -DCP_DATADIR="\"$(datadir)\"" diff --git a/package/xbmc/patches/patch-m4_ax_python_devel_m4 b/package/xbmc/patches/patch-m4_ax_python_devel_m4 deleted file mode 100644 index ded81dbd5..000000000 --- a/package/xbmc/patches/patch-m4_ax_python_devel_m4 +++ /dev/null @@ -1,11 +0,0 @@ ---- xbmc-13.0rc1.orig/m4/ax_python_devel.m4 2014-04-30 15:43:58.000000000 +0200 -+++ xbmc-13.0rc1/m4/ax_python_devel.m4 2014-05-02 08:03:10.000000000 +0200 -@@ -298,7 +298,7 @@ EOD` - # save current global flags - ac_save_LIBS="$LIBS" - ac_save_CPPFLAGS="$CPPFLAGS" -- LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS" -+ LIBS="$ac_save_LIBS $PYTHON_LDFLAGS" - CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" - AC_LANG_PUSH([C]) - AC_LINK_IFELSE([ diff --git a/package/xbmc/patches/patch-tools_Linux_xbmc_sh_in b/package/xbmc/patches/patch-tools_Linux_xbmc_sh_in deleted file mode 100644 index f430c5af9..000000000 --- a/package/xbmc/patches/patch-tools_Linux_xbmc_sh_in +++ /dev/null @@ -1,82 +0,0 @@ ---- xbmc-24032014.orig/tools/Linux/xbmc.sh.in 2014-03-24 15:52:52.000000000 +0100 -+++ xbmc-24032014/tools/Linux/xbmc.sh.in 2014-03-27 11:42:33.985822969 +0100 -@@ -23,7 +23,7 @@ prefix="@prefix@" - exec_prefix="@exec_prefix@" - datarootdir="@datarootdir@" - LIBDIR="@libdir@" --CRASHLOG_DIR=${CRASHLOG_DIR:-$HOME} -+CRASHLOG_DIR=/tmp/xbmc - - # Check for some options used by this script - while [ "$#" -gt "0" ] -@@ -42,7 +42,7 @@ done - single_stacktrace() - { - # core filename is either "core.$PID" or "core" -- find "$1" -maxdepth $2 -name 'core*' | while read core; do -+ find "$1" -name 'core*' | while read core; do - LC_ALL=C gdb --core="$core" --batch 2> /dev/null | grep -q "^Core was generated by \`$LIBDIR/xbmc/xbmc.bin" || continue - echo "=====> Core file: "$core" ($(stat -c%y "$core"))" >> $FILE - echo " =========================================" >> $FILE -@@ -64,33 +64,14 @@ print_crash_report() - uname -m >> $FILE - echo -n " Kernel: " >> $FILE - uname -rvs >> $FILE -- echo -n " Release: " >> $FILE -- if [ -f /etc/os-release ]; then -- . /etc/os-release -- echo $NAME $VERSION >> $FILE -- elif which lsb_release > /dev/null; then -- echo >> $FILE -- lsb_release -a 2> /dev/null | sed -e 's/^/ /' >> $FILE -- else -- echo "lsb_release not available" >> $FILE -- fi - echo "############## END SYSTEM INFO ##############" >> $FILE - echo >> $FILE - echo "############### STACK TRACE #################" >> $FILE - if which gdb >/dev/null 2>&1; then -- if which systemd-coredumpctl &> /dev/null; then -- systemd-coredumpctl dump -o core xbmc.bin &> /dev/null -- fi -- single_stacktrace "$PWD" 1 -+ single_stacktrace "$PWD" - # Find in plugins directories -- if [ $XBMC_HOME ]; then -- BASEDIR=$XBMC_HOME -- else -- BASEDIR="$LIBDIR/xbmc/" -- fi -- single_stacktrace "$BASEDIR" 5 -- # find in user xbmc dir -- single_stacktrace $HOME/.xbmc/ 5 -+ BASEDIR="$LIBDIR/xbmc/" -+ single_stacktrace "$BASEDIR" - else - echo "gdb not installed, can't get stack trace." >> $FILE - fi -@@ -98,9 +79,9 @@ print_crash_report() - echo >> $FILE - echo "################# LOG FILE ##################" >> $FILE - echo >> $FILE -- if [ -f ~/.xbmc/temp/xbmc.log ] -+ if [ -f /tmp/xbmc/xbmc.log ] - then -- cat ~/.xbmc/temp/xbmc.log >> $FILE -+ cat /tmp/xbmc/xbmc.log >> $FILE - echo >> $FILE - else - echo "Logfile not found in the usual place." >> $FILE -@@ -114,12 +95,6 @@ print_crash_report() - echo "Crash report available at $FILE" - } - --python @datadir@/xbmc/FEH.py $SAVED_ARGS --RET=$? --if [ $RET -ne 0 ]; then -- exit $RET --fi -- - if which gdb >/dev/null 2>&1; then - # Output warning in case ulimit is unsupported by shell - eval ulimit -c unlimited diff --git a/package/xbmc/patches/patch-xbmc_Application_cpp b/package/xbmc/patches/patch-xbmc_Application_cpp deleted file mode 100644 index 906ba1222..000000000 --- a/package/xbmc/patches/patch-xbmc_Application_cpp +++ /dev/null @@ -1,41 +0,0 @@ ---- xbmc-13.1.orig/xbmc/Application.cpp 2014-06-08 08:40:26.000000000 +0200 -+++ xbmc-13.1/xbmc/Application.cpp 2014-06-08 09:42:40.232780377 +0200 -@@ -682,7 +682,7 @@ bool CApplication::Create() - - if (!CLog::Init(CSpecialProtocol::TranslatePath(g_advancedSettings.m_logFolder).c_str())) - { -- fprintf(stderr,"Could not init logging classes. Permission errors on ~/.xbmc (%s)\n", -+ fprintf(stderr,"Could not init logging classes. Permission errors on %s\n", - CSpecialProtocol::TranslatePath(g_advancedSettings.m_logFolder).c_str()); - return false; - } -@@ -1085,10 +1085,13 @@ bool CApplication::InitDirectoriesLinux( - userName = "root"; - - CStdString userHome; -+ userHome = "/data/xbmc"; -+/* - if (getenv("HOME")) - userHome = getenv("HOME"); - else - userHome = "/root"; -+*/ - - CStdString xbmcBinPath, xbmcPath; - CUtil::GetHomePath(xbmcBinPath, "XBMC_BIN_HOME"); -@@ -1120,11 +1123,11 @@ bool CApplication::InitDirectoriesLinux( - // map our special drives - CSpecialProtocol::SetXBMCBinPath(xbmcBinPath); - CSpecialProtocol::SetXBMCPath(xbmcPath); -- CSpecialProtocol::SetHomePath(userHome + "/.xbmc"); -- CSpecialProtocol::SetMasterProfilePath(userHome + "/.xbmc/userdata"); -+ CSpecialProtocol::SetHomePath(userHome); -+ CSpecialProtocol::SetMasterProfilePath(userHome + "/userdata"); - -- CStdString strTempPath = userHome; -- strTempPath = URIUtils::AddFileToFolder(strTempPath, ".xbmc/temp"); -+ CStdString strTempPath = "/tmp"; -+ strTempPath = URIUtils::AddFileToFolder(strTempPath, "/xbmc"); - if (getenv("XBMC_TEMP")) - strTempPath = getenv("XBMC_TEMP"); - CSpecialProtocol::SetTempPath(strTempPath); diff --git a/package/xbmc/patches/xbmc-gotham_rbp_backports.patch b/package/xbmc/patches/xbmc-gotham_rbp_backports.patch deleted file mode 100644 index 9a4772437..000000000 --- a/package/xbmc/patches/xbmc-gotham_rbp_backports.patch +++ /dev/null @@ -1,20665 +0,0 @@ -From 1353d8feca19f2f84019797942d70864054db1b0 Mon Sep 17 00:00:00 2001 -From: Ben Avison -Date: Mon, 5 Aug 2013 13:12:46 +0100 -Subject: [PATCH 01/94] h264_parser: Initialize the h264dsp context in the - parser as well -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Each AVStream struct for an H.264 elementary stream actually has two -copies of the H264DSPContext struct (and in fact all the other members -of H264Context as well): - -((H264Context *) ((AVStream *)st)->codec->priv_data)->h264dsp -((H264Context *) ((AVStream *)st)->parser->priv_data)->h264dsp - -but only the first of these was actually being initialised. This -prevented the addition of platform-specific implementations of -parser-related functions. - -Signed-off-by: Martin Storsjö ---- - lib/ffmpeg/libavcodec/h264_parser.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/ffmpeg/libavcodec/h264_parser.c b/lib/ffmpeg/libavcodec/h264_parser.c -index aff9ba1..a732f79 100644 ---- a/lib/ffmpeg/libavcodec/h264_parser.c -+++ b/lib/ffmpeg/libavcodec/h264_parser.c -@@ -386,6 +386,7 @@ static int init(AVCodecParserContext *s) - H264Context *h = s->priv_data; - h->thread_context[0] = h; - h->slice_context_count = 1; -+ ff_h264dsp_init(&h->h264dsp, 8, 1); - return 0; - } - --- -1.9.3 - - -From 7ea2cb68f6fb1149fce70854e36ed6357a267238 Mon Sep 17 00:00:00 2001 -From: Ben Avison -Date: Mon, 5 Aug 2013 13:12:47 +0100 -Subject: [PATCH 02/94] h264dsp: Factorize code into a new function, - h264_find_start_code_candidate -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This performs the start code search which was previously part of -h264_find_frame_end() - the most CPU intensive part of the function. - -By itself, this results in a performance regression: - Before After - Mean StdDev Mean StdDev Change -Overall time 2925.6 26.2 3068.5 31.7 -4.7% - -but this can more than be made up for by platform-optimised -implementations of the function. - -Signed-off-by: Martin Storsjö ---- - lib/ffmpeg/libavcodec/h264_parser.c | 20 +++----------------- - lib/ffmpeg/libavcodec/h264dsp.c | 29 +++++++++++++++++++++++++++++ - lib/ffmpeg/libavcodec/h264dsp.h | 9 +++++++++ - 3 files changed, 41 insertions(+), 17 deletions(-) - -diff --git a/lib/ffmpeg/libavcodec/h264_parser.c b/lib/ffmpeg/libavcodec/h264_parser.c -index a732f79..972aace 100644 ---- a/lib/ffmpeg/libavcodec/h264_parser.c -+++ b/lib/ffmpeg/libavcodec/h264_parser.c -@@ -62,23 +62,9 @@ static int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_si - } - - if(state==7){ --#if HAVE_FAST_UNALIGNED -- /* we check ih264dsp.h264_find_start_code_candidate(buf + i, buf_size - i); -+ if (i < buf_size) -+ state = 2; - } - }else if(state<=2){ - if(buf[i]==1) state^= 5; //2->7, 1->4, 0->5 -diff --git a/lib/ffmpeg/libavcodec/h264dsp.c b/lib/ffmpeg/libavcodec/h264dsp.c -index da9e417..b7d61cd 100644 ---- a/lib/ffmpeg/libavcodec/h264dsp.c -+++ b/lib/ffmpeg/libavcodec/h264dsp.c -@@ -60,6 +60,34 @@ - #include "h264addpx_template.c" - #undef BIT_DEPTH - -+static int h264_find_start_code_candidate_c(const uint8_t *buf, int size) -+{ -+ int i = 0; -+#if HAVE_FAST_UNALIGNED -+ /* we check i < size instead of i + 3 / 7 because it is -+ * simpler and there must be FF_INPUT_BUFFER_PADDING_SIZE -+ * bytes at the end. -+ */ -+#if HAVE_FAST_64BIT -+ while (i < size && -+ !((~*(const uint64_t *)(buf + i) & -+ (*(const uint64_t *)(buf + i) - 0x0101010101010101ULL)) & -+ 0x8080808080808080ULL)) -+ i += 8; -+#else -+ while (i < size && -+ !((~*(const uint32_t *)(buf + i) & -+ (*(const uint32_t *)(buf + i) - 0x01010101U)) & -+ 0x80808080U)) -+ i += 4; -+#endif -+#endif -+ for (; i < size; i++) -+ if (!buf[i]) -+ break; -+ return i; -+} -+ - void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) - { - #undef FUNC -@@ -146,6 +174,7 @@ void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, const int chroma_fo - H264_DSP(8); - break; - } -+ c->h264_find_start_code_candidate = h264_find_start_code_candidate_c; - - if (ARCH_ARM) ff_h264dsp_init_arm(c, bit_depth, chroma_format_idc); - if (HAVE_ALTIVEC) ff_h264dsp_init_ppc(c, bit_depth, chroma_format_idc); -diff --git a/lib/ffmpeg/libavcodec/h264dsp.h b/lib/ffmpeg/libavcodec/h264dsp.h -index 98ea15c..1be4804 100644 ---- a/lib/ffmpeg/libavcodec/h264dsp.h -+++ b/lib/ffmpeg/libavcodec/h264dsp.h -@@ -105,6 +105,15 @@ typedef struct H264DSPContext { - /* bypass-transform */ - void (*h264_add_pixels8_clear)(uint8_t *dst, int16_t *block, int stride); - void (*h264_add_pixels4_clear)(uint8_t *dst, int16_t *block, int stride); -+ -+ /** -+ * Search buf from the start for up to size bytes. Return the index -+ * of a zero byte, or >= size if not found. Ideally, use lookahead -+ * to filter out any zero bytes that are known to not be followed by -+ * one or more further zero bytes and a one byte. Better still, filter -+ * out any bytes that form the trailing_zero_8bits syntax element too. -+ */ -+ int (*h264_find_start_code_candidate)(const uint8_t *buf, int size); - } H264DSPContext; - - void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, --- -1.9.3 - - -From 458ff4b6c1855c529f563dbbd15e35aaab50adae Mon Sep 17 00:00:00 2001 -From: Ben Avison -Date: Mon, 5 Aug 2013 13:12:48 +0100 -Subject: [PATCH 03/94] arm: Add assembly version of - h264_find_start_code_candidate -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - - Before After - Mean StdDev Mean StdDev Change -This function 508.8 23.4 185.4 9.0 +174.4% -Overall 3068.5 31.7 2752.1 29.4 +11.5% - -In combination with the preceding patch: - Before After - Mean StdDev Mean StdDev Change -Overall 2925.6 26.2 2752.1 29.4 +6.3% - -Signed-off-by: Martin Storsjö ---- - lib/ffmpeg/libavcodec/arm/Makefile | 1 + - lib/ffmpeg/libavcodec/arm/h264dsp_armv6.S | 253 +++++++++++++++++++++++++++ - lib/ffmpeg/libavcodec/arm/h264dsp_init_arm.c | 4 + - lib/ffmpeg/libavcodec/h264_parser.c | 1 - - 4 files changed, 258 insertions(+), 1 deletion(-) - create mode 100644 lib/ffmpeg/libavcodec/arm/h264dsp_armv6.S - -diff --git a/lib/ffmpeg/libavcodec/arm/Makefile b/lib/ffmpeg/libavcodec/arm/Makefile -index 7390a8b..480000b71 100644 ---- a/lib/ffmpeg/libavcodec/arm/Makefile -+++ b/lib/ffmpeg/libavcodec/arm/Makefile -@@ -9,6 +9,7 @@ OBJS-$(CONFIG_AAC_DECODER) += arm/sbrdsp_init_arm.o \ - OBJS-$(CONFIG_DCA_DECODER) += arm/dcadsp_init_arm.o \ - - ARMV6-OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_armv6.o -+ARMV6-OBJS-$(CONFIG_H264DSP) += arm/h264dsp_armv6.o - - OBJS-$(CONFIG_FLAC_DECODER) += arm/flacdsp_init_arm.o \ - arm/flacdsp_arm.o \ -diff --git a/lib/ffmpeg/libavcodec/arm/h264dsp_armv6.S b/lib/ffmpeg/libavcodec/arm/h264dsp_armv6.S -new file mode 100644 -index 0000000..c4f12a6 ---- /dev/null -+++ b/lib/ffmpeg/libavcodec/arm/h264dsp_armv6.S -@@ -0,0 +1,253 @@ -+/* -+ * Copyright (c) 2013 RISC OS Open Ltd -+ * Author: Ben Avison -+ * -+ * This file is part of Libav. -+ * -+ * Libav is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * Libav is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with Libav; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ */ -+ -+#include "libavutil/arm/asm.S" -+ -+RESULT .req a1 -+BUF .req a1 -+SIZE .req a2 -+PATTERN .req a3 -+PTR .req a4 -+DAT0 .req v1 -+DAT1 .req v2 -+DAT2 .req v3 -+DAT3 .req v4 -+TMP0 .req v5 -+TMP1 .req v6 -+TMP2 .req ip -+TMP3 .req lr -+ -+#define PRELOAD_DISTANCE 4 -+ -+.macro innerloop4 -+ ldr DAT0, [PTR], #4 -+ subs SIZE, SIZE, #4 @ C flag survives rest of macro -+ sub TMP0, DAT0, PATTERN, lsr #14 -+ bic TMP0, TMP0, DAT0 -+ ands TMP0, TMP0, PATTERN -+.endm -+ -+.macro innerloop16 decrement, do_preload -+ ldmia PTR!, {DAT0,DAT1,DAT2,DAT3} -+ .ifnc "\do_preload","" -+ pld [PTR, #PRELOAD_DISTANCE*32] -+ .endif -+ .ifnc "\decrement","" -+ subs SIZE, SIZE, #\decrement @ C flag survives rest of macro -+ .endif -+ sub TMP0, DAT0, PATTERN, lsr #14 -+ sub TMP1, DAT1, PATTERN, lsr #14 -+ bic TMP0, TMP0, DAT0 -+ bic TMP1, TMP1, DAT1 -+ sub TMP2, DAT2, PATTERN, lsr #14 -+ sub TMP3, DAT3, PATTERN, lsr #14 -+ ands TMP0, TMP0, PATTERN -+ bic TMP2, TMP2, DAT2 -+ it eq -+ andseq TMP1, TMP1, PATTERN -+ bic TMP3, TMP3, DAT3 -+ itt eq -+ andseq TMP2, TMP2, PATTERN -+ andseq TMP3, TMP3, PATTERN -+.endm -+ -+/* int ff_h264_find_start_code_candidate_armv6(const uint8_t *buf, int size) */ -+function ff_h264_find_start_code_candidate_armv6, export=1 -+ push {v1-v6,lr} -+ mov PTR, BUF -+ @ Ensure there are at least (PRELOAD_DISTANCE+2) complete cachelines to go -+ @ before using code that does preloads -+ cmp SIZE, #(PRELOAD_DISTANCE+3)*32 - 1 -+ blo 60f -+ -+ @ Get to word-alignment, 1 byte at a time -+ tst PTR, #3 -+ beq 2f -+1: ldrb DAT0, [PTR], #1 -+ sub SIZE, SIZE, #1 -+ teq DAT0, #0 -+ beq 90f -+ tst PTR, #3 -+ bne 1b -+2: @ Get to 4-word alignment, 1 word at a time -+ ldr PATTERN, =0x80008000 -+ setend be -+ tst PTR, #12 -+ beq 4f -+3: innerloop4 -+ bne 91f -+ tst PTR, #12 -+ bne 3b -+4: @ Get to cacheline (8-word) alignment -+ tst PTR, #16 -+ beq 5f -+ innerloop16 16 -+ bne 93f -+5: @ Check complete cachelines, with preloading -+ @ We need to stop when there are still (PRELOAD_DISTANCE+1) -+ @ complete cachelines to go -+ sub SIZE, SIZE, #(PRELOAD_DISTANCE+2)*32 -+6: innerloop16 , do_preload -+ bne 93f -+ innerloop16 32 -+ bne 93f -+ bcs 6b -+ @ Preload trailing part-cacheline, if any -+ tst SIZE, #31 -+ beq 7f -+ pld [PTR, #(PRELOAD_DISTANCE+1)*32] -+ @ Check remaining data without doing any more preloads. First -+ @ do in chunks of 4 words: -+7: adds SIZE, SIZE, #(PRELOAD_DISTANCE+2)*32 - 16 -+ bmi 9f -+8: innerloop16 16 -+ bne 93f -+ bcs 8b -+ @ Then in words: -+9: adds SIZE, SIZE, #16 - 4 -+ bmi 11f -+10: innerloop4 -+ bne 91f -+ bcs 10b -+11: setend le -+ @ Check second byte of final halfword -+ ldrb DAT0, [PTR, #-1] -+ teq DAT0, #0 -+ beq 90f -+ @ Check any remaining bytes -+ tst SIZE, #3 -+ beq 13f -+12: ldrb DAT0, [PTR], #1 -+ sub SIZE, SIZE, #1 -+ teq DAT0, #0 -+ beq 90f -+ tst SIZE, #3 -+ bne 12b -+ @ No candidate found -+13: sub RESULT, PTR, BUF -+ b 99f -+ -+60: @ Small buffer - simply check by looping over bytes -+ subs SIZE, SIZE, #1 -+ bcc 99f -+61: ldrb DAT0, [PTR], #1 -+ subs SIZE, SIZE, #1 -+ teq DAT0, #0 -+ beq 90f -+ bcs 61b -+ @ No candidate found -+ sub RESULT, PTR, BUF -+ b 99f -+ -+90: @ Found a candidate at the preceding byte -+ sub RESULT, PTR, BUF -+ sub RESULT, RESULT, #1 -+ b 99f -+ -+91: @ Found a candidate somewhere in the preceding 4 bytes -+ sub RESULT, PTR, BUF -+ sub RESULT, RESULT, #4 -+ sub TMP0, DAT0, #0x20000 -+ bics TMP0, TMP0, DAT0 -+ itt pl -+ ldrbpl DAT0, [PTR, #-3] -+ addpl RESULT, RESULT, #2 -+ bpl 92f -+ teq RESULT, #0 -+ beq 98f @ don't look back a byte if found at first byte in buffer -+ ldrb DAT0, [PTR, #-5] -+92: teq DAT0, #0 -+ it eq -+ subeq RESULT, RESULT, #1 -+ b 98f -+ -+93: @ Found a candidate somewhere in the preceding 16 bytes -+ sub RESULT, PTR, BUF -+ sub RESULT, RESULT, #16 -+ teq TMP0, #0 -+ beq 95f @ not in first 4 bytes -+ sub TMP0, DAT0, #0x20000 -+ bics TMP0, TMP0, DAT0 -+ itt pl -+ ldrbpl DAT0, [PTR, #-15] -+ addpl RESULT, RESULT, #2 -+ bpl 94f -+ teq RESULT, #0 -+ beq 98f @ don't look back a byte if found at first byte in buffer -+ ldrb DAT0, [PTR, #-17] -+94: teq DAT0, #0 -+ it eq -+ subeq RESULT, RESULT, #1 -+ b 98f -+95: add RESULT, RESULT, #4 -+ teq TMP1, #0 -+ beq 96f @ not in next 4 bytes -+ sub TMP1, DAT1, #0x20000 -+ bics TMP1, TMP1, DAT1 -+ itee mi -+ ldrbmi DAT0, [PTR, #-13] -+ ldrbpl DAT0, [PTR, #-11] -+ addpl RESULT, RESULT, #2 -+ teq DAT0, #0 -+ it eq -+ subeq RESULT, RESULT, #1 -+ b 98f -+96: add RESULT, RESULT, #4 -+ teq TMP2, #0 -+ beq 97f @ not in next 4 bytes -+ sub TMP2, DAT2, #0x20000 -+ bics TMP2, TMP2, DAT2 -+ itee mi -+ ldrbmi DAT0, [PTR, #-9] -+ ldrbpl DAT0, [PTR, #-7] -+ addpl RESULT, RESULT, #2 -+ teq DAT0, #0 -+ it eq -+ subeq RESULT, RESULT, #1 -+ b 98f -+97: add RESULT, RESULT, #4 -+ sub TMP3, DAT3, #0x20000 -+ bics TMP3, TMP3, DAT3 -+ itee mi -+ ldrbmi DAT0, [PTR, #-5] -+ ldrbpl DAT0, [PTR, #-3] -+ addpl RESULT, RESULT, #2 -+ teq DAT0, #0 -+ it eq -+ subeq RESULT, RESULT, #1 -+ @ drop through to 98f -+98: setend le -+99: pop {v1-v6,pc} -+.endfunc -+ -+ .unreq RESULT -+ .unreq BUF -+ .unreq SIZE -+ .unreq PATTERN -+ .unreq PTR -+ .unreq DAT0 -+ .unreq DAT1 -+ .unreq DAT2 -+ .unreq DAT3 -+ .unreq TMP0 -+ .unreq TMP1 -+ .unreq TMP2 -+ .unreq TMP3 -diff --git a/lib/ffmpeg/libavcodec/arm/h264dsp_init_arm.c b/lib/ffmpeg/libavcodec/arm/h264dsp_init_arm.c -index 785b604..2804e56 100644 ---- a/lib/ffmpeg/libavcodec/arm/h264dsp_init_arm.c -+++ b/lib/ffmpeg/libavcodec/arm/h264dsp_init_arm.c -@@ -24,6 +24,8 @@ - #include "libavutil/arm/cpu.h" - #include "libavcodec/h264dsp.h" - -+int ff_h264_find_start_code_candidate_armv6(const uint8_t *buf, int size); -+ - void ff_h264_v_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha, - int beta, int8_t *tc0); - void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha, -@@ -106,6 +108,8 @@ av_cold void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, - { - int cpu_flags = av_get_cpu_flags(); - -+ if (have_armv6(cpu_flags)) -+ c->h264_find_start_code_candidate = ff_h264_find_start_code_candidate_armv6; - if (have_neon(cpu_flags)) - ff_h264dsp_init_neon(c, bit_depth, chroma_format_idc); - } -diff --git a/lib/ffmpeg/libavcodec/h264_parser.c b/lib/ffmpeg/libavcodec/h264_parser.c -index 972aace..363843c 100644 ---- a/lib/ffmpeg/libavcodec/h264_parser.c -+++ b/lib/ffmpeg/libavcodec/h264_parser.c -@@ -65,7 +65,6 @@ static int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_si - i += h->h264dsp.h264_find_start_code_candidate(buf + i, buf_size - i); - if (i < buf_size) - state = 2; -- } - }else if(state<=2){ - if(buf[i]==1) state^= 5; //2->7, 1->4, 0->5 - else if(buf[i]) state = 7; --- -1.9.3 - - -From 5841d5b69f0df2f286c0a8e419deb16d927e864e Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Mon, 19 Aug 2013 22:48:05 +0100 -Subject: [PATCH 04/94] [ffmpeg] Backport of h264_find_start_code_candidate - optimisation - ---- - ...-Initialize-the-h264dsp-context-in-the-pa.patch | 39 +++ - ...torize-code-into-a-new-function-h264_find.patch | 134 +++++++++ - ...embly-version-of-h264_find_start_code_can.patch | 322 +++++++++++++++++++++ - 3 files changed, 495 insertions(+) - create mode 100644 lib/ffmpeg/patches/0056-h264_parser-Initialize-the-h264dsp-context-in-the-pa.patch - create mode 100644 lib/ffmpeg/patches/0057-h264dsp-Factorize-code-into-a-new-function-h264_find.patch - create mode 100644 lib/ffmpeg/patches/0058-arm-Add-assembly-version-of-h264_find_start_code_can.patch - -diff --git a/lib/ffmpeg/patches/0056-h264_parser-Initialize-the-h264dsp-context-in-the-pa.patch b/lib/ffmpeg/patches/0056-h264_parser-Initialize-the-h264dsp-context-in-the-pa.patch -new file mode 100644 -index 0000000..263578d ---- /dev/null -+++ b/lib/ffmpeg/patches/0056-h264_parser-Initialize-the-h264dsp-context-in-the-pa.patch -@@ -0,0 +1,39 @@ -+From 7a82022ee2f9b1fad991ace0936901e7419444be Mon Sep 17 00:00:00 2001 -+From: Ben Avison -+Date: Mon, 5 Aug 2013 13:12:46 +0100 -+Subject: [PATCH 1/3] h264_parser: Initialize the h264dsp context in the -+ parser as well -+MIME-Version: 1.0 -+Content-Type: text/plain; charset=UTF-8 -+Content-Transfer-Encoding: 8bit -+ -+Each AVStream struct for an H.264 elementary stream actually has two -+copies of the H264DSPContext struct (and in fact all the other members -+of H264Context as well): -+ -+((H264Context *) ((AVStream *)st)->codec->priv_data)->h264dsp -+((H264Context *) ((AVStream *)st)->parser->priv_data)->h264dsp -+ -+but only the first of these was actually being initialised. This -+prevented the addition of platform-specific implementations of -+parser-related functions. -+ -+Signed-off-by: Martin Storsjö -+--- -+ libavcodec/h264_parser.c | 1 + -+ 1 file changed, 1 insertion(+) -+ -+diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c -+index 2ed155c..da2a5f9 100644 -+--- a/libavcodec/h264_parser.c -++++ b/libavcodec/h264_parser.c -+@@ -417,6 +417,7 @@ static av_cold int init(AVCodecParserContext *s) -+ H264Context *h = s->priv_data; -+ h->thread_context[0] = h; -+ h->slice_context_count = 1; -++ ff_h264dsp_init(&h->h264dsp, 8, 1); -+ return 0; -+ } -+ -+-- -+1.7.9.5 -diff --git a/lib/ffmpeg/patches/0057-h264dsp-Factorize-code-into-a-new-function-h264_find.patch b/lib/ffmpeg/patches/0057-h264dsp-Factorize-code-into-a-new-function-h264_find.patch -new file mode 100644 -index 0000000..0151d85 ---- /dev/null -+++ b/lib/ffmpeg/patches/0057-h264dsp-Factorize-code-into-a-new-function-h264_find.patch -@@ -0,0 +1,134 @@ -+From 218d6844b37d339ffbf2044ad07d8be7767e2734 Mon Sep 17 00:00:00 2001 -+From: Ben Avison -+Date: Mon, 5 Aug 2013 13:12:47 +0100 -+Subject: [PATCH 2/3] h264dsp: Factorize code into a new function, -+ h264_find_start_code_candidate -+MIME-Version: 1.0 -+Content-Type: text/plain; charset=UTF-8 -+Content-Transfer-Encoding: 8bit -+ -+This performs the start code search which was previously part of -+h264_find_frame_end() - the most CPU intensive part of the function. -+ -+By itself, this results in a performance regression: -+ Before After -+ Mean StdDev Mean StdDev Change -+Overall time 2925.6 26.2 3068.5 31.7 -4.7% -+ -+but this can more than be made up for by platform-optimised -+implementations of the function. -+ -+Signed-off-by: Martin Storsjö -+--- -+ libavcodec/h264_parser.c | 27 +++------------------------ -+ libavcodec/h264dsp.c | 29 +++++++++++++++++++++++++++++ -+ libavcodec/h264dsp.h | 9 +++++++++ -+ 3 files changed, 41 insertions(+), 24 deletions(-) -+ -+diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c -+index da2a5f9..ef5da98 100644 -+--- a/libavcodec/h264_parser.c -++++ b/libavcodec/h264_parser.c -+@@ -47,30 +47,9 @@ static int h264_find_frame_end(H264Context *h, const uint8_t *buf, -+ -+ for (i = 0; i < buf_size; i++) { -+ if (state == 7) { -+-#if HAVE_FAST_UNALIGNED -+- /* we check i < buf_size instead of i + 3 / 7 because it is -+- * simpler and there must be FF_INPUT_BUFFER_PADDING_SIZE -+- * bytes at the end. -+- */ -+-#if HAVE_FAST_64BIT -+- while (i < buf_size && -+- !((~*(const uint64_t *)(buf + i) & -+- (*(const uint64_t *)(buf + i) - 0x0101010101010101ULL)) & -+- 0x8080808080808080ULL)) -+- i += 8; -+-#else -+- while (i < buf_size && -+- !((~*(const uint32_t *)(buf + i) & -+- (*(const uint32_t *)(buf + i) - 0x01010101U)) & -+- 0x80808080U)) -+- i += 4; -+-#endif -+-#endif -+- for (; i < buf_size; i++) -+- if (!buf[i]) { -+- state = 2; -+- break; -+- } -++ i += h->h264dsp.h264_find_start_code_candidate(buf + i, buf_size - i); -++ if (i < buf_size) -++ state = 2; -+ } else if (state <= 2) { -+ if (buf[i] == 1) -+ state ^= 5; // 2->7, 1->4, 0->5 -+diff --git a/libavcodec/h264dsp.c b/libavcodec/h264dsp.c -+index 3ca6abe..a901dbb 100644 -+--- a/libavcodec/h264dsp.c -++++ b/libavcodec/h264dsp.c -+@@ -53,6 +53,34 @@ -+ #include "h264addpx_template.c" -+ #undef BIT_DEPTH -+ -++static int h264_find_start_code_candidate_c(const uint8_t *buf, int size) -++{ -++ int i = 0; -++#if HAVE_FAST_UNALIGNED -++ /* we check i < size instead of i + 3 / 7 because it is -++ * simpler and there must be FF_INPUT_BUFFER_PADDING_SIZE -++ * bytes at the end. -++ */ -++#if HAVE_FAST_64BIT -++ while (i < size && -++ !((~*(const uint64_t *)(buf + i) & -++ (*(const uint64_t *)(buf + i) - 0x0101010101010101ULL)) & -++ 0x8080808080808080ULL)) -++ i += 8; -++#else -++ while (i < size && -++ !((~*(const uint32_t *)(buf + i) & -++ (*(const uint32_t *)(buf + i) - 0x01010101U)) & -++ 0x80808080U)) -++ i += 4; -++#endif -++#endif -++ for (; i < size; i++) -++ if (!buf[i]) -++ break; -++ return i; -++} -++ -+ av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, -+ const int chroma_format_idc) -+ { -+@@ -133,6 +161,7 @@ av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, -+ H264_DSP(8); -+ break; -+ } -++ c->h264_find_start_code_candidate = h264_find_start_code_candidate_c; -+ -+ if (ARCH_ARM) ff_h264dsp_init_arm(c, bit_depth, chroma_format_idc); -+ if (ARCH_PPC) ff_h264dsp_init_ppc(c, bit_depth, chroma_format_idc); -+diff --git a/libavcodec/h264dsp.h b/libavcodec/h264dsp.h -+index 1f9f8fe..6249ba7 100644 -+--- a/libavcodec/h264dsp.h -++++ b/libavcodec/h264dsp.h -+@@ -105,6 +105,15 @@ typedef struct H264DSPContext { -+ /* bypass-transform */ -+ void (*h264_add_pixels8_clear)(uint8_t *dst, int16_t *block, int stride); -+ void (*h264_add_pixels4_clear)(uint8_t *dst, int16_t *block, int stride); -++ -++ /** -++ * Search buf from the start for up to size bytes. Return the index -++ * of a zero byte, or >= size if not found. Ideally, use lookahead -++ * to filter out any zero bytes that are known to not be followed by -++ * one or more further zero bytes and a one byte. Better still, filter -++ * out any bytes that form the trailing_zero_8bits syntax element too. -++ */ -++ int (*h264_find_start_code_candidate)(const uint8_t *buf, int size); -+ } H264DSPContext; -+ -+ void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, -+-- -+1.7.9.5 -diff --git a/lib/ffmpeg/patches/0058-arm-Add-assembly-version-of-h264_find_start_code_can.patch b/lib/ffmpeg/patches/0058-arm-Add-assembly-version-of-h264_find_start_code_can.patch -new file mode 100644 -index 0000000..cdc2d1e ---- /dev/null -+++ b/lib/ffmpeg/patches/0058-arm-Add-assembly-version-of-h264_find_start_code_can.patch -@@ -0,0 +1,322 @@ -+From 45e10e5c8d3df09c80a4d80483bff2712367f3fa Mon Sep 17 00:00:00 2001 -+From: Ben Avison -+Date: Mon, 5 Aug 2013 13:12:48 +0100 -+Subject: [PATCH 3/3] arm: Add assembly version of -+ h264_find_start_code_candidate -+MIME-Version: 1.0 -+Content-Type: text/plain; charset=UTF-8 -+Content-Transfer-Encoding: 8bit -+ -+ Before After -+ Mean StdDev Mean StdDev Change -+This function 508.8 23.4 185.4 9.0 +174.4% -+Overall 3068.5 31.7 2752.1 29.4 +11.5% -+ -+In combination with the preceding patch: -+ Before After -+ Mean StdDev Mean StdDev Change -+Overall 2925.6 26.2 2752.1 29.4 +6.3% -+ -+Signed-off-by: Martin Storsjö -+--- -+ libavcodec/arm/Makefile | 1 + -+ libavcodec/arm/h264dsp_armv6.S | 253 +++++++++++++++++++++++++++++++++++++ -+ libavcodec/arm/h264dsp_init_arm.c | 4 + -+ 3 files changed, 258 insertions(+) -+ create mode 100644 libavcodec/arm/h264dsp_armv6.S -+ -+diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile -+index e941aaa..9c64b36 100644 -+--- a/libavcodec/arm/Makefile -++++ b/libavcodec/arm/Makefile -+@@ -45,6 +45,7 @@ ARMV6-OBJS-$(CONFIG_DSPUTIL) += arm/dsputil_init_armv6.o \ -+ arm/simple_idct_armv6.o \ -+ -+ ARMV6-OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_armv6.o -++ARMV6-OBJS-$(CONFIG_H264DSP) += arm/h264dsp_armv6.o -+ ARMV6-OBJS-$(CONFIG_HPELDSP) += arm/hpeldsp_init_armv6.o \ -+ arm/hpeldsp_armv6.o -+ ARMV6-OBJS-$(CONFIG_MPEGAUDIODSP) += arm/mpegaudiodsp_fixed_armv6.o -+diff --git a/libavcodec/arm/h264dsp_armv6.S b/libavcodec/arm/h264dsp_armv6.S -+new file mode 100644 -+index 0000000..c4f12a6 -+--- /dev/null -++++ b/libavcodec/arm/h264dsp_armv6.S -+@@ -0,0 +1,253 @@ -++/* -++ * Copyright (c) 2013 RISC OS Open Ltd -++ * Author: Ben Avison -++ * -++ * This file is part of Libav. -++ * -++ * Libav is free software; you can redistribute it and/or -++ * modify it under the terms of the GNU Lesser General Public -++ * License as published by the Free Software Foundation; either -++ * version 2.1 of the License, or (at your option) any later version. -++ * -++ * Libav is distributed in the hope that it will be useful, -++ * but WITHOUT ANY WARRANTY; without even the implied warranty of -++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -++ * Lesser General Public License for more details. -++ * -++ * You should have received a copy of the GNU Lesser General Public -++ * License along with Libav; if not, write to the Free Software -++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -++ */ -++ -++#include "libavutil/arm/asm.S" -++ -++RESULT .req a1 -++BUF .req a1 -++SIZE .req a2 -++PATTERN .req a3 -++PTR .req a4 -++DAT0 .req v1 -++DAT1 .req v2 -++DAT2 .req v3 -++DAT3 .req v4 -++TMP0 .req v5 -++TMP1 .req v6 -++TMP2 .req ip -++TMP3 .req lr -++ -++#define PRELOAD_DISTANCE 4 -++ -++.macro innerloop4 -++ ldr DAT0, [PTR], #4 -++ subs SIZE, SIZE, #4 @ C flag survives rest of macro -++ sub TMP0, DAT0, PATTERN, lsr #14 -++ bic TMP0, TMP0, DAT0 -++ ands TMP0, TMP0, PATTERN -++.endm -++ -++.macro innerloop16 decrement, do_preload -++ ldmia PTR!, {DAT0,DAT1,DAT2,DAT3} -++ .ifnc "\do_preload","" -++ pld [PTR, #PRELOAD_DISTANCE*32] -++ .endif -++ .ifnc "\decrement","" -++ subs SIZE, SIZE, #\decrement @ C flag survives rest of macro -++ .endif -++ sub TMP0, DAT0, PATTERN, lsr #14 -++ sub TMP1, DAT1, PATTERN, lsr #14 -++ bic TMP0, TMP0, DAT0 -++ bic TMP1, TMP1, DAT1 -++ sub TMP2, DAT2, PATTERN, lsr #14 -++ sub TMP3, DAT3, PATTERN, lsr #14 -++ ands TMP0, TMP0, PATTERN -++ bic TMP2, TMP2, DAT2 -++ it eq -++ andseq TMP1, TMP1, PATTERN -++ bic TMP3, TMP3, DAT3 -++ itt eq -++ andseq TMP2, TMP2, PATTERN -++ andseq TMP3, TMP3, PATTERN -++.endm -++ -++/* int ff_h264_find_start_code_candidate_armv6(const uint8_t *buf, int size) */ -++function ff_h264_find_start_code_candidate_armv6, export=1 -++ push {v1-v6,lr} -++ mov PTR, BUF -++ @ Ensure there are at least (PRELOAD_DISTANCE+2) complete cachelines to go -++ @ before using code that does preloads -++ cmp SIZE, #(PRELOAD_DISTANCE+3)*32 - 1 -++ blo 60f -++ -++ @ Get to word-alignment, 1 byte at a time -++ tst PTR, #3 -++ beq 2f -++1: ldrb DAT0, [PTR], #1 -++ sub SIZE, SIZE, #1 -++ teq DAT0, #0 -++ beq 90f -++ tst PTR, #3 -++ bne 1b -++2: @ Get to 4-word alignment, 1 word at a time -++ ldr PATTERN, =0x80008000 -++ setend be -++ tst PTR, #12 -++ beq 4f -++3: innerloop4 -++ bne 91f -++ tst PTR, #12 -++ bne 3b -++4: @ Get to cacheline (8-word) alignment -++ tst PTR, #16 -++ beq 5f -++ innerloop16 16 -++ bne 93f -++5: @ Check complete cachelines, with preloading -++ @ We need to stop when there are still (PRELOAD_DISTANCE+1) -++ @ complete cachelines to go -++ sub SIZE, SIZE, #(PRELOAD_DISTANCE+2)*32 -++6: innerloop16 , do_preload -++ bne 93f -++ innerloop16 32 -++ bne 93f -++ bcs 6b -++ @ Preload trailing part-cacheline, if any -++ tst SIZE, #31 -++ beq 7f -++ pld [PTR, #(PRELOAD_DISTANCE+1)*32] -++ @ Check remaining data without doing any more preloads. First -++ @ do in chunks of 4 words: -++7: adds SIZE, SIZE, #(PRELOAD_DISTANCE+2)*32 - 16 -++ bmi 9f -++8: innerloop16 16 -++ bne 93f -++ bcs 8b -++ @ Then in words: -++9: adds SIZE, SIZE, #16 - 4 -++ bmi 11f -++10: innerloop4 -++ bne 91f -++ bcs 10b -++11: setend le -++ @ Check second byte of final halfword -++ ldrb DAT0, [PTR, #-1] -++ teq DAT0, #0 -++ beq 90f -++ @ Check any remaining bytes -++ tst SIZE, #3 -++ beq 13f -++12: ldrb DAT0, [PTR], #1 -++ sub SIZE, SIZE, #1 -++ teq DAT0, #0 -++ beq 90f -++ tst SIZE, #3 -++ bne 12b -++ @ No candidate found -++13: sub RESULT, PTR, BUF -++ b 99f -++ -++60: @ Small buffer - simply check by looping over bytes -++ subs SIZE, SIZE, #1 -++ bcc 99f -++61: ldrb DAT0, [PTR], #1 -++ subs SIZE, SIZE, #1 -++ teq DAT0, #0 -++ beq 90f -++ bcs 61b -++ @ No candidate found -++ sub RESULT, PTR, BUF -++ b 99f -++ -++90: @ Found a candidate at the preceding byte -++ sub RESULT, PTR, BUF -++ sub RESULT, RESULT, #1 -++ b 99f -++ -++91: @ Found a candidate somewhere in the preceding 4 bytes -++ sub RESULT, PTR, BUF -++ sub RESULT, RESULT, #4 -++ sub TMP0, DAT0, #0x20000 -++ bics TMP0, TMP0, DAT0 -++ itt pl -++ ldrbpl DAT0, [PTR, #-3] -++ addpl RESULT, RESULT, #2 -++ bpl 92f -++ teq RESULT, #0 -++ beq 98f @ don't look back a byte if found at first byte in buffer -++ ldrb DAT0, [PTR, #-5] -++92: teq DAT0, #0 -++ it eq -++ subeq RESULT, RESULT, #1 -++ b 98f -++ -++93: @ Found a candidate somewhere in the preceding 16 bytes -++ sub RESULT, PTR, BUF -++ sub RESULT, RESULT, #16 -++ teq TMP0, #0 -++ beq 95f @ not in first 4 bytes -++ sub TMP0, DAT0, #0x20000 -++ bics TMP0, TMP0, DAT0 -++ itt pl -++ ldrbpl DAT0, [PTR, #-15] -++ addpl RESULT, RESULT, #2 -++ bpl 94f -++ teq RESULT, #0 -++ beq 98f @ don't look back a byte if found at first byte in buffer -++ ldrb DAT0, [PTR, #-17] -++94: teq DAT0, #0 -++ it eq -++ subeq RESULT, RESULT, #1 -++ b 98f -++95: add RESULT, RESULT, #4 -++ teq TMP1, #0 -++ beq 96f @ not in next 4 bytes -++ sub TMP1, DAT1, #0x20000 -++ bics TMP1, TMP1, DAT1 -++ itee mi -++ ldrbmi DAT0, [PTR, #-13] -++ ldrbpl DAT0, [PTR, #-11] -++ addpl RESULT, RESULT, #2 -++ teq DAT0, #0 -++ it eq -++ subeq RESULT, RESULT, #1 -++ b 98f -++96: add RESULT, RESULT, #4 -++ teq TMP2, #0 -++ beq 97f @ not in next 4 bytes -++ sub TMP2, DAT2, #0x20000 -++ bics TMP2, TMP2, DAT2 -++ itee mi -++ ldrbmi DAT0, [PTR, #-9] -++ ldrbpl DAT0, [PTR, #-7] -++ addpl RESULT, RESULT, #2 -++ teq DAT0, #0 -++ it eq -++ subeq RESULT, RESULT, #1 -++ b 98f -++97: add RESULT, RESULT, #4 -++ sub TMP3, DAT3, #0x20000 -++ bics TMP3, TMP3, DAT3 -++ itee mi -++ ldrbmi DAT0, [PTR, #-5] -++ ldrbpl DAT0, [PTR, #-3] -++ addpl RESULT, RESULT, #2 -++ teq DAT0, #0 -++ it eq -++ subeq RESULT, RESULT, #1 -++ @ drop through to 98f -++98: setend le -++99: pop {v1-v6,pc} -++.endfunc -++ -++ .unreq RESULT -++ .unreq BUF -++ .unreq SIZE -++ .unreq PATTERN -++ .unreq PTR -++ .unreq DAT0 -++ .unreq DAT1 -++ .unreq DAT2 -++ .unreq DAT3 -++ .unreq TMP0 -++ .unreq TMP1 -++ .unreq TMP2 -++ .unreq TMP3 -+diff --git a/libavcodec/arm/h264dsp_init_arm.c b/libavcodec/arm/h264dsp_init_arm.c -+index bb8b3b9..b206a1b 100644 -+--- a/libavcodec/arm/h264dsp_init_arm.c -++++ b/libavcodec/arm/h264dsp_init_arm.c -+@@ -24,6 +24,8 @@ -+ #include "libavutil/arm/cpu.h" -+ #include "libavcodec/h264dsp.h" -+ -++int ff_h264_find_start_code_candidate_armv6(const uint8_t *buf, int size); -++ -+ void ff_h264_v_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha, -+ int beta, int8_t *tc0); -+ void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha, -+@@ -102,6 +104,8 @@ av_cold void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, -+ { -+ int cpu_flags = av_get_cpu_flags(); -+ -++ if (have_armv6(cpu_flags)) -++ c->h264_find_start_code_candidate = ff_h264_find_start_code_candidate_armv6; -+ if (have_neon(cpu_flags)) -+ h264dsp_init_neon(c, bit_depth, chroma_format_idc); -+ } -+-- -+1.7.9.5 --- -1.9.3 - - -From db098a580259625bb7b7385a48cb0756aea5cafe Mon Sep 17 00:00:00 2001 -From: Ben Avison -Date: Wed, 16 Apr 2014 01:51:31 +0100 -Subject: [PATCH 05/94] h264: Move search code search functions into separate - source files. - -This permits re-use with parsers for codecs which use similar start codes. - -Signed-off-by: Michael Niedermayer ---- - lib/ffmpeg/libavcodec/Makefile | 2 +- - lib/ffmpeg/libavcodec/arm/Makefile | 2 +- - lib/ffmpeg/libavcodec/arm/h264dsp_armv6.S | 253 --------------------------- - lib/ffmpeg/libavcodec/arm/h264dsp_init_arm.c | 4 +- - lib/ffmpeg/libavcodec/arm/startcode_armv6.S | 253 +++++++++++++++++++++++++++ - lib/ffmpeg/libavcodec/h264dsp.c | 31 +--- - lib/ffmpeg/libavcodec/startcode.c | 57 ++++++ - lib/ffmpeg/libavcodec/startcode.h | 35 ++++ - 8 files changed, 351 insertions(+), 286 deletions(-) - delete mode 100644 lib/ffmpeg/libavcodec/arm/h264dsp_armv6.S - create mode 1006