Av1SampleDependencyParser


@UnstableApi
public final class Av1SampleDependencyParser


An AV1 bitstream parser that identifies frames that are not depended on.

Summary

Public constructors

Public methods

void

Updates the parser state with the next sample data.

void

Resets the parser state.

int
sampleLimitAfterSkippingNonReferenceFrame(
    ByteBuffer sample,
    boolean skipFrameHeaders
)

Returns the new sample limit after deleting any frames that are not used as reference.

Public constructors

Av1SampleDependencyParser

public Av1SampleDependencyParser()

Public methods

queueInputBuffer

public void queueInputBuffer(ByteBuffer sample)

Updates the parser state with the next sample data.

reset

public void reset()

Resets the parser state.

sampleLimitAfterSkippingNonReferenceFrame

public int sampleLimitAfterSkippingNonReferenceFrame(
    ByteBuffer sample,
    boolean skipFrameHeaders
)

Returns the new sample limit after deleting any frames that are not used as reference.

Each AV1 temporal unit must have exactly one shown frame. Other frames in the temporal unit that aren't shown are used as reference, but the shown frame may not be used as reference. Frequently, the shown frame is the last frame in the temporal unit.

If the last frame in the temporal unit is a non-reference OBU_FRAME or OBU_FRAME_HEADER, this method returns a new limit value that would leave only the frames used as reference in the input sample.

See Ordering of OBUs.

Parameters
ByteBuffer sample

The sample data for one AV1 temporal unit.

boolean skipFrameHeaders

Whether to skip OBU_FRAME_HEADER.