MPP Programming Interface Reference Manual  jpl-r3.0.0-rc1
mpi_enc.h File Reference

MPI for encoder channel. More...

#include "mpi_index.h"

Data Structures

struct  MPI_BUF_SEG_S
 Struct for the buffer segment. More...
 
struct  MPI_STREAM_PARAMS_S
 Stream frame buffer parameter. More...
 
struct  MPI_ENC_CHN_ATTR_S
 Struct for the encoder channel attributes. More...
 
struct  MPI_ENC_BIND_INFO_S
 Struct for the encoder channel binding info. More...
 
struct  MPI_MCVC_VBR_PARAM_S
 Struct for the parameters of rate control in variable bit rate mode for motion-compensation-based video compression standard. More...
 
struct  MPI_MCVC_CBR_PARAM_S
 Struct for the parameters of rate control in constant bit rate mode for motion-compensation-based video compression standard. More...
 
struct  MPI_MCVC_CQP_PARAM_S
 Struct for the parameters of rate control in constant QP mode for motion-compensation-based video compression standard. More...
 
struct  MPI_MCVC_RC_ATTR_S
 Struct for rate control for Motion-Compensation-based Video Compression (MCVC) standard. More...
 
struct  MPI_VC_RC_ATTR_S
 Struct for rate control for intra-frame based video compression standard. More...
 
struct  MPI_VENC_ATTR_H264_S
 Struct for H264 encoder attribute. More...
 
struct  MPI_VENC_ATTR_H265_S
 Struct for H265 encoder attribute. More...
 
struct  MPI_VENC_ATTR_MJPEG_S
 Struct for MJPEG encoder attribute. More...
 
struct  MPI_VENC_ATTR_JPEG_S
 Struct for JPEG encoder attribute. More...
 
struct  MPI_VENC_ATTR_S
 Struct for video codec. More...
 
struct  MPI_VENC_ATTR_EX_S
 Struct for video codec extend. More...
 
struct  MPI_ENC_EVENT_S
 Struct for encoder event. More...
 
struct  MPI_VENC_ROI_S
 Struct for video encoder ROI. More...
 

Macros

#define MPI_VENC_ROI_NUM   (8)
 
#define MPI_ENC_MAX_FRAME_SEG_CNT   16 /* duplicates ENC_MAX_FRAME_SEG_CNT */
 
#define MPI_ISP_MAX_WIN_NUM   9 /* duplicates ISP_MAX_WIN_NUM */
 

Enumerations

enum  MPI_FRAME_TYPE_E {
  MPI_FRAME_TYPE_SPS = 0, MPI_FRAME_TYPE_PPS = 1, MPI_FRAME_TYPE_I = 2, MPI_FRAME_TYPE_P = 3,
  MPI_FRAME_TYPE_B = 4, MPI_FRAME_TYPE_NUM
}
 Enumeration of frame type. More...
 
enum  MPI_RC_MODE_E {
  MPI_RC_MODE_VBR, MPI_RC_MODE_CBR, MPI_RC_MODE_SBR, MPI_RC_MODE_CQP,
  MPI_RC_MODE_NUM
}
 Enumeration of rate control mode. More...
 
enum  MPI_VENC_PRFL_E { MPI_PRFL_BASELINE, MPI_PRFL_MAIN, MPI_PRFL_HIGH, MPI_PRFL_NUM }
 Enumeration of video codec profile. More...
 
enum  MPI_VENC_TYPE_E {
  MPI_VENC_TYPE_H264, MPI_VENC_TYPE_H265, MPI_VENC_TYPE_MJPEG, MPI_VENC_TYPE_JPEG,
  MPI_VENC_TYPE_NUM
}
 Enumeration of video encoder type. More...
 
enum  MPI_VENC_OBS_MODE_E { MPI_VENC_OBS_DISABLE, MPI_VENC_OBS_ENABLE, MPI_VENC_OBS_NUM }
 Enumeration of obs(optical-flow bit-rate) mode. More...
 

Functions

INT32 MPI_ENC_createChn (MPI_ECHN chn_idx, const MPI_ENC_CHN_ATTR_S *p_chn_attr)
 Create a encoder channel and set its attributes. More...
 
INT32 MPI_ENC_destroyChn (MPI_ECHN chn_idx)
 Destroy a encoder channel. More...
 
INT32 MPI_ENC_bindToVideoChn (MPI_ECHN chn_idx, const MPI_ENC_BIND_INFO_S *p_bind_info)
 Binding an encoder channel to a video channel. More...
 
INT32 MPI_ENC_unbindFromVideoChn (MPI_ECHN chn_idx)
 Unbind an encoder channel from a video channel. More...
 
INT32 MPI_ENC_setChnAttr (MPI_ECHN chn_idx, const MPI_ENC_CHN_ATTR_S *p_chn_attr)
 Set the encoder channel attributes. More...
 
INT32 MPI_ENC_getChnAttr (MPI_ECHN chn_idx, MPI_ENC_CHN_ATTR_S *p_chn_attr)
 Get the attributes of a video channel. More...
 
INT32 MPI_ENC_setVencAttr (MPI_ECHN chn_idx, const MPI_VENC_ATTR_S *p_venc_attr)
 Set video encoder attributes. More...
 
INT32 MPI_ENC_getVencAttr (MPI_ECHN chn_idx, MPI_VENC_ATTR_S *p_venc_attr)
 Get the video encoder attributes. More...
 
INT32 MPI_ENC_setVencAttrEx (MPI_ECHN chn_idx, const MPI_VENC_ATTR_EX_S *p_venc_attr_ex)
 Set video encoder attributes extend. More...
 
INT32 MPI_ENC_getVencAttrEx (MPI_ECHN chn_idx, MPI_VENC_ATTR_EX_S *p_venc_attr_ex)
 Get the video encoder attributes extend. More...
 
INT32 MPI_ENC_startChn (MPI_ECHN chn_idx)
 Start a encoder channel. More...
 
INT32 MPI_ENC_stopChn (MPI_ECHN chn_idx)
 Stop a encoder channel. More...
 
INT32 MPI_ENC_notifyEvent (MPI_ECHN idx, MPI_ENC_EVENT_S *event)
 Start a encoder channel. More...
 
INT32 MPI_initBitStreamSystem (void)
 Initialize bit stream system.
 
INT32 MPI_exitBitStreamSystem (void)
 Exit bit stream system.
 
MPI_BCHN MPI_createBitStreamChn (MPI_ECHN chn_idx)
 Create a channel to get the bit stream data. More...
 
INT32 MPI_destroyBitStreamChn (MPI_BCHN chn_idx)
 Destroy a channel to get the bit stream data. More...
 
INT32 MPI_getBitStream (MPI_BCHN chn_idx, MPI_STREAM_PARAMS_S *stream_params, INT32 time_ms)
 Get the parameters of a encoded bit stream. More...
 
INT32 MPI_releaseBitStream (MPI_BCHN chn_idx, MPI_STREAM_PARAMS_S *stream_params)
 Release the buffer of a encoded bit stream. More...
 
INT32 MPI_ENC_getChnFrame (MPI_ECHN idx, MPI_STREAM_PARAMS_S *stream_params, INT32 time_ms)
 
INT32 MPI_ENC_releaseChnFrame (MPI_ECHN idx, MPI_STREAM_PARAMS_S *stream_params)
 
INT32 MPI_ENC_requestIdr (MPI_ECHN idx)
 Request IDR frame. More...
 

Detailed Description

MPI for encoder channel.

Macro Definition Documentation

#define MPI_VENC_ROI_NUM   (8)

Number of video encode ROI.

Enumeration Type Documentation

Enumeration of frame type.

Enumerator
MPI_FRAME_TYPE_SPS 

SPS frame.

MPI_FRAME_TYPE_PPS 

PPS frame.

MPI_FRAME_TYPE_I 

I frame.

MPI_FRAME_TYPE_P 

P frame.

MPI_FRAME_TYPE_B 

B frame.

MPI_FRAME_TYPE_NUM 

The number of frame type.

Enumeration of rate control mode.

Enumerator
MPI_RC_MODE_VBR 

Variable bit rate mode.

MPI_RC_MODE_CBR 

Conttant bit rate mode.

MPI_RC_MODE_SBR 

Smart bit rate mode.

MPI_RC_MODE_CQP 

Constant QP mode.

MPI_RC_MODE_NUM 

Number of rate control mode.

Enumeration of obs(optical-flow bit-rate) mode.

Enumerator
MPI_VENC_OBS_DISABLE 

obs disable.

MPI_VENC_OBS_ENABLE 

obs enable.

MPI_VENC_OBS_NUM 

The number of obs mode number.

Enumeration of video codec profile.

Enumerator
MPI_PRFL_BASELINE 

Baseline profile.

MPI_PRFL_MAIN 

Main profile.

MPI_PRFL_HIGH 

High profile.

MPI_PRFL_NUM 

Number of video codec profile.

Enumeration of video encoder type.

Enumerator
MPI_VENC_TYPE_H264 

H.264.

MPI_VENC_TYPE_H265 

H.265.

MPI_VENC_TYPE_MJPEG 

Motion JPEG.

MPI_VENC_TYPE_JPEG 

JPEG.

MPI_VENC_TYPE_NUM 

Number of video encoder type.

Function Documentation

MPI_BCHN MPI_createBitStreamChn ( MPI_ECHN  idx)

Create a channel to get the bit stream data.

Parameters
[in]idxphysical/extended channel index.
See also
MPI_destroyBitStreamChn()
Returns
The execution result.
INT32 MPI_destroyBitStreamChn ( MPI_BCHN  idx)

Destroy a channel to get the bit stream data.

Parameters
[in]idxphysical/extended channel index.
See also
MPI_createBitStreamChn()
Returns
The execution result.
INT32 MPI_ENC_bindToVideoChn ( MPI_ECHN  idx,
const MPI_ENC_BIND_INFO_S p_bind_info 
)

Binding an encoder channel to a video channel.

Parameters
[in]idxencoder channel index.
[in]p_bind_infopointer to the binding info.
See also
MPI_ENC_unbindFromVideoChn()
Returns
The execution result.
INT32 MPI_ENC_createChn ( MPI_ECHN  idx,
const MPI_ENC_CHN_ATTR_S p_chn_attr 
)

Create a encoder channel and set its attributes.

Parameters
[in]idxencoder channel index.
[in]p_chn_attrpointer to the encoder channel attribute.
See also
MPI_ENC_destroyChn()
Returns
The execution result.
INT32 MPI_ENC_destroyChn ( MPI_ECHN  idx)

Destroy a encoder channel.

Parameters
[in]idxencoder channel index.
See also
MPI_ENC_createChn()
Returns
The execution result.
INT32 MPI_ENC_getChnAttr ( MPI_ECHN  idx,
MPI_ENC_CHN_ATTR_S p_chn_attr 
)

Get the attributes of a video channel.

Parameters
[in]idxencoder channel index.
[out]p_chn_attrpointer to the encoder channel attribute.
See also
MPI_ENC_setChnAttr()
Returns
The execution result.
INT32 MPI_ENC_getVencAttr ( MPI_ECHN  idx,
MPI_VENC_ATTR_S p_venc_attr 
)

Get the video encoder attributes.

Parameters
[in]idxencoder channel index.
[out]p_venc_attrpointer to the video encoder attribute.
See also
MPI_setVencAttr()
Returns
The execution result.
INT32 MPI_ENC_getVencAttrEx ( MPI_ECHN  idx,
MPI_VENC_ATTR_EX_S p_venc_attr_ex 
)

Get the video encoder attributes extend.

Parameters
[in]idxencoder channel index.
[out]p_venc_attr_expointer to the video encoder attribute extend.
See also
MPI_ENC_setVencAttrEx()
Returns
The execution result.
INT32 MPI_ENC_notifyEvent ( MPI_ECHN  idx,
MPI_ENC_EVENT_S event 
)

Start a encoder channel.

Parameters
[in]idxencoder channel index.
See also
MPI_ENC_stopChn()
Returns
The execution result.
INT32 MPI_ENC_requestIdr ( MPI_ECHN  idx)

Request IDR frame.

Parameters
[in]idxphysical/extended channel index.
Returns
The execution result.
INT32 MPI_ENC_setChnAttr ( MPI_ECHN  idx,
const MPI_ENC_CHN_ATTR_S p_chn_attr 
)

Set the encoder channel attributes.

Parameters
[in]idxencoder channel index.
[in]p_chn_attrpointer to the encoder channel attribute.
See also
MPI_ENC_getChnAttr()
Returns
The execution result.
INT32 MPI_ENC_setVencAttr ( MPI_ECHN  idx,
const MPI_VENC_ATTR_S p_venc_attr 
)

Set video encoder attributes.

Parameters
[in]idxencoder channel index.
[in]p_venc_attrpointer to the video encoder attribute.
See also
MPI_ENC_getVencAttr()
Returns
The execution result.
INT32 MPI_ENC_setVencAttrEx ( MPI_ECHN  idx,
const MPI_VENC_ATTR_EX_S p_venc_attr_ex 
)

Set video encoder attributes extend.

Parameters
[in]idxencoder channel index.
[in]p_venc_attr_expointer to the video encoder attribute extend.
See also
MPI_ENC_getVencAttrEx()
Returns
The execution result.
INT32 MPI_ENC_startChn ( MPI_ECHN  idx)

Start a encoder channel.

Parameters
[in]idxencoder channel index.
See also
MPI_ENC_stopChn()
Returns
The execution result.
INT32 MPI_ENC_stopChn ( MPI_ECHN  idx)

Stop a encoder channel.

Parameters
[in]idxencoder channel index.
See also
MPI_ENC_startChn()
Returns
The execution result.
INT32 MPI_ENC_unbindFromVideoChn ( MPI_ECHN  idx)

Unbind an encoder channel from a video channel.

Parameters
[in]idxencoder channel index.
See also
MPI_ENC_bindToVideoChn()
Returns
The execution result.
INT32 MPI_getBitStream ( MPI_BCHN  idx,
MPI_STREAM_PARAMS_S p_stream_params,
INT32  time_ms 
)

Get the parameters of a encoded bit stream.

Parameters
[in]idxphysical/extended channel index.
[out]p_stream_paramsthe parameters of a encoded bit stream.
[in]time_mstimeout value (unit: ms).
See also
MPI_releaseBitStream()
Returns
The execution result.
INT32 MPI_releaseBitStream ( MPI_BCHN  idx,
MPI_STREAM_PARAMS_S p_stream_params 
)

Release the buffer of a encoded bit stream.

Parameters
[in]idxphysical/extended channel index.
[in]p_stream_paramsthe parameters of a encoded bit stream.
See also
MPI_getBitStream()
Returns
The execution result.