kato0315 发表于 2020-9-28 14:25:54

mpp解码问题

本帖最后由 kato0315 于 2020-9-28 14:29 编辑

下载官方镜像ROC-RK3328-PC-UBUNTU18.04-GPT-20200630-1405.img,从github上获取mpp源码。
试跑mpi_dec_test后发现有报错,也没有yuv数据输出到文件上。

firefly@firefly:~/code/mpp/ouput/test$ ./mpi_dec_test-t 7 -i ./test.h264 -o ./output.yuv -n 60
mpp: mpi_dec_test: cmd parse result:
mpp: mpi_dec_test: inputfile name: ./test.h264
mpp: mpi_dec_test: output file name: ./output.yuv
mpp: mpi_dec_test: config file name:
mpp: mpi_dec_test: width      :    0
mpp: mpi_dec_test: height   :    0
mpp: mpi_dec_test: type       : 7
mpp: mpi_dec_test: debug flag : 0
mpp: mpi_dec_test: max frames : 60
mpp: mpi_dec_test: mpi_dec_test start
mpp: mpi_dec_test: input file size 30884393
mpp: mpp_info: mpp version: dbd5ae40 author: Herman Chen   2020-09-25 : Fix header not send on frame drop
mpp: mpi_dec_test: 0x55a7d49600 mpi_dec_test decoder test start w 0 h 0 type 7
mpp: mpp_rt: NOT found ion allocator
mpp: mpp_rt: found drm allocator
mpp: mpi_dec_test: 0x55a7d49600 decode_get_frame get info changed found
mpp: mpi_dec_test: 0x55a7d49600 decoder require buffer w:h stride buf_size 1843200
mpp: mpp_device: mpp_device_send_reg ioctl VPU_IOC_SET_REG failed ret -1 errno 14 Bad address
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 0 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 1 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 2 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 3 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 4 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 5 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 6 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 7 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 8 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 9 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 10 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 11 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 12 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 13 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 14 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 15 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 16 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 17 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 18 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 19 err 1 discard 0
mpp: mpi_dec_test: 0x55a7d49600 decode get frame 20 err 1 discard 0

luo 发表于 2020-9-30 15:47:18

lz,你还能从github上下载mpp代码吗?

kato0315 发表于 2020-9-30 16:17:04

luo 发表于 2020-9-30 15:47
lz,你还能从github上下载mpp代码吗?

https://github.com/HermanChen/mpp

penguin 发表于 2020-9-30 17:17:48

注意你的test.h264是需要h264 raw数据,不能是打包的数据。 可以通过ffmpeg转换出h264裸流。

luo 发表于 2020-10-5 16:50:29

kato0315 发表于 2020-9-30 16:17
https://github.com/HermanChen/mpp

我之前一直用的https://github.com/rockchip-linux/mpp,前些天关闭了,

kato0315 发表于 2020-10-9 11:12:03

penguin 发表于 2020-9-30 17:17
注意你的test.h264是需要h264 raw数据,不能是打包的数据。 可以通过ffmpeg转换出h264裸流。

测试文件应该没有问题
firefly@firefly:~/code$ ffprobe test.h264
ffprobe version 4.2.git Copyright (c) 2007-2019 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
configuration: --enable-version3 --enable-libdrm --enable-rkmpp --enable-libx264 --enable-nonfree --enable-gpl
libavutil      56. 35.101 / 56. 35.101
libavcodec   58. 60.100 / 58. 60.100
libavformat    58. 34.101 / 58. 34.101
libavdevice    58.9.100 / 58.9.100
libavfilter   7. 66.100 /7. 66.100
libswscale      5.6.100 /5.6.100
libswresample   3.6.100 /3.6.100
libpostproc    55.6.100 / 55.6.100
Input #0, h264, from 'test.h264':
Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc

miaork3399 发表于 2021-7-21 14:00:19

注意 其中一行:
mpp: mpp_device: mpp_device_send_reg ioctl VPU_IOC_SET_REG failed ret -1 errno 14 Bad address

打开 kernel 中的 VPU 功能

wx__KpPmKM 发表于 2022-10-12 11:58:09

miaork3399 发表于 2021-7-21 14:00
注意 其中一行:
mpp: mpp_device: mpp_device_send_reg ioctl VPU_IOC_SET_REG failed ret -1 err ...

您好,这个功能在哪里打开

wx__KpPmKM 发表于 2022-10-12 12:05:19

楼主好,请问这个解决了吗
页: [1]
查看完整版本: mpp解码问题