MPP使用

下载源代码

发布分支为 release 分支,开发分支为 develop 分支,默认为开发分支。 下载命令

cd ~
git clone https://github.com/rockchip-linux/mpp.git

编译

neardi@LPA3588:~/mpp$ cmake -DRKPLATFORM=ON -DHAVE_DRM=ON && make

编译过程如下:

CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- cmake version 3.16.3
-- Detected ARMv8 system processor
-- current version:
-- 93b1cd14 author: He Hua        2022-12-26 [vpu_api]: modify struct VideoFrame

...

[ 98%] Built target vpu_api_test
[ 99%] Built target mpi_enc_mt_test
[100%] Built target mpi_dec_nt_test

安装

sudo make install

安装过程如下:

[ 10%] Built target osal
[ 16%] Built target mpp_base
[ 16%] Built target hal_common
[ 17%] Built target mpp_rc

...

-- Up-to-date: /usr/local/bin/mpi_rc2_test
-- Up-to-date: /usr/local/bin/mpi_dec_multi_test
-- Up-to-date: /usr/local/bin/vpu_api_test

执行

mpi_dec_test -t 7 -n 10 -i /tmp/enc.h264

查看日志

journalctl -r | grep mpp