Alphablending optimizations: - validate palette alpha values in overlay manager (one check / palette index) instead of checking every alpha value twice for every blended pixel in every frame - remove unneeded calculations - approximiate expensive integer divisions with multiplication and shift - simplify if(...) 's by pre-calculating values that are needed later anyway - remove local variables to save registers This results significant savings in CPU time when blending large semi-transparent overlays. Quick test blending VDR main menu to 720x576 mpeg video, Core2 E6600: xine-lib 1.1.6, de-interlacing (-> YUY2 Xv) original: video 32%, video+OSD 61% (OSD 31%) optimized: video 32%, video+OSD 52% (OSD 22%) --------------------------------------------- speedup total 22% (OSD 33%) xine-lib 1.1.6, YV12 Xv: original: video 5% video+OSD 18% (OSD 13%) optimized: video 5% video+OSD 14% (OSD 9%) --------------------------------------------- speedup total 22% (OSD 40%)