Media Process Platform (MPP) module
Media Process Platform (MPP) module directory description:
MPP : Media Process Platform MPI : Media Process Interface HAL : Hardware Abstract Layer OSAL : Operation System Abstract Layer
Rules:
NOTE:
More document can be found at http://opensource.rock-chips.com/wiki_Mpp
---- top | |----- build CMake out-of-source build directory | | | |----- cmake cmake script directory | | | |----- android android build directory | | | |----- linux linux build directory | | | |----- vc10-x86_64 visual studio 2010 on x86_64 build directory | | | |----- vc12-x86_64 visual studio 2013 on x86_64 build directory | |----- doc design documents of mpp | |----- inc header file for external usage, including | platform header and mpi header | |----- mpp Media Process Platform : mpi function private | | implement and mpp infrastructure (vpu_api | | private layer) | | | |----- base base components including MppBuffer, MppFrame, | | MppPacket, MppTask, MppMeta, etc. | | | |----- common video codec protocol syntax interface for both | | codec parser and hal | | | |----- codec all video codec parser, convert stream to | | | protocol structure | | | | | |----- inc header files provided by codec module for | | | external usage | | | | | |----- dec | | | | | | | |----- av1 av1 parser | | | | | | | |----- avs avs parser | | | | | | | |----- avs2 avs2 parser | | | | | | | |----- h263 h263 parser | | | | | | | |----- h264 h264 parser | | | | | | | |----- h265 h265 parser | | | | | | | |----- m2v mpeg2 parser | | | | | | | |----- mpg4 mpeg4 parser | | | | | | | |----- vp8 vp8 parser | | | | | | | |----- vp9 vp9 parser | | | | | | | |----- jpeg jpeg parser | | | | | |----- enc | | | | | |----- dummy encoder controllor work flow sample | | | | | |----- h264 h264 encoder | | | | | |----- h265 h265 encoder | | | | | |----- jpeg jpeg encoder | | | | | |----- vp8 vp8 encoder | | | |----- hal Hardware Abstract Layer (HAL): modules used in mpi | | | | | |----- inc header files provided by hal for external usage | | | | | |----- common shared HAL code | | | | | |----- rkdec rockchip hardware decoder register generation | | | | | | | |----- h264d generate register file from H.264 syntax info | | | | | | | |----- h265d generate register file from H.265 syntax info | | | | | | | |----- vp9d generate register file from vp9 syntax info | | | | | | | |----- av1d generate register file from AV1 syntax info | | | | | | | |----- avsd generate register file from AVS syntax info | | | | | | | |----- avs2d generate register file from AVS2 syntax info | | | | | |----- rkenc rockchip hardware encoder register generation | | | | | | | |----- h264e generate register file from H.264 syntax info | | | | | | | |----- h265e generate register file from H.265 syntax info | | | | | | | |----- jpege generate register file from jpeg syntax info | | | | | |----- vpu vpu register generation library | | | | | |----- av1d generate register file from AV1 syntax info | | | | | |----- h263d generate register file from H.263 syntax info | | | | | |----- h264e generate register file from H.264 syntax info | | | | | |----- jpegd generate register file from jpeg syntax info | | | | | |----- jpege generate register file from jpeg syntax info | | | | | |----- m2vd generate register file from mpeg2 syntax info | | | | | |----- mpg4d generate register file from mpeg4 syntax info | | | | | |----- vp8d generate register file from vp8 syntax info | | | | | |----- vp8e generate register file from vp8 syntax info | | | |----- vproc video process modules | | | | | |----- iep image enhancement processor | | | | | |----- iep2 image enhancement processor v2 | | | | | |----- vdpp video post processor | | | |----- legacy generate new libvpu to include old vpuapi path | | and new mpp path | | | |----- test mpp internal video protocol unit test and demo | |----- test mpp buffer/packet component unit test and | mpp/mpi/vpu_api demo | |----- out final release binary output directory | | | |----- bin executable binary file output directory | | | |----- inc header file output directory | | | |----- lib library file output directory | |----- osal Operation System Abstract Layer: abstract layer | | for different operation system | | | |----- allocator supported allocator including Android ion and | | Linux drm | | | |----- android google's android | | | |----- inc osal header file for mpp modules | | | |----- linux mainline linux kernel | | | |----- windows microsoft's windows | | | |----- test OASL unit test | |----- tools coding style format tools | |----- utils small util functions
Here is the mpp implement overall framework:
+---------------------------------------+
| |
| OpenMax / gstreamer / libva |
| |
+---------------------------------------+
+-------------------- MPP ----------------------+
| |
| +-------------------------+ +--------+ |
| | | | | |
| | MPI / MPP | | | |
| | buffer queue manage | | | |
| | | | | |
| +-------------------------+ | | |
| | | |
| +-------------------------+ | | |
| | | | | |
| | codec | | OSAL | |
| | decoder / encoder | | | |
| | | | | |
| +-------------------------+ | | |
| | | |
| +-----------+ +-----------+ | | |
| | | | | | | |
| | parser | | HAL | | | |
| | recoder | | reg_gen | | | |
| | | | | | | |
| +-----------+ +-----------+ +--------| |
| |
+-------------------- MPP ----------------------+
+---------------------------------------+
| |
| kernel |
| RK vcodec_service / v4l2 |
| |
+---------------------------------------+Here is the Media Process Interface hierarchical structure MpiPacket and MpiFrame is the stream I/O data structure. And MpiBuffer encapsulates different buffer implement like Linux's dma-buf and Android's ion. This part is learned from ff.
+-------------------+
| |
| MPI |
| |
+---------+---------+
|
|
v
+---------+---------+
| |
+---+ ctx +---+
| | | |
| +-------------------+ |
| |
v v
+-------+-------+ +-------+-------+
| | | |
| packet | | frame |
| | | |
+---------------+ +-------+-------+
| |
| |
| |
| +---------------+ |
| | | |
+---->+ buffer + | | | |
| | | | | | init | | | | +----------------> | | | | | | | | | | | init | | | | +----------------> | | | | | | | | | | | init | | | | +----------------> | | | |
No open issues yet, or sync has not completed.