[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Alternative compression scheme.



On 12/03/2010 06:25 PM, Chris Marrin wrote:
> On Dec 2, 2010, at 10:41 PM, Steve Baker wrote:
>
>   
>> I don't know whether there is any interest in this - but I guess I could
>> suggest another lossy compression scheme for WebGL textures based on
>> simple dictionary compression.
>>
>> The reason I propose it in the teeth of so many other lossy image
>> compression schemes such as JPEG, WebP, DXT and ETC is that this scheme
>> can be decoded in the shader - either as a one-time step to avoid
>> decompressing it in JavaScript - or used directly in its compressed form
>> as the image is rendered.
>>
>> The idea is to chop your image into (say) 4x4 pixel chunks - and make a
>> list of them.  The file  itself consists of the list of 4x4 chunks (the
>> dictionary) - plus a 2D array of indices that point into that dictionary.
>>
>> The size of the resulting file is (16*DictionarySize*Sizeof(Pixel)) +
>> (ImageSize*log2(DictionarySize)/26) ...which is (in practice) dominated
>> by the first term - the space consumed by the dictionary.
>>
>> To avoid having to invent new file formats - you can store this as two
>> separate maps - one containing the dictionary and the other containing
>> the index array.  Both of those could be stored as .PNG or whatever.
>>     
> Do you have a patent on this format?
No - I don't.
>  If not, it's likely that the owners of other patented formats could come after you, making this format unusable. In particular you concept of splitting an image into smaller squares and encoding must fall well within the JPEG and MPEG patents.
>   
Really?  There are lots of compression schemes that do that (ETC and
DXT/S3C, to name but two).  It's hard to imagine that such a very
basic/obvious idea used across so many competing file formats would be
patentable.  IANAL though...who knows?
> For some reason I've seen lots of people lately saying, "the web is full of patented technologies, let's make something just as good that's not patented". Their solution until a company owning the patents decides to go after them. There are several formats on the web today. Just because someone hasn't gone after them yet, doesn't me someone won't. GIF was ruined this way.
>   
Yep...it's basically a mess.  But the reason people say this is that
there is really no other choice.  What can you do?  Standards for the
web have to be free in order to get W3C backing.  So we can't use DXT
(which could have been ideal).  ETC isn't very useful because it fails
miserably for anything other than RGB photographs (although maybe there
is hope for ETC2).   Nothing that has hardware support is available to
WebGL.  What choice do we have but to try to come up with something
that's patent-free and could be decoded on-the-fly in the GPU?
> We may not like the prevalence of patent encumbrances on what we do. But they're there and we have to deal with that.
>   
Indeed.   Well, I only offer this as a suggestion - if it's already
covered by some other patent then it's no good - but I don't have the
patent-lawyer skills at reading turgid/obfuscated English - or the
patience to check through a bazillion dusty old patents.

  -- Steve

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: