#include <cafe/h264.h>

s32	H264DECCheckDecunitLength(void *memPtr, const u8 *buf, s32 totalBytes,
				  s32 streamOffset, s32 *length);


memPtr Pointer to work memory (Input).
buf Pointer to the beginning of the input data (Input).
totalBytes The overall size of the input data (Input).
streamOffset The offset position at which to start decoding (Input).
length The size of the data to decode (Output).

Return Values

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


Retrieves the size of a single unit of decodable data.

This utility function handles Video Elementary Streams that have not been converted into MP4 format. It is not necessary when using the MP4 demultiplexer.

This utility acquires the sizes up to the subsequent frames. Because size cannot be determined when there is only one frame and no subsequent frames after the decoding start offset for the input data passed to this utility, a return value of 0x01000000 (H264DEC_ERR_STREAM : Stream Error) is returned. This means that at the end of the stream, the same error is always returned, but if the end of the stream can be distinguished at the application layer, it is possible to continue the process regardless of the return value of this API.

Do Not Call From

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

See Also


Revision History

2014/07/22 Initial version.