diff options
author | James Almer <jamrial@gmail.com> | 2015-04-18 04:31:30 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2015-04-18 14:15:57 -0300 |
commit | d8c52f5d04fce8d9a1a86782fba95b26b6ecd951 (patch) | |
tree | 445681839352ee465169fefaf84ca3d622c28e7b /libavcodec/proresenc_anatoliy.c | |
parent | 778bac278869a98e93f23e8e2aa098782027b4e2 (diff) | |
download | ffmpeg-d8c52f5d04fce8d9a1a86782fba95b26b6ecd951.tar.gz |
proresenc_anatoliy: use put_sbits()
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/proresenc_anatoliy.c')
-rw-r--r-- | libavcodec/proresenc_anatoliy.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index bf6e671570..cc98c6611e 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -156,8 +156,7 @@ typedef struct { static void encode_codeword(PutBitContext *pb, int val, int codebook) { - unsigned int rice_order, exp_order, switch_bits, first_exp, exp, zeros, - mask; + unsigned int rice_order, exp_order, switch_bits, first_exp, exp, zeros; /* number of bits to switch between rice and exp golomb */ switch_bits = codebook & 3; @@ -174,10 +173,9 @@ static void encode_codeword(PutBitContext *pb, int val, int codebook) put_bits(pb, zeros, 0); put_bits(pb, exp + 1, val); } else if (rice_order) { - mask = (1 << rice_order) - 1; put_bits(pb, (val >> rice_order), 0); put_bits(pb, 1, 1); - put_bits(pb, rice_order, val & mask); + put_sbits(pb, rice_order, val); } else { put_bits(pb, val, 0); put_bits(pb, 1, 1); |