OpenELEC Testbuilds for RaspberryPi (Kodi 16.0)
(2015-08-06, 15:55)Milhouse Wrote: Presumably you're referring to these commits. Unfortunately these commits don't apply cleanly on the version of libdvbcsa being used by OpenELEC as it appears glenvt18 has applied additional changes to master, so these also need to be added to OpenELEC.

Without any sign of these commits being pushed upstream (and the NEON performance stuff still in a development branch) it's pretty much a non-starter for upstream OpenELEC.

Just for the hell of it, I've uploaded a vdr-addon that includes the above glenvt18 commits (plus a build patch to enable NEON/SSE2) - give it a try, let us know what difference it makes. If the changes are positive, try to get glenvt18 to push his commits upstream.

Looks like we did work in parallel while forum was down. I also ported those patches and recompiled vdr. My imho better libdvbcsa package.mk which will also enable MMX/SSE2/SSSE3 on x86 if available in the project:

Code:
PKG_NAME="libdvbcsa"
PKG_VERSION="1.1.0"
PKG_REV="2"
PKG_ARCH="any"
PKG_LICENSE="LGPL"
PKG_SITE="http://www.videolan.org/developers/libdvbcsa.html"
PKG_URL="http://download.videolan.org/pub/videolan/libdvbcsa/${PKG_VERSION}/libdvbcsa-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="lib"
PKG_SHORTDESC="libdvbcsa is a free implementation of the DVB Common Scrambling Algorithm - DVB/CSA - with encryption and decryption capabilities"
PKG_LONGDESC="libdvbcsa is a free implementation of the DVB Common Scrambling Algorithm - DVB/CSA - with encryption and decryption capabilities"

PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"

if [ -z "$TARGET_FPU" ]; then
    # If TARGET_FPU is undefined, determine best performing x86 FPU capability from PROJECT_CFLAGS
    LIBDVBCSA_FPU=`echo $PROJECT_CFLAGS | \
        awk '
            /-mssse3( |$)/ { printf "--enable-ssse3" ; exit; }
            /-msse2( |$)/  { printf "--enable-sse2"  ; exit; }
            /-mmmx( |$)/   { printf "--enable-mmx"   ; exit; }
        '`
else
    # TARGET_FPU defined, enable best optimization as supported
    case "$TARGET_FPU" in
        neon*)        LIBDVBCSA_FPU="--enable-neon" ;;
        *)            LIBDVBCSA_FPU="" ;;
    esac
fi

# This library's configure will set aggressive optimisation flags by itself
CFLAGS=`echo $CFLAGS | sed -e "s|-Os||g"`

PKG_CONFIGURE_OPTS_TARGET="--disable-shared --enable-static --with-sysroot=$SYSROOT_PREFIX $LIBDVBCSA_FPU"

The patch itself libdvbcsa-1.1.0-rff.patch is too big (1.4 MB text) so can't be included here. Page me if interested. ZIP 300 KB.

Of course I did benchmark cpu time as shown by htop with 120 seconds of ~2 Mbps video each.
Focus was on the "device 1 receiv" receiver thread of vdr.bin, which handles decryption.

Code:
libdvbcsa 1.1.0:
FTA               1.08s
Encrypted        26.64s

libdvbcsa 1.1.0 w/NEON:
FTA               1.36s
Encrypted        13.67s

TLDR; CSA decryption speed using NEON instructions has doubled. Do legst di nieda is a saying where I live for such cases. Tongue
Katastrophentourist


Messages In This Thread
RE: OpenELEC Testbuilds for RaspberryPi (Kodi 16.0) - by MarkT - 2015-08-07, 02:14
Bluetooth on #1003 - by cdvreede - 2015-10-13, 11:08
Re: RE: Bluetooth on #1003 - by Milhouse - 2015-10-13, 13:24
Logout Mark Read Team Forum Stats Members Help
OpenELEC Testbuilds for RaspberryPi (Kodi 16.0)10