Thanks for the credit on the xBR addition. All that Ctrl+C and Ctrl+V was really hard work!
Hyllian, your standalone code works on 24-bit/32-bit PNGs, but there were so many revisions and I don't speak Portuguese, so I couldn't really make out what was needed for xBR to work in 32-bit colour. Having RGB to YUV conversion as a function rather than a look-up table might affect performance, but the look-up table is created every frame in the current code, so it might even out. Hq2/3/4x 16-bit has the YUV look-up table initialised separately, so that would be another optimisation for xBR in 16-bit. Do any FBA emulated games run in 24/32 bit colour?
You might be interested to learn I added the CPU xBR filters to Snes9x as well, and it was just as easy as FBA was! It's not as good for Snes9x because it can already use the shader version via Cg, but I have integrated graphics in my PC and it runs shaders at about 8 fps maximum, so I put the CPU versions in and got 60fps.
I just think it's the nature of these pixel scaling functions being self contained that makes them easy to add to emulators that already have a structure in place for other algorithms. All you have to do is look how the other scalers are accessed and copy it.