fix level_prefix too large in residual decoding
negative data with left shift, use cast or multiplication instead
merge the calculate
Merge pull request #294 from huili2/neg_left_shift

negative data with left shift, use cast or multiplication instead
Merge pull request #292 from huili2/level_prefix

fix level_prefix too large in residual decoding
Merge remote-tracking branch 'upstream/master' into travis.osx