mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 21:37:26 +00:00
Replace the placeholder temporal blend in the interpolation shader with a motion-compensated algorithm. This is finally the point where we are actually using the optical flow information. For each output pixel the source position on the f0 and f1 grids is recovered by fixed-point Picard iteration before the samples are blended. The number of iterations and the relaxation factor are established through empirical testing on a couple of ad-hoc samples, representing highly uniform and non-uniform motion respectively. The approach here is hardly profound, and not meant to be. There are for sure many more advanced algorithms for doing motion interpolation from optical flow, and we can happily replace it with, or add, something more advanced once all the machinery is in place.