Made two optimizations, little effect.
suggested register on several variables
set block_cr to int to avoid possible need for sign extension