This wiki article provides a link to a free Java port of the hqx algorithm that closely mirrors the C version. However, testing reveals it doesn't execute nearly as efficiently; 4x scaling of a 256x256 image takes about 100 millis, way too slow for real-time. This is quite surprising because the hqx algorithm is even used in JavaScript games. For anyone who has had experience with hqx, any ideas on speeding it up or links to alternate Java implementations? Thanks.