Re: [RFD] frame-size switching: preview / single-shot use-case

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

 



Hi Mauro,

On Friday 18 February 2011 13:33:12 Mauro Carvalho Chehab wrote:
> Em 18-02-2011 08:31, Laurent Pinchart escreveu:
> > It's a trade-off between memory and speed. Preallocating still image
> > capture buffers will give you better snapshot performances, at the
> > expense of memory.
> > 
> > The basic problems we have here is that taking snapshots is slow with the
> > current API if we need to stop capture, free buffers, change the format,
> > allocate new buffers (and perform cache management operations) and
> > restart the stream. To fix this we're considering a way to preallocate
> > still image capture buffers, but I'm open to proposals for other ways to
> > solve the issue :-)
> 
> From the above operations, considering that CMA is used to reserve a
> non-shared memory with enough space for the new buffer size/qtd, I don't
> think that the most expensive operation would be to realloc the memory.
> 
> The logic to stop/start streaming seems to be the most consuming one, as
> driver will need to wait for the current I/O operation to complete, and
> this can take hundreds of milisseconds (the duration of one frame).
> 
> How much time would CMA need to free and re-allocate the buffers for, let's
> say, something in the range of 1-10 MB, on a pre-allocated, non shared
> memory space?

CMA won't solve the problem, as not all drivers require continuous memory. The 
OMAP3 ISP has an IOMMU, and two very time-consuming tasks are mapping the 
memory to the IOMMU and cleaning the cache. This is why preallocation *and* 
prequeuing is needed.

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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