Speedup of BG subtraction.