diff options
author | James Almer <jamrial@gmail.com> | 2016-01-18 18:38:18 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-01-20 16:41:19 -0300 |
commit | 4c4ebeb587cc0ba53d7c90b5b574c7b1378886ff (patch) | |
tree | 74c43ccade8a7051c76b3fe6fbe11ac647547f11 | |
parent | 4a3cf186b2daa2e121b25dec19b0ec529fc8d850 (diff) | |
download | ffmpeg-4c4ebeb587cc0ba53d7c90b5b574c7b1378886ff.tar.gz |
avcodec/wavpackenc: use put_sbits
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/wavpackenc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c index 98a011fe18..979b92165b 100644 --- a/libavcodec/wavpackenc.c +++ b/libavcodec/wavpackenc.c @@ -2216,8 +2216,7 @@ static void pack_float_sample(WavPackEncodeContext *s, int32_t *sample) } } else if (shift_count) { if (s->float_flags & FLOAT_SHIFT_SENT) { - int32_t data = get_mantissa(*sample) & ((1 << shift_count) - 1); - put_bits(pb, shift_count, data); + put_sbits(pb, shift_count, get_mantissa(*sample)); } else if (s->float_flags & FLOAT_SHIFT_SAME) { put_bits(pb, 1, get_mantissa(*sample) & 1); } |