fix c99 issues
optimize rc 
optimize cabac to call initialization only once