Ubuntu 應(yīng)用層支持
視頻硬件編解碼支持
Mpp是Rockchip為RK3399提供的一套視頻編解碼的api, 并且基于mpp,Rockchip提供了一套gstreamer的編解碼插件。用戶(hù)可以根據(jù)自己的需求,基于gstreamer來(lái)做視頻編解碼的應(yīng)用,或者直接調(diào)用mpp,來(lái)實(shí)現(xiàn)硬件的編解碼加速。
Firefly 發(fā)布的Ubuntu 系統(tǒng), 都已經(jīng)提供了完整的gstremaer 和 mpp支持,并且提供了相應(yīng)的demo,供用戶(hù)開(kāi)發(fā)參考。
Gstreamer
Ubuntu 16.04 下,gstreamer 1.12 已經(jīng)安裝在/opt/目錄下。
Ubuntu 18.04下, gstreamer 1.12 已經(jīng)安裝到系統(tǒng)中。
/usr/local/bin/h264dec.sh 測(cè)試硬件H264解碼。
/usr/local/bin/h264enc.sh 測(cè)試硬件H264編碼。
用戶(hù)可以參照這兩個(gè)腳本,配置自己的gstreamer應(yīng)用。
Mpp
Ubunut 系統(tǒng)下, mpp 相關(guān)dev包都已經(jīng)安裝到系統(tǒng)中。
/opt/mpp/下分別是mpp 編解碼的相關(guān)demo 和 源文件。
OpenGL-ES
RK3399 支持 OpenGL ES1.1/2.0/3.0/3.1。
Firefly 發(fā)布的Ubuntu 系統(tǒng), 都已經(jīng)提供了完整的OpenGL-ES支持。運(yùn)行g(shù)lmark2-es2可以測(cè)試openGL-ES支持。 如果要避免屏幕刷新率對(duì)測(cè)試結(jié)果的影響,可以在串口終端上使用以下命令測(cè)試。
# systemctl stop lightdm # export DISPLAY=:0 # Xorg & # glmark2-es2 –off-screen
在Chromium瀏覽器中, 在地址欄輸入:chrome://gpu可以查看chromium下硬件加速的支持。
Note:
EGL 是用arm 平臺(tái)上OpenGL針對(duì)x window system的擴(kuò)展,功能等效于x86下的glx庫(kù)。
由于Xorg使用的Driver modesettings 默認(rèn)會(huì)加載libglx.so(禁用glx會(huì)導(dǎo)致某些通過(guò)檢測(cè)glx環(huán)境的應(yīng)用啟動(dòng)失敗), libglx.so會(huì)搜索系統(tǒng)中的dri實(shí)現(xiàn)庫(kù)。但是rk3399 Xorg 2D加速是直接基于DRM實(shí)現(xiàn), 并未實(shí)現(xiàn)dri庫(kù),所以啟動(dòng)過(guò)程中,libglx.so會(huì)報(bào)告如下的錯(cuò)誤 。
(EE) AIGLX error: dlopen of /usr/lib/aarch64-linux-gnu/dri/rockchip_dri.so failed
這個(gè)對(duì)系統(tǒng)運(yùn)行沒(méi)有任何影響,不需要處理。
基于同樣的道理,某些應(yīng)用啟動(dòng)過(guò)程中,也會(huì)報(bào)告如下錯(cuò)誤,不用處理,對(duì)應(yīng)用的運(yùn)行不會(huì)造成影響。
libGL error: unable to load driver: rockchip_dri.so libGL error: driver pointer missing libGL error: failed to load driver: rockchip
Firefly之前發(fā)布的某些版本的Ubuntu軟件,默認(rèn)關(guān)閉了加載libglx.so,在某些情況下,運(yùn)行某些應(yīng)用程序會(huì)出現(xiàn)下述錯(cuò)誤:
GdkGLExt-WARNING **: Window system doesn't support OpenGL.
修正的方法如下:
刪除 /etc/X11/xorg.conf.d/20-modesetting.conf 中一下三行配置。
Section "Module" Disable "glx" EndSection
OpenCL
Firefly發(fā)布的Ubuntu系統(tǒng),已經(jīng)添加了opencl1.2支持,可以運(yùn)行系統(tǒng)內(nèi)置的clinfo獲取平臺(tái)opencl相關(guān)參數(shù)。
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 支持神經(jīng)網(wǎng)絡(luò)的GPU加速方案LinuxNN, Firefly發(fā)布的Ubuntu系統(tǒng),已經(jīng)添加了LinuxNN的支持。
在opt/tensorflowbin/下,運(yùn)行test.sh, 即可測(cè)試MobileNet 模型圖像分類(lèi)器的 Demo和MobileNet-SSD 模型的目標(biāo)檢測(cè) 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!
屏幕旋轉(zhuǎn)
Firefly發(fā)布的Ubuntu系統(tǒng),如果需要默認(rèn)對(duì)系統(tǒng)的顯示方向做旋轉(zhuǎn),可以在
/etc/default/xrandr中修改對(duì)應(yīng)的顯示設(shè)備的方向即可。
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
對(duì)于配有觸摸屏的平臺(tái),如果需要對(duì)觸摸屏的方向做旋轉(zhuǎn),可以在/etc/X11/xorg.conf.d/05-gslX680.conf中修改SwapAxes / InvertX / InvertY三個(gè)值。
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
-
Linux
+關(guān)注
關(guān)注
87文章
11350瀏覽量
210466 -
嵌入式主板
+關(guān)注
關(guān)注
7文章
6086瀏覽量
35636 -
Firefly
+關(guān)注
關(guān)注
2文章
538瀏覽量
7138
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
fireflyAIO-3399J主板紅外遙控器簡(jiǎn)介
fireflyAIO-3399J主板UART使用介紹
![<b class='flag-5'>fireflyAIO-3399J</b>主板UART使用<b class='flag-5'>介紹</b>](https://file.elecfans.com/web1/M00/AB/A5/pIYBAF2227uAYdDUAAIbuRT89KU569.png)
fireflyAIO-3399J主板PWM使用介紹
fireflyAIO-3399J主板MIPI CSI使用簡(jiǎn)介
![<b class='flag-5'>fireflyAIO-3399J</b>主板MIPI CSI使用簡(jiǎn)介](https://file.elecfans.com/web1/M00/AB/4D/o4YBAF2226KAPJZYAApmpDWQQ1Y247.png)
fireflyAIO-3399J主板IR使用簡(jiǎn)介
![<b class='flag-5'>fireflyAIO-3399J</b>主板IR使用簡(jiǎn)介](https://file.elecfans.com/web1/M00/AB/A5/pIYBAF2229OAFXQkAADawVe-83s200.png)
fireflyAIO-3399J主板ADC使用介紹
fireflyAIO-3399J啟動(dòng)模式說(shuō)明主板
fireflyAIO-3288J主板Ubuntu應(yīng)用層支持簡(jiǎn)介
Core 3399J固件Ubuntu(GPT)分享
![Core <b class='flag-5'>3399J</b>固件<b class='flag-5'>Ubuntu</b>(GPT)分享](https://file.elecfans.com/web1/M00/D9/4E/pIYBAF_1ac2Ac0EEAABDkS1IP1s689.png)
評(píng)論