Appendix B MME supplement. STMicroelectronics Multicom 4
Advertisement
Advertisement
UM1112
Appendix B MME supplement
MME supplement
This appendix provides supplementary information to
This section describes a simply interface for a simple MPEG video decoder showing how the configuration parameters can be customized for each transformer.
lists the MPEG video decoders specific definitions.
Type
Table 32. MPEG video decoders specific definitions
Description
MPGV_PictureType_t
MPGV_GlobalParams_t
MPGV_DecodeParams_t
Defines the different picture types an MPEG video transformation can handle.
Parameters to be used for the next transformation an MPEG transformer has to process.
Parameters used by an MPEG transformer to decode an MPEG picture.
Definition:
Description:
Fields:
MPGV_PictureType_t
typedef enum
{
MPGV_PICTURE_TYPE_I,
MPGV_PICTURE_TYPE_P,
MPGV_PICTURE_TYPE_B,
} MPGV_PictureType_t;
Defines the different picture types an MPEG video transformation can handle.
MPGV_PICTURE_TYPE_I
MPGV_PICTURE_TYPE_P
MPGV_PICTURE_TYPE_B
Picture type is I.
Picture type is P.
Picture type is B.
See also:
MPGV_DecodeParams_t
8182595 Rev 5 211/224
215
MME supplement
Definition:
MPGV_GlobalParams_t
enum MPGV_GlobalParamsIdx {
MME_OFFSET_MPGVGlobal_horizontal_size_value,
MME_OFFSET_MPGVGlobal_vertical_size_value,
MME_OFFSET_MPGVGlobal_intra_quantiser_matrix,
MME_OFFSET_MPGVGlobal_non_intra_quantiser_matrix =
MME_OFFSET_MPGVGlobal_intra_quantiser_matrix + 64,
Description:
UM1112
MME_LENGTH_MPGVGlobal =
MME_OFFSET_MPGVGlobal_non_intra_quantiser_matrix + 64
#define MME_TYPE_MPGVGlobal_horizontal_size_value U32
#define MME_TYPE_MPGVGlobal_vertial_size_value U32
#define MME_TYPE_MPGVGlobal_intra_quantiser_matrix U8
#define MME_TYPE_MPGVGlobal_non_intra_quantiser_matrix U8
}; typedef MME_GenericParams_t
MPGV_GlobalParams_t[MME_LENGTH(MPGVGlobal)];
Parameters to be used for the next transformation an MPEG transformer has to process.
The following code provides a simplified example:
MPGV_GlobalParams_t params;
MME_PARAM(params, Length) = MME_LENGTH(MPGVGlobal);
MME_PARAM(params, MPGVGlobal_horizontal_size_value) = hsv;
MME_PARAM(params, MPGVGlobal_vertical_size_value) = vsv; for (i=0; i<64; i++) {
MME_INDEXED_PARAM(params, MPGVGlobal_intra_quantiser_matrix, i) =
iqm[i];
/* ... */
} or to declare parameters statically:
MPGV_GlobalParams_t params = {
10,
10,
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
/* ... */
}
212/224 8182595 Rev 5
UM1112
See also:
MME supplement
8182595 Rev 5 213/224
215
MME supplement
Definition:
MPGV_DecodeParams_t
enum MPGVIdx {
MME_OFFSET_MPGV_picture_type,
MME_OFFSET_MPGV_full_pel_forward_vector,
MME_OFFSET_MPGV_forward_f_code,
MME_OFFSET_MPGV_full_pel_backward_vector,
MME_OFFSET_MPGV_backward_f_code,
MME_OFFSET_MPGV_forward_horizontal,
MME_OFFSET_MPGV_forward_vertical,
/* ... */
Description:
Fields:
UM1112
MME_LENGTH_MPGV
#define MME_TYPE_MPGV_picture_type MPGV_Picture_t
#define MME_TYPE_MPGV_full_pel_forward_vector U32
#define MME_TYPE_MPGV_forward_f_code U32
#define MME_TYPE_MPGV_full_pel_backward_vector U32
#define MME_TYPE_MPGV_backward_f_code U32
#define MME_TYPE_MPGV_forward_horizontal U32
#define MME_TYPE_MPGV_forward_vertical U32
/* ... */
}; typedef MME_GenericParams_t MPGV_DecodeParams_t[MME_LENGTH(MPGV)];
Parameters to be used by a MPEG transformer to be decode an MPEG picture.
MPGV_picture_type Type of the picture that has to be decoded
MPGV_full_pel_forward_vector As described in ISO/IEC 13818-2.
MPGV_forward_f_code As described in ISO/IEC 13818-2.
MPGV_full_pel_backward_vector As described in ISO/IEC 13818-2.
MPGV_backward_f_code As described in ISO/IEC 13818-2.
MPGV_forward_horizontal
MPGV_forward_vertical
...
As described in ISO/IEC 13818-2.
As described in ISO/IEC 13818-2.
The following code provides an example:
MME_Command_t command;
MME_CommandStatus_t status;
MME_DataBuffer_t buffers[4];
MPGV_DecodeParams_t params; command.StructSize = sizeof(command); command.CmdEnd = MME_COMMAND_END_RETURN_NOTIFY;
214/224 8182595 Rev 5
UM1112
See also:
MME supplement
command.DueTime = now + (20 * MS); command.CmdStatus_p = &status; command.NumInputBuffers = 3; command.NumOutputBuffers = 1; command.Buffers_p = &buffers; command.Param_p = ¶ms; status.StructSize = sizeof(status);
/* Setup the input buffers, compressed data, backward reference
picture and forward reference picture */
/* Setup the output buffer, the decompressed picture */
/* Setup the transformer specific parameter structure */
MME_PARAM(params, MPGV_picture_type) = pt;
MME_PARAM(params, MPGV_full_pel_forward_vector = 0;
/* ... */ err = MME_SendCommand(handle, MME_TRANSFORM, &command);
MPGV_GlobalParams_t
8182595 Rev 5 215/224
215
Download
Advertisement