Improve performance for delta_encoder

This patch inline the case of the first line to drop the if() that was done
at each loop.
Some variable have been renamed for code clarity.
Merge pull request #23 from hardening/planar_perf

Improve performance for delta_encoder