Reimplement Blocky16 based on FFmpeg's code. Fix #909

The previous implementation was directly converted from the assembly,
and it was nearly unreadable. This is much more structured and
safer.

If someone could test it on a BE machine it would make me a favor, I wouldn't want to introduce some bug. :)
out_size should be outSize