On Fri, 01 Aug 2014 12:14:15 +0200 Hans Verkuil <hverkuil@xxxxxxxxx> wrote: > On 07/31/2014 09:16 PM, Andy Walls wrote: > > On Wed, 2014-07-30 at 16:23 +0200, Hans Verkuil wrote: > >> From: Hans Verkuil <hans.verkuil@xxxxxxxxx> > >> [..] > >> +- Improve the sinus generation of the SDR radio. > > > > Maybe a lookup table, containing the first quarter wave of cos() from 0 > > to pi/2 in pi/200 steps, and then linear interpolation for cos() of > > angles in between those steps. You could go with a larger lookup table > > with finer grained steps to reduce the approximation errors. A lookup > > table with linear interpolation, I would think, requires fewer > > mutliplies and divides than the current Taylor expansion computation. > > Yeah, I had plans for that. There actually is a sine-table already in vivid-tpg.c > since I'm using that to implement Hue support. > I don't know what your requirements are here but JFTR there is already a simplistic implementation of fixed point operations in include/linux/fixp-arith.h I used them in drivers/media/usb/gspca/ov534.c for some hue calculation. Ciao, Antonio -- Antonio Ospite http://ao2.it A: Because it messes up the order in which people normally read text. See http://en.wikipedia.org/wiki/Posting_style Q: Why is top-posting such a bad thing? -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html