Optimize depth calculus
Merge branch 'B0RJA-master'