Discussion:
[Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video performance issue
Denis Shienkov
2015-11-03 17:20:31 UTC
Permalink
Hi Qt developers.

I have veeery slow video performance with Qt 5.5.1 and the video camera
(frame rate about ~1-3 fps) on Tegra Jetson TK1 device, where the video
stream writes via HDMI interface to the monitor.

My stuff is:

* Qt 5.5.1, cross-compiled himself.
* Tegra Jetson TK1 board [1]
* Logitech c920 USB camera (supports 1920x1080 @ 30 Hz) [2]

I compiled Qt with this C++ flags:

{quote}
DISTRO_OPTS += hard-float

QMAKE_INCDIR += /usr/arm-linux-gnueabihf/include \
/usr/arm-linux-gnueabihf/include/c++/4.8.2 \
/usr/arm-linux-gnueabihf/include/c++/4.8.2/arm-linux-gnueabihf

TEGRA_TK1_CFLAGS = -mcpu=cortex-a15 -mfpu=neon-vfpv4 -marm
QMAKE_CFLAGS += $$TEGRA_TK1_CFLAGS
QMAKE_CXXFLAGS += $$TEGRA_TK1_CFLAGS
{quote}

with the GStreamer v1.0 , the GL and the EGL (2.0, 3.0) support:

{quote}
/home/builder/Projects/qt5/./configure \
-v \
-release \
-opensource \
-confirm-license \
-make libs \
-prefix /opt/qt-5.5 \
-device tegra-tk1 \
-device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- \
-sysroot /home/builder/Projects/tegra/rootfs \
-optimized-qmake \
-alsa \
-gstreamer 1.0 \
-nomake examples \
-nomake tests \
-no-compile-examples \
-no-gtkstyle \
-no-qml-debug \
-no-nis \
-no-mtdev \
-no-evdev \
-no-tslib \
-no-harfbuzz \
-no-openssl \
-no-libproxy \
-no-pulseaudio \
-no-cups \
-no-icu \
-no-fontconfig \
-no-sql-db2 \
-no-sql-mysql \
-no-sql-oci \
-no-sql-odbc \
-no-sql-psql \
-no-sql-sqlite \
-no-sql-sqlite2 \
-no-sql-ibase \
-no-sql-tds \
-no-directfb \
-no-xcb \
-no-xcb-xlib \
-no-glib \
-system-zlib \
-qt-libjpeg \
-qt-libpng \
-qt-freetype \
-opengl es2 \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtconnectivity \
-skip qtdoc \
-skip qtdocgallery \
-skip qtenginio \
-skip qtfeedback \
-skip qtimageformats \
-skip qtlocation \
-skip qtmacextras \
-skip qtpim \
-skip qtqa \
-skip qtquick1 \
-skip qtquickcontrols \
-skip qtrepotools \
-skip qtsensors \
-skip qtserialport \
-skip qtsystems \
-skip qttools \
-skip qttranslations \
-skip qtwayland \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebkit \
-skip qtwebkit-examples \
-skip qtwebsockets \
-skip qtwinextras \
{quote}

Resulting configuration are following:

{quote}
Support enabled for:
Accessibility .......... yes
ALSA ................... yes
CUPS ................... no
Evdev .................. no
FontConfig ............. no
FreeType ............... qt
Glib ................... no
GStreamer .............. yes (1.0)
GTK theme .............. no
HarfBuzz ............... no
Iconv .................. yes
ICU .................... no
Image formats:
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using bundled copy)
PNG .................. yes (in QtGui, using bundled copy)
journald ............... no
libinput................ no
mtdev .................. no
Networking:
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
libproxy.............. no
OpenSSL .............. no
NIS .................... no
OpenGL / OpenVG:
EGL .................. yes
OpenGL ............... yes (OpenGL ES 2.0+)
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. yes
PulseAudio ............. no
QPA backends:
DirectFB ............. no
EGLFS ................ yes
EGLFS i.MX6....... . no
EGLFS KMS .......... yes
EGLFS Mali ......... no
EGLFS Raspberry Pi . no
EGLFS X11 .......... yes
LinuxFB .............. yes
XCB .................. no
Session management ..... yes
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... no
TDS .................. no
tslib .................. no
udev ................... yes
xkbcommon-x11........... no
xkbcommon-evdev......... no
zlib ................... yes (system library)
{quote}

I tried to launch the QtMultimedia's Camera example (which does not use
QML) via SSH connection
to the Tegra's device, like:

= using LinuxFB =

{quote}
$ ./camera -platform linuxfb:fb=/dev/fb1
{quote}

= using EGLFS via X =
{quote}
$ export DISPLAY=:0
$ export |QT_QPA_EGLFS_INTEGRATION=eglfs_x11|
$ startx &
$ ./camera -platform eglfs
{quote}

= using EGLFS via KMS =

{quote}
$ export DISPLAY=
$ export |QT_QPA_EGLFS_INTEGRATION=eglfs_kms|
$ ./camera -platform eglfs
{quote}

Use of LinuxFB and EGLFS via X gives very slow video performance (~3 fps
as I spoke before).

Use of EGLFS via KMS gives folloving error:

{quote}
Could not find DRM device
Aborted
{quote}

I found out in the google yours blog [3] from Laszlo Agocs in which
Tegra Jetson is mentioned,
but there are no details about building, running and so on.

So, my question is:

* do you have any trics and recommendations how to properly compile Qt
on Tegra Jetson TK1 (maybe requires another flags and so on)?
* how to run the GUI application properly with KMS and so on?
* how to check that are used the HW rendering instead of SW rendering of
video?


BR,
Denis

===========
[1] http://elinux.org/Jetson_TK1
[2] http://support.logitech.com/product/hd-pro-webcam-c920
[3]
https://blog.qt.io/blog/2015/03/03/qt-weekly-28-qt-and-cuda-on-the-jetson-tk1/
Jason H
2015-11-03 20:58:49 UTC
Permalink
_______________________________________________
Interest mailing list
***@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
Agocs Laszlo
2015-11-04 09:26:20 UTC
Permalink
* do you have any trics and recommendations how to properly compile Qt on Tegra Jetson TK1 (maybe requires another flags and so on)?

What you have should be good enough. Qt 5.6 comes with Jetson Pro support and it looks more or less the same when it comes to the compiler flags: http://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf

* how to run the GUI application properly with KMS and so on?

You can’t. AFAIK the public TK1 is pretty much X11 only with NVIDIA’s binary drivers. (the Jetson Pro is a different story, though) You could try an open-source stack with Nouveau for KMS, Wayland, etc. but no idea how stable that is nowadays.

Video with Qt Multimedia did not really work out of the box the last time I tried it. It has not been investigated much since. Anyway, the slow speeds are likely related to the camera/GStreamer/QtMultimedia, not Qt in general as Qt apps are known to run pretty well on the TK1.

Best regards,
Laszlo


From: Interest [mailto:interest-***@qt-project.org] On Behalf Of Jason H
Sent: 3. november 2015 21:59
To: Denis Shienkov <***@gmail.com>
Cc: Thiago Macieira <***@intel.com>; ***@qt-project.org
Subject: Re: [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video performance issue

I didn't use that confguration, but I have compiled Qt on an Atom with a Tegra chipset. I vaguely remember optimizing the video stack. By default it was using a CPU renderer, but I beulve the trick was re-compiling GStreamer to use the proper hardware acceleration. There may have been an environment variable involved in getting GStreamer to select the proper back-end -- that is to say GStreamer had it own envionment variable , not a QT_ one -- IIRC.

I am sorry I can't be more specific, but maybe that can get you in the right direction.

Also, I remember using the 'top' command and I think it being rather obvious who who the culprit was who was not using hardware rendering. Once I got it all set, even on that old Atom, it was doing 30fps with less than 10% CPU.

That said, in my experience linuxFB is extremely slow, never use it for video.

If you can't find the DRM device, then you are missing the Direct Render Mode drivers for it. That said, I've never used DRM without X.


Sent: Tuesday, November 03, 2015 at 12:20 PM
From: "Denis Shienkov" <***@gmail.com<mailto:***@gmail.com>>
To: ***@qt-project.org<mailto:***@qt-project.org>
Cc: "Thiago Macieira" <***@intel.com<mailto:***@intel.com>>
Subject: [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video performance issue
Hi Qt developers.

I have veeery slow video performance with Qt 5.5.1 and the video camera (frame rate about ~1-3 fps) on Tegra Jetson TK1 device, where the video stream writes via HDMI interface to the monitor.

My stuff is:

* Qt 5.5.1, cross-compiled himself.
* Tegra Jetson TK1 board [1]
* Logitech c920 USB camera (supports 1920x1080 @ 30 Hz) [2]

I compiled Qt with this C++ flags:

{quote}
DISTRO_OPTS += hard-float

QMAKE_INCDIR += /usr/arm-linux-gnueabihf/include \
/usr/arm-linux-gnueabihf/include/c++/4.8.2 \
/usr/arm-linux-gnueabihf/include/c++/4.8.2/arm-linux-gnueabihf

TEGRA_TK1_CFLAGS = -mcpu=cortex-a15 -mfpu=neon-vfpv4 -marm
QMAKE_CFLAGS += $$TEGRA_TK1_CFLAGS
QMAKE_CXXFLAGS += $$TEGRA_TK1_CFLAGS
{quote}

with the GStreamer v1.0 , the GL and the EGL (2.0, 3.0) support:

{quote}
/home/builder/Projects/qt5/./configure \
-v \
-release \
-opensource \
-confirm-license \
-make libs \
-prefix /opt/qt-5.5 \
-device tegra-tk1 \
-device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- \
-sysroot /home/builder/Projects/tegra/rootfs \
-optimized-qmake \
-alsa \
-gstreamer 1.0 \
-nomake examples \
-nomake tests \
-no-compile-examples \
-no-gtkstyle \
-no-qml-debug \
-no-nis \
-no-mtdev \
-no-evdev \
-no-tslib \
-no-harfbuzz \
-no-openssl \
-no-libproxy \
-no-pulseaudio \
-no-cups \
-no-icu \
-no-fontconfig \
-no-sql-db2 \
-no-sql-mysql \
-no-sql-oci \
-no-sql-odbc \
-no-sql-psql \
-no-sql-sqlite \
-no-sql-sqlite2 \
-no-sql-ibase \
-no-sql-tds \
-no-directfb \
-no-xcb \
-no-xcb-xlib \
-no-glib \
-system-zlib \
-qt-libjpeg \
-qt-libpng \
-qt-freetype \
-opengl es2 \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtconnectivity \
-skip qtdoc \
-skip qtdocgallery \
-skip qtenginio \
-skip qtfeedback \
-skip qtimageformats \
-skip qtlocation \
-skip qtmacextras \
-skip qtpim \
-skip qtqa \
-skip qtquick1 \
-skip qtquickcontrols \
-skip qtrepotools \
-skip qtsensors \
-skip qtserialport \
-skip qtsystems \
-skip qttools \
-skip qttranslations \
-skip qtwayland \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebkit \
-skip qtwebkit-examples \
-skip qtwebsockets \
-skip qtwinextras \
{quote}

Resulting configuration are following:

{quote}
Support enabled for:
Accessibility .......... yes
ALSA ................... yes
CUPS ................... no
Evdev .................. no
FontConfig ............. no
FreeType ............... qt
Glib ................... no
GStreamer .............. yes (1.0)
GTK theme .............. no
HarfBuzz ............... no
Iconv .................. yes
ICU .................... no
Image formats:
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using bundled copy)
PNG .................. yes (in QtGui, using bundled copy)
journald ............... no
libinput................ no
mtdev .................. no
Networking:
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
libproxy.............. no
OpenSSL .............. no
NIS .................... no
OpenGL / OpenVG:
EGL .................. yes
OpenGL ............... yes (OpenGL ES 2.0+)
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. yes
PulseAudio ............. no
QPA backends:
DirectFB ............. no
EGLFS ................ yes
EGLFS i.MX6....... . no
EGLFS KMS .......... yes
EGLFS Mali ......... no
EGLFS Raspberry Pi . no
EGLFS X11 .......... yes
LinuxFB .............. yes
XCB .................. no
Session management ..... yes
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... no
TDS .................. no
tslib .................. no
udev ................... yes
xkbcommon-x11........... no
xkbcommon-evdev......... no
zlib ................... yes (system library)
{quote}

I tried to launch the QtMultimedia's Camera example (which does not use QML) via SSH connection
to the Tegra's device, like:

= using LinuxFB =

{quote}
$ ./camera -platform linuxfb:fb=/dev/fb1
{quote}

= using EGLFS via X =
{quote}
$ export DISPLAY=:0
$ export QT_QPA_EGLFS_INTEGRATION=eglfs_x11
$ startx &
$ ./camera -platform eglfs
{quote}

= using EGLFS via KMS =

{quote}
$ export DISPLAY=
$ export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
$ ./camera -platform eglfs
{quote}

Use of LinuxFB and EGLFS via X gives very slow video performance (~3 fps as I spoke before).

Use of EGLFS via KMS gives folloving error:

{quote}
Could not find DRM device
Aborted
{quote}

I found out in the google yours blog [3] from Laszlo Agocs in which Tegra Jetson is mentioned,
but there are no details about building, running and so on.

So, my question is:

* do you have any trics and recommendations how to properly compile Qt on Tegra Jetson TK1 (maybe requires another flags and so on)?
* how to run the GUI application properly with KMS and so on?
* how to check that are used the HW rendering instead of SW rendering of video?


BR,
Denis

===========
[1] http://elinux.org/Jetson_TK1
[2] http://support.logitech.com/product/hd-pro-webcam-c920
[3] https://blog.qt.io/blog/2015/03/03/qt-weekly-28-qt-and-cuda-on-the-jetson-tk1/

_______________________________________________ Interest mailing list ***@qt-project.org<mailto:***@qt-project.org> http://lists.qt-project.org/mailman/listinfo/interest
Denis Shienkov
2015-11-04 18:08:26 UTC
Permalink
Laszlo, thanks for your answer.

So, I have another questions:

1. What is "eglfs_kms_egldevice" ? Is it introduced in Qt 5.6 only? What
for this option? Is is equal to "eglfs_kms" option?

2. Is it possible to change the Gstreamer's sinks from Qt application?
Is it make sense?
Because according to NVIDIA Tegra's documentation [1], I can (?) run the
'gst-launch' utility using different sinks,
like 'xvimagesink', 'nv_omx_hdmi_videosink', 'nveglglessink' and so on
to test performance with the native stuff..

BR,
Denis

-----
[1]
http://developer.download.nvidia.com/embedded/L4T/r21_Release_v3.0/L4T_Jetson_TK1_Multimedia_User_Guide_V2.1.pdf
Post by Denis Shienkov
* do you have any trics and recommendations how to properly compile Qt
on Tegra Jetson TK1 (maybe requires another flags and so on)?
What you have should be good enough. Qt 5.6 comes with Jetson Pro
support and it looks more or less the same when it comes to the
http://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf
* how to run the GUI application properly with KMS and so on?
You can’t. AFAIK the public TK1 is pretty much X11 only with NVIDIA’s
binary drivers. (the Jetson Pro is a different story, though) You
could try an open-source stack with Nouveau for KMS, Wayland, etc. but
no idea how stable that is nowadays.
Video with Qt Multimedia did not really work out of the box the last
time I tried it. It has not been investigated much since. Anyway, the
slow speeds are likely related to the camera/GStreamer/QtMultimedia,
not Qt in general as Qt apps are known to run pretty well on the TK1.
Best regards,
Laszlo
*Jason H
*Sent:* 3. november 2015 21:59
*Subject:* Re: [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video
performance issue
I didn't use that confguration, but I have compiled Qt on an Atom with
a Tegra chipset. I vaguely remember optimizing the video stack. By
default it was using a CPU renderer, but I beulve the trick was
re-compiling GStreamer to use the proper hardware acceleration. There
may have been an environment variable involved in getting GStreamer to
select the proper back-end -- that is to say GStreamer had it own
envionment variable , not a QT_ one -- IIRC.
I am sorry I can't be more specific, but maybe that can get you in the right direction.
Also, I remember using the 'top' command and I think it being rather
obvious who who the culprit was who was not using hardware rendering.
Once I got it all set, even on that old Atom, it was doing 30fps with
less than 10% CPU.
That said, in my experience linuxFB is extremely slow, never use it for video.
If you can't find the DRM device, then you are missing the Direct
Render Mode drivers for it. That said, I've never used DRM without X.
*Sent:* Tuesday, November 03, 2015 at 12:20 PM
*Subject:* [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video
performance issue
Hi Qt developers.
I have veeery slow video performance with Qt 5.5.1 and the video
camera (frame rate about ~1-3 fps) on Tegra Jetson TK1 device, where
the video stream writes via HDMI interface to the monitor.
* Qt 5.5.1, cross-compiled himself.
* Tegra Jetson TK1 board [1]
{quote}
DISTRO_OPTS += hard-float
QMAKE_INCDIR += /usr/arm-linux-gnueabihf/include \
/usr/arm-linux-gnueabihf/include/c++/4.8.2 \
/usr/arm-linux-gnueabihf/include/c++/4.8.2/arm-linux-gnueabihf
TEGRA_TK1_CFLAGS = -mcpu=cortex-a15 -mfpu=neon-vfpv4 -marm
QMAKE_CFLAGS += $$TEGRA_TK1_CFLAGS
QMAKE_CXXFLAGS += $$TEGRA_TK1_CFLAGS
{quote}
{quote}
/home/builder/Projects/qt5/./configure \
-v \
-release \
-opensource \
-confirm-license \
-make libs \
-prefix /opt/qt-5.5 \
-device tegra-tk1 \
-device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- \
-sysroot /home/builder/Projects/tegra/rootfs \
-optimized-qmake \
-alsa \
-gstreamer 1.0 \
-nomake examples \
-nomake tests \
-no-compile-examples \
-no-gtkstyle \
-no-qml-debug \
-no-nis \
-no-mtdev \
-no-evdev \
-no-tslib \
-no-harfbuzz \
-no-openssl \
-no-libproxy \
-no-pulseaudio \
-no-cups \
-no-icu \
-no-fontconfig \
-no-sql-db2 \
-no-sql-mysql \
-no-sql-oci \
-no-sql-odbc \
-no-sql-psql \
-no-sql-sqlite \
-no-sql-sqlite2 \
-no-sql-ibase \
-no-sql-tds \
-no-directfb \
-no-xcb \
-no-xcb-xlib \
-no-glib \
-system-zlib \
-qt-libjpeg \
-qt-libpng \
-qt-freetype \
-opengl es2 \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtconnectivity \
-skip qtdoc \
-skip qtdocgallery \
-skip qtenginio \
-skip qtfeedback \
-skip qtimageformats \
-skip qtlocation \
-skip qtmacextras \
-skip qtpim \
-skip qtqa \
-skip qtquick1 \
-skip qtquickcontrols \
-skip qtrepotools \
-skip qtsensors \
-skip qtserialport \
-skip qtsystems \
-skip qttools \
-skip qttranslations \
-skip qtwayland \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebkit \
-skip qtwebkit-examples \
-skip qtwebsockets \
-skip qtwinextras \
{quote}
{quote}
Accessibility .......... yes
ALSA ................... yes
CUPS ................... no
Evdev .................. no
FontConfig ............. no
FreeType ............... qt
Glib ................... no
GStreamer .............. yes (1.0)
GTK theme .............. no
HarfBuzz ............... no
Iconv .................. yes
ICU .................... no
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using bundled copy)
PNG .................. yes (in QtGui, using bundled copy)
journald ............... no
libinput................ no
mtdev .................. no
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
libproxy.............. no
OpenSSL .............. no
NIS .................... no
EGL .................. yes
OpenGL ............... yes (OpenGL ES 2.0+)
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. yes
PulseAudio ............. no
DirectFB ............. no
EGLFS ................ yes
EGLFS i.MX6....... . no
EGLFS KMS .......... yes
EGLFS Mali ......... no
EGLFS Raspberry Pi . no
EGLFS X11 .......... yes
LinuxFB .............. yes
XCB .................. no
Session management ..... yes
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... no
TDS .................. no
tslib .................. no
udev ................... yes
xkbcommon-x11........... no
xkbcommon-evdev......... no
zlib ................... yes (system library)
{quote}
I tried to launch the QtMultimedia's Camera example (which does not
use QML) via SSH connection
= using LinuxFB =
{quote}
$ ./camera -platform linuxfb:fb=/dev/fb1
{quote}
= using EGLFS via X =
{quote}
$ export DISPLAY=:0
$ export |QT_QPA_EGLFS_INTEGRATION=eglfs_x11|
$ startx &
$ ./camera -platform eglfs
{quote}
= using EGLFS via KMS =
{quote}
$ export DISPLAY=
$ export |QT_QPA_EGLFS_INTEGRATION=eglfs_kms|
$ ./camera -platform eglfs
{quote}
Use of LinuxFB and EGLFS via X gives very slow video performance (~3
fps as I spoke before).
{quote}
Could not find DRM device
Aborted
{quote}
I found out in the google yours blog [3] from Laszlo Agocs in which
Tegra Jetson is mentioned,
but there are no details about building, running and so on.
* do you have any trics and recommendations how to properly compile Qt
on Tegra Jetson TK1 (maybe requires another flags and so on)?
* how to run the GUI application properly with KMS and so on?
* how to check that are used the HW rendering instead of SW rendering of video?
BR,
Denis
===========
[1] http://elinux.org/Jetson_TK1
[2] http://support.logitech.com/product/hd-pro-webcam-c920
[3]
https://blog.qt.io/blog/2015/03/03/qt-weekly-28-qt-and-cuda-on-the-jetson-tk1/
_______________________________________________ Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
Agocs Laszlo
2015-11-05 08:47:18 UTC
Permalink
As for #1, yes, the new backend is 5.6 only. It is different from eglfs_kms. The latter uses GBM for buffer management while the new one relies on EGLDevice, EGLOutput and EGLStream. (if interested in the details, check this presentation: http://www.x.org/wiki/Events/XDC2014/XDC2014RitgerEGLNonMesa ) That said, it most likely won’t help you since I doubt this is functional in the Linux for Tegra images for the TK1.

Best regards,
Laszlo

From: Denis Shienkov [mailto:***@gmail.com]
Sent: 4. november 2015 19:08
To: ***@qt-project.org
Cc: Agocs Laszlo <***@theqtcompany.com>; Thiago Macieira <***@intel.com>; Lopes Yoann <***@theqtcompany.com>
Subject: Re: [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video performance issue

Laszlo, thanks for your answer.

So, I have another questions:

1. What is "eglfs_kms_egldevice" ? Is it introduced in Qt 5.6 only? What for this option? Is is equal to "eglfs_kms" option?

2. Is it possible to change the Gstreamer's sinks from Qt application? Is it make sense?
Because according to NVIDIA Tegra's documentation [1], I can (?) run the 'gst-launch' utility using different sinks,
like 'xvimagesink', 'nv_omx_hdmi_videosink', 'nveglglessink' and so on to test performance with the native stuff..

BR,
Denis

-----
[1] http://developer.download.nvidia.com/embedded/L4T/r21_Release_v3.0/L4T_Jetson_TK1_Multimedia_User_Guide_V2.1.pdf

04.11.2015 12:26, Agocs Laszlo пОшет:
* do you have any trics and recommendations how to properly compile Qt on Tegra Jetson TK1 (maybe requires another flags and so on)?

What you have should be good enough. Qt 5.6 comes with Jetson Pro support and it looks more or less the same when it comes to the compiler flags: http://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf

* how to run the GUI application properly with KMS and so on?

You can’t. AFAIK the public TK1 is pretty much X11 only with NVIDIA’s binary drivers. (the Jetson Pro is a different story, though) You could try an open-source stack with Nouveau for KMS, Wayland, etc. but no idea how stable that is nowadays.

Video with Qt Multimedia did not really work out of the box the last time I tried it. It has not been investigated much since. Anyway, the slow speeds are likely related to the camera/GStreamer/QtMultimedia, not Qt in general as Qt apps are known to run pretty well on the TK1.

Best regards,
Laszlo


From: Interest [mailto:interest-***@qt-project.org] On Behalf Of Jason H
Sent: 3. november 2015 21:59
To: Denis Shienkov <***@gmail.com><mailto:***@gmail.com>
Cc: Thiago Macieira <***@intel.com><mailto:***@intel.com>; ***@qt-project.org<mailto:***@qt-project.org>
Subject: Re: [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video performance issue

I didn't use that confguration, but I have compiled Qt on an Atom with a Tegra chipset. I vaguely remember optimizing the video stack. By default it was using a CPU renderer, but I beulve the trick was re-compiling GStreamer to use the proper hardware acceleration. There may have been an environment variable involved in getting GStreamer to select the proper back-end -- that is to say GStreamer had it own envionment variable , not a QT_ one -- IIRC.

I am sorry I can't be more specific, but maybe that can get you in the right direction.

Also, I remember using the 'top' command and I think it being rather obvious who who the culprit was who was not using hardware rendering. Once I got it all set, even on that old Atom, it was doing 30fps with less than 10% CPU.

That said, in my experience linuxFB is extremely slow, never use it for video.

If you can't find the DRM device, then you are missing the Direct Render Mode drivers for it. That said, I've never used DRM without X.


Sent: Tuesday, November 03, 2015 at 12:20 PM
From: "Denis Shienkov" <***@gmail.com<mailto:***@gmail.com>>
To: ***@qt-project.org<mailto:***@qt-project.org>
Cc: "Thiago Macieira" <***@intel.com<mailto:***@intel.com>>
Subject: [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video performance issue
Hi Qt developers.

I have veeery slow video performance with Qt 5.5.1 and the video camera (frame rate about ~1-3 fps) on Tegra Jetson TK1 device, where the video stream writes via HDMI interface to the monitor.

My stuff is:

* Qt 5.5.1, cross-compiled himself.
* Tegra Jetson TK1 board [1]
* Logitech c920 USB camera (supports 1920x1080 @ 30 Hz) [2]

I compiled Qt with this C++ flags:

{quote}
DISTRO_OPTS += hard-float

QMAKE_INCDIR += /usr/arm-linux-gnueabihf/include \
/usr/arm-linux-gnueabihf/include/c++/4.8.2 \
/usr/arm-linux-gnueabihf/include/c++/4.8.2/arm-linux-gnueabihf

TEGRA_TK1_CFLAGS = -mcpu=cortex-a15 -mfpu=neon-vfpv4 -marm
QMAKE_CFLAGS += $$TEGRA_TK1_CFLAGS
QMAKE_CXXFLAGS += $$TEGRA_TK1_CFLAGS
{quote}

with the GStreamer v1.0 , the GL and the EGL (2.0, 3.0) support:

{quote}
/home/builder/Projects/qt5/./configure \
-v \
-release \
-opensource \
-confirm-license \
-make libs \
-prefix /opt/qt-5.5 \
-device tegra-tk1 \
-device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- \
-sysroot /home/builder/Projects/tegra/rootfs \
-optimized-qmake \
-alsa \
-gstreamer 1.0 \
-nomake examples \
-nomake tests \
-no-compile-examples \
-no-gtkstyle \
-no-qml-debug \
-no-nis \
-no-mtdev \
-no-evdev \
-no-tslib \
-no-harfbuzz \
-no-openssl \
-no-libproxy \
-no-pulseaudio \
-no-cups \
-no-icu \
-no-fontconfig \
-no-sql-db2 \
-no-sql-mysql \
-no-sql-oci \
-no-sql-odbc \
-no-sql-psql \
-no-sql-sqlite \
-no-sql-sqlite2 \
-no-sql-ibase \
-no-sql-tds \
-no-directfb \
-no-xcb \
-no-xcb-xlib \
-no-glib \
-system-zlib \
-qt-libjpeg \
-qt-libpng \
-qt-freetype \
-opengl es2 \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtconnectivity \
-skip qtdoc \
-skip qtdocgallery \
-skip qtenginio \
-skip qtfeedback \
-skip qtimageformats \
-skip qtlocation \
-skip qtmacextras \
-skip qtpim \
-skip qtqa \
-skip qtquick1 \
-skip qtquickcontrols \
-skip qtrepotools \
-skip qtsensors \
-skip qtserialport \
-skip qtsystems \
-skip qttools \
-skip qttranslations \
-skip qtwayland \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebkit \
-skip qtwebkit-examples \
-skip qtwebsockets \
-skip qtwinextras \
{quote}

Resulting configuration are following:

{quote}
Support enabled for:
Accessibility .......... yes
ALSA ................... yes
CUPS ................... no
Evdev .................. no
FontConfig ............. no
FreeType ............... qt
Glib ................... no
GStreamer .............. yes (1.0)
GTK theme .............. no
HarfBuzz ............... no
Iconv .................. yes
ICU .................... no
Image formats:
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using bundled copy)
PNG .................. yes (in QtGui, using bundled copy)
journald ............... no
libinput................ no
mtdev .................. no
Networking:
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
libproxy.............. no
OpenSSL .............. no
NIS .................... no
OpenGL / OpenVG:
EGL .................. yes
OpenGL ............... yes (OpenGL ES 2.0+)
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. yes
PulseAudio ............. no
QPA backends:
DirectFB ............. no
EGLFS ................ yes
EGLFS i.MX6....... . no
EGLFS KMS .......... yes
EGLFS Mali ......... no
EGLFS Raspberry Pi . no
EGLFS X11 .......... yes
LinuxFB .............. yes
XCB .................. no
Session management ..... yes
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... no
TDS .................. no
tslib .................. no
udev ................... yes
xkbcommon-x11........... no
xkbcommon-evdev......... no
zlib ................... yes (system library)
{quote}

I tried to launch the QtMultimedia's Camera example (which does not use QML) via SSH connection
to the Tegra's device, like:

= using LinuxFB =

{quote}
$ ./camera -platform linuxfb:fb=/dev/fb1
{quote}

= using EGLFS via X =
{quote}
$ export DISPLAY=:0
$ export QT_QPA_EGLFS_INTEGRATION=eglfs_x11
$ startx &
$ ./camera -platform eglfs
{quote}

= using EGLFS via KMS =

{quote}
$ export DISPLAY=
$ export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
$ ./camera -platform eglfs
{quote}

Use of LinuxFB and EGLFS via X gives very slow video performance (~3 fps as I spoke before).

Use of EGLFS via KMS gives folloving error:

{quote}
Could not find DRM device
Aborted
{quote}

I found out in the google yours blog [3] from Laszlo Agocs in which Tegra Jetson is mentioned,
but there are no details about building, running and so on.

So, my question is:

* do you have any trics and recommendations how to properly compile Qt on Tegra Jetson TK1 (maybe requires another flags and so on)?
* how to run the GUI application properly with KMS and so on?
* how to check that are used the HW rendering instead of SW rendering of video?


BR,
Denis

===========
[1] http://elinux.org/Jetson_TK1
[2] http://support.logitech.com/product/hd-pro-webcam-c920
[3] https://blog.qt.io/blog/2015/03/03/qt-weekly-28-qt-and-cuda-on-the-jetson-tk1/

_______________________________________________ Interest mailing list ***@qt-project.org<mailto:***@qt-project.org> http://lists.qt-project.org/mailman/listinfo/interest
Denis Shienkov
2015-11-05 10:12:58 UTC
Permalink
Post by Agocs Laszlo
That said, it most likely won’t help you since I doubt this is functional
in the Linux for Tegra images for the TK1.

Ok, thanks.. let's will forget about KMS/DRM, because now I want to use
EGLFS via X11.

So, now, directly run of the 'standard' GStreamer's 'gst-launch' tool it is
allowed for me to show a video from the camera Logitech c920 without
freezes (but with some artifacts):

{quote}
***@tegra-ubuntu:~$ gst-launch-1.0 -e v4l2src device=/dev/video0 !
'video/x-raw, format=(string)I420, framerate=20/1' ! xvimagesink sync=false
{quote}

where I use such parameters as 'framerate=30' and 'sync=false'.

So, is it possible to pass this parameters to the Qt (QML) application
which are used GStreamer too?

BR,
Denis
Post by Agocs Laszlo
As for #1, yes, the new backend is 5.6 only. It is different from
eglfs_kms. The latter uses GBM for buffer management while the new one
relies on EGLDevice, EGLOutput and EGLStream. (if interested in the
http://www.x.org/wiki/Events/XDC2014/XDC2014RitgerEGLNonMesa ) That said,
it most likely won’t help you since I doubt this is functional in the Linux
for Tegra images for the TK1.
Best regards,
Laszlo
*Sent:* 4. november 2015 19:08
*Subject:* Re: [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video
performance issue
Laszlo, thanks for your answer.
1. What is "eglfs_kms_egldevice" ? Is it introduced in Qt 5.6 only? What
for this option? Is is equal to "eglfs_kms" option?
2. Is it possible to change the Gstreamer's sinks from Qt application? Is it make sense?
Because according to NVIDIA Tegra's documentation [1], I can (?) run the
'gst-launch' utility using different sinks,
like 'xvimagesink', 'nv_omx_hdmi_videosink', 'nveglglessink' and so on to
test performance with the native stuff..
BR,
Denis
-----
[1]
http://developer.download.nvidia.com/embedded/L4T/r21_Release_v3.0/L4T_Jetson_TK1_Multimedia_User_Guide_V2.1.pdf
* do you have any trics and recommendations how to properly compile Qt on
Tegra Jetson TK1 (maybe requires another flags and so on)?
What you have should be good enough. Qt 5.6 comes with Jetson Pro support
http://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf
* how to run the GUI application properly with KMS and so on?
You can’t. AFAIK the public TK1 is pretty much X11 only with NVIDIA’s
binary drivers. (the Jetson Pro is a different story, though) You could try
an open-source stack with Nouveau for KMS, Wayland, etc. but no idea how
stable that is nowadays.
Video with Qt Multimedia did not really work out of the box the last time
I tried it. It has not been investigated much since. Anyway, the slow
speeds are likely related to the camera/GStreamer/QtMultimedia, not Qt in
general as Qt apps are known to run pretty well on the TK1.
Best regards,
Laszlo
*Sent:* 3. november 2015 21:59
*Subject:* Re: [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video
performance issue
I didn't use that confguration, but I have compiled Qt on an Atom with a
Tegra chipset. I vaguely remember optimizing the video stack. By default it
was using a CPU renderer, but I beulve the trick was re-compiling GStreamer
to use the proper hardware acceleration. There may have been an environment
variable involved in getting GStreamer to select the proper back-end --
that is to say GStreamer had it own envionment variable , not a QT_ one --
IIRC.
I am sorry I can't be more specific, but maybe that can get you in the right direction.
Also, I remember using the 'top' command and I think it being rather
obvious who who the culprit was who was not using hardware rendering. Once
I got it all set, even on that old Atom, it was doing 30fps with less than
10% CPU.
That said, in my experience linuxFB is extremely slow, never use it for video.
If you can't find the DRM device, then you are missing the Direct Render
Mode drivers for it. That said, I've never used DRM without X.
*Sent:* Tuesday, November 03, 2015 at 12:20 PM
*Subject:* [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video
performance issue
Hi Qt developers.
I have veeery slow video performance with Qt 5.5.1 and the video camera
(frame rate about ~1-3 fps) on Tegra Jetson TK1 device, where the video
stream writes via HDMI interface to the monitor.
* Qt 5.5.1, cross-compiled himself.
* Tegra Jetson TK1 board [1]
{quote}
DISTRO_OPTS += hard-float
QMAKE_INCDIR += /usr/arm-linux-gnueabihf/include \
/usr/arm-linux-gnueabihf/include/c++/4.8.2 \
/usr/arm-linux-gnueabihf/include/c++/4.8.2/arm-linux-gnueabihf
TEGRA_TK1_CFLAGS = -mcpu=cortex-a15 -mfpu=neon-vfpv4 -marm
QMAKE_CFLAGS += $$TEGRA_TK1_CFLAGS
QMAKE_CXXFLAGS += $$TEGRA_TK1_CFLAGS
{quote}
{quote}
/home/builder/Projects/qt5/./configure \
-v \
-release \
-opensource \
-confirm-license \
-make libs \
-prefix /opt/qt-5.5 \
-device tegra-tk1 \
-device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- \
-sysroot /home/builder/Projects/tegra/rootfs \
-optimized-qmake \
-alsa \
-gstreamer 1.0 \
-nomake examples \
-nomake tests \
-no-compile-examples \
-no-gtkstyle \
-no-qml-debug \
-no-nis \
-no-mtdev \
-no-evdev \
-no-tslib \
-no-harfbuzz \
-no-openssl \
-no-libproxy \
-no-pulseaudio \
-no-cups \
-no-icu \
-no-fontconfig \
-no-sql-db2 \
-no-sql-mysql \
-no-sql-oci \
-no-sql-odbc \
-no-sql-psql \
-no-sql-sqlite \
-no-sql-sqlite2 \
-no-sql-ibase \
-no-sql-tds \
-no-directfb \
-no-xcb \
-no-xcb-xlib \
-no-glib \
-system-zlib \
-qt-libjpeg \
-qt-libpng \
-qt-freetype \
-opengl es2 \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtconnectivity \
-skip qtdoc \
-skip qtdocgallery \
-skip qtenginio \
-skip qtfeedback \
-skip qtimageformats \
-skip qtlocation \
-skip qtmacextras \
-skip qtpim \
-skip qtqa \
-skip qtquick1 \
-skip qtquickcontrols \
-skip qtrepotools \
-skip qtsensors \
-skip qtserialport \
-skip qtsystems \
-skip qttools \
-skip qttranslations \
-skip qtwayland \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebkit \
-skip qtwebkit-examples \
-skip qtwebsockets \
-skip qtwinextras \
{quote}
{quote}
Accessibility .......... yes
ALSA ................... yes
CUPS ................... no
Evdev .................. no
FontConfig ............. no
FreeType ............... qt
Glib ................... no
GStreamer .............. yes (1.0)
GTK theme .............. no
HarfBuzz ............... no
Iconv .................. yes
ICU .................... no
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using bundled copy)
PNG .................. yes (in QtGui, using bundled copy)
journald ............... no
libinput................ no
mtdev .................. no
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
libproxy.............. no
OpenSSL .............. no
NIS .................... no
EGL .................. yes
OpenGL ............... yes (OpenGL ES 2.0+)
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. yes
PulseAudio ............. no
DirectFB ............. no
EGLFS ................ yes
EGLFS i.MX6....... . no
EGLFS KMS .......... yes
EGLFS Mali ......... no
EGLFS Raspberry Pi . no
EGLFS X11 .......... yes
LinuxFB .............. yes
XCB .................. no
Session management ..... yes
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... no
TDS .................. no
tslib .................. no
udev ................... yes
xkbcommon-x11........... no
xkbcommon-evdev......... no
zlib ................... yes (system library)
{quote}
I tried to launch the QtMultimedia's Camera example (which does not use
QML) via SSH connection
= using LinuxFB =
{quote}
$ ./camera -platform linuxfb:fb=/dev/fb1
{quote}
= using EGLFS via X =
{quote}
$ export DISPLAY=:0
$ export QT_QPA_EGLFS_INTEGRATION=eglfs_x11
$ startx &
$ ./camera -platform eglfs
{quote}
= using EGLFS via KMS =
{quote}
$ export DISPLAY=
$ export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
$ ./camera -platform eglfs
{quote}
Use of LinuxFB and EGLFS via X gives very slow video performance (~3 fps
as I spoke before).
{quote}
Could not find DRM device
Aborted
{quote}
I found out in the google yours blog [3] from Laszlo Agocs in which Tegra
Jetson is mentioned,
but there are no details about building, running and so on.
* do you have any trics and recommendations how to properly compile Qt on
Tegra Jetson TK1 (maybe requires another flags and so on)?
* how to run the GUI application properly with KMS and so on?
* how to check that are used the HW rendering instead of SW rendering of video?
BR,
Denis
===========
[1] http://elinux.org/Jetson_TK1
[2] http://support.logitech.com/product/hd-pro-webcam-c920
[3]
https://blog.qt.io/blog/2015/03/03/qt-weekly-28-qt-and-cuda-on-the-jetson-tk1/
_______________________________________________ Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
Denis Shienkov
2015-11-05 11:10:37 UTC
Permalink
Now all works with Qt in EGLFS via X (no freezes),

{code}
***@tegra-ubuntu:~/Downloads$ ./qml-camera -platform eglfs &
{code}

need just add the Qt camera properties like minimum and maximum frame rates
[1] (15 and 30 in my case).

But the CPU average is ~80% O_o.

And when running the gst-launch only:

{quote}
***@tegra-ubuntu:~/Downloads$ gst-launch-1.0 v4l2src device=/dev/video0
! 'video/x-raw, format=(string)I420, framerate=30/1' ! xvimagesink
sync=false &
{quote}

shows CPU average ~50%..

BR,
Denis

----
[1]
http://doc.qt.io/qt-5/qml-qtmultimedia-camera.html#viewfinder.minimumFrameRate-prop
Post by Agocs Laszlo
Post by Agocs Laszlo
That said, it most likely won’t help you since I doubt this is
functional in the Linux for Tegra images for the TK1.
Ok, thanks.. let's will forget about KMS/DRM, because now I want to use
EGLFS via X11.
So, now, directly run of the 'standard' GStreamer's 'gst-launch' tool it
is allowed for me to show a video from the camera Logitech c920 without
{quote}
'video/x-raw, format=(string)I420, framerate=20/1' ! xvimagesink sync=false
{quote}
where I use such parameters as 'framerate=30' and 'sync=false'.
So, is it possible to pass this parameters to the Qt (QML) application
which are used GStreamer too?
BR,
Denis
Post by Agocs Laszlo
As for #1, yes, the new backend is 5.6 only. It is different from
eglfs_kms. The latter uses GBM for buffer management while the new one
relies on EGLDevice, EGLOutput and EGLStream. (if interested in the
http://www.x.org/wiki/Events/XDC2014/XDC2014RitgerEGLNonMesa ) That
said, it most likely won’t help you since I doubt this is functional in the
Linux for Tegra images for the TK1.
Best regards,
Laszlo
*Sent:* 4. november 2015 19:08
*Subject:* Re: [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video
performance issue
Laszlo, thanks for your answer.
1. What is "eglfs_kms_egldevice" ? Is it introduced in Qt 5.6 only? What
for this option? Is is equal to "eglfs_kms" option?
2. Is it possible to change the Gstreamer's sinks from Qt application? Is it make sense?
Because according to NVIDIA Tegra's documentation [1], I can (?) run the
'gst-launch' utility using different sinks,
like 'xvimagesink', 'nv_omx_hdmi_videosink', 'nveglglessink' and so on to
test performance with the native stuff..
BR,
Denis
-----
[1]
http://developer.download.nvidia.com/embedded/L4T/r21_Release_v3.0/L4T_Jetson_TK1_Multimedia_User_Guide_V2.1.pdf
* do you have any trics and recommendations how to properly compile Qt on
Tegra Jetson TK1 (maybe requires another flags and so on)?
What you have should be good enough. Qt 5.6 comes with Jetson Pro support
http://code.qt.io/cgit/qt/qtbase.git/tree/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf
* how to run the GUI application properly with KMS and so on?
You can’t. AFAIK the public TK1 is pretty much X11 only with NVIDIA’s
binary drivers. (the Jetson Pro is a different story, though) You could try
an open-source stack with Nouveau for KMS, Wayland, etc. but no idea how
stable that is nowadays.
Video with Qt Multimedia did not really work out of the box the last time
I tried it. It has not been investigated much since. Anyway, the slow
speeds are likely related to the camera/GStreamer/QtMultimedia, not Qt in
general as Qt apps are known to run pretty well on the TK1.
Best regards,
Laszlo
*Sent:* 3. november 2015 21:59
*Subject:* Re: [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video
performance issue
I didn't use that confguration, but I have compiled Qt on an Atom with a
Tegra chipset. I vaguely remember optimizing the video stack. By default it
was using a CPU renderer, but I beulve the trick was re-compiling GStreamer
to use the proper hardware acceleration. There may have been an environment
variable involved in getting GStreamer to select the proper back-end --
that is to say GStreamer had it own envionment variable , not a QT_ one --
IIRC.
I am sorry I can't be more specific, but maybe that can get you in the right direction.
Also, I remember using the 'top' command and I think it being rather
obvious who who the culprit was who was not using hardware rendering. Once
I got it all set, even on that old Atom, it was doing 30fps with less than
10% CPU.
That said, in my experience linuxFB is extremely slow, never use it for video.
If you can't find the DRM device, then you are missing the Direct Render
Mode drivers for it. That said, I've never used DRM without X.
*Sent:* Tuesday, November 03, 2015 at 12:20 PM
*Subject:* [Interest] Qt 5.5.x & NVIDIA Tegra Jetson TK1 video
performance issue
Hi Qt developers.
I have veeery slow video performance with Qt 5.5.1 and the video camera
(frame rate about ~1-3 fps) on Tegra Jetson TK1 device, where the video
stream writes via HDMI interface to the monitor.
* Qt 5.5.1, cross-compiled himself.
* Tegra Jetson TK1 board [1]
{quote}
DISTRO_OPTS += hard-float
QMAKE_INCDIR += /usr/arm-linux-gnueabihf/include \
/usr/arm-linux-gnueabihf/include/c++/4.8.2 \
/usr/arm-linux-gnueabihf/include/c++/4.8.2/arm-linux-gnueabihf
TEGRA_TK1_CFLAGS = -mcpu=cortex-a15 -mfpu=neon-vfpv4 -marm
QMAKE_CFLAGS += $$TEGRA_TK1_CFLAGS
QMAKE_CXXFLAGS += $$TEGRA_TK1_CFLAGS
{quote}
{quote}
/home/builder/Projects/qt5/./configure \
-v \
-release \
-opensource \
-confirm-license \
-make libs \
-prefix /opt/qt-5.5 \
-device tegra-tk1 \
-device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf- \
-sysroot /home/builder/Projects/tegra/rootfs \
-optimized-qmake \
-alsa \
-gstreamer 1.0 \
-nomake examples \
-nomake tests \
-no-compile-examples \
-no-gtkstyle \
-no-qml-debug \
-no-nis \
-no-mtdev \
-no-evdev \
-no-tslib \
-no-harfbuzz \
-no-openssl \
-no-libproxy \
-no-pulseaudio \
-no-cups \
-no-icu \
-no-fontconfig \
-no-sql-db2 \
-no-sql-mysql \
-no-sql-oci \
-no-sql-odbc \
-no-sql-psql \
-no-sql-sqlite \
-no-sql-sqlite2 \
-no-sql-ibase \
-no-sql-tds \
-no-directfb \
-no-xcb \
-no-xcb-xlib \
-no-glib \
-system-zlib \
-qt-libjpeg \
-qt-libpng \
-qt-freetype \
-opengl es2 \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtconnectivity \
-skip qtdoc \
-skip qtdocgallery \
-skip qtenginio \
-skip qtfeedback \
-skip qtimageformats \
-skip qtlocation \
-skip qtmacextras \
-skip qtpim \
-skip qtqa \
-skip qtquick1 \
-skip qtquickcontrols \
-skip qtrepotools \
-skip qtsensors \
-skip qtserialport \
-skip qtsystems \
-skip qttools \
-skip qttranslations \
-skip qtwayland \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebkit \
-skip qtwebkit-examples \
-skip qtwebsockets \
-skip qtwinextras \
{quote}
{quote}
Accessibility .......... yes
ALSA ................... yes
CUPS ................... no
Evdev .................. no
FontConfig ............. no
FreeType ............... qt
Glib ................... no
GStreamer .............. yes (1.0)
GTK theme .............. no
HarfBuzz ............... no
Iconv .................. yes
ICU .................... no
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using bundled copy)
PNG .................. yes (in QtGui, using bundled copy)
journald ............... no
libinput................ no
mtdev .................. no
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
libproxy.............. no
OpenSSL .............. no
NIS .................... no
EGL .................. yes
OpenGL ............... yes (OpenGL ES 2.0+)
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. yes
PulseAudio ............. no
DirectFB ............. no
EGLFS ................ yes
EGLFS i.MX6....... . no
EGLFS KMS .......... yes
EGLFS Mali ......... no
EGLFS Raspberry Pi . no
EGLFS X11 .......... yes
LinuxFB .............. yes
XCB .................. no
Session management ..... yes
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... no
TDS .................. no
tslib .................. no
udev ................... yes
xkbcommon-x11........... no
xkbcommon-evdev......... no
zlib ................... yes (system library)
{quote}
I tried to launch the QtMultimedia's Camera example (which does not use
QML) via SSH connection
= using LinuxFB =
{quote}
$ ./camera -platform linuxfb:fb=/dev/fb1
{quote}
= using EGLFS via X =
{quote}
$ export DISPLAY=:0
$ export QT_QPA_EGLFS_INTEGRATION=eglfs_x11
$ startx &
$ ./camera -platform eglfs
{quote}
= using EGLFS via KMS =
{quote}
$ export DISPLAY=
$ export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
$ ./camera -platform eglfs
{quote}
Use of LinuxFB and EGLFS via X gives very slow video performance (~3 fps
as I spoke before).
{quote}
Could not find DRM device
Aborted
{quote}
I found out in the google yours blog [3] from Laszlo Agocs in which Tegra
Jetson is mentioned,
but there are no details about building, running and so on.
* do you have any trics and recommendations how to properly compile Qt on
Tegra Jetson TK1 (maybe requires another flags and so on)?
* how to run the GUI application properly with KMS and so on?
* how to check that are used the HW rendering instead of SW rendering of video?
BR,
Denis
===========
[1] http://elinux.org/Jetson_TK1
[2] http://support.logitech.com/product/hd-pro-webcam-c920
[3]
https://blog.qt.io/blog/2015/03/03/qt-weekly-28-qt-and-cuda-on-the-jetson-tk1/
_______________________________________________ Interest mailing list
http://lists.qt-project.org/mailman/listinfo/interest
Loading...