H264DECFindIdrpoint

Syntax

#include <cafe/h264.h>

s32	H264DECFindIdrpoint(const u8 *buf, s32 totalBytes, s32 *streamOffset);

Parameters

buf Pointer to the beginning of the input data (Input).
totalBytes The overall size of the input data (Input).
streamOffset The offset (the beginning of an IDR frame) at which to start decoding (Output).

Return Values

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

Description

Searches for a position at which to start decoding within the input data (the starting position of an IDR frame).

This allows you to get a position at which to start playback in the middle of a bitstream (random access).

This function is used to get the position at which to start decoding in the middle of a Video Elementary Stream or to resume decoding after an error (see Changing Data to Be Decoded). You need to finish decoding from the position returned by the H264DECFindDecstartpoint function at least once before being able to decode from the position returned by this function. This is because this function obtains information needed to start decoding from an IDR frame and stores it in the library.

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

Do Not Call From

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

See Also

H264DECMemoryRequirement
H264DECGetImageSize
H264DECFindDecstartpoint
H264DECCheckDecunitLength
H264DECCheckMemSegmentation
H264DECCheckSkipableFrame

Revision History

2014/07/22 Initial version.


CONFIDENTIAL