Re: [PATCH RFC 5/6] media: cedrus: Make the slice_params array size limitation more explicit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 05 Jun 2019 23:01:37 +0200
Paul Kocialkowski <paul.kocialkowski@xxxxxxxxxxx> wrote:

> Hi,
> 
> Le mardi 04 juin 2019 à 10:31 -0400, Nicolas Dufresne a écrit :
> > Le mardi 04 juin 2019 à 10:12 +0200, Thierry Reding a écrit :  
> > > 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.  
> > 
> > This is already passed as this is part of the slice header that we both
> > pass and parse to structure. Each slice have it's first MB indicated
> > (that standard to H264) and you can deduce the lost slice from that.
> >   
> > > 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.  
> > 
> > We do this in per-frame mode only. The offset of the slice in the
> > bitstream is always 0 in per-slice mode, since each v4l2 input buffer
> > is a slice.  
> 
> I don't think we need a slice index either, we most likely already have
> enough information to know where we're at regarding slices position.
> 
> But how about allowing an arbitrary number of slices within frame
> boundary in per-slice decoding mode?

Yep, will send a v2 taking that case into consideration.



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux