fireflyAIO-3399J-Ubuntu应用层支持介绍

ubuntu 应用层支持
视频硬件编解码支持
mpp是rockchip为rk3399提供的一套视频编解码的api, 并且基于mpp,rockchip提供了一套gstreamer的编解码插件。用户可以根据自己的需求,基于gstreamer来做视频编解码的应用,或者直接调用mpp,来实现硬件的编解码加速。
firefly 发布的ubuntu 系统, 都已经提供了完整的gstremaer 和 mpp支持,并且提供了相应的demo,供用户开发参考。
gstreamer
ubuntu 16.04 下,gstreamer 1.12 已经安装在/opt/目录下。
ubuntu 18.04下, gstreamer 1.12 已经安装到系统中。
/usr/local/bin/h264dec.sh 测试硬件h264解码。
/usr/local/bin/h264enc.sh 测试硬件h264编码。
用户可以参照这两个脚本,配置自己的gstreamer应用。
mpp
ubunut 系统下, mpp 相关dev包都已经安装到系统中。
/opt/mpp/下分别是mpp 编解码的相关demo 和 源文件。
opengl-es
rk3399 支持 opengl es1.1/2.0/3.0/3.1。
firefly 发布的ubuntu 系统, 都已经提供了完整的opengl-es支持。运行glmark2-es2可以测试opengl-es支持。 如果要避免屏幕刷新率对测试结果的影响,可以在串口终端上使用以下命令测试。
# systemctl stop lightdm # export display=:0 # xorg & # glmark2-es2 –off-screen
在chromium浏览器中, 在地址栏输入:chrome://gpu可以查看chromium下硬件加速的支持。
note:
egl 是用arm 平台上opengl针对x window system的扩展,功能等效于x86下的glx库。
由于xorg使用的driver modesettings 默认会加载libglx.so(禁用glx会导致某些通过检测glx环境的应用启动失败), libglx.so会搜索系统中的dri实现库。但是rk3399 xorg 2d加速是直接基于drm实现, 并未实现dri库,所以启动过程中,libglx.so会报告如下的错误 。
(ee) aiglx error: dlopen of /usr/lib/aarch64-linux-gnu/dri/rockchip_dri.so failed
这个对系统运行没有任何影响,不需要处理。
基于同样的道理,某些应用启动过程中,也会报告如下错误,不用处理,对应用的运行不会造成影响。
libgl error: unable to load driver: rockchip_dri.so libgl error: driver pointer missing libgl error: failed to load driver: rockchip
firefly之前发布的某些版本的ubuntu软件,默认关闭了加载libglx.so,在某些情况下,运行某些应用程序会出现下述错误:
gdkglext-warning **: window system doesn't support opengl.
修正的方法如下:
删除 /etc/x11/xorg.conf.d/20-modesetting.conf 中一下三行配置。
section module disable glx endsection
opencl
firefly发布的ubuntu系统,已经添加了opencl1.2支持,可以运行系统内置的clinfo获取平台opencl相关参数。
firefly@firefly:~$ clinfo platform #0 name: arm platform version: opencl 1.2 v1.r14p0-01rel0-git(966ed26).f44c85cb3d2ceb87e8be88e7592755c3 device #0 name: mali-t860 type: gpu version: opencl 1.2 v1.r14p0-01rel0-git(966ed26).f44c85cb3d2ceb87e8be88e7592755c3 global memory size: 1 gb 935 mb 460 kb local memory size: 32 kb max work group size: 256 max work item sizes: (256, 256, 256) …
tensorflow lite
rk3399 支持神经网络的gpu加速方案linuxnn, firefly发布的ubuntu系统,已经添加了linuxnn的支持。
在opt/tensorflowbin/下,运行test.sh, 即可测试mobilenet 模型图像分类器的 demo和mobilenet-ssd 模型的目标检测 demo
firefly@firefly:/opt/tensorflowbin$ ./test.sh loaded model mobilenet_ssd.tflite resolved reporter nn version: 1.0.0 findavailabledevices filename:libarmnn-driver.so d_info:40432 d_reclen:40s [d][armnndriver]: register service: armnn (version: 1.0.0)! first invoked time: 1919.17 ms invoked average time: 108.4 ms validcount: 26 car @ (546, 501) (661, 586) car @ (1, 549) (51, 618) person @ (56, 501) (239, 854) person @ (332, 530) (368, 627) person @ (391, 541) (434, 652) person @ (418, 477) (538, 767) person @ (456, 487) (602, 764) car @ (589, 523) (858, 687) person @ (826, 463) (1034, 873) bicycle @ (698, 644) (1128, 925) write out.jpg succ!
屏幕旋转
firefly发布的ubuntu系统,如果需要默认对系统的显示方向做旋转,可以在
/etc/default/xrandr中修改对应的显示设备的方向即可。
firefly@firefly:~$ cat /etc/default/xrandr #!/bin/sh # rotation can be one of 'normal', 'left', 'right' or 'inverted'. # xrandr --output hdmi-1 --rotate normal # xrandr --output lvds-1 --rotate normal # xrandr --output edp-1 --rotate normal # xrandr --output mipi-1 --rotate normal # xrandr --output vga-1 --rotate normal # xrandr --output dp-1 --rotate normal
对于配有触摸屏的平台,如果需要对触摸屏的方向做旋转,可以在/etc/x11/xorg.conf.d/05-gslx680.conf中修改swapaxes / invertx / inverty三个值。
firefly@firefly:~$ cat /etc/x11/xorg.conf.d/05-gslx680.conf section inputclass identifier gslx680 matchistouchscreen on matchproduct gslx680 driver evdev option swapaxes off # invert the respective axis. option invertx off option inverty off endsection

中国联通“联通链”发布会在海口举行
编写属于自己的PCB设计规则检查器
机器学习算法的实现时所面临的问题及相关开源软件
动物面部识别具有怎样的发展价值和潜力
京东方成苹果柔性OLED面板供应商
fireflyAIO-3399J-Ubuntu应用层支持介绍
倒计时1天!机智云即将亮相2023中关村论坛展览(科博会)
荣耀8X:美人尖全面屏,Android 8.1,骁龙660,9月5日在西安发布
NI发布PXIe-1066DC18槽机箱增加PXI Express平台高可用性
美国最神秘的自动驾驶项目ZOOX:一个黑色的类似汽车的机器人
雷军为何对红米Note3偏爱之甚
网络互助平台“水滴互助”完成近5亿元B轮融资,由腾讯领投
百度地图宣布城市车道级导航取得里程碑突破
PyTorch教程-5.2. 多层感知器的实现
2013年下届慕尼黑电子展即将上演
CAXA三点角度标注的详细介绍
小米手机的无线充电刷新了新记录?
北醒车规级激光雷达AD2首次亮相HICOOL峰会|市领导莅临展位听取联合创始人汇报
PCV薄膜瑕疵检测设备的原理、参数及功能
比克电池将成谷歌Nexus One电池供应商