Unify handling of EC level between encoder and decoder