christiankerl/libfreenect2 — pull request #5 by floe (2014-02-10 19:52:56+00:00)
Title: replace per-pixel trig calculations with table lookups

I've found a more worthwhile opportunity for optimization: the trig calculations in processMeasurementTriple don't actually depend on live pixel data, but just on the p0tables, so they can easily be pre-calculated as lookup tables. This saves a total of 180 trigonometry operations per output pixel and results in a speedup of just about 2 x (at least without bilinear filtering):

ir_iso_transfer: [CpuDepthPacketProcessor] avg. time: 155.165ms -> ~6.44476Hz
trig_tables: [CpuDepthPacketProcessor] avg. time: 82.522ms -> ~12.118Hz