Improve performance for delta_encoder

This patch inlines the case of the first line to drop the if() that was done at each loop.
Some variable have been renamed for code clarity.