[FFmpeg-user] between(x,min,max)

Michael Koch astroelectronic at t-online.de
Mon Jun 6 09:36:10 EEST 2022


The function  between(x,min,max)   is definded as: "Return 1 if x is 
greater than or equal to min and less than or equal to max, 0 otherwise."

In some cases it would be useful to have a similar function (with a 
different name) which doesn't include the maximum: "Return 1 if x is 
greater than or equal to min and less than max, 0 otherwise."

This would be useful if a function is defined segment-wise:
ld(0)*between(t,0,10)+ld(1)*between(t,10,20)+...

The problem is at t=10, where both "between" functions become true.

Sure, there are workarounds to solve this problem, but a new "between2" 
function would make things easier.

Michael




More information about the ffmpeg-user mailing list