This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 25976f1908dcd700ed224c3421e0bbf9804d0188 Author: Kacper Michajłow <[email protected]> AuthorDate: Tue Sep 22 18:34:17 2026 +0200 Commit: Kacper Michajłow <[email protected]> CommitDate: Tue Sep 29 22:39:09 2026 +0200 avutil/tests/pca: fix unsigned wraparound in the generated samples av_lfg_get() % 101 - 50 is evaluated as unsigned. Assigned to an int it wraps back to the intended range, but v[0] is a double and received values near 4e9, which put the covariances around 4e18. Signed-off-by: Kacper Michajłow <[email protected]> --- libavutil/tests/pca.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/tests/pca.c b/libavutil/tests/pca.c index a2a620799a..fcf59759db 100644 --- a/libavutil/tests/pca.c +++ b/libavutil/tests/pca.c @@ -41,8 +41,8 @@ int main(void){ double v[2*LEN+100]; // double sum=0; int pos = av_lfg_get(&prng) % LEN; - int v2 = av_lfg_get(&prng) % 101 - 50; - v[0] = av_lfg_get(&prng) % 101 - 50; + int v2 = (int)(av_lfg_get(&prng) % 101) - 50; + v[0] = (int)(av_lfg_get(&prng) % 101) - 50; for(j=1; j<8; j++){ if(j<=pos) v[j]= v[0]; else v[j]= v2; -- 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]
