Commit 6005ab3e authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mjpegenc: use av_log2_16bit() in encode_block()

This reduces the number of operations done per non zero coefficient
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5b4d5745
......@@ -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]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment