frame mask with averging