merging changes from mplayerxp (rgb2rgb*.{c,h} only)