Skip to content
Snippets Groups Projects

Implements #168 keeping decoding on GPU

Merged Nicolas Pope requested to merge feature/168/keepgpu into master
1 file
+ 2
0
Compare changes
  • Side-by-side
  • Inline
@@ -309,11 +309,13 @@ void Source::notify(int64_t ts, cv::cuda::GpuMat &c1, cv::cuda::GpuMat &c2) {
// Should channel 1 be scaled?
if (c1.cols < max_width || c1.rows < max_height) {
LOG(WARNING) << "Resizing on GPU";
cv::cuda::resize(c1, c1, cv::Size(max_width, max_height));
}
// Should channel 2 be scaled?
if (!c2.empty() && (c2.cols < max_width || c2.rows < max_height)) {
LOG(WARNING) << "Resizing on GPU";
if (c2.type() == CV_32F) {
cv::cuda::resize(c2, c2, cv::Size(max_width, max_height), 0.0, 0.0, cv::INTER_NEAREST);
} else {
Loading