From 74b8483457b51727dba38aa05a5be9bc773d8a28 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 4 Jun 2015 19:51:33 +0200 Subject: octopus, pt, aruco: optimize image copying Perform less operations in inner loop where pixels are accessed. --- ftnoir_tracker_ht/ht_video_widget.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ftnoir_tracker_ht/ht_video_widget.h') diff --git a/ftnoir_tracker_ht/ht_video_widget.h b/ftnoir_tracker_ht/ht_video_widget.h index cbfe6ddc..be4aee44 100644 --- a/ftnoir_tracker_ht/ht_video_widget.h +++ b/ftnoir_tracker_ht/ht_video_widget.h @@ -23,7 +23,7 @@ class HTVideoWidget : public QWidget Q_OBJECT public: - HTVideoWidget(QWidget *parent) : QWidget(parent), fb(), width(0), height(0) { + HTVideoWidget(QWidget *parent) : QWidget(parent), fb(), width(0), height(0), fresh(false) { connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); timer.start(60); } @@ -40,8 +40,9 @@ private: QMutex mtx; QImage texture; QTimer timer; - char fb[2048*2048*3]; + unsigned char fb[2048*2048*3]; int width,height; + bool fresh; }; #endif // VIDEOWIDGET_H -- cgit v1.2.3