C2VDAComponent: support VP9 show_existing_frame.
In VP9 spec, the reference frame can be displayed more than once. We changed the Chrome VDA implementation that passes the same output buffer multiple times directly. This CL changed the C2VDAComponent implementation according to this. When output buffer is returned from accelerator (onOutputBufferDone), the output buffer info will be queued into the FIFO |mPendingBuffersToWork|, and component calls sendOutputBufferToWorkIfAny() to dequeue the FIFO to put output buffer to its corresponding work as many as possible. |mUndequeuedBlockIds| is introduced to store the buffer ID which will be displayed right before the current buffer with the size of undequeued buffer count for display. While dequeueing the FIFO if the current buffer ID could be found in |mUndequeuedBlockIds|, there is no way to show this frame and we will drop this frame immediately. Otherwise, the FIFO is temporarily blocked until the current buffer is owned by component. Bug: 110968122 Test: CtsMediaTestCases android.media.cts.DecoderConformanceTest#testVP9Other on Kevin w/ Codec2.0 decoder Change-Id: I228e42a76bff6f88af8c0d0a6aa795cfba356bd1 (cherry picked from commit 0af04055489cb9c0b9b3933969f56ac6c7c25e17)
Loading
Please sign in to comment