Generation loss

Last updated
Digital generation loss induced by rotating a JPEG image 90 degrees (from top to bottom) 0, 100, 200, 500, 900, and 2000 times (without using lossless tools) JPEG Generation Loss rotating 90 (stitch of 0,100,200,500,900,2000 times).png
Digital generation loss induced by rotating a JPEG image 90 degrees (from top to bottom) 0, 100, 200, 500, 900, and 2000 times (without using lossless tools)

Generation loss is the loss of quality between subsequent copies or transcodes of data. Anything that reduces the quality of the representation when copying, and would cause further reduction in quality on making a copy of the copy, can be considered a form of generation loss. File size increases are a common result of generation loss, as the introduction of artifacts may actually increase the entropy of the data through each generation.

Contents

Analog generation loss

In analog systems (including systems that use digital recording but make the copy over an analog connection), generation loss is mostly due to noise and bandwidth issues in cables, amplifiers, mixers, recording equipment and anything else between the source and the destination. Poorly adjusted distribution amplifiers and mismatched impedances can make these problems even worse. Repeated conversion between analog and digital can also cause loss.

Generation loss was a major consideration in complex analog audio and video editing, where multi-layered edits were often created by making intermediate mixes which were then "bounced down" back onto tape. Careful planning was required to minimize generation loss, and the resulting noise and poor frequency response.

One way of minimizing the number of generations needed was to use an audio mixing or video editing suite capable of mixing a large number of channels at once; in the extreme case, for example with a 48-track recording studio, an entire complex mixdown could be done in a single generation, although this was prohibitively expensive for all but the best-funded projects.

The introduction of professional analog noise reduction systems such as Dolby A helped reduce the amount of audible generation loss, but were eventually superseded by digital systems which vastly reduced generation loss. [1]

According to ATIS, "Generation loss is limited to analog recording because digital recording and reproduction may be performed in a manner that is essentially free from generation loss." [1]

Digital generation loss

Used correctly, digital technology can eliminate generation loss. This implies the exclusive use of lossless compression codecs or uncompressed data from recording or creation until the final lossy encode for distribution through internet streaming or optical discs. Copying a digital file gives an exact copy if the equipment is operating properly which eliminates generation loss caused by copying, while reencoding digital files with lossy compression codecs can cause generation loss. This trait of digital technology has given rise to awareness of the risk of unauthorized copying. Before digital technology was widespread, a record label, for example, could be confident knowing that unauthorized copies of their music tracks were never as good as the originals.

Generation loss can still occur when using lossy video or audio compression codecs as these introduce artifacts into the source material with each encode or reencode. Lossy compression codecs such as Apple ProRes, Advanced Video Coding and mp3 are very widely used as they allow for dramatic reductions on file size while being indistinguishable from the uncompressed or losslessly compressed original for viewing purposes. The only way to avoid generation loss is by using uncompressed or losslessly compressed files; which may be expensive from a storage standpoint as they require larger amounts of storage space in flash memory or hard drives per second of runtime. Uncompressed video requires a high data rate; for example, a 1080p video at 60 frames per second require approximately 370 megabytes per second. [2] Lossy codecs make Blu-rays and streaming video over the internet feasible since neither can deliver the amounts of data needed for uncompressed or losslessly compressed video at acceptable frame rates and resolutions. Images can suffer from generation loss in the same way video and audio can.

Processing a lossily compressed file rather than an original usually results in more loss of quality than generating the same output from an uncompressed original. For example, a low-resolution digital image for a web page is better if generated from an uncompressed raw image than from an already-compressed JPEG file of higher quality.

Techniques that cause generation loss in digital systems

In digital systems, several techniques such as lossy compression codecs and algorithms, used because of other advantages, may introduce generation loss and must be used with caution. However, copying a digital file itself incurs no generation loss—the copied file is identical to the original, provided a perfect copying channel is used.

Some digital transforms are reversible, while some are not. Lossless compression is, by definition, fully reversible, while lossy compression throws away some data which cannot be restored. Similarly, many DSP processes are not reversible.

Thus careful planning of an audio or video signal chain from beginning to end and rearranging to minimize multiple conversions is important to avoid generation loss when using lossy compression codecs. Often, arbitrary choices of numbers of pixels and sampling rates for source, destination, and intermediates can seriously degrade digital signals in spite of the potential of digital technology for eliminating generation loss completely.

Similarly, when using lossy compression, it will ideally only be done once, at the end of the workflow involving the file, after all required changes have been made.

Transcoding

Converting between lossy formats – be it decoding and re-encoding to the same format, between different formats, or between different bitrates or parameters of the same format – causes generation loss.

Repeated applications of lossy compression and decompression can cause generation loss, particularly if the parameters used are not consistent across generations. Ideally an algorithm will be both idempotent, meaning that if the signal is decoded and then re-encoded with identical settings, there is no loss, and scalable, meaning that if it is re-encoded with lower quality settings, the result will be the same as if it had been encoded from the original signal – see Scalable Video Coding. More generally, transcoding between different parameters of a particular encoding will ideally yield the greatest common shared quality – for instance, converting from an image with 4 bits of red and 8 bits of green to one with 8 bits of red and 4 bits of green would ideally yield simply an image with 4 bits of red color depth and 4 bits of green color depth without further degradation.

Some lossy compression algorithms are much worse than others in this regard, being neither idempotent nor scalable, and introducing further degradation if parameters are changed.

For example, with JPEG, changing the quality setting will cause different quantization constants to be used, causing additional loss. Further, as JPEG is divided into 16×16 blocks (or 16×8, or 8×8, depending on chroma subsampling), cropping that does not fall on an 8×8 boundary shifts the encoding blocks, causing substantial degradation – similar problems happen on rotation. This can be avoided by the use of jpegtran or similar tools for cropping. Similar degradation occurs if video keyframes do not line up from generation to generation.

Editing

Digital resampling such as image scaling, and other DSP techniques can also introduce artifacts or degrade signal-to-noise ratio (S/N ratio) each time they are used, even if the underlying storage is lossless. When making a copy of a copy, the quality of the image will deteriorate with every ‘generation’.

To use the scanning and printing features on a photocopier, these elements rely on noise sensors and physical mediums like paper and ink, leading to the accumulation of noise over successive iterations. Similarly, lossy image formats, such as JPEG, introduce degradation when files are repeatedly edited and re-saved. While directly copying a JPEG file preserves its quality, opening and saving it in an image editor creates a new, re-encoded version, introducing subtle changes. Social media platforms like Facebook and X, formerly known as Twitter, automatically re-encode uploaded images at low-quality settings to optimize storage and bandwidth, further compounding compression artifacts. Over time, repeated re-encoding or processing can significantly degrade the image's quality.

Resampling causes aliasing, both blurring low-frequency components and adding high-frequency noise, causing jaggies, while rounding off computations to fit in finite precision introduces quantization, causing banding; if fixed by dither, this instead becomes noise. In both cases, these at best degrade the signal's S/N ratio, and may cause artifacts. Quantization can be reduced by using high precision while editing (notably floating point numbers), only reducing back to fixed precision at the end.

Often, particular implementations fall short of theoretical ideals.

Examples

Successive generations of photocopies result in image distortion and degradation. [3] Repeatedly downloading and then reposting / reuploading content to platforms such as Instagram or YouTube can result to noticeable quality degradation. [4] [5] [6] Similar effects have been documented in copying of VHS tapes. [7] This is because both services use lossy codecs on all data that is uploaded to them, even if the data being uploaded is a duplicate of data already hosted on the service, while VHS is an analog medium, where effects such as noise from interference can have a much more noticeable impact on recordings.

See also

Notes

  1. 1 2 "generation loss". ATIS Telecom Glossary. Alliance for Telecommunications Industry Solutions. September 28, 2016. Archived from the original on 2017-01-23. Retrieved September 28, 2016.
  2. "H.264 is magic: A technical walkthrough of a remarkable technology". 2 November 2016.
  3. "Generation loss". Webopedia. March 2007. Retrieved September 28, 2016.
  4. Simpson, Isaac (December 4, 2013). "Copying a YouTube video 1,000 times is a descent into hell". The Daily Dot . Retrieved September 28, 2016 via YouTube.
  5. Zhang, Michael (February 11, 2015). "Experiment Shows What Happens When You Repost a Photo to Instagram 90 Times". Petapixel. Retrieved September 28, 2016.
  6. Zhang, Michael (June 4, 2010). "I Am Sitting in a Room, YouTube Style". Petapixel. Retrieved September 28, 2016.
  7. "VHS generation loss (50fps)". YouTube. December 4, 2016. Retrieved September 11, 2024.

Related Research Articles

<span class="mw-page-title-main">Audio file format</span> Computer format for digital audio

An audio file format is a file format for storing digital audio data on a computer system. The bit layout of the audio data is called the audio coding format and can be uncompressed, or compressed to reduce the file size, often using lossy compression. The data can be a raw bitstream in an audio coding format, but it is usually embedded in a container format or an audio data format with defined storage layer.

A codec is a computer hardware or software component that encodes or decodes a data stream or signal. Codec is a portmanteau of coder/decoder.

In information theory, data compression, source coding, or bit-rate reduction is the process of encoding information using fewer bits than the original representation. Any particular compression is either lossy or lossless. Lossless compression reduces bits by identifying and eliminating statistical redundancy. No information is lost in lossless compression. Lossy compression reduces bits by removing unnecessary or less important information. Typically, a device that performs data compression is referred to as an encoder, and one that performs the reversal of the process (decompression) as a decoder.

<span class="mw-page-title-main">Digital video</span> Digital electronic representation of moving visual images

Digital video is an electronic representation of moving visual images (video) in the form of encoded digital data. This is in contrast to analog video, which represents moving visual images in the form of analog signals. Digital video comprises a series of digital images displayed in rapid succession, usually at 24, 25, 30, or 60 frames per second. Digital video has many advantages such as easy copying, multicasting, sharing and storage.

<span class="mw-page-title-main">JPEG</span> Lossy compression method for reducing the size of digital images

JPEG is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable trade off between storage size and image quality. JPEG typically achieves 10:1 compression with noticeable, but widely agreed to be acceptable perceptible loss in image quality. Since its introduction in 1992, JPEG has been the most widely used image compression standard in the world, and the most widely used digital image format, with several billion JPEG images produced every day as of 2015.

<span class="mw-page-title-main">Lossy compression</span> Data compression approach that reduces data size while discarding or changing some of it

In information technology, lossy compression or irreversible compression is the class of data compression methods that uses inexact approximations and partial data discarding to represent the content. These techniques are used to reduce data size for storing, handling, and transmitting content. Higher degrees of approximation create coarser images as more details are removed. This is opposed to lossless data compression which does not degrade the data. The amount of data reduction possible using lossy compression is much higher than using lossless techniques.

Lossless compression is a class of data compression that allows the original data to be perfectly reconstructed from the compressed data with no loss of information. Lossless compression is possible because most real-world data exhibits statistical redundancy. By contrast, lossy compression permits reconstruction only of an approximation of the original data, though usually with greatly improved compression rates.

<span class="mw-page-title-main">Image compression</span> Reduction of image size to save storage and transmission costs

Image compression is a type of data compression applied to digital images, to reduce their cost for storage or transmission. Algorithms may take advantage of visual perception and the statistical properties of image data to provide superior results compared with generic data compression methods which are used for other digital data.

<span class="mw-page-title-main">Video codec</span> Digital video coder/decoder

A video codec is software or hardware that compresses and decompresses digital video. In the context of video compression, codec is a portmanteau of encoder and decoder, while a device that only compresses is typically called an encoder, and one that only decompresses is a decoder.

<span class="mw-page-title-main">JPEG 2000</span> Image compression standard and coding system

JPEG 2000 (JP2) is an image compression standard and coding system. It was developed from 1997 to 2000 by a Joint Photographic Experts Group committee chaired by Touradj Ebrahimi, with the intention of superseding their original JPEG standard, which is based on a discrete cosine transform (DCT), with a newly designed, wavelet-based method. The standardized filename extension is .jp2 for ISO/IEC 15444-1 conforming files and .jpx for the extended part-2 specifications, published as ISO/IEC 15444-2. The MIME types for JPEG 2000 are defined in RFC 3745. The MIME type for JPEG 2000 is image/jp2.

<span class="mw-page-title-main">Compression artifact</span> Distortion of media caused by lossy data compression

A compression artifact is a noticeable distortion of media caused by the application of lossy compression. Lossy data compression involves discarding some of the media's data so that it becomes small enough to be stored within the desired disk space or transmitted (streamed) within the available bandwidth. If the compressor cannot store enough data in the compressed version, the result is a loss of quality, or introduction of artifacts. The compression algorithm may not be intelligent enough to discriminate between distortions of little subjective importance and those objectionable to the user.

ICER is a wavelet-based image compression file format used by the NASA Mars rovers. ICER has both lossy and lossless compression modes.

Transcoding is the direct digital-to-digital conversion of one encoding to another, such as for video data files, audio files, or character encoding. This is usually done in cases where a target device does not support the format or has limited storage capacity that mandates a reduced file size, or to convert incompatible or obsolete data to a better-supported or modern format.

In data compression and psychoacoustics, transparency is the result of lossy data compression accurate enough that the compressed result is perceptually indistinguishable from the uncompressed input, i.e. perceptually lossless.

An image file format is a file format for a digital image. There are many formats that can be used, such as JPEG, PNG, and GIF. Most formats up until 2022 were for storing 2D images, not 3D ones. The data stored in an image file format may be compressed or uncompressed. If the data is compressed, it may be done so using lossy compression or lossless compression. For graphic design applications, vector formats are often used. Some image file formats support transparency.

JPEG XR is an image compression standard for continuous tone photographic images, based on the HD Photo specifications that Microsoft originally developed and patented. It supports both lossy and lossless compression, and is the preferred image format for Ecma-388 Open XML Paper Specification documents.

CineForm Intermediate is an open source video codec developed for CineForm Inc by David Taylor, David Newman and Brian Schunck. On March 30, 2011, the company was acquired by GoPro which in particular wanted to use the 3D film capabilities of the CineForm 444 Codec for its 3D HERO System.

A video coding format is a content representation format of digital video content, such as in a data file or bitstream. It typically uses a standardized video compression algorithm, most commonly based on discrete cosine transform (DCT) coding and motion compensation. A computer software or hardware component that compresses or decompresses a specific video coding format is a video codec.

JPEG XL is a royalty-free open standard for the compressed representation of raster graphics images. It defines a graphics file format and the abstract device for coding JPEG XL bitstreams. It is developed by the Joint Photographic Experts Group (JPEG) and standardized by the International Electrotechnical Commission (IEC) and the International Organization for Standardization (ISO) as the international standard ISO/IEC 18181. As a superset of JPEG/JFIF encoding, it features a compression mode built on a traditional block-based transform coding core. Additionally, there is a "modular mode" for synthetic image content and lossless compression. Optional lossy quantization enables both lossless and lossy compression.

JPEG XS is an interoperable, visually lossless, low-latency and lightweight image and video coding system used in professional applications. Target applications of the standard include streaming high-quality content for professional video over IP in broadcast and other applications, virtual reality, drones, autonomous vehicles using cameras, gaming. Although there is not an official acronym definition, XS was chosen to highlight the extra small and extra speed characteristics of the codec.