[FFmpeg-cvslog] avcodec/osq: Add note about update_stats() count
Michael Niedermayer
git at videolan.org
Mon Aug 4 19:37:31 EEST 2025
ffmpeg | branch: release/6.1 | Michael Niedermayer <michael at niedermayer.cc> | Tue Jun 17 02:28:08 2025 +0200| [6739f24c0ba772fbb46c5730a8b1ed970d64d29a] | 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 <michael at niedermayer.cc>
(cherry picked from commit b587afcb65192c4c4bf88422f6565e5355eaf31e)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6739f24c0ba772fbb46c5730a8b1ed970d64d29a
---
libavcodec/osq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/osq.c b/libavcodec/osq.c
index 256b1d6421..7cbb36d5d6 100644
--- a/libavcodec/osq.c
+++ b/libavcodec/osq.c
@@ -149,6 +149,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;
}
More information about the ffmpeg-cvslog
mailing list