[sldev] OpenJPEG decoder update

Tofu Linden tofu.linden at lindenlab.com
Wed Mar 7 06:26:17 PST 2007


Tofu Linden wrote:
> Hey, I can leave LIMIT_TO_MAIN_HEADER enabled as long as the error
> condition returns the pre-patch '1' instead of 'FALSE' - then everything
> actually seems pretty groovy, comparatively good decode speed and
> no Mystery Bloat.  I'll have a look into why, tomorrow.

The patch's Mystery Bloat happens because, unlike
LLImageJ2COJ::getMetadata(), the return BOOL of
LLImageJ2COJ::decodeImpl() means 'finished', not 'succeeded',
so TRUE is still the correct return in the case of an error
(otherwise the failed decoder object is not dequeued and
cleaned-up until shutdown).

The problem wouldn't have been conspicuously triggered unless
you were trying to decode a bad j2c - I got (un)lucky in testing.

The repaired patch I'm going to check-in is at:
https://jira.secondlife.com/secure/attachment/10130/llimagej2c-fixes-final.patch

This still needs a bit more love and internal QA before it
hits a source release, but it seems good to me.  How about you? :)

Thanks for the great submission.

- Tofu


More information about the SLDev mailing list