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

Fixes for multiple buffer swaps

parent 82a22c9e
No related branches found
No related tags found
1 merge request!86Fixes for multi swap in net buffers
Pipeline #12686 passed
...@@ -76,7 +76,7 @@ class Source : public ftl::Configurable { ...@@ -76,7 +76,7 @@ class Source : public ftl::Configurable {
/** /**
* Between frames, do any required buffer swaps. * Between frames, do any required buffer swaps.
*/ */
void swap() { if (impl_) impl_->swap(); LOG(INFO) << "SWAP SV " << timestamp_; } void swap() { if (impl_) impl_->swap(); }
/** /**
* Do any post-grab processing. This function * Do any post-grab processing. This function
......
...@@ -244,7 +244,7 @@ bool Source::compute(int N, int B) { ...@@ -244,7 +244,7 @@ bool Source::compute(int N, int B) {
return true; return true;
} else if (impl_ && impl_->compute(N,B)) { } else if (impl_ && impl_->compute(N,B)) {
timestamp_ = impl_->timestamp_; timestamp_ = impl_->timestamp_;
cv::Mat tmp; /*cv::Mat tmp;
rgb_.create(impl_->rgb_.size(), impl_->rgb_.type()); rgb_.create(impl_->rgb_.size(), impl_->rgb_.type());
depth_.create(impl_->depth_.size(), impl_->depth_.type()); depth_.create(impl_->depth_.size(), impl_->depth_.type());
tmp = rgb_; tmp = rgb_;
...@@ -252,10 +252,13 @@ bool Source::compute(int N, int B) { ...@@ -252,10 +252,13 @@ bool Source::compute(int N, int B) {
impl_->rgb_ = tmp; impl_->rgb_ = tmp;
tmp = depth_; tmp = depth_;
depth_ = impl_->depth_; depth_ = impl_->depth_;
impl_->depth_ = tmp; impl_->depth_ = tmp;*/
//impl_->rgb_.copyTo(rgb_); // TODO:(Nick) Reduce buffer copies
//impl_->depth_.copyTo(depth_); impl_->rgb_.copyTo(rgb_);
impl_->depth_.copyTo(depth_);
//rgb_ = impl_->rgb_;
//depth_ = impl_->depth_;
return true; return true;
} }
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment