added encoder context in spupng