对纹理元素透明度alpha的压缩是纹理压缩的重要组成部分.通过分析透明度和颜色的本质差异,提出了具有可变数据格式的透明度压缩——龙芯透明度压缩(LAC)方法.该方法定义了3种alpha压缩数据格式,用聚类算法和线性插值方法将16个输入alpha数据压缩为64比特,并依据压缩数据格式采用灵活的解压方式;实现了LAC的压缩和解压过程,以及DXT5的alpha通道压缩.实验结果表明,与DXT5的alpha压缩相比,LAC方法可使测试图像的平均PSNR值提高0.25dB,alpha数据的平均压缩时间缩短约18%,硬件实现的平均单元面积减小25%左右,解压功耗降低10%~30%.
The alpha channel compression of texture elements is an integral part of texture compression. A novel alpha compression scheme, called Loongson alpha compression (LAC), is proposed based on an insight into the essential difference between transparency and color. LAC defines 3 alpha compression data formats, employs clustering algorithms combined with linear interpolation method used in DXT5 to compress 16 input alpha data to a 64-bit block, and decompresses the block flexibly. Both compression and decompression are implemented for LAC and DXT5's alpha channel. Experimental results show that LAC improves the average PSNR with about 0.25dB over a set of test images and reduces about 18% of alpha compression time, as compared to DXT5 alpha compression. Moreover the average cell area of the hardware implementation is lowered by about 25% and the power consumption is reduced by 10%-30%.