CS 395 T RealTime Graphics Architectures Algorithms and

















- Slides: 17
CS 395 T Real-Time Graphics Architectures, Algorithms, and Programming Systems Vector Quantization for Texture Compression Qiu Wu Dept. of ECE & TICAM University of Texas at Austin Feb. 4 th, 2003 Spring’ 03
Overview l Review of Vector Quantization l VQ for texture compression (paper of Beers etc) discussion of its contributions and weakness l DXT 1 Texture Compression
Signal Compression V Purpose : reduce the bit rate for transmission/storage V Principles: l l Exploit the signal redundancy in spatial domain Human vision system has different sensitivities for different frequencies, low frequency noise is more noticeable
Signal Compression 1. Reconstruction error==0? V V Lossy Compression: often eliminate high frequency components Lossless Compression: exact reconstruction 2. Scalar based or Vector based Quantization? V V Scalar Quantization : transform+SQ, state of the art Vector Quantization
Vector Quantization l l 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 l 1. Begin with an initial codebook C 1. l 2. Repeat l (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. l (b) Recompute the centroids for each cluster just created, to obtain the new codebook Cm+1. l (c) Compute the average distortion Dm+1 for Cm+1, Until the distortion has only changed by a small
Animation of LBG Algorithm (http: //www. data-compression. com/index. html)
Pros and Cons of VQ V Pros: Fast decoding ---lookup table V Cons: Long training time, unstable process, low CR,
VQ for texture compression l Presented by Andrew. C. Beers, Maneesh. Agrawala, and Navin. Chaddha on SIGGRAPH 1996 l VQ for generating compressed texture in memory l VQ for compressed MIPMAP l Performance: CR=20, 2— 20% saving on time
VQ scheme of Beer’s paper
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 l Large codebook or Small codebook Large codebook--- more representative vectors--- better reconstruction quality but More bits per index—>low compression ratio l Vice versa for small codebook
Details of VQ for texture compression l 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? l My explanation: more energy in Y component
Details of VQ for texture compression (Fig 2 of Beers’ paper) l Mipmaping
DXT 1 texture compression l compressed textures stored in memory at a ratio of 4: 1 l supported by Direct 3 D l 4 by 4 pixel blocks--- compressed block has a size of 64 bits while an original, uncompressed block is 4 x 4 x 16 = 256 bits in size
DXT 1 texture compression: Opaque Case l When compressing an entirely opaque block, two extreme colours are chosen from all the colours present in the original block l 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 l While two of these combinations indicate to use either of the stored colours, the other two specify a gradient of the defined colours
Reference: l Image coding using vector quantization: A review. IEEE Transactions on Communications, 36(8): 957 --971, August 1988. l Rendering from Compressed Textures", Beers, Agrawala and Chaddha, SIGGRAPH 1996. l DXT 1 Texture Compression", Imagination Technologies

















