Toybrick

标题: 创建mpp解码器实例失败 [打印本页]

作者: kiwi    时间: 2019-7-19 16:55
标题: 创建mpp解码器实例失败
mpi: mpp version: Without VCS info
hal_h264d_api: Assertion vcodec_type & ((0x00000200) | (0x00000001) | (0x00000002)) failed at hal_h264d_init:104
hal_h264d_api: hal_h264d_init hard mode error, value=0
hal_h264d_api: Assertion 0 failed at hal_h264d_init:154
mpp_device: mpp_device_init failed to find device for coding 7 type 0
mpp_rt: NOT found ion allocator
mpp_rt: found drm allocator
Segmentation fault (核心已转储)

请问这是什么原因导致的?



作者: jefferyzhang    时间: 2019-7-19 16:56
gdb调试啊,你这样发个段错误连堆栈都没有,谁知道哪里问题,这里看八成是你自己代码段错误了
作者: kiwi    时间: 2019-7-19 17:02
jefferyzhang 发表于 2019-7-19 16:56
gdb调试啊,你这样发个段错误连堆栈都没有,谁知道哪里问题,这里看八成是你自己代码段错误了 ...

我的代码只有这一句
MppDecoder *dec = MppDecoderCreate(DECODE_TYPE_H264);
作者: jefferyzhang    时间: 2019-7-19 17:02
开个gdb看下堆栈
作者: kiwi    时间: 2019-7-19 17:27
jefferyzhang 发表于 2019-7-19 17:02
开个gdb看下堆栈

(gdb) n
mpi: mpp version: Without VCS info
hal_h264d_api: Assertion vcodec_type & ((0x00000200) | (0x00000001) | (0x00000002)) failed at hal_h264d_init:104
hal_h264d_api: hal_h264d_init hard mode error, value=0
hal_h264d_api: Assertion 0 failed at hal_h264d_init:154
mpp_device: mpp_device_init failed to find device for coding 7 type 0
mpp_rt: NOT found ion allocator
mpp_rt: found drm allocator

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in  ()
#1  0x0000007fb5f300a0 in hal_h264d_init () at /usr/lib64/librockchip_mpp.so.1
#2  0x0000007fb5f2f9f8 in mpp_hal_init () at /usr/lib64/librockchip_mpp.so.1
#3  0x0000007fb5ef7d68 in mpp_dec_init () at /usr/lib64/librockchip_mpp.so.1
#4  0x0000007fb5ef07e4 in Mpp::init(MppCtxType, MppCodingType) () at /usr/lib64/librockchip_mpp.so.1
#5  0x0000007fb5ef3340 in mpp_init () at /usr/lib64/librockchip_mpp.so.1
#6  0x0000007fb5ef4070 in MppDecoderCreate(DecodeType) () at /usr/lib64/librockchip_mpp.so.1

拜托了,看看

作者: jefferyzhang    时间: 2019-7-19 17:33
问题已经转给大佬了。
顺便问下,你这个板子是toybrick复现的么?我们这里复现不出来。
试下dnf clean all; dnf update库更新后再跑。
作者: addy    时间: 2019-7-19 17:42
执行如下命令,看下vpu节点的权限:
ls -l /dev/rkvdec
ls -l /dev/vpu_service

执行如下命令,看下mpp版本号:
rpm -qa|grep mpp


帮忙提供如下信息:
1. 开发板的SN号
2. 内核是否重新编译过?

作者: kiwi    时间: 2019-7-19 17:44
jefferyzhang 发表于 2019-7-19 17:33
问题已经转给大佬了。
顺便问下,你这个板子是toybrick复现的么?我们这里复现不出来。
试下dnf clean all; ...

是的,toybrick rk3399pro开发板,更新了也还是一样
作者: jefferyzhang    时间: 2019-7-19 17:45
kiwi 发表于 2019-7-19 17:44
是的,toybrick rk3399pro开发板,更新了也还是一样

你回下上面addy所要的信息
作者: kiwi    时间: 2019-7-19 17:50
addy 发表于 2019-7-19 17:42
执行如下命令,看下vpu节点的权限:
ls -l /dev/rkvdec
ls -l /dev/vpu_service

[toybrick@localhost ~]$ ls -l /dev/rkvdev
ls: 无法访问'/dev/rkvdev': No such file or directory
[toybrick@localhost ~]$ ls -l /dev/vpu_service
ls: 无法访问'/dev/vpu_service': No such file or directory
[toybrick@localhost ~]$ rpm -qa|grep mpp
librockchip_mpp-devel-1.3.7-10.rockchip.fc28.aarch64
librockchip_mpp-1.3.7-10.rockchip.fc28.aarch64
librockchip_mpp-tests-1.3.7-10.rockchip.fc28.aarch64

1.SN:TDs33101190100363
2.没有重新编译过
作者: addy    时间: 2019-7-19 17:58
1月份出厂的固件,默认是没有打开VPU的。
请更新到V1.3,或更新内核到最新代码,并手动编译内核
作者: kiwi    时间: 2019-7-24 09:32
addy 发表于 2019-7-19 17:58
1月份出厂的固件,默认是没有打开VPU的。
请更新到V1.3,或更新内核到最新代码,并手动编译内核 ...

更新固件到V1.3后,
安装librockchip_mpp-tests-1.3.7-10.rockchip.fc28.aarch64
运行mpi_test,
[toybrick@localhost bin]$ mpi_test
mpi_test: mpi_test start
mpi_test: mpi_test decoder test start
mpi: mpp_create enter ctx 0x7fd8875b70 mpi 0x7fd8875b78
mpi: mpp version: Without VCS info
mpi: mpp_create leave ret 0 ctx 0x280bb440 mpi 0x7f800af4a0
mpi: mpp_init enter ctx 0x280bb440 type 0 coding 0
mpp: unable to create unsupported type 0 coding 0
mpi: mpp_init leave ret -1
mpi_test: mpp_init failed
mpi: mpp_destroy enter ctx 0x280bb440
mpi: mpp_destroy leave ret 0
mpi_test: mpi_test failed
还是不正常
这两个设备文件权限如下:
[toybrick@localhost /]$ ls -l /dev/rkvdec
crw-rw-rw- 1 root root 244, 0 7月  22 15:53 /dev/rkvdec
[toybrick@localhost /]$ ls -l /dev/vpu_service
crw-rw-rw- 1 root root 245, 0 7月  22 15:53 /dev/vpu_service

作者: kiwi    时间: 2019-7-24 09:36
jefferyzhang 发表于 2019-7-19 17:45
你回下上面addy所要的信息

照addy所说,更新固件到1.3了,尝试运行mpi_test进行测试,测试失败,具体信息在下面的回复中
作者: zerollzeng    时间: 2019-9-27 14:09
我也遇到了一样的问题,在跑入门教程的时候,官方的例子.
[toybrick@localhost build]$ ./rtsp_ssd
mpi: mpp version: Without VCS info
hal_h264d_api: Assertion vcodec_type & ((0x00000200) | (0x00000001) | (0x00000002)) failed at hal_h264d_init:104
hal_h264d_api: hal_h264d_init hard mode error, value=0
hal_h264d_api: Assertion 0 failed at hal_h264d_init:154
mpp_device: mpp_device_init failed to find device for coding 7 type 0
mpp_rt: NOT found ion allocator
mpp_rt: found drm allocator
Segmentation fault
请问知道是什么原因了吗?
作者: 灰胡子    时间: 2019-12-9 14:52
请问楼主的问题解决了吗?我也遇到了相似的问题如下,
[toybrick@toybrick test]$ ./mpp_info_test
mpp_info_test: mpp revision is 0
mpp_info_test: mpp info all:
Without VCS info
mpp_info_test: mpp info revision: -1
mpp_info_test: mpp info date    :
mpp_info_test: mpp info author  : Unknown


--------------

这是另一个例程执行情况:

[toybrick@toybrick test]$ ./mpi_test
mpi_test: mpi_test start
mpi_test: mpi_test decoder test start
mpi: mpp_create enter ctx 0x7fe9add220 mpi 0x7fe9add228
mpi: mpp version: Without VCS info
mpi: mpp_create leave ret 0 ctx 0x1e28b460 mpi 0x7f969934c8
mpi: mpp_init enter ctx 0x1e28b460 type 0 coding 0
mpp: unable to create unsupported type 0 coding 0
mpi: mpp_init leave ret -1
mpi_test: mpp_init failed
mpi: mpp_destroy enter ctx 0x1e28b460
mpi: mpp_destroy leave ret 0
mpi_test: mpi_test failed


-------------

固件是刷的资料库里最新的TB-RK3399ProD-v1.5.zip
设备文件权限也是一样:

[toybrick@toybrick test]$ ls -l /dev/rkvdec
crw-rw-rw- 1 root root 244, 0 Feb 20  2019 /dev/rkvdec
[toybrick@toybrick test]$ ls -l /dev/vpu_service
crw-rw-rw- 1 root root 245, 0 Feb 20  2019 /dev/vpu_service

作者: kiwi    时间: 2019-12-10 09:32
灰胡子 发表于 2019-12-9 14:52
请问楼主的问题解决了吗?我也遇到了相似的问题如下,
[toybrick@toybrick test]$ ./mpp_info_test
mpp_inf ...

后面认真看了一下,这些demo写得有问题,不用管




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3