ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Tue 
Jun 17 02:28:08 2025 +0200| [b587afcb65192c4c4bf88422f6565e5355eaf31e] | 
committer: Michael Niedermayer

avcodec/osq: Add note about update_stats() count

It seems this is basically unused and unfinished code

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b587afcb65192c4c4bf88422f6565e5355eaf31e
---

 libavcodec/osq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/osq.c b/libavcodec/osq.c
index 14c723ed9c..d3b1d86ee3 100644
--- a/libavcodec/osq.c
+++ b/libavcodec/osq.c
@@ -150,6 +150,8 @@ static void update_stats(OSQChannel *cb, int val)
     cb->history[cb->pos] = FFABS((int64_t)val);
     cb->pos++;
     cb->count++;
+    //NOTE for this to make sense count would need to be limited to 
FF_ARRAY_ELEMS(cb->history)
+    //Otherwise the average computation later makes no sense
     if (cb->pos >= FF_ARRAY_ELEMS(cb->history))
         cb->pos = 0;
 }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to