Merge "Complete (mostly) migration of palette mode" into nextgenv2