simplify decoder init loop, removing calls to log2()