We are having trouble sustaining a single stream 60fps rate with 1080p H.264 encoding using VIDENC2_Process(), resulting in dropped frames.
Our measured execution time for VIDENC2_Process (via clock_gettime, monotonic) on a single 1080p frame often exceeds 20ms; since frames are arriving every 16.6ms, the pipeline falls behind, and the VIP driver drops frames (we are using 8 capture buffers; increasing this only delays the start of the frame drops.)
Our pipeline is VIP (capture at 1080p60) -> VPE (convert YUYV to NV12) -> encoder. It works fine up to and including 1080p50.
CPU or memory contention should not be an issue as we are showing only about 15% total CPU utilization while encoding, and are running at the highest OPP as well as using interleaved memory banks.
The VIDENC2_Process calls occur on a dedicated high-priority, realtime-scheduled thread. All DMA buffers are allocated via DRM / omap_bo operations.
We have observed that gstreamer achieves only ~55fps encoded frame rate for 1080p input, so it appears the issue exists there as well (it silently drops frames and simply adjusts the timing of the subsequent ones, which is not an option in our application.)
How can the HDVICP2 encoder be made to work at 60FPS 1080p ? What other factors affect encoder performance?
Thanks for any assistance,