OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b4d574
)
avcodec/mjpegenc: use av_log2_16bit() in encode_block()
author
Michael Niedermayer
<michaelni@gmx.at>
Thu, 5 Dec 2013 13:08:06 +0000
(14:08 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Thu, 5 Dec 2013 13:15:28 +0000
(14:15 +0100)
This reduces the number of operations done per non zero coefficient
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mjpegenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/mjpegenc.c
b/libavcodec/mjpegenc.c
index
74817ca
..
d4db8d8
100644
(file)
--- 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]);