Search
j0ke.net Open Build Service
>
Projects
>
multimedia
:
SL11
>
openjpeg
> openjpeg-20070717svn-mqc-optimize.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File openjpeg-20070717svn-mqc-optimize.patch of Package openjpeg
diff -urN -x '*.orig' -x '*.rej' -x '*~' -x '.*' OpenJPEG.orig/libopenjpeg/mqc.c OpenJPEG.patched/libopenjpeg/mqc.c --- OpenJPEG.orig/libopenjpeg/mqc.c 2007-07-17 20:07:22.000000000 -0500 +++ OpenJPEG.patched/libopenjpeg/mqc.c 2007-07-17 20:07:44.000000000 -0500 @@ -507,20 +507,20 @@ int mqc_decode(opj_mqc_t *mqc) { int d; - mqc->a -= (*mqc->curctx)->qeval; - if ((mqc->c >> 16) < (*mqc->curctx)->qeval) { + unsigned int qeval = (*mqc->curctx)->qeval; + mqc->a -= qeval; + qeval <<= 16; + if (mqc->c < qeval) { d = mqc_lpsexchange(mqc); - mqc_renormd(mqc); } else { - mqc->c -= (*mqc->curctx)->qeval << 16; + mqc->c -= qeval; if ((mqc->a & 0x8000) == 0) { d = mqc_mpsexchange(mqc); - mqc_renormd(mqc); } else { - d = (*mqc->curctx)->mps; + return (*mqc->curctx)->mps; } } - + mqc_renormd(mqc); return d; }