SetDecodeParams
Function Usage
Sets decoder parameters.
Restrictions
N/A
Prototype
DecoderRetCode SetDecodeParams(DecodeParamsIndex index, void *decParams)
Parameter Description
Parameter |
Input/Output |
Type |
Description |
|---|---|---|---|
index |
Input |
DecodeParamsIndex |
Type of a parameter to be set. |
decParams |
Input |
void * |
Memory address of the parameter. |
Configurable parameters:
// Decoding parameters
enum DecodeParamsIndex : uint32_t {
INDEX_PIC_INFO,
INDEX_PORT_FORMAT_INFO,
INDEX_ALIGN_INFO,
INDEX_PARAM_NONE
};
enum DecoderPort : uint32_t {
IN_PORT,
OUT_PORT
};
// Decoding output formats
enum MediaPixelFormat : uint32_t {
PIXEL_FORMAT_RGBA_8888,
PIXEL_FORMAT_YUV_420P,
PIXEL_FORMAT_FLEX_YUV_420P,
PIXEL_FORMAT_NV12,
PIXEL_FORMAT_NV21,
PIXEL_FORMAT_NONE
};
struct PortFormatParams {
DecoderPort port {};
int32_t format = 0;
};
struct PicInfoParams {
uint32_t width = 0; // Image width
uint32_t height = 0; // Image height
int32_t stride = 0; // Image height after horizontal alignment
uint32_t scanLines = 0; // Image height after vertical alignment
uint32_t cropWidth = 0; // Cropped width to the left of the image
uint32_t cropHeight = 0; // Cropped height to the top of the image
};
struct AlignInfoParams {
uint32_t widthAlign = 0;
uint32_t heightAlign = 0;
};
Return Value Description
Data type: DecoderRetCode
The value can be any of the following:
- VIDEO_DECODER_SUCCESS: The decoder is successfully configured.
- VIDEO_DECODER_SET_DECODE_PARAMS_FAIL: Failed to configure the decoder.
Parent topic: Decoding APIs (C and C++)