typo

Signed-off-by: Mattias Andrée <maandree@operamail.com>
calculating next power of two

Signed-off-by: Mattias Andrée <maandree@operamail.com>
code reduction

Signed-off-by: Mattias Andrée <maandree@operamail.com>