projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7e2025
)
do UPDATE_CACHE only when needed (which should be VERY rare)
author
Michael Niedermayer
<michaelni@gmx.at>
Fri, 31 Mar 2006 17:43:28 +0000
(17:43 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Fri, 31 Mar 2006 17:43:28 +0000
(17:43 +0000)
Originally committed as revision 5254 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/mjpeg.c
patch
|
blob
|
history
diff --git
a/libavcodec/mjpeg.c
b/libavcodec/mjpeg.c
index 8c90022bc573e9189fef54905694084c330c2f1d..2fc870a61a69458c5ed1a230cafa69fbb6e0bc00 100644
(file)
--- a/
libavcodec/mjpeg.c
+++ b/
libavcodec/mjpeg.c
@@
-1286,8
+1286,9
@@
static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
} else {
i += ((unsigned)code) >> 4;
code &= 0xf;
-
- UPDATE_CACHE(re, &s->gb)
+ if(code > MIN_CACHE_BITS - 16){
+ UPDATE_CACHE(re, &s->gb)
+ }
{
int cache=GET_CACHE(re,gb);
int sign=(~cache)>>31;