Domanda

I am reading the official WebP lossless bitstream spec. and I have a feeling, that the document is missing some explanation.

Let me describe some fragments of the specification:

1. Introduction - clear

2. Riff header - clear

3. Transformations

The transformations are used only for the main level ARGB image: the subresolution images have no transforms, not even the 0 bit indicating the end-of-transforms.

Nowhere earlier was it mentioned, that the container holds some sub-resolution images. What are they? Where are they described, if not in the specification? How to they add to the final image?

Then, in the Predictor transform paragraph:

We divide the image into squares...

..what image? The main image or sub-resolution image? What if the image cannot be divided into squares (apart from pixel-size squares)?

The first 4 bits of prediction data define the block width and height in number of bits. The number of block columns, block_xsize, is used in indexing two-dimensionally.

Does this mean that the image width is block_xsize * block_width ?

The transform data contains the prediction mode for each block of the image.

In what way, what format?

I dont know why I am having a hard time understanding this. Maybe because I am not a native english speaker or because the description is too laconic.

I'd appreciate any help in decoding this specification :)

È stato utile?

Soluzione

It was mentioned earlier. Right at the top of the document it says:

The format uses subresolution images, recursively embedded into the format itself, for storing statistical data about the images, such as the used entropy codes, spatial predictors, color space conversion, and color table.

These are arrays (or a vector in the case of the color table) of data where each element applies to a block of pixels in the actual image, e.g. a 16x16 block. These "subresolution images" are not themselves subsamples of the image being compressed.

The format description calls them images because they are stored exactly like the main image is in the format. The transforms are instructions to the decoder to apply to the decompressed main image data. The entropy image is used to decompress the main image, by virtue of providing the Huffman codes for each block.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top