MPP Development Reference
MPP Development Reference
Rockchip Confidential 0/ 10
Fuzhou Rokchip Electronics Co., Ltd.
Table of Content
MPP DEVELOPMENT REFERENCE ...................................................................................................................... 0
Rockchip Confidential 1/ 10
Fuzhou Rokchip Electronics Co., Ltd.
1.1 Overview
Rockchip provides a media processing platform (MPP for short) for rapid application development. For
application, the MPP shields the complex processing procedures at the bottom layer related to the chip, and
provides MPP programming interfaces (MPIs) for implementing various functions. The functions include:
encoding
H.264: up to High Profile Level 4.0, including Baseline Profile and Main Profile,
1920x1080@30fps
decoding
H.264: up to High Profile Level 4.1, including Baseline Profile and Main Profile,
1920x1080@30fps
H.265: Main Profile up to Level 4.1, 1920x1080@30fps
MPEG-2: Main Profile up to High Level, 1920x1080@30fps
MPEG-4: Simple Profile up to Level 6; Advanced Profile up to Level 5, 1920x1080@30fps
VP8: 1920x1080@30fps
This document describes the architecture and modules of the MPP, and the user MPIs related to the MPP. It
is intended for but not limited to application development engineers and technical support personnel.
Application layer
Encoder Decoder
HAL
OS layer
Hardware layer
Hardware layer
It is comprised of the RK32xx and peripherals, including the flash memory, double-data rate (DDR), video
sensor or video analog-to-digital converter(VADC).
MPP
Based on the OS layer, the MPP controls the media processing functions. That is, the MPP shields the
details about hardware processing, and provides application programming interface (APIs) for the
application layer.
Rockchip Confidential 2/ 10
Fuzhou Rokchip Electronics Co., Ltd.
Application layer
It is used for developing application based on the MPP and drivers.
dec_parser
stream mpp_dec picture
dec_hal
Input mpp Output
enc_control
mpp_enc
picture enc_hal stream
Rockchip Confidential 3/ 10
Fuzhou Rokchip Electronics Co., Ltd.
/MPP/mpp/hal/vpu: vpu register generation library
android
cmake
toolchain h263
inc h264
vc10-x86_64
h265
vc12-x86_64
m2v
base
inc mpg4
enc dummy
common h264
dummy
legacy pp h263d
rkdec h264d
test
rkenc h265d
osal allocator
vpu m2vd
android
out
mpg4d
inc
test vp8d
linux
tools test
utils window
(5)
/MPP/mpp/legacy: generate new libvpu to include old vpuapi path and new mpp path
(6)
/MPP/mpp/test: mpp internal video protocol unit test and demo
(7)
/MPP/test: mpp buffer/packet component unit test and mpi demo
(8)
/MPP/out: final release binary output directory
/MPP/out/bin: executable binary file output directory
/MPP/out/inc: header file output directory
/MPP/out/lib: library file output directory
(9)
/MPP/osal: Operation System Abstract Layer: abstract layer for different operation system
/MPP/osal/mem: mpi memory subsystem for hardware
/MPP/osal/android: google's android
/MPP/osal/linux: mainline linux kernel
/MPP/osal/window: microsoft's window
/MPP/osal/test: OASL unit test
(10)
/MPP/tools: coding style format tools
Rockchip Confidential 4/ 10
Fuzhou Rokchip Electronics Co., Ltd.
(11)
/MPP/utils: small util functions
open context
init
init
init
open
decode
send stream
parse stream
reg generation
send regs
wait regs
get picture
get picture
flush
flush
reset
close close
close
close
Rockchip Confidential 5/ 10
Fuzhou Rokchip Electronics Co., Ltd.
Rockchip Confidential 6/ 10
Fuzhou Rokchip Electronics Co., Ltd.
Chapter 3 Abbreviations
For the purposes of this documentation, the following abbreviations apply:
MPP Media Process Platform
MPI Media Process Interface
HAL Hardware Abstract Layer
OSAL Operating System Abstract Layer
Rockchip Confidential 7/ 10
Fuzhou Rokchip Electronics Co., Ltd.
Start End
Rockchip Confidential 8/ 10
Fuzhou Rokchip Electronics Co., Ltd.
by dequeue and enqueue operation in input queue while getting picture from decoder by dequeue and
enqueue operation in output queue. When decoding is done, mpp context must be reset and memory
allocated by programmer should be released.
Loop
YES
Parse command option End
decoder is simple
Allocate memory output queue: get picture
flow
from decoder by dequeue
and enqueue operation
Loop
Create and init mpp context
NO input queue: send stream
to decoder by dequeue and
enqueue operation
Create and init mpi pointers advanced decoder
Rockchip Confidential 9/ 10