MPP Port Devices Driver

Posted on

Uninstall and reinstall the driver. The device driver may have become corrupted. Uninstall the driver from Device Manager and scan for new hardware to install the driver again. In the device's Properties dialog box, click the Driver tab, and then click Uninstall. Follow the instructions. Restart your computer. The mpp is a middleware library for Rockchip SoC's cross platform media process. The main purpose of mpp is to provide very high performance, high flexibility and expansibility on multimedia (mainly video and image) process. The design target of mpp is to connect different Rockchip hardware kernel driver.

Multimedia Overview on Rockchip platform

MPP: Media Process Platform is the video codec parser andHardware Abstraction Layer library for the Rockchip platforms.

  • 2Build
  • 6Mpp Components
  • 11Mpp User Guide
    • 11.3Rate Control

Get source code

You can get mpp source from git.

git clone -b release



If you are using a Debian relation distribution, there is a debian build rulles in the source code. You may check the debian directory for the future information.

You may use the following command to build the deb packages, supporting architecture are: armhf, arm64.

DEB_BUILD_OPTIONS='parallel=4 nocheck' dpkg-buildpackage -a<arch>

Please install the all requirement cross compiling tools and Debian packages tools before.

You may use the following command to build it in the board:



Build in Android need android ndk package, usually we use android-ndk-r10d.
you can download ndk from google website and modify ndk path in make-Android.bash. Auto path is
Then, Carry out build/andorid/xx/make-Android.bash. There may be some errors in the first execution
Re-execution make-Android.bash the probelm can be resolved.


Carry out build/xx-x86_64/build-all.bat and make-solutions.bat

System Diagram


OpenMax / libva


+-------------------- MPP ----------------------+

+-------------------------+ +--------+

buffer queue manage



codec OSAL
decoder / encoder


+-----------+ +-----------+

parser HAL
control reg_gen

+-----------+ +-----------+ +--------

+-------------------- MPP ----------------------+


RK vcodec_service / v4l2


About Mpp

The mpp is a middleware library for Rockchip SoC's cross platform media process.
The main purpose of mpp is to provide very high performance, high flexibility
and expansibility on multimedia (mainly video and image) process.

The design target of mpp is to connect different Rockchip hardware kernel driver
and different userspace application.

Rockchip has two sets of hardware kernel driver.

The first one is vcodec_service/vpu_service/mpp_service which is a high
performance stateless frame base hardware kernel driver. This driver supports
all available codecs that hardware can provide. This driver is used on Android/

The second one is v4l2 driver which is developed for ChromeOS. It currently
supports H.264/H.265/vp8/vp9. This driver is used on ChomeOS/Linux.

Mpp plans to support serval userspace applications including OpenMax, libva.

Mpp Feature

1. Cross Platform
The target OS platform including Android, Linux, ChromeOS and windows. Mpp uses
cmake to compile on different platform.

2. High Performance
Mpp supports sync / async interface to reduce the time blocked in interface. And
mpp internally make hardware and software run parallelly. When hardware is
running sofware will prepare next hardware task at the same time.

3. High Flexibility
mpi (Media Process Interface) is easy to extend by different control function.
The input/output element packet/frame/buffer is easy to extend different

Mpp Components

OSAL (Operation System Abstraction Layer)

This module shutters the differences between different operation systems and
provide basic components including memory, time, thread, log and hardware memory

MPI (Media Process Interface) / MPP

This module is on charge of interaction with external user. Mpi layer has two
ways for user. The simple way - User can use put/get packet/frame function set.
The advanced way - User has to config MppTask and use dequeue/enqueue funciton
set to communicate with mpp. MppTask can carry different meta data and complete
complex work.

Codec (encoder / decoder)

This module implements the high efficiency internal work flow. The codec module
provides a general call flow for different video format. Software process will
be separated from hardware specified process. The software will communicate with
hardware with a common task interface which combines the buffer information and
codec specified infomation.

Mpp Port Devices Driver Windows 10

Parser/Controller and hal (Hardware Abstraction Layer)

This layer provides the implement function call of different video format and
different hardware. For decoder parser provide the video stream parse function
and output format related syntax structure to hal. The hal will translate the
syntax structure to register set on different hardware. Current hal supports
vcodec_service kernel driver and plan to support v4l2 driver later.

Mpp Kernel Driver

Rockchip has two sets of hardware kernel driver.

The first one is vcodec_service/vpu_service/mpp_service which is a high
performance stateless frame base hardware kernel driver. This driver supports
all available codecs that hardware can provide. This driver is used on Android/

Here is the vcodec_service kernel driver framework diagram.

+-------------+ +-------------+ +-------------+
client A client B client C
+-------------+ +-------------+ +-------------+

MPP Port Devices Driver


+-------------+ +-------------+ +-------------+
session A session B session C
+-------------+ +-------------+ +-------------+

waiting done waiting done waiting done

+---+---+ +---+---+ +---+---+ +---+---+ +---+---+
task3 task0 task1 task0 task0
+---+---+ +-------+ +-------+ +-------+ +---+---+

+---+---+ +---+---+
task2 task1
+-------+ +-------+

waiting running done

+-----+-----+ +-----+-----+ +-----+-----+
task A2 task A1 task C0
+-----+-----+ +-----------+ +-----+-----+

+-----+-----+ +-----+-----+
task B1 task C1
+-----+-----+ +-----+-----+

+-----+-----+ +-----+-----+
task A3 task A0
+-----------+ +-----+-----+

task B0

The principle of this design is to separate user task handling and hardware
resource management and minimize the kernel serial process time between two
hardware process operation.

The driver uses session as communication channel. Each userspace client (client)
will have a kernel session. Client will commit tasks to session. Then hardware
is managed by service (vpu_service/vcodec_service). Service will provide the
ability to process tasks in sessions.

When client commits a task to kernel the task will be set to waiting status and
link to both session waiting list and service waiting list. Then service will
get task from waiting list to running list and run. When hardware finishs a task
the task will be moved to done list and put to both service done list and
session done list. Finally client will get the finished task from session.

Mpp Buffer

Mpp buffer is the warpper of the buffer used by hardware. Hardware usually can
not use the buffer malloc by cpu. Then we design MppBuffer for different memory
allocator on different platform. Currently it is designed for ion buffer on
Android and drm buffer on Linux. Later may support vb2_buffer in v4l2 devices.

In order to manage buffer usage in different user mpp buffer module introduces
MppBufferGroup as bufffer manager. All MppBuffer will connect to its manager.
MppBufferGroup provides allocator service and buffer reuse ability.

Different MppBufferGroup has different allocator. And besides normal malloc/free
function the allocator can also accept buffer from external file descriptor.

MppBufferGroup has two lists, unused buffer list and used buffer list. When
buffer is free buffer will not be released immediately. Buffer will be moved to
unused list for later reuse. There is a good reason for doing so. When video
resolution comes to 4K the buffer size will be above 12M. It will take a long
time to allocate buffer and generate map table for it. So reusing the buffer
will save the allocate/free time.

Here is the diagram of Mpp buffer status transaction.

+----------+ +---------+
create commit
+-----+----+ +----+----+

+----------+ unused <-----------+

+-----v----+ +-----+----+
malloc free
+----------+ +----------+
inc_ref +---------+ dec_ref
+-----+----+ +-----^----+

+----------> used +-----------+



Mpp Task

Mpp task is the contain component for transaction with external user in advanced
mode. The target of advanced mode is to provide flexible, multiple input/output
content for extension.

Mpp task has mpp_meta as the rich content carrier. Mpp meta uses KEY and value
pair for extension. One task can carries multiple data into or out of mpp.
The typical case is encoder with OSD and motion detection. One task may contain
OSD buffer, motion detection buffer, frame buffer and stream buffer as input and
output stream buffer and motion detection buffer with data. And this case can
also be used on decoder if decoder wants to output some side information.

1. Mpp task queue
Mpp task queue is the manager of tasks. Due to user may incorrectly use the task
we choose the design that hold all task inside mpp. Task queue will create and
release task. But task queue will not interact with user directly. We use port
and task status to control the transaction.

2. Mpp port
Mpp port is the transaction interface of task queue. External user and internal
worker thread will use mpp_port_poll / mpp_port_dequeue / mpp_port_enqueue
interface to poll / dequeue / enqueue the task task queue. Mpp advanced mode is
using port to connect external user, interface storage and internal process
thread. Each task queue has two port: input port and output port. And from a
global view the task will always flow from input port to output port.

3. Mpp task status
There are four status for one task. Mpp use list_head to represent the status.

INPUT_PORT : Initial status for input port user to dequeue. Or when output port
successfully enqueue a task then the task is on this status.

INPUT_HOLD : When input port user successfully dequeue a task then the task is
on this status.

OUTPUT_PORT: When input port user successfully enqueue a task then the task is
on OUTPUT_PORT status. And this task is ready for dequeue from
output port.

MPP Port Devices driver

OUTPUT_HOLD: When output port user successfully dequeue a task then the task is
on this status.

4. Mpp task / port transaction
There are three transaction functions on a port: poll / dequeue / enqueue.
When port user call the transaction function task will be transfer from one
status to next status. The status transform flow is unidirectional from input
port to output port.

The overall relationship graph of task / port / status is shown below.

1. task queue

+----+----+ +--------------+ +----+----+
4 3 2.1
+--------+ dequeue <--+ status <--+ enqueue <---------+
+---------+ +---------+
+------v-----+ +--------------+ +------+------+
3 2 2 3
status input output status

+------+-----+ +--------------+ +------^------+
+---------+ 3 +---------+
4 status 2.1
+--------> enqueue +--> INPUT_PORT +--> dequeue +---------+

+----+----+ +--------------+ -----+----+


On advanced mode mpp uses two task queue: input task queue and output task
Input task queue connects input side external user to internal worker thread.
Output task queue connects internal worker thread to output side external user.
Then there will be three threads to parallelize internal process and external
transation. This will maximize mpp efficiency.

The work flow is demonstrated as below graph.

+-------------------+ +-------------------+
input side user output side user
+----^---------+----+ +----^---------+----+

+----+----+----v----+ +----+----+----v----+
dequeue enqueue dequeue enqueue
+----^----+----+----+ +----^----+----+----+

+----+---------+----+ MPP +----+---------v----+
+---+ input port +-----------+ output port +---+
+-------------------+ +-------------------+
input task queue output task queue
+-------------------+ +-------------------+
output port input port
+----+---------^----+ +----+---------^----+

+----v----+----+----+ +----v----+----+----+
dequeue enqueue dequeue enqueue
+----+----+----^----+ +----+----+----^----+

internal work thread



Mpp don't directly provide thread api, so you should use the correspoding
os interface.
About multithreading encode/decode, something must be done.

1. Resources should apply for multiple copies rather than one, To avoid the
competition of resources

2. The timing of resource release is different, release resource should be done after
a frmae or a packet end to used.

For specific details about multithreading, see test/mpi_enc_test and test/mpi_dec_test.

param set

Mpp nees some param to decide work mode, param include MPP, OSAL, CODEC, ISP, HAL
and Mode module cmd.

All cmd is define in Inc/Rk_mpi_cmd.h

Usually cmd is set after mpp_create and mpp_init, but work mode should be set
before mpp_init. you need to indicate work mode(single or advanced) to help mpp cho
se thread.

Rate Control

Mpp support three mode of rate control, CBR(constant bitrate),VBR(variable
bitrate) and CQP(FIX QP). Mpp control rate according to the set of three
parameters, include MppEncCodecCfg, MppEncPrepCfg and MppEncRcCfg.

1. CBR

In CBR mode, the bitrate of encoded data is controlled whtnin the configured maximum
bit rate and the minimum bitrate range.

2. VBR

In VBR mode, mpp will try to keep the video quality stable and make the code rate of
the encoded file fluctuate as much as possible within the given maximum and minimum
bit rate ranges.

Mpp Interface Use

1. MPP_RET Mpp::put_packet(MppPacket packet)
Is packaged as mpi->put_packet, and for interact with internal packet list in decoder.

2. MPP_RET Mpp::get_frame(MppFrame *frame)
Is packaged as mpi->get_frame, and for interact with internal frame list in decoder. you can
call like this when decode.


Mpp Port Devices Driver Update

3. MPP_RET Mpp::put_frame(MppFrame frame)
Is packaged as mpi->put_frame, and for interact with internal frame list in encoder.

4. MPP_RET Mpp::get_packet(MppPacket *packet)
Is packaged as mpi->get_packet, and for interact eith internal packet list in encoder. you can
call like this when encode.


5. MPP_RET Mpp::poll(MppPortType type, MppPollType timeout)
Is packaged as mpi->poll, poll usually used in task mode(advance mode). poll will check internal
task list, if MPP_INPUT_PORT/MPP_OUTPUT_PORT is empty, poll will block util task list get node,
else poll will return immediately.

about how does task modework, please see doc/design/4.mpp_task.txt

6. MPP_RET Mpp::dequeue(MppPortType type, MppTask *task)
Is packaged as mpi->dequeue, will get a task with multiple data. when port is MPP_INPUT_PORT, get a
task to set. when port is MPP_OUTPUT_PORT, get a task with encoded data.

7. MPP_RET Mpp::enqueue(MppPortType type, MppTask task)
Is packaged as mpi->enqueue, will send a task to internal task list, so that list get a node. you
can call like this when encode.
mpi->poll(input, xx)

mpi->dequeue(input, xx)

mpi->enqueue(input, xx)

mpi->poll(output, xx)

mpi->dequeue(output, xx)

mpi->enqueue(output, xx)
8. MPP_RET Mpp::control(MpiCmd cmd, MppParam param)
Is packaged as mpi->control, will change mpp param.

About how to use mpp encode/decode, please test/mpi_encode_test.c and test/mpi_decode_test.c

Mpp Port Devices Driver Download

Retrieved from ''

Before you begin

Driver updates for Windows 10, along with many devices, such as network adapters, monitors, printers, and video cards, are automatically downloaded and installed through Windows Update. You probably already have the most recent drivers, but if you'd like to manually update or reinstall a driver, here's how:

Update the device driver

  1. In the search box on the taskbar, enter device manager, then select Device Manager.

  2. Select a category to see names of devices, then right-click (or press and hold) the one you’d like to update.

  3. Select Search automatically for updated driver software.

  4. Select Update Driver.

  5. If Windows doesn't find a new driver, you can try looking for one on the device manufacturer's website and follow their instructions.

Reinstall the device driver

MPP Port Devices Driver

  1. In the search box on the taskbar, enter device manager, then select Device Manager.

  2. Right-click (or press and hold) the name of the device, and select Uninstall.

  3. Restart your PC.

  4. Windows will attempt to reinstall the driver.

Mpp Port Devices Drivers

More help

If you can't see the desktop and instead see a blue, black, or blank screen, see Troubleshoot blue screen errors or Troubleshoot black or blank screen errors.