CS 395 T Real-Time Graphics Architectures, Algorithms, and Programming Systems Spring’03 Vector...
-
Upload
sibyl-pitts -
Category
Documents
-
view
218 -
download
0
Transcript of CS 395 T Real-Time Graphics Architectures, Algorithms, and Programming Systems Spring’03 Vector...
CS 395 T Real-Time Graphics Architectures,
Algorithms, and Programming Systems Spring’03
Vector Quantization
for Texture Compression
Qiu Wu
Dept. of ECE & TICAM
University of Texas at Austin
Feb. 4th, 2003
Overview
Review of Vector QuantizationVQ for texture compression
(paper of Beers etc) discussion of its contributions
and weaknessDXT1 Texture Compression
Signal Compression
Purpose : reduce the bit rate for
transmission/storage
Principles:Exploit the signal redundancy in spatial
domainHuman vision system has different
sensitivities for different frequencies, low frequency noise is more noticeable
Signal Compression
1. Reconstruction error==0? Lossy Compression: often eliminate high
frequency components Lossless Compression: exact reconstruction
2. Scalar based or Vector based Quantization?
Scalar Quantization : transform+SQ, state of the art
Vector Quantization
Vector Quantization
Block coding: consecutive n pixels as a block(vector)
Map each vector to an index of the code which is closest to this vector
This index is compressed info In decoding, look up table for a
vector by this index
Training algorithm: GLA
1. Begin with an initial codebook C1. 2. Repeat
(a) Given a codebook (set of clusters defined by their centroids) redistribute each vector x into one of the clusters in by selecting the one whose centroid is closer to x.
(b) Recompute the centroids for each cluster just created, to obtain the new codebook Cm+1.
(c) Compute the average distortion Dm+1
for Cm+1, Until the distortion has only changed by a
small enough amount since last iteration.
Pros and Cons of VQ
Pros: Fast decoding ---lookup table
Cons: Long training time, unstable process, low CR,
VQ for texture compression
Presented by AndrewC.Beers,
ManeeshAgrawala,and NavinChaddha on
SIGGRAPH 1996 VQ for generating compressed
texture in memory VQ for compressed MIPMAP Performance: CR=20, 2—20%
saving on time
Details of VQ for texture compression
Multiple-codebooks or Single codebook
Option 1: Each codebook for each color component
Option 2: Components of color as a single value
Too simple description and just experimental, more statistical discussion would be necessary and wonderful
Details of VQ for texture compression
Large codebook or Small codebook
Large codebook---more representative vectors---better reconstruction quality
but More bits per index—>low compression ratio
Vice versa for small codebook
Details of VQ for texture compression
RGB-YUV
• More CPU time for tansforming back and forth though additional compression
• Just mention borrowing concept from video coding, no reason given in the paper, then in coding YUV combined together or in separate?
My explanation: more energy in Y component
DXT1 texture compression
compressed textures stored in memory at a ratio of 4:1
supported by Direct3D 4 by 4 pixel blocks---compressed
block has a size of 64 bits while an original, uncompressed block is 4x4x16 = 256 bits in size
DXT1 texture compression:Opaque Case
When compressing an entirely opaque block, two extreme colours are chosen from all the colours present in the original block
All 16 pixels contained in a block are represented with two bits each. These two bits enable four possible combinations to encode a pixel color
While two of these combinations indicate to use either of the stored colours, the other two specify a gradient of the defined colours