[sldev] Bug in LLTextureCacheRemoteWorker::doRead ?
Philippe Bossut (Merov Linden)
merov at lindenlab.com
Fri Mar 27 13:33:07 PDT 2009
Hi Carlo,
Sorry about the delay. Things were a little bit more complex for me to
figure out as I'm working on a branch with lots of differences on how
the cache works compared to the trunk (more on this later may be) so I
wanted to make sure that I was not confusing everybody (including
myself) mixing up the 2 versions of the code.
First, "header" size: as Sheet Spotter said, it is 600 bytes, not 1 K
as I said (I let out an expletive when I realized that the comment in
lltexturecache.cpp was lying...).
Second, mOffset is not the size of the "raw file header" data
(whatever that's supposed to be...) as I thought but the size of a
"header" the viewer could be stuffing in front of the raw data. For
j2c files (the only type of file cached that way right now), it is
always 0 and, so far, I haven't found one instance where that was
different. So, the complex code you've been pointing to has, more than
likely, never been exercised with anything else than (mOffset == 0)...
which is a sort of degenerate case anyway.
Your schema is correct:
<------TEXTURE_CACHE_ENTRY_SIZE------><-------------cache
file------------>
<----mOffset----><----JPEG2000 header----><-----pixel data------->
But as for what is in the mOffset section, we're pretty much on our
own since it's always 0... Extra info on images? Padding? Don't know
but it's clear in the code that the whole acrobatics you asked about
in your initial post is about skipping that section when rebuilding
the whole raw stream of data from the "header cache" and the "body
cache" (cache file in your schema) before stuffing that into a decoder.
For the rest, the wiki is short but correct:
http://wiki.secondlife.com/wiki/Texture_cache
I'm working now on documenting the various threads.
Cheers,
- Merov
On Mar 27, 2009, at 9:03 AM, Carlo Wood wrote:
> Did you figure it out yet what mOffset exactly is?
> I'd really like to hear from you :)
>
> On Thu, Mar 26, 2009 at 09:46:36AM -0700, Philippe Bossut (Merov
> Linden) wrote:
>> is adding a different header to j2c files... I'll be investigating
>> more
>> this morning and report my findings here.
>
> --
> Carlo Wood <carlo at alinoe.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20090327/6b6c49ea/attachment-0001.htm
More information about the SLDev
mailing list