Appendix 2
Digital Data Compression

 

 

 

 

 

Knowledge of digital data compression is very important when working in transmedia, particularly with regard to problem solving and pushing digital audiovisual materials to their limits. Online broadcasters employ compression technologies that reduce file size with minimum quality loss. Smaller files can be sent faster and require less bandwidth for transmission. A codec (compressor/decompressor) is used to ‘compress’ a file before transmitting it online. The same model codec is used by the receiver to ‘decompress’ the file when it has arrived at its destination. A great number of codecs are available for music, images and video and some of them are quite similar in performance, but the codec that is used to compress a file must also be used to decompress it correctly.

SPATIAL AND TEMPORAL COMPRESSION: EXPLOITING REDUNDANCY

Compression of images and video work both spatially and temporally (within each frame and from frame-to-frame). Spatial compression exploits spatial redundancy, repeating pixel values that make up a single ‘block’ of colour within an image – for example, a clear blue sky. Pixels are positioned at x–y coordinates within the frame. Spatial compression works to eliminate the need to repeatedly transmit the same pixel values when all that is needed is one value plus the number of times it should be re-used. Temporal redundancy occurs where pixel values at specific x–y coordinates do not change from frame to frame. This can happen when a camera is in a fixed position and the image background is static. The redundancy here is that the pixels that make up the image background essentially do not change from their first frame values. Therefore, the codec compresses a video file by recording the x–y pixel values in the first frame, then indicating how many frames they should be repeated for. Rapidly changing pixels in successive frames require a high data rate to store and replay the visuals. Some codecs use two-pass encoding, assessing the data rate needed for each sequence, then raising and reducing the amount of data used for each shot to optimise compression.

QUANTISATION: THRESHOLD LEVELS AND BANDING

A threshold value can be used to set the level of compression required. This value is used to quantise pixel information according to a fixed scale. For example, a finely detailed image that has millions of colours will result in a large data file if every pixel value is recorded and stored. With quantisation, the codec notes each value, then converts it to the closest value on a preset scale. This is like using a thermometer to record room temperatures to an accuracy of a tenth of a degree (e.g. 32.2°), then ‘quantising’ the values to the nearest whole number (32°). The threshold indicates how different the compressed value can be to the original. Over-quantising would result in some image quality loss (the new pixel value is an approximation of the original – close but not exact) but would reduce the number of pixel values needed to recreate the image and therefore reduce the data file size. Therefore the codec settings must be adjusted to control the amount of compression applied or banding may occur – subtle tonal changes within the original image appear as large bands of colour.

CODING COMPRESSION

Coding compression works at the level of machine code. The codec looks for long, repeating series of bits in the code that make up the file. The codec removes these strings and replaces them with shorter sequences. The transmitted file will contain a header, which tells the receiving codec to decompress the file by replacing these short strings with the original longer sequences.

FRAME PREDICTION: KEYFRAMES AND CHECKSUM VALUES

The MPEG (Motion Picture Experts Group) codec is used to encode video. MPEG uses a system of frame prediction to reduce the amount of data that must be sent. The codec encodes and transmits keyframes (e.g. frames 1 and 5) then ‘predicts’ frames 2, 3 and 4. The codec compares the predicted frames to the originals to assess their accuracy, then calculates a checksum value by applying an algorithm to the frame data. This checksum is also transmitted to the receiver. On receipt of frames 1 and 5 plus the checksum, the receiver codec uses frames 1 and 5 to predict frames 2, 3 and 4 and uses the algorithm to produce another checksum value. If both the received and locally created checksum values are the same, the frames must have been predicted correctly. MPEG data must be buffered in order to allow time for resending corrupted data and dropped files. This means that MPEG broadcasts cannot be fully live; there is a short delay between the live event and the reception, processing and presentation of audiovisual materials on the audience screens.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.128.129