Sunday, October 4, 2015

Binaries for Hardware Accelerated Qt 5.5.0 Multimedia Backend on Raspberry Pi 1 and 2 (5.0.0 stable)

This package includes mostly bug fixes over beta2. You can consider it stable in the sense that no one complained about severe bugs for a few days. You always have to test before going to production. Please fil bugs to github if needed. Refer to previous articles on how to use.

Download PiOmxTextures 5.0.0 for Pi1 here (extraction code is: 3466).
Download PiOmxTextures 5.0.0 for Pi2 here (extraction code is: ddd0).

Monday, September 28, 2015

Deinterlacing with POT on 1080i Videos

A few weeks ago I came across the interesting task of adding deinterlacing to the POT rendering pipeline.
I had never looked into deinterlacing with POT, but the code was actually present in the repo. By switching the proper enum in the sources deinterlacing could be enabled. The resulting performance was however pretty bad when applied to 1080i videos.
This demo is, instead, the result of a few quick patches:


After a quick investigation it seemed strangely clear that the reason was too much work being done by the VPU. When running without deinterlacing, this is approximately the situation of the VPUs as reported by vcdbg:

[...]
set yrange [-0.1:30.1]
set multiplot
set title 'Core 1 (VPU0)'
set ytics ("Idle" 0, "Int timer0" 1, "Int timer2" 2, "Int codec0" 3, "Int codec2" 4, "Int 3d" 5, "Int msync2" 6, "Int dma3" 7, "Int 0x5e" 8, "Int 0x5f" 9, "Int scaler" 10, "DISPSERVX" 11, "SysTimer" 12, "Dispmanx Ch1 EO" 13, "AUDSRV" 14, "HDMI_HOTPLUG_TM" 15, "HDMI TASK" 16, "KHRN_S" 17, "powerman" 18, "temp_check" 19, "v3d_gfxh16_thre" 20, "VCHIQ-0" 21, "VCHIQr-0" 22, "ILCS_VC" 23, "ILClock" 24, "ILVDecode" 25, "ILADecode" 26, "ILEGLRender" 27, "ILAMixer" 28, "ILVScheduler" 29, "ILARender" 30)
plot 'task.dat' index 30 with boxes lt 5 title 'ILARender 3.39%', 'task.dat' index 29 with boxes lt 1 title 'ILVScheduler 0.26%', 'task.dat' index 28 with boxes lt 2 title 'ILAMixer 1.19%', 'task.dat' index 27 with boxes lt 3 title 'ILEGLRender 46.3%', 'task.dat' index 26 with boxes lt 4 title 'ILADecode 0.64%', 'task.dat' index 25 with boxes lt 11 title 'ILVDecode 0.36%', 'task.dat' index 24 with boxes lt 12 title 'ILClock 0.18%', 'task.dat' index 23 with boxes lt 13 title 'ILCS_VC 0.30%', 'task.dat' index 22 with boxes lt 14 title 'VCHIQr-0 0.01%', 'task.dat' index 21 with boxes lt 15 title 'VCHIQ-0 0.30%', 'task.dat' index 20 with boxes lt 10 title 'v3d_gfxh16_thre 0.02%', 'task.dat' index 19 with boxes lt 9 title 'temp_check 0.02%', 'task.dat' index 18 with boxes lt 5 title 'powerman 0.15%', 'task.dat' index 17 with boxes lt 1 title 'KHRN_S 5.13%', 'task.dat' index 16 with boxes lt 2 title 'HDMI TASK 0.04%', 'task.dat' index 15 with boxes lt 3 title 'HDMI_HOTPLUG_TM 0.01%', 'task.dat' index 14 with boxes lt 4 title 'AUDSRV 0.08%', 'task.dat' index 13 with boxes lt 11 title 'Dispmanx Ch1 EO 0.08%', 'task.dat' index 12 with boxes lt 12 title 'SysTimer 0.16%', 'task.dat' index 11 with boxes lt 13 title 'DISPSERVX 0.14%', 'task.dat' using 1:2:($3/2) index 10 with xerrorbars lt 14 title 'Int scaler 0.07%', 'task.dat' using 1:2:($3/2) index 9 with xerrorbars lt 15 title 'Int 0x5f 0.02%', 'task.dat' using 1:2:($3/2) index 8 with xerrorbars lt 10 title 'Int 0x5e 0.10%', 'task.dat' using 1:2:($3/2) index 7 with xerrorbars lt 9 title 'Int dma3 0.17%', 'task.dat' using 1:2:($3/2) index 6 with xerrorbars lt 5 title 'Int msync2 0.00%', 'task.dat' using 1:2:($3/2) index 5 with xerrorbars lt 1 title 'Int 3d 0.07%', 'task.dat' using 1:2:($3/2) index 4 with xerrorbars lt 2 title 'Int codec2 0.11%', 'task.dat' using 1:2:($3/2) index 3 with xerrorbars lt 3 title 'Int codec0 0.02%', 'task.dat' using 1:2:($3/2) index 2 with xerrorbars lt 4 title 'Int timer2 0.10%', 'task.dat' using 1:2:($3/2) index 1 with xerrorbars lt 11 title 'Int timer0 0.03%', 0 title 'Idle 40.4%'
set nomultiplot
pause -1 'Hit return to continue'

set yrange [-0.1:3.1]
set multiplot
set title 'Core 2 (VPU1)'
set ytics ("Idle" 0, "Int msync3" 1, "khrn_llat_threa" 2, "H264#0 Outer" 3)
plot 'task.dat' index 34 with boxes lt 5 title 'H264#0 Outer 1.96%', 'task.dat' index 33 with boxes lt 1 title 'khrn_llat_threa 1.48%', 'task.dat' using 1:2:($3/2) index 32 with xerrorbars lt 2 title 'Int msync3 0.02%', 0 title 'Idle 96.5%'
set nomultiplot
pause -1 'Hit return to continue'
[...]

By forcing deinterlacing we get this:

[...]
set yrange [-0.1:31.1]
set multiplot
set title 'Core 1 (VPU0)'
set ytics ("Idle" 0, "Int timer0" 1, "Int timer2" 2, "Int codec0" 3, "Int codec2" 4, "Int 3d" 5, "Int msync2" 6, "Int dma3" 7, "Int 0x5e" 8, "Int 0x5f" 9, "Int scaler" 10, "DISPSERVX" 11, "SysTimer" 12, "Dispmanx Ch1 EO" 13, "AUDSRV" 14, "HDMI_HOTPLUG_TM" 15, "HDMI TASK" 16, "KHRN_S" 17, "mbox_read" 18, "powerman" 19, "temp_check" 20, "v3d_gfxh16_thre" 21, "VCHIQ-0" 22, "VCHIQr-0" 23, "ILCS_VC" 24, "ILClock" 25, "ILVDecode" 26, "ILADecode" 27, "ILAMixer" 28, "ILEGLRender" 29, "ILVScheduler" 30, "ILARender" 31)
plot 'task.dat' index 31 with boxes lt 5 title 'ILARender 3.15%', 'task.dat' index 30 with boxes lt 1 title 'ILVScheduler 0.39%', 'task.dat' index 29 with boxes lt 2 title 'ILEGLRender 84.9%', 'task.dat' index 28 with boxes lt 3 title 'ILAMixer 1.42%', 'task.dat' index 27 with boxes lt 4 title 'ILADecode 0.95%', 'task.dat' index 26 with boxes lt 11 title 'ILVDecode 0.35%', 'task.dat' index 25 with boxes lt 12 title 'ILClock 0.36%', 'task.dat' index 24 with boxes lt 13 title 'ILCS_VC 0.36%', 'task.dat' index 23 with boxes lt 14 title 'VCHIQr-0 0.02%', 'task.dat' index 22 with boxes lt 15 title 'VCHIQ-0 0.34%', 'task.dat' index 21 with boxes lt 10 title 'v3d_gfxh16_thre 0.02%', 'task.dat' index 20 with boxes lt 9 title 'temp_check 0.02%', 'task.dat' index 19 with boxes lt 5 title 'powerman 0.14%', 'task.dat' index 18 with boxes lt 1 title 'mbox_read 0.14%', 'task.dat' index 17 with boxes lt 2 title 'KHRN_S 5.10%', 'task.dat' index 16 with boxes lt 3 title 'HDMI TASK 0.03%', 'task.dat' index 15 with boxes lt 4 title 'HDMI_HOTPLUG_TM 0.01%', 'task.dat' index 14 with boxes lt 11 title 'AUDSRV 0.08%', 'task.dat' index 13 with boxes lt 12 title 'Dispmanx Ch1 EO 0.08%', 'task.dat' index 12 with boxes lt 13 title 'SysTimer 0.15%', 'task.dat' index 11 with boxes lt 14 title 'DISPSERVX 0.15%', 'task.dat' using 1:2:($3/2) index 10 with xerrorbars lt 15 title 'Int scaler 0.07%', 'task.dat' using 1:2:($3/2) index 9 with xerrorbars lt 10 title 'Int 0x5f 0.03%', 'task.dat' using 1:2:($3/2) index 8 with xerrorbars lt 9 title 'Int 0x5e 0.11%', 'task.dat' using 1:2:($3/2) index 7 with xerrorbars lt 5 title 'Int dma3 0.19%', 'task.dat' using 1:2:($3/2) index 6 with xerrorbars lt 1 title 'Int msync2 0.01%', 'task.dat' using 1:2:($3/2) index 5 with xerrorbars lt 2 title 'Int 3d 0.06%', 'task.dat' using 1:2:($3/2) index 4 with xerrorbars lt 3 title 'Int codec2 0.13%', 'task.dat' using 1:2:($3/2) index 3 with xerrorbars lt 4 title 'Int codec0 0.01%', 'task.dat' using 1:2:($3/2) index 2 with xerrorbars lt 11 title 'Int timer2 0.11%', 'task.dat' using 1:2:($3/2) index 1 with xerrorbars lt 12 title 'Int timer0 0.04%', 0 title 'Idle 1.01%'
set nomultiplot
pause -1 'Hit return to continue'

set yrange [-0.1:6.1]
set multiplot
set title 'Core 2 (VPU1)'
set ytics ("Idle" 0, "Int msync3" 1, "SysTimer2" 2, "khrn_llat_threa" 3, "H264#0 Outer" 4, "ILARender" 5, "ILImageFX" 6)
plot 'task.dat' index 38 with boxes lt 5 title 'ILImageFX 21.5%', 'task.dat' index 37 with boxes lt 1 title 'ILARender 0.00%', 'task.dat' index 36 with boxes lt 2 title 'H264#0 Outer 1.58%', 'task.dat' index 35 with boxes lt 3 title 'khrn_llat_threa 1.54%', 'task.dat' index 34 with boxes lt 4 title 'SysTimer2 0.02%', 'task.dat' using 1:2:($3/2) index 33 with xerrorbars lt 11 title 'Int msync3 0.02%', 0 title 'Idle 75.2%'
set nomultiplot
pause -1 'Hit return to continue'
[...]

It is clear that one VPU is completely saturated by the EGL component.

By discussing this issue here I added a couple of patches to POT that now allows to reduce the resulting frame rate of the deinterlaced stream and to move the deinterlacing algorithm from the VPU to the QPU by setting three environment variables before the startup:

POT_DEINTERLACE_MODE
POT_DEINTERLACE_QPU
POT_HALF_FRAMERATE_MODE

The result of halving the frame rate is:

[...]
set yrange [-0.1:30.1]
set multiplot
set title 'Core 1 (VPU0)'
set ytics ("Idle" 0, "Int timer0" 1, "Int timer2" 2, "Int codec0" 3, "Int codec2" 4, "Int 3d" 5, "Int msync2" 6, "Int dma3" 7, "Int 0x5e" 8, "Int 0x5f" 9, "Int scaler" 10, "DISPSERVX" 11, "SysTimer" 12, "Dispmanx Ch1 EO" 13, "AUDSRV" 14, "HDMI_HOTPLUG_TM" 15, "HDMI TASK" 16, "KHRN_S" 17, "powerman" 18, "temp_check" 19, "v3d_gfxh16_thre" 20, "VCHIQ-0" 21, "VCHIQr-0" 22, "ILCS_VC" 23, "ILClock" 24, "ILVDecode" 25, "ILADecode" 26, "ILAMixer" 27, "ILEGLRender" 28, "ILVScheduler" 29, "ILARender" 30)
plot 'task.dat' index 30 with boxes lt 5 title 'ILARender 3.81%', 'task.dat' index 29 with boxes lt 1 title 'ILVScheduler 0.26%', 'task.dat' index 28 with boxes lt 2 title 'ILEGLRender 55.3%', 'task.dat' index 27 with boxes lt 3 title 'ILAMixer 1.49%', 'task.dat' index 26 with boxes lt 4 title 'ILADecode 0.91%', 'task.dat' index 25 with boxes lt 11 title 'ILVDecode 0.39%', 'task.dat' index 24 with boxes lt 12 title 'ILClock 0.19%', 'task.dat' index 23 with boxes lt 13 title 'ILCS_VC 0.37%', 'task.dat' index 22 with boxes lt 14 title 'VCHIQr-0 0.02%', 'task.dat' index 21 with boxes lt 15 title 'VCHIQ-0 0.38%', 'task.dat' index 20 with boxes lt 10 title 'v3d_gfxh16_thre 0.02%', 'task.dat' index 19 with boxes lt 9 title 'temp_check 0.02%', 'task.dat' index 18 with boxes lt 5 title 'powerman 0.15%', 'task.dat' index 17 with boxes lt 1 title 'KHRN_S 4.95%', 'task.dat' index 16 with boxes lt 2 title 'HDMI TASK 0.04%', 'task.dat' index 15 with boxes lt 3 title 'HDMI_HOTPLUG_TM 0.01%', 'task.dat' index 14 with boxes lt 4 title 'AUDSRV 0.08%', 'task.dat' index 13 with boxes lt 11 title 'Dispmanx Ch1 EO 0.08%', 'task.dat' index 12 with boxes lt 12 title 'SysTimer 0.17%', 'task.dat' index 11 with boxes lt 13 title 'DISPSERVX 0.13%', 'task.dat' using 1:2:($3/2) index 10 with xerrorbars lt 14 title 'Int scaler 0.08%', 'task.dat' using 1:2:($3/2) index 9 with xerrorbars lt 15 title 'Int 0x5f 0.03%', 'task.dat' using 1:2:($3/2) index 8 with xerrorbars lt 10 title 'Int 0x5e 0.12%', 'task.dat' using 1:2:($3/2) index 7 with xerrorbars lt 9 title 'Int dma3 0.18%', 'task.dat' using 1:2:($3/2) index 6 with xerrorbars lt 5 title 'Int msync2 0.01%', 'task.dat' using 1:2:($3/2) index 5 with xerrorbars lt 1 title 'Int 3d 0.07%', 'task.dat' using 1:2:($3/2) index 4 with xerrorbars lt 2 title 'Int codec2 0.13%', 'task.dat' using 1:2:($3/2) index 3 with xerrorbars lt 3 title 'Int codec0 0.02%', 'task.dat' using 1:2:($3/2) index 2 with xerrorbars lt 4 title 'Int timer2 0.10%', 'task.dat' using 1:2:($3/2) index 1 with xerrorbars lt 11 title 'Int timer0 0.04%', 0 title 'Idle 30.3%'
set nomultiplot
pause -1 'Hit return to continue'

set yrange [-0.1:5.1]
set multiplot
set title 'Core 2 (VPU1)'
set ytics ("Idle" 0, "Int msync3" 1, "SysTimer2" 2, "khrn_llat_threa" 3, "H264#0 Outer" 4, "ILImageFX" 5)
plot 'task.dat' index 36 with boxes lt 5 title 'ILImageFX 15.7%', 'task.dat' index 35 with boxes lt 1 title 'H264#0 Outer 1.95%', 'task.dat' index 34 with boxes lt 2 title 'khrn_llat_threa 1.43%', 'task.dat' index 33 with boxes lt 3 title 'SysTimer2 0.03%', 'task.dat' using 1:2:($3/2) index 32 with xerrorbars lt 4 title 'Int msync3 0.02%', 0 title 'Idle 80.8%'
set nomultiplot
pause -1 'Hit return to continue'
[...]

And now enabling QPU deinterlacing:

[...]
set yrange [-0.1:31.1]
set multiplot
set title 'Core 1 (VPU0)'
set ytics ("Idle" 0, "Int timer0" 1, "Int timer2" 2, "Int codec0" 3, "Int codec2" 4, "Int 3d" 5, "Int msync2" 6, "Int dma3" 7, "Int 0x5e" 8, "Int 0x5f" 9, "Int scaler" 10, "DISPSERVX" 11, "SysTimer" 12, "Dispmanx Ch1 EO" 13, "AUDSRV" 14, "HDMI_HOTPLUG_TM" 15, "HDMI TASK" 16, "KHRN_S" 17, "mbox_read" 18, "powerman" 19, "temp_check" 20, "v3d_gfxh16_thre" 21, "VCHIQ-0" 22, "VCHIQr-0" 23, "ILCS_VC" 24, "ILClock" 25, "ILVDecode" 26, "ILADecode" 27, "ILEGLRender" 28, "ILAMixer" 29, "ILVScheduler" 30, "ILARender" 31)
plot 'task.dat' index 31 with boxes lt 5 title 'ILARender 3.67%', 'task.dat' index 30 with boxes lt 1 title 'ILVScheduler 0.26%', 'task.dat' index 29 with boxes lt 2 title 'ILAMixer 1.57%', 'task.dat' index 28 with boxes lt 3 title 'ILEGLRender 50.3%', 'task.dat' index 27 with boxes lt 4 title 'ILADecode 0.97%', 'task.dat' index 26 with boxes lt 11 title 'ILVDecode 0.39%', 'task.dat' index 25 with boxes lt 12 title 'ILClock 0.19%', 'task.dat' index 24 with boxes lt 13 title 'ILCS_VC 0.37%', 'task.dat' index 23 with boxes lt 14 title 'VCHIQr-0 0.02%', 'task.dat' index 22 with boxes lt 15 title 'VCHIQ-0 0.34%', 'task.dat' index 21 with boxes lt 10 title 'v3d_gfxh16_thre 0.02%', 'task.dat' index 20 with boxes lt 9 title 'temp_check 0.02%', 'task.dat' index 19 with boxes lt 5 title 'powerman 0.15%', 'task.dat' index 18 with boxes lt 1 title 'mbox_read 0.13%', 'task.dat' index 17 with boxes lt 2 title 'KHRN_S 4.96%', 'task.dat' index 16 with boxes lt 3 title 'HDMI TASK 0.04%', 'task.dat' index 15 with boxes lt 4 title 'HDMI_HOTPLUG_TM 0.01%', 'task.dat' index 14 with boxes lt 11 title 'AUDSRV 0.08%', 'task.dat' index 13 with boxes lt 12 title 'Dispmanx Ch1 EO 0.08%', 'task.dat' index 12 with boxes lt 13 title 'SysTimer 0.17%', 'task.dat' index 11 with boxes lt 14 title 'DISPSERVX 0.14%', 'task.dat' using 1:2:($3/2) index 10 with xerrorbars lt 15 title 'Int scaler 0.08%', 'task.dat' using 1:2:($3/2) index 9 with xerrorbars lt 10 title 'Int 0x5f 0.03%', 'task.dat' using 1:2:($3/2) index 8 with xerrorbars lt 9 title 'Int 0x5e 0.12%', 'task.dat' using 1:2:($3/2) index 7 with xerrorbars lt 5 title 'Int dma3 0.19%', 'task.dat' using 1:2:($3/2) index 6 with xerrorbars lt 1 title 'Int msync2 0.01%', 'task.dat' using 1:2:($3/2) index 5 with xerrorbars lt 2 title 'Int 3d 0.07%', 'task.dat' using 1:2:($3/2) index 4 with xerrorbars lt 3 title 'Int codec2 0.14%', 'task.dat' using 1:2:($3/2) index 3 with xerrorbars lt 4 title 'Int codec0 0.02%', 'task.dat' using 1:2:($3/2) index 2 with xerrorbars lt 11 title 'Int timer2 0.10%', 'task.dat' using 1:2:($3/2) index 1 with xerrorbars lt 12 title 'Int timer0 0.04%', 0 title 'Idle 35.3%'
set nomultiplot
pause -1 'Hit return to continue'

set yrange [-0.1:5.1]
set multiplot
set title 'Core 2 (VPU1)'
set ytics ("Idle" 0, "Int msync3" 1, "SysTimer2" 2, "khrn_llat_threa" 3, "H264#0 Outer" 4, "ILImageFX" 5)
plot 'task.dat' index 37 with boxes lt 5 title 'ILImageFX 15.1%', 'task.dat' index 36 with boxes lt 1 title 'H264#0 Outer 2.05%', 'task.dat' index 35 with boxes lt 2 title 'khrn_llat_threa 1.42%', 'task.dat' index 34 with boxes lt 3 title 'SysTimer2 0.03%', 'task.dat' using 1:2:($3/2) index 33 with xerrorbars lt 4 title 'Int msync3 0.02%', 0 title 'Idle 81.3%'
set nomultiplot
pause -1 'Hit return to continue'
[...]

so a very small, but still positive, impact.
Being able to deinterlace 1080i may be useful when working with DVB-T/S for instance, so someone may be interested in such a feature.

NOTE: Of course to properly analyse the results we should plot multiple samples and get to conclusions accordingly, not just one as I did. However, as time is a little short, I think I'll end here this topic with these rough and approximate values. If anyone wants to go on with a better analysis, the repository will be updated soon.

Sunday, September 13, 2015

Binaries for Hardware Accelerated Qt 5.5.0 Multimedia Backend on Raspberry Pi 1 and 2 (5.0.0 beta 2)

This package includes mostly bug fixes and some slight improvements over beta 1. Please fil bugs to github if needed. Refer to previous articles on how to use.

Download PiOmxTextures 5.0.0-beta2 for Pi1 here (extraction code is: add4).
Download PiOmxTextures 5.0.0-beta2 for Pi2 here (extraction code is: 2ad5).

NOTE: I made a mistake with the above packages. Please download the ones below.

Download PiOmxTextures 5.0.0-beta2 for Pi1 here (extraction code is: 504a).
Download PiOmxTextures 5.0.0-beta2 for Pi2 here (extraction code is: 12e3).

Friday, August 28, 2015

Binaries for Hardware Accelerated Qt 5.5.0 Multimedia Backend on Raspberry Pi 1 and 2 (5.0.0 beta 1)

These are two packages containing binaries for PiOmxTextures (POT) for Raspberry Pi 1 and 2 running Raspbian.
The main changes are:
  • Completely changed approach to GPU buffer and structure allocations. This should avoid interrupting the renderer thread during execution of commands and, in the future, to avoid the need for patching Qt Multimedia.
  • Reusing textures when possible instead of reallocating when not needed.
  • Fixed a few bugs reported on github.
  • Speed up start/stop by removing the need for closing and reopening the streams.
  • Changed screen update procedure. This seems to improve performance again a bit than before.
  • Merged changes from omxplayer.
  • Bump ffmpeg to 2.7.2.
  • Added QML samples (these are not contained in the package, some are in the github repo).
Package for Pi1 is supposed to work both on Pi1 and Pi2. Package for Pi2 includes armv7 optimizations in ffmpeg, POT and Qt and is therefore only compatible with Pi2. Qt build was unchanged since last build.

Download PiOmxTextures 5.0.0 for Pi1 here.
Download PiOmxTextures 5.0.0 for Pi2 here.

The information provided for previous builds apply.

This is a beta version because I do not have much time to test. So do not use in production, but if you can invest time in testing, please report any bug you find. Me or someone else interested may try to fix.

NOTE: If you develop your own C++ app remember to enable the global shared OpenGL context in Qt. qmlscene seems to already enable that by default.

NOTE: If you need information on how to use this build, please refer to this little procedure.

Friday, July 17, 2015

Binaries for Hardware Accelerated Qt 5.5.0 Multimedia Backend on Raspberry Pi 1 and 2 (4.5.0 & 4.5.1)

These are two packages containing binaries for PiOmxTextures (POT) for Raspberry Pi 1 and 2 running Raspbian.

PiOmxTextures 4.5.0

The first package contains POT 4.5.0 for Raspberry Pi (1):
  • Improved sample code and POCPlayer.
  • Added POCPlayer tests running multiple MediaPlayer instances.
  • Improved rendering performance.
  • Added support for multiple players (this seems to still show issues on Pi1, a little better on Pi2).
  • Fixed volume range to avoid distortion.
  • POCPlayer now shows how to render 24 bit color depth.
  • Other fixes.
  • Moved to Qt 5.5.0 (including libinput support).*

PiOmxTextures 4.5.1 (for armv7)

The second package contains POT 4.5.1 for Raspberry Pi 2 and adds to the above:
  • Improved buffer provider code.
  • ffmpeg 2.7.1 (old was 2.6) compiled with proper CPU optimisations.
  • Added compiler optimisations to leverage the new armv7 processor and NEON support for POT, Qt 5.5.0** and ffmpeg builds.

The first package ran long tests and is supposed to guarantee more stability. Tests showed uptime of POCPlayer (sample media player included in the sources) way over a month uninterruptedly. The second package instead did not run any long test. Please let me know if you notice anything wrong.

Both packages contain:
  • piomxtextures_pocplayer: sample player which includes tests for animations, loops and commands. Have a look at the sources to understand how it works.
  • Qt-rasp(2)-5.5.0.tar: contains the build of Qt 5.5.0 with proper CPU optimisations. This also includes the host tools like qmake. rpath is set to /usr/local/Qt-rasp(2)-5.5.0 so you're probably better install it there.
  • qtdeps.tar: this contains libevdev and libinput which are not available in Raspbian repos. Qt will need these in the runtime lib path to work.
Please, let me know if you encounter issues with the packages or if anything goes wrong.
Bye! ;-)

NOTE: This is not available in github yet. But it will shortly.

*Qt Configuration for Raspberry Pi 1


   Configure summary

Building on:   linux-g++ (x86_64, CPU features: mmx sse sse2)
Building for:  devices/linux-rasp-pi-g++ (arm, CPU features: none detected)
Platform notes:

            - Also available for Linux: linux-kcc linux-icc linux-cxx
        
qmake vars .......... styles += mac fusion windows QT_CFLAGS_GLIB = -pthread -I/opt/rpi/sysroot/usr/include/glib-2.0 -I/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include  QT_LIBS_GLIB = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lgthread-2.0 -pthread -lrt -lglib-2.0  QT_CFLAGS_QGTKSTYLE = -pthread -I/opt/rpi/sysroot/usr/include/gtk-2.0 -I/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/gtk-2.0/include -I/opt/rpi/sysroot/usr/include/gio-unix-2.0/ -I/opt/rpi/sysroot/usr/include/cairo -I/opt/rpi/sysroot/usr/include/pango-1.0 -I/opt/rpi/sysroot/usr/include/cairo -I/opt/rpi/sysroot/usr/include/pixman-1 -I/opt/rpi/sysroot/usr/include/libpng12 -I/opt/rpi/sysroot/usr/include/gdk-pixbuf-2.0 -I/opt/rpi/sysroot/usr/include/libpng12 -I/opt/rpi/sysroot/usr/include/pango-1.0 -I/opt/rpi/sysroot/usr/include/harfbuzz -I/opt/rpi/sysroot/usr/include/pango-1.0 -I/opt/rpi/sysroot/usr/include/freetype2 -I/opt/rpi/sysroot/usr/include/atk-1.0 -I/opt/rpi/sysroot/usr/include/glib-2.0 -I/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include  QT_LIBS_QGTKSTYLE = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lgobject-2.0 -lglib-2.0  QT_CFLAGS_QGTK2 = -pthread -I/opt/rpi/sysroot/usr/include/gtk-2.0 -I/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/gtk-2.0/include -I/opt/rpi/sysroot/usr/include/gio-unix-2.0/ -I/opt/rpi/sysroot/usr/include/cairo -I/opt/rpi/sysroot/usr/include/pango-1.0 -I/opt/rpi/sysroot/usr/include/cairo -I/opt/rpi/sysroot/usr/include/pixman-1 -I/opt/rpi/sysroot/usr/include/libpng12 -I/opt/rpi/sysroot/usr/include/gdk-pixbuf-2.0 -I/opt/rpi/sysroot/usr/include/libpng12 -I/opt/rpi/sysroot/usr/include/pango-1.0 -I/opt/rpi/sysroot/usr/include/harfbuzz -I/opt/rpi/sysroot/usr/include/pango-1.0 -I/opt/rpi/sysroot/usr/include/freetype2 -I/opt/rpi/sysroot/usr/include/atk-1.0 -I/opt/rpi/sysroot/usr/include/glib-2.0 -I/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include  QT_LIBS_QGTK2 = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfreetype -lfontconfig  QT_CFLAGS_PULSEAUDIO = -D_REENTRANT -I/opt/rpi/sysroot/usr/include/glib-2.0 -I/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include  QT_LIBS_PULSEAUDIO = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lpulse-mainloop-glib -lpulse -lglib-2.0  QMAKE_CFLAGS_FONTCONFIG = -I/opt/rpi/sysroot/usr/include/freetype2  QMAKE_LIBS_FONTCONFIG = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lfontconfig -lfreetype  QMAKE_INCDIR_LIBUDEV =  QMAKE_LIBS_LIBUDEV = -ludev  QMAKE_INCDIR_XKBCOMMON_EVDEV =  QMAKE_LIBS_XKBCOMMON_EVDEV = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lxkbcommon  QMAKE_LIBINPUT_VERSION_MAJOR = 0 QMAKE_LIBINPUT_VERSION_MINOR = 19 QMAKE_INCDIR_LIBINPUT = /opt/rpi/sysroot/usr/local/include  QMAKE_LIBS_LIBINPUT = -L/opt/rpi/sysroot/usr/local/lib -linput  QMAKE_LIBXI_VERSION_MAJOR = 1 QMAKE_LIBXI_VERSION_MINOR = 6 QMAKE_LIBXI_VERSION_PATCH = 1 QMAKE_X11_PREFIX = /usr DEFINES += QT_NO_XKB QMAKE_XKB_CONFIG_ROOT = /usr/share/X11/xkb QMAKE_CFLAGS_XCB =  QMAKE_LIBS_XCB = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lxcb-sync -lxcb-xfixes -lxcb-render -lxcb-randr -lxcb-image -lxcb-shm -lxcb-keysyms -lxcb-icccm -lxcb-shape -lxcb  sql-drivers =  sql-plugins =  odbc sqlite sqlite2 tds qmake switches ......... 

Build options:
  Configuration .......... accessibility accessibility-atspi-bridge alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile cups dbus egl eglfs eglfs_brcm enable_new_dtags evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib gstreamer-1.0 gtk2 gtkstyle harfbuzz iconv icu inotify ipv6ifname large-config largefile libinput libproxy libudev linuxfb medium-config minimal-config mremap mtdev nis opengl opengles2 openssl pcre png posix_fallocate pulseaudio qpa qpa reduce_exports release rpath shared small-config system-freetype system-jpeg system-png system-zlib tslib use_gold_linker xcb xcb-glx xcb-plugin xcb-render xcb-sm xcb-xlib xinput2 xkbcommon-qt xlib xrender 
  Build parts ............  libs examples
  Mode ................... release
  Using sanitizer(s)...... none
  Using C++11 ............ yes
  Using gold linker....... yes
  Using new DTAGS ........ yes
  Using PCH .............. no
  Target compiler supports:
    Neon ................. no

Qt modules and options:
  Qt D-Bus ............... yes (loading dbus-1 at runtime)
  Qt Concurrent .......... yes
  Qt GUI ................. yes
  Qt Widgets ............. yes
  Large File ............. yes
  QML debugging .......... yes
  Use system proxies ..... no

Support enabled for:
  Accessibility .......... yes
  ALSA ................... yes
  CUPS ................... yes
  Evdev .................. yes
  FontConfig ............. yes
  FreeType ............... yes (system library)
  Glib ................... yes
  GStreamer .............. yes (1.0)
  GTK theme .............. yes
  HarfBuzz ............... yes (bundled copy)
  Iconv .................. yes
  ICU .................... yes
  Image formats: 
    GIF .................. yes (plugin, using bundled copy)
    JPEG ................. yes (plugin, using system library)
    PNG .................. yes (in QtGui, using system library)
  journald ............... no
  libinput................ yes
  mtdev .................. yes (system library)
  Networking: 
    getaddrinfo .......... yes
    getifaddrs ........... yes
    IPv6 ifname .......... yes
    libproxy.............. yes
    OpenSSL .............. yes (loading libraries at run-time)
  NIS .................... yes
  OpenGL / OpenVG: 
    EGL .................. yes
    OpenGL ............... yes (OpenGL ES 2.0+)
    OpenVG ............... no
  PCRE ................... yes (bundled copy)
  pkg-config ............. yes 
  PulseAudio ............. yes
  QPA backends: 
    DirectFB ............. no
    EGLFS ................ yes
      EGLFS i.MX6....... . no
      EGLFS KMS .......... no
      EGLFS Mali ......... no
      EGLFS Raspberry Pi . yes
      EGLFS X11 .......... no
    LinuxFB .............. yes
    XCB .................. yes (system library)
      EGL on X ........... no
      GLX ................ yes
      MIT-SHM ............ yes
      Xcb-Xlib ........... yes
      Xcursor ............ yes (loaded at runtime)
      Xfixes ............. yes (loaded at runtime)
      Xi ................. no
      Xi2 ................ yes
      Xinerama ........... yes (loaded at runtime)
      Xrandr ............. yes (loaded at runtime)
      Xrender ............ yes
      XKB ................ no
      XShape ............. yes
      XSync .............. yes
      XVideo ............. yes
  Session management ..... yes
  SQL drivers: 
    DB2 .................. no
    InterBase ............ no
    MySQL ................ no
    OCI .................. no
    ODBC ................. yes (plugin)
    PostgreSQL ........... no
    SQLite 2 ............. yes (plugin)
    SQLite ............... yes (plugin, using bundled copy)
    TDS .................. yes (plugin)
  tslib .................. yes
  udev ................... yes
  xkbcommon-x11........... yes (bundled copy, XKB config root: /usr/share/X11/xkb)
  xkbcommon-evdev......... no
  zlib ................... yes (system library)

**Qt Configuration for Raspberry Pi 2

   Configure summary

Building on:   linux-g++ (x86_64, CPU features: mmx sse sse2)
Building for:  devices/linux-rasp-pi2-g++ (arm, CPU features: neon)
Platform notes:

            - Also available for Linux: linux-kcc linux-icc linux-cxx
        
qmake vars .......... styles += mac fusion windows QT_CFLAGS_GLIB = -pthread -I/opt/rpi/sysroot/usr/include/glib-2.0 -I/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include  QT_LIBS_GLIB = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lgthread-2.0 -pthread -lrt -lglib-2.0  QT_CFLAGS_PULSEAUDIO = -D_REENTRANT -I/opt/rpi/sysroot/usr/include/glib-2.0 -I/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/glib-2.0/include  QT_LIBS_PULSEAUDIO = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lpulse-mainloop-glib -lpulse -lglib-2.0  QMAKE_CFLAGS_FONTCONFIG = -I/opt/rpi/sysroot/usr/include/freetype2  QMAKE_LIBS_FONTCONFIG = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lfontconfig -lfreetype  QMAKE_INCDIR_LIBUDEV =  QMAKE_LIBS_LIBUDEV = -ludev  QMAKE_LIBINPUT_VERSION_MAJOR = 0 QMAKE_LIBINPUT_VERSION_MINOR = 19 QMAKE_INCDIR_LIBINPUT = /opt/rpi/sysroot/usr/local/include  QMAKE_LIBS_LIBINPUT = -L/opt/rpi/sysroot/usr/local/lib -linput  QMAKE_LIBXI_VERSION_MAJOR = 1 QMAKE_LIBXI_VERSION_MINOR = 6 QMAKE_LIBXI_VERSION_PATCH = 1 QMAKE_X11_PREFIX = /usr DEFINES += QT_NO_XKB QMAKE_XKB_CONFIG_ROOT = /usr/share/X11/xkb QMAKE_CFLAGS_XCB =  QMAKE_LIBS_XCB = -L/opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf -lxcb-sync -lxcb-xfixes -lxcb-render -lxcb-randr -lxcb-image -lxcb-shm -lxcb-keysyms -lxcb-icccm -lxcb-shape -lxcb  sql-drivers =  sql-plugins =  odbc sqlite sqlite2 tds qmake switches ......... 

Build options:
  Configuration .......... accessibility accessibility-atspi-bridge alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile cups dbus egl eglfs eglfs_brcm enable_new_dtags evdev eventfd fontconfig full-config getaddrinfo getifaddrs glib gstreamer-1.0 harfbuzz iconv icu inotify ipv6ifname large-config largefile libinput libproxy libudev linuxfb medium-config minimal-config mremap mtdev neon nis opengl opengles2 openssl pcre png posix_fallocate pulseaudio qpa qpa reduce_exports release rpath shared small-config system-freetype system-jpeg system-png system-zlib tslib use_gold_linker xcb xcb-glx xcb-plugin xcb-render xcb-xlib xinput2 xkbcommon-qt xlib xrender 
  Build parts ............  libs examples
  Mode ................... release
  Using sanitizer(s)...... none
  Using C++11 ............ yes
  Using gold linker....... yes
  Using new DTAGS ........ yes
  Using PCH .............. no
  Target compiler supports:
    Neon ................. yes

Qt modules and options:
  Qt D-Bus ............... yes (loading dbus-1 at runtime)
  Qt Concurrent .......... yes
  Qt GUI ................. yes
  Qt Widgets ............. yes
  Large File ............. yes
  QML debugging .......... yes
  Use system proxies ..... no

Support enabled for:
  Accessibility .......... yes
  ALSA ................... yes
  CUPS ................... yes
  Evdev .................. yes
  FontConfig ............. yes
  FreeType ............... yes (system library)
  Glib ................... yes
  GStreamer .............. yes (1.0)
  GTK theme .............. no
  HarfBuzz ............... yes (bundled copy)
  Iconv .................. yes
  ICU .................... yes
  Image formats: 
    GIF .................. yes (plugin, using bundled copy)
    JPEG ................. yes (plugin, using system library)
    PNG .................. yes (in QtGui, using system library)
  journald ............... no
  libinput................ yes
  mtdev .................. yes (system library)
  Networking: 
    getaddrinfo .......... yes
    getifaddrs ........... yes
    IPv6 ifname .......... yes
    libproxy.............. yes
    OpenSSL .............. yes (loading libraries at run-time)
  NIS .................... yes
  OpenGL / OpenVG: 
    EGL .................. yes
    OpenGL ............... yes (OpenGL ES 2.0+)
    OpenVG ............... no
  PCRE ................... yes (bundled copy)
  pkg-config ............. yes 
  PulseAudio ............. yes
  QPA backends: 
    DirectFB ............. no
    EGLFS ................ yes
      EGLFS i.MX6....... . no
      EGLFS KMS .......... no
      EGLFS Mali ......... no
      EGLFS Raspberry Pi . yes
      EGLFS X11 .......... no
    LinuxFB .............. yes
    XCB .................. yes (system library)
      EGL on X ........... no
      GLX ................ yes
      MIT-SHM ............ yes
      Xcb-Xlib ........... yes
      Xcursor ............ yes (loaded at runtime)
      Xfixes ............. yes (loaded at runtime)
      Xi ................. no
      Xi2 ................ yes
      Xinerama ........... yes (loaded at runtime)
      Xrandr ............. yes (loaded at runtime)
      Xrender ............ yes
      XKB ................ no
      XShape ............. yes
      XSync .............. yes
      XVideo ............. yes
  Session management ..... yes
  SQL drivers: 
    DB2 .................. no
    InterBase ............ no
    MySQL ................ no
    OCI .................. no
    ODBC ................. yes (plugin)
    PostgreSQL ........... no
    SQLite 2 ............. yes (plugin)
    SQLite ............... yes (plugin, using bundled copy)
    TDS .................. yes (plugin)
  tslib .................. yes
  udev ................... yes
  xkbcommon-x11........... yes (bundled copy, XKB config root: /usr/share/X11/xkb)
  xkbcommon-evdev......... no
  zlib ................... yes (system library)

Sunday, May 17, 2015

Multiple Animated Videos on Raspberry Pi 2 with Fading Audio

Someone asked if PiOmxTextures (library and Qt OpenMAX-based multimedia plugin) could be used on Raspberry Pi 2 and if it could be used to play more than one video contemporarily. I worked on this and a couple of recent patches made the following result possible.



The video shows two videos running contemporarily on Pi 2, with QML animations applied to the videos and with audio fading from one to the other. The videos are 720p h264 main and high profile. UI is written in QML in 1080p with 24 bit color depth. As you can see, load on the CPU is very low. The demo also shows the same QML file running on Mac OS X.

To get this performance you'll need to properly overclock your Pi 2, otherwise the achievable frame rate is lower.

NOTE: Code for this is not yet on github.