[libcamera-devel] Questions about a zero-copy RAW stream in the raspberrypi pipelinehandler

Niklas Söderlund niklas.soderlund at ragnatech.se
Fri Jun 26 14:03:53 CEST 2020


Hi Naushir,

I just merged a patch for the IPU3 pipeline handler making its RAW 
stream zero-copy [1]. I would like for something similar for the 
raspberrypi pipeline handler as that would allow us to drop 
FrameBuffer::copyFrom(). The need to copy out the RAW buffer was an idea 
we had when we wished to protect against applications re-using the RAW 
buffer before the request it belonged to had completed. In hindsight we 
think this was a bad idea and wish to reverse course and address the 
issue in a way that does not impact performance as much.

I had a look at the raspberrypi pipeline. After understanding that you 
run the bayer and embeddeddata queues in lockstep and share the bayer 
buffer with the IPA (RPI_IPA_EVENT_SIGNAL_ISP_PREPARE) I realised it 
would not be a simple change as it was for the IPU3 pipeline. Would it 
be possible for you to have a look and provide some guidance on how we 
could move the pipeline in this direction? If you think getting rid of 
the copy operation is a bad idea that is of course also good feedback.

Thanks and have a nice weekend.

1. 40148cfcafbac274 ("libcamera: ipu3: Allow zero-copy RAW stream capture")

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list