pre-calculating size and position dependent parameters; this change yields exacatly the same bitstreams