mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Optimizing iteration
prefix ++i is faster than post i++
This commit is contained in:
@@ -232,7 +232,7 @@ void Stream::close()
|
||||
desired_state_ = GST_STATE_PAUSED;
|
||||
|
||||
// cleanup eventual remaining frame memory
|
||||
for(guint i = 0; i < N_FRAME; i++){
|
||||
for(guint i = 0; i < N_FRAME; ++i){
|
||||
frame_[i].access.lock();
|
||||
frame_[i].unmap();
|
||||
frame_[i].access.unlock();
|
||||
@@ -710,7 +710,7 @@ void Stream::TimeCounter::tic ()
|
||||
GstClockTime dt = t - last_time;
|
||||
|
||||
// one more frame since last time
|
||||
nbFrames++;
|
||||
++nbFrames;
|
||||
|
||||
// calculate instantaneous framerate
|
||||
// Exponential moving averate with previous framerate to filter jitter (50/50)
|
||||
|
||||
Reference in New Issue
Block a user