Mercurial > libavcodec.hg
changeset 3241:61d9f1418c02 libavcodec
do UPDATE_CACHE only when needed (which should be VERY rare)
author | michael |
---|---|
date | Fri, 31 Mar 2006 17:43:28 +0000 |
parents | 5fab2409bf8d |
children | e22fc2d702b7 |
files | mjpeg.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mjpeg.c Fri Mar 31 17:01:58 2006 +0000 +++ b/mjpeg.c Fri Mar 31 17:43:28 2006 +0000 @@ -1286,8 +1286,9 @@ } 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;