On Mon, Jun 03, 2019 at 07:55:48PM -0400, Nicolas Dufresne wrote: > Le lundi 03 juin 2019 à 23:48 +0200, Jernej Škrabec a écrit : > > Dne ponedeljek, 03. junij 2019 ob 13:09:45 CEST je Boris Brezillon napisal(a): > > > The driver only supports per-slice decoding, and in that mode > > > decode_params->num_slices must be set to 1 and the slice_params array > > > should contain only one element. > > > > What Cedrus actually needs to know is if this is first slice in frame or not. I > > imagine it resets some stuff internally when first slice is processed. > > > > So if driver won't get all slices of one frame at once, it can't know if this > > is first slice in frame or not. I guess we need additional flag for this. > > A first slice of a frame comes with a new timestamp, so you don't need > a flag for that. But slices for the same frame will all have the same timestamp, so we can't use the timestamp to tell the individual slices apart. I mentioned this in that other thread, but I think it'd be useful to pass along the number of each of the slices. Drivers can use this in order to conceal errors when corrupt slices are detected during the decode operation. So if we also passed a slice index along with the offset of the slice in the bitstream, that should give us enough information to achieve both. A slice with index 0 is obviously going to be the first slice in a frame. Thierry