[FFmpeg-devel] [PATCH 0/1] Fix tmix on discontinuities

Ignacy Gawędzki bugs at qult.net
Sun Jul 6 21:30:09 EEST 2025


A simple example of the bug:

  ffplay -f lavfi color=c=gray -vf 'tmix=enable=gt(t\,1)'

After one second, the color is wrong (green in my case), not the
expected gray.

It seems it is due to the fact that parse_weights determines that
the weights are all 1 and FAST_TMIX_SLICE should be used instead of
MIX_SLICE.  But if the filter is not running from the very start with
these weights, FAST_TMIX_SLICE will not work properly.

Besides, should FAST_TMIX_SLICE not be used with float types either,
as addition on floats is not associative and rounding errors will
accumulate?

Ignacy Gawędzki (1):
  avfilter/f_mix: disable fast on discontinuities

 libavfilter/vf_mix.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.48.1


More information about the ffmpeg-devel mailing list