Skip to content
Sijia Chen edited this page Feb 2, 2015 · 10 revisions

This file describes the interface of ISVCDecoder

Class:ISVCDecoder

Initilaize decoder.

Return:
0 - success; otherwise - failed;

Name Type Descritpion
pParam const SDecodingParam * parameter for decoder

Uninitialize the decoder.

Decode one frame.

Return:
0 - success; otherwise -failed;

Name Type Descritpion
pSrc const unsigned char * the h264 stream to be decoded
iSrcLen const int the length of h264 stream
ppDst unsigned char ** buffer pointer of decoded data (YUV)
pStride int * output stride
iWidth int & output width
iHeight int & output height

For slice level DecodeFrameNoDelay() (4 parameters input), whatever the function return value is, the output data of I420 format will only be available when pDstInfo->iBufferStatus == 1,. This function will parse and reconstruct the input frame immediately if it is complete It is recommended as the main decoding function for H.264/AVC format input.

Return:
0 - success; otherwise -failed;

Name Type Descritpion
pSrc const unsigned char * the h264 stream to be decoded
iSrcLen const int the length of h264 stream
ppDst unsigned char ** buffer pointer of decoded data (YUV)
pDstInfo SBufferInfo * information provided to API(width, height, etc.)

For slice level DecodeFrame2() (4 parameters input), whatever the function return value is, the output data of I420 format will only be available when pDstInfo->iBufferStatus == 1,. (e.g., in multi-slice cases, only when the whole picture is completely reconstructed, this variable would be set equal to 1.)

Return:
0 - success; otherwise -failed;

Name Type Descritpion
pSrc const unsigned char * the h264 stream to be decoded
iSrcLen const int the length of h264 stream
ppDst unsigned char ** buffer pointer of decoded data (YUV)
pDstInfo SBufferInfo * information provided to API(width, height, etc.)

This function parse input bitstream only, and rewrite possible SVC syntax to AVC syntax.

Return:
0 - success; otherwise -failed;

Name Type Descritpion
pSrc const unsigned char * the h264 stream to be decoded
iSrcLen const int the length of h264 stream
pDstInfo SParserBsInfo * bit stream info

This API does not work for now!! This is for future use to support non-I420 color format output.

Return:
to do ...

Name Type Descritpion
pSrc const unsigned char * the h264 stream to be decoded
iSrcLen const int the length of h264 stream
pDst unsigned char * buffer pointer of decoded data (YUV)
iDstStride int output stride
iDstLen int & bit stream info
iWidth int & output width
iHeight int & output height
iColorFormat int & output color format

Set option for decoder, detail option type, please refer to enumurate DECODER_OPTION.

Return:
CM_RETURN: 0 - success; otherwise - failed;

Name Type Descritpion
eOptionId DECODER_OPTION  
pOption void * option for decoder such as OutDataFormat, Eos Flag, EC method, ...

Get option for decoder, detail option type, please refer to enumurate DECODER_OPTION.

Return:
CM_RETURN: 0 - success; otherwise - failed;

Name Type Descritpion
eOptionId DECODER_OPTION  
pOption void * option for decoder such as OutDataFormat, Eos Flag, EC method, ...

Get the capability of decoder.

Return:
0 - success; otherwise - failed;

Name Type Descritpion
pDecCapability SDecoderCapability * decoder capability

Create decoder.

Return:
0 - success; otherwise - failed;

Name Type Descritpion
ppDecoder ISVCDecoder ** decoder

Destroy decoder.

Return:
void

Name Type Descritpion
pDecoder ISVCDecoder * decoder