NativeBuffer->copyToNvBuffer take a long time in 09_camera_jpeg_capture example when do 4K camera preview

My camera sensor is os08a02

I run this demo like this:
./camera_jpeg_capture --pre-res 3840x2160 --img-res 3840x2160 --fps 60 --disable-jpg --cap-time 30

The display fps is too low, only 47 fps.
Then I did some debugging, and found copyToNvBuffer cost 20ms, that’s too long for 4k 60 fps camera previewing application.

How can this demo make zero copy?

Please execute the steps to run hardware converter at maximum clock:
Nvvideoconvert issue, nvvideoconvert in DS4 is better than Ds5? - #3 by DaneLLL

And try again.

1 Like

Hi DaneLLL,

This problem is resolved after setting vic max clock.
Thank you very much, but I’m still a little confused about why copying has anything to do with VIC clocks?

copyToNvBuffer() copies data from one hardware DMA buffer to the other hardware DMA buffer(named Nvbuffer). It is done on hardware engine so it is faster and consumes less power than copying through CPU.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.