Hi Gerd, Thank you so much for the review. I'm sorry for not replying earlier. On Thu, Dec 19, 2019 at 10:02 PM Gerd Hoffmann <kraxel@xxxxxxxxxx> wrote: > > Hi, > > > > Not clearly defined in the spec: When is the decoder supposed to send > > > the response for a queue request? When it finished decoding (i.e. frame > > > is ready for playback), or when it doesn't need the buffer any more for > > > decoding (i.e. buffer can be re-queued or pages can be released)? The answer is "when it doesn't need the buffer any more for decoding". The device can access buffer contents from when a queue request is sent until the device responds it. So, the device must not responds a queue request before finishing all process that requires the buffer content. Actually, the first one "When it finished decoding (i.e. frame is ready for playback)" doesn't make much sense, as it's not necessary to have a one-to-one correspondence between an input bitstream buffer and a decoded frame. It's okay to decode one input buffer contains bitstream data for two frames. Also, a user can pass bitstream for one frame as two input buffers. I'll document it in the spec. Best regards, Keiichi > > In my eyes the both statements mean almost the same and both are valid. > > Well, no. When the device decoded a P-Frame it can notify the device, > saying "here is your decoded frame". But the device might still need > the buffer with the decoded frame to properly decode the following B/I > Frames which reference the P-Frame. > > cheers, > Gerd >