change bitstream.c to inline, but result is bad :(