convert if then else video palette to pix_fmt construct to simpiler table based lookup.