On 16.08.2014 14:53, Antti Palosaari wrote: > > > I will look that more carefully on end of next week, go through possible > symbol rates and rounding errors. > > Maybe it should be something like that (didn't test any way, may not > even compile): > f_3db_hz = div_u64((u64) (c->symbol_rate * 135), 200); > In this case c->symbol_rate * 135 is still 32bits wide, but maybe signed because 135 is signed. So there will be an overflow on 32bit platforms at symbol rates equal to 15907287. So better cast symbol_rate to u64 before. Matthias -- 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