Skip to content
Snippets Groups Projects
Commit 23bff5a2 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Add compress time log

parent e830c3ac
No related branches found
No related tags found
No related merge requests found
Pipeline #11585 passed
...@@ -295,6 +295,8 @@ void Streamer::_schedule() { ...@@ -295,6 +295,8 @@ void Streamer::_schedule() {
// Compress depth job // Compress depth job
pool_.push([this,src](int id) { pool_.push([this,src](int id) {
auto start = std::chrono::high_resolution_clock::now();
if (!src->depth.empty()) { if (!src->depth.empty()) {
cv::Mat d2; cv::Mat d2;
src->depth.convertTo(d2, CV_16UC1, 16*100); src->depth.convertTo(d2, CV_16UC1, 16*100);
...@@ -308,6 +310,10 @@ void Streamer::_schedule() { ...@@ -308,6 +310,10 @@ void Streamer::_schedule() {
cv::imencode(".png", d2, src->d_buf, pngparams); cv::imencode(".png", d2, src->d_buf, pngparams);
} }
std::chrono::duration<double> elapsed =
std::chrono::high_resolution_clock::now() - start;
LOG(INFO) << "Depth Compress in " << elapsed.count() << "s";
src->state |= ftl::rgbd::detail::kDepth; src->state |= ftl::rgbd::detail::kDepth;
_swap(src); _swap(src);
--jobs_; --jobs_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment