H264DECExecute

Syntax

#include <cafe/h264.h>

s32	H264DECExecute(void *memPtr, void *StrFmPtr);

Parameters

memPtr Pointer to the work memory (Input).
StrFmPtr Pointer to the frame memory that stores the decoding results (Input).
NOTE:
The frame memory must start on a 256-byte boundary.

Return Values

The return value of this API function differs from other functions. The upper 24 bits indicate whether the process succeeded or failed, and the lower 8 bits indicate the decoding status.

When the specified one-frame bitstream is 100 percent correctly decoded, the return value is 0X000000E4.

NOTE:
The values of the upper 24 bits in the following table are the result of a bitwise AND between the actual return value and 0xFFFFFF00.

A return value of 0 indicates success. Any nonzero return value indicates failure.

Description of Lower 8 Bits of Return Value

Bits Description
Bit 7 The decode flag.
  • If this is 1, decoding results are stored in frame memory.
  • If this is 0, decoding results could not be stored in frame memory.
Bits 0-6 The percentage (0-100) of macro blocks that have been properly decoded.

Description

Decodes data for the specified one-frame bitstream.

This API function determines whether to invoke the callback function when the decoding results have been stored in the second argument frame memory.

With sequential output mode, when the decoding results can be stored in frame memory, the callback function is invoked each time, and the decoded results are output at that time.

In contrast, with buffering mode, because the frame is output after rearranging into the original video frame order, a prescribed number of frames (five frames for this library) accumulate in the library. Specifically, the callback function is invoked and a single frame is output when the decoding results that could be stored in frame memory accumulate in the library, and the accumulated decoding results exceed the prescribed number of frames. For example, if the stream is error-free, decoding starts from the beginning, and the callback is invoked for the first time when the API in the sixth frame is invoked.

Do Not Call From

Background Do not call this function from the background.
Multiple threads This function is not thread-safe.

See Also

H264DECInitParam
H264DECSetParam
H264DECOpen
H264DECBegin
H264DECSetBitstream
H264DECEnd
H264DECFlush
H264DECClose

Revision History

2014/07/22 Initial version.


CONFIDENTIAL