lavfi/delogo: don't recompute the same difference again and again
authorJean Delvare <khali@linux-fr.org>
Fri, 5 Jul 2013 08:23:18 +0000 (10:23 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 5 Jul 2013 11:52:59 +0000 (13:52 +0200)
commit6fc8c4cc0ef643b8d6b87b0cf20ca8792c9b2dbe
tree3fb0fc724a73c27b3d59c4a8a7e98e8efd803812
parentc6c2231227c1d9031de43496dacdbcb309829b4d
lavfi/delogo: don't recompute the same difference again and again

The top left hand corner pixel coordinates are already stored in
logo_x1 and logo_y1 so don't recompute each of them 6 times for every
iteration.

This is a simple code optimization, result is obviously the same. The
performance gain is small (about 2% in my tests) but still good to
have, and the new code is clearer.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by; Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_delogo.c