Rewrite of reference FLIC decoder.