Justin Ruggles <justin.rugg...@gmail.com> writes:

> +        uint64_t ret = ((uint64_t)get_bits_long(s, 32)) << (n-32);
> +        return ret | get_bits_long(s, n-32);

One more thing: on 32-bit machines it is more efficient to do
"get_bits(n - 32) << 32 | get_bits(32)" since it avoids shifting across
registers.  A good compiler might make this optimisation, but I wouldn't
count on it.

-- 
Måns Rullgård
m...@mansr.com
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to