This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 7f9b5b057cea21f24dc9e0a25e93fd3a07d970cd Author: Ayoub Nabil Boubagrat <[email protected]> AuthorDate: Thu Aug 27 20:17:04 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Mon Aug 31 13:42:52 2026 +0000 avfilter/aderivative: saturate integer differences full-scale transitions overflow or wrap integer sample formats. use saturating subtraction for the integer paths. Signed-off-by: Ayoub Nabil Boubagrat <[email protected]> --- libavfilter/af_aderivative.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavfilter/af_aderivative.c b/libavfilter/af_aderivative.c index 7ac730836a..9f15aad129 100644 --- a/libavfilter/af_aderivative.c +++ b/libavfilter/af_aderivative.c @@ -28,7 +28,7 @@ typedef struct ADerivativeContext { int nb_samples, int channels); } ADerivativeContext; -#define DERIVATIVE(name, type) \ +#define DERIVATIVE(name, type, difference) \ static void aderivative_## name ##p(void **d, void **p, const void **s, \ int nb_samples, int channels) \ { \ @@ -42,16 +42,16 @@ static void aderivative_## name ##p(void **d, void **p, const void **s, \ for (n = 0; n < nb_samples; n++) { \ const type current = src[n]; \ \ - dst[n] = current - prv[0]; \ + dst[n] = difference; \ prv[0] = current; \ } \ } \ } -DERIVATIVE(flt, float) -DERIVATIVE(dbl, double) -DERIVATIVE(s16, int16_t) -DERIVATIVE(s32, int32_t) +DERIVATIVE(flt, float, current - prv[0]) +DERIVATIVE(dbl, double, current - prv[0]) +DERIVATIVE(s16, int16_t, av_clip_int16(current - prv[0])) +DERIVATIVE(s32, int32_t, av_sat_sub32(current, prv[0])) #define INTEGRAL(name, type) \ static void aintegral_## name ##p(void **d, void **p, const void **s, \ -- 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]
