More work on palette decoder