gui-image-dynamic-range

José Fonseca jose.r.fonseca at gmail.com
Sun Mar 18 13:47:56 PDT 2012


On Sun, Mar 18, 2012 at 6:53 PM, Zack Rusin <zack at kde.org> wrote:
> On Sunday, March 18, 2012 06:24:55 AM José Fonseca wrote:
>> I'd like to merge
>>
>>   https://github.com/apitrace/apitrace/commits/gui-image-dynamic-range
>>
>> which allows to control the color space range in the image viewer. It
>> would be much more helpful if depth images had more precision, but
>> it's better than nothing, and enough for stencil images.
>>
>> Zack, let me know if I'm doing anything stupid/inefficient with Qt images.
>
> Looks great.
>
> I thought about this a while back. Mainly about operating on native data in
> the gui. QImage's aren't good enough for that and we'd need to either use some
> kind of a library that is capable of doing tone mapping or write the code
> ourselves. I was too lazy and didn't see any decent library that could do what
> we'd want so I gave up. The inability to nicely visualize some of the stencils
> and depth buffers is definitely one our biggest problems.

Yeah. It's currently pretty hard to diagnose depth buffer related
issues, with or without gui, as everything gets funneled into rgba8
images.

I don't know a good library that would fit our needs neither. My
current idea is to promote the Image class to a template thhat has the
channel type as parameter:

   template< class ChanType , unsigned numChannels >
   class Image;

and then add few virtual methods for the operations we care:
 - (de)serialize
  - produce a RGBA8 , with adjustable range

I think this should be relatively simple.

Another other issue is how to encode this on JSON. On commit aa0a7822
you said that PNG was a performance win because it reduced the
pressure on JSON parser. So either we use some compression (snappy,
zlib) when serializing the above images into JSON, or we drop JSON and
use trace binary format everywhere including state dumps.

Jose


More information about the apitrace mailing list