So I moved the timing function to just be around mmapping and finding the pointer to the mmapped data and now I'm seeing results as expected.
Mmapping each frame takes about 30000 nanoseconds.Finding the mmapped pointer takes about 1000 nanoseconds.Please note that these speeds are on a Pi5 for a V3 camera with a resolution of 2304x1296.
Mmapping each frame takes about 30000 nanoseconds.
Code:
uint8_t *ptr = static_cast<uint8_t *>(mmap(NULL, buffer->planes()[0].length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0));
Code:
auto it = mapped_buffers[0].find(bufferPair.second);if (it == mapped_buffers[0].end())throw std::runtime_error("failed to identify queue request buffer");uint8_t *ptr = (uint8_t *)it->second[0].data();
Statistics: Posted by peytonicmaster — Tue Feb 13, 2024 4:55 am