[sldev] Meaning of RequestImage DiscardLevel field?
Carsten Juttner
carjay at gmx.net
Fri Sep 19 15:45:02 PDT 2008
Robin Cornelius wrote:
> John Hurliman wrote:
>
>> I know that the DiscardLevel field in the RequestImage packet is used to
>> request different quality levels (not different texture sizes as the
>> protocol documentation states, SL uses LRCP ordered JPEG2000 files), but
>> i can't figure out what the values correspond to. In a typical texture
>> download I'll see values ranging from -1 to 5. Is -1 a special value? Is
>> there an upper limit? Does a larger number mean a lower quality layer?
>>
>>
>
> The discard field is directly related to the request quality level as
> you are already aware. It should be a simple calculation that the
> discard is the number of powers of 2 to scale the image down by for the
> reduced quality. So a discard of 0 is the complete image and a discard
> of 1 is a 1/2 size, a discard of 2 is a 1/4 size etc.
>
I think what John was actually referring to here is that quality layers
and resolution levels are not the same. In JPEG2k all data is divided
into packets for one tile. Each packet contains codestream data for one
quality layer for one resolution for one component for one precinct
(spatial partition). The order in which you transmit the packets decides
what you get first and is signalled by the "progression order". LRCP
(Layer-Resolution-Component-Position) is layer-centric meaning that one
by one you get all the data for each quality layer, not for each
resolution. That means you end up with the lowest quality layer for all
resolutions first so it's really a quality-based progression, not a
resolution-based.
Think of the quality layers as going down the bits from MSB to LSB.
First you get the rough information, then it progresses to the detailed
information (actually for the wavelet coefficients).
AFAIK, inside the viewer the progression order is not really cared about
and the discard levels are merely referring to the dropped resolutions
from the highest resolution.
Also nobody seems to really know what is happening on the server side
since we did ask a while ago but never met a Linden who was familiar
with that area of the code so it's still a bit of a mystery.
Regards,
Carsten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20080920/fc30ffe8/attachment.htm
More information about the SLDev
mailing list