Fix #34782: Video Editor - Substract after transform fails
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 28 Mar 2013 08:21:29 +0000 (08:21 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 28 Mar 2013 08:21:29 +0000 (08:21 +0000)
commitc5c34ca65f7d53abea3bead809dc282d231010ca
tree567833a875c1561fa0d6b3a131542b26be17f7fe
parented99c94bef1dc896a645d5b361964afa7372365b
Fix #34782: Video Editor - Substract after transform fails

Couple of precision issues here:

- Interpolation was rounding trunkcating colors, and because
  of some precision issues value 254.999 became 254 leading
  to troubles later.

  Now color interpolaiton will do rounding to nearest int.

- Subtract was setting channels to something negative which
  confused color management (especially negative alpha),

  Now subtract effect will clamp channels to 0 from bottom
  and also do some tricks to prevent small alpha which
  could also confuse color management.
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenlib/intern/math_interp.c