Modified signature of residual() to apply field coding mode
Merge branch 'master' into field