video-overlay-composition: Optimize premultiplication/unpremultiplication loops
authorSebastian Dröge <sebastian@centricular.com>
Fri, 7 Dec 2018 17:13:59 +0000 (19:13 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 7 Dec 2018 17:23:49 +0000 (19:23 +0200)
commitf441b5216e7e3af806fd7a501ee50192dbe5fecf
tree22bda9148efc5ba2a38e7a7b59c84e6e4249417b
parent76aa92be518e1c271116682b1bda3bc98d213129
video-overlay-composition: Optimize premultiplication/unpremultiplication loops

Pull in video frame fields into local variables. Without this the
compiler must assume that they could've changed on every use and read
them from memory again.

This reduces the inner loop from 6 memory reads per pixels to 4, and the
number of writes stays at 3.
gst-libs/gst/video/video-overlay-composition.c