diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-05 14:08:06 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-05 14:15:28 +0100 |
commit | 6005ab3e0ed6513cdc274a758fb63a57516cf63e (patch) | |
tree | dcd25218d8f40bcdda073fce523305de67a4dd62 /libavcodec/mjpegenc.c | |
parent | 5b4d57455d5b587fb0141823e2d08c9117ad1817 (diff) | |
download | ffmpeg-6005ab3e0ed6513cdc274a758fb63a57516cf63e.tar.gz |
avcodec/mjpegenc: use av_log2_16bit() in encode_block()
This reduces the number of operations done per non zero coefficient
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegenc.c')
-rw-r--r-- | libavcodec/mjpegenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index 74817cadc2..d4db8d83da 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -441,7 +441,7 @@ static void encode_block(MpegEncContext *s, int16_t *block, int n) mant--; } - nbits= av_log2(val) + 1; + nbits= av_log2_16bit(val) + 1; code = (run << 4) | nbits; put_bits(&s->pb, huff_size_ac[code], huff_code_ac[code]); |