On 22/04/2016 13:30, Andrew Baumann wrote: >> From: Sylvain Garrigues [mailto:sylv...@sylvaingarrigues.com] >> Sent: Friday, 22 April 2016 13:27 >> >> Le 22 avr. 2016 à 13:22, Andrew Baumann >> <andrew.baum...@microsoft.com> a écrit : >>>> + stl_le_phys(&s->dma_as, value + 16, tmp_xres * tmp_yres >>>> + * (tmp_bpp >> 3)); >>> >>> Personal style nit: I prefer * 8 rather than >> 3, because it's more >>> immediately >> obvious what you're computing, a trivial optimisation for the compiler
Note that it's only trivial for unsigned dividend. A signed dividend has >> rounding towards -infinity and / rounding towards zero. Paolo