[sldev] Meaning of RequestImage DiscardLevel field?

John Hurliman jhurliman at jhurliman.org
Sat Sep 20 21:05:40 PDT 2008


Thank you Carsten, that clarification is correct. For now I'm assuming that
DiscardLevel 0 is a request for the full quality (zero discarded levels) and
DiscardLevel 5 is requesting the lowest quality level. However, if you start
with five quality layers and you discard five of them what are you left
with? Is five actually being clamped to four? This still doesn't explain -1.
If you send a RequestImage with Priority = 0.0 and DiscardLevel = -1 it will
cancel the download, but texture requests often start with a positive
priority and a DiscardLevel of -1. Is this a request for the header only, or
is it just an uninitialized value in the client that implies zero or four?

John

On Fri, Sep 19, 2008 at 3:45 PM, Carsten Juttner <carjay at gmx.net> wrote:

>  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
>
>
> _______________________________________________
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/SLDev
> Please read the policies before posting to keep unmoderated posting
> privileges
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20080920/87c62fe5/attachment.htm


More information about the SLDev mailing list