Skip to content

High h265 decoding latency ( decoder buffers frames) #3

@Consti10

Description

@Consti10

Hello,

I am using your example code to investigate the behaviour of the rpi h265 decoder regarding frame buffering and decoding latency.

So far I have made the following observations:

  1. after feeding a frame with avcodec_send_packet() , and sequentially polling avcodec_receive_frame() afterwards for one Second,
    The decoder still returns AVERROR(EAGAIN)
    The only interpretation for me here is that the decoder buffers at least one frame
    Aka frame N only becomes available after you feed frame N+1 to the decoder (or more).
    The used test file decodes with zero frame buffering on other platforms, for example ffmpeg sw decoder.

hacky testing code: https://github.com/Consti10/hello_drmprime/blob/0882f18e2e4bb3d5b5e6087cc95ac0b74d9d1c9b/hello_drmprime.cpp#L211

  1. By looking at my debug output, it looks as if the decoder buffers exactly 2 frames. E.g. frame N becomes available after frame N+2
    has been fed to the decoder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions