mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
5b4d57455d
commit
6005ab3e0e
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user