ABSTRACT

This chapter demonstrates how to encode JPEG standard compliant images using DirectCompute. JPEG is a digital image compression standard created by the Joint Photographic Experts Group. The JPEG codec is widely used and suffcient for most applications. The chapter describes the process of encoding uncompressed RGB data into compressed JPEG data. It describes the implementation of a baseline JPEG encoder using DirectX 11.0 and Shader Model 5.0. The Graphics processing units is used to compute a majority of encoding steps, and the CPU is used to stitch together final JPEG data. Quantization tables are calculated based on JPEG quality, while computation dimensions are calculated from image dimensions and subsampling mode. The DirectCompute tests are done by sampling back-buffer data directly. Resulting JPEG data size was always smaller when encoding using the DirectCompute encoder. The image compression method is used in multiple data formats such as the JPEG file interchange format.