This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 231ce8136e ffplay: compute 1/sqrt(nb_freq) once outside the row loop
231ce8136e is described below
commit 231ce8136e1e8fb33cbf640ceee07dd0397231b5
Author: romainhedouin <[email protected]>
AuthorDate: Thu Oct 15 13:02:30 2026 +0200
Commit: Baptiste Coudurier <[email protected]>
CommitDate: Sat Oct 17 18:41:09 2026 +0000
ffplay: compute 1/sqrt(nb_freq) once outside the row loop
The value is the same for every row. No change in behaviour.
Found during a code review sweep of ffmpeg using an LLM.
---
fftools/ffplay.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index a280ed3abe..3054820dc3 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -2005,10 +2005,10 @@ static void video_audio_display(VideoState *s)
/* Least efficient way to do this, we should of course
* directly access it but it is more than fast enough. */
if (!SDL_LockTexture(s->vis_texture, &rect, (void **)&pixels,
&pitch)) {
+ double w = 1 / sqrt(nb_freq);
pitch >>= 2;
pixels += pitch * s->height;
for (y = 0; y < s->height; y++) {
- double w = 1 / sqrt(nb_freq);
int a = sqrt(w * sqrt(data[0][y].re * data[0][y].re +
data[0][y].im * data[0][y].im));
int b = (nb_display_channels == 2 ) ? sqrt(w *
hypot(data[1][y].re, data[1][y].im))
: a;
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]