AI Glossary / MLOps and deployment / Beginner

Compression artifact

Definition

A compression artifact is an unwanted change in reconstructed media caused by a compression process, especially lossy coding. In images and video, artifacts can include blocking, ringing, smearing, banding or unstable detail, depending on the codec and settings.

What it means

Lossy compression reduces data by representing some information approximately or discarding distinctions considered less important. The decoded result can therefore differ from the source. When those differences become visible or interfere with a task, they are described as artifacts. Their appearance depends on content, bitrate, quantization, prediction and other coding choices. Not every image defect is a compression artifact: blur from focus, sensor noise and display problems can exist before or after coding. Identifying the cause requires comparison with the relevant source and processing path.

How it works

A codec may predict content, transform residuals and quantize coefficients before entropy coding. Quantization and other lossy steps introduce differences; the decoder reconstructs from the retained information. Block-based processing can make boundaries noticeable, while limited high-frequency representation can produce ringing near sharp edges or loss of fine texture.
Video prediction and rate allocation can create time-varying effects, such as detail changing across frames. Color subsampling can affect fine colored edges. Different formats use different tools, so artifact names should not be treated as proof of a specific implementation fault. Repeated decoding and lossy re-encoding can introduce additional changes, particularly when parameters or alignments change.

Three practical examples

  • A small website image develops ringing around high-contrast text after aggressive lossy compression.
  • A video stream loses fine grass texture during complex motion at a constrained bitrate.
  • An image-analysis team finds that compressed inputs change the visibility of subtle inspection features.

Think of it this way

Think of making an abbreviated copy of a detailed drawing. The copy may preserve its overall message while simplifying lines or introducing rough transitions. The analogy explains a quality tradeoff, but actual codecs use precise numerical operations, and some formats are lossless and preserve the encoded sample values exactly.

Worked example

Consider a simplified transform coefficient of 23 quantized to the nearest multiple of 10. It is reconstructed as 20, introducing an error of −3 in that coefficient. Another coefficient of 4 becomes 0, removing its contribution entirely. When the inverse transform combines many such approximations, the pixel differences can form visible patterns rather than isolated random errors.
This example illustrates one mechanism, not a complete JPEG or video-coding calculation. The visual effect depends on the transform basis, surrounding coefficients and content. A small coefficient error can matter near a fine line, while larger aggregate errors may be less noticeable in some textured areas.

Illustrative case study

In a fictional online-training platform, a team compresses slides and live video with one delivery preset. The video appears acceptable, but small colored text on slides becomes difficult to read. The team evaluates a content-appropriate encoding path and checks the final delivered stream rather than only the uncompressed source. It measures readability alongside bandwidth. This case illustrates that acceptable quality depends on the information viewers need, not merely the codec name or nominal resolution.

Common misconceptions and mistakes

Compression artifacts are not always evidence of a broken decoder. They can be expected consequences of a bitrate - quality tradeoff. Increasing displayed resolution does not recover discarded detail. A larger file is not automatically better if it was created by re-encoding an already damaged source. Another mistake is blaming compression for every visible defect without inspecting the source, scaling and display stages. Lossless coding can preserve sample values while other steps in the workflow still alter the image.

Business use

For media or AI pipelines, compare decoded outputs with source material at intended viewing sizes and task conditions. Include text, gradients, fine texture and motion in evaluation. Choose settings based on perceptual quality and downstream performance, not file size alone. Avoid unnecessary lossy generations and retain high-quality sources for future exports. If compressed data train or feed a model, test representative artifact levels so deployment quality does not differ unexpectedly from development data.

People also ask

Can lossless compression cause these changes?

A correctly decoded lossless representation preserves the encoded samples. Other processing, such as color conversion or resizing, can still change the result.

Does a deblocking filter restore the original?

It can reduce a visible artifact, but cannot generally recover every discarded detail exactly.

Why do artifacts vary between scenes?

Content complexity, motion and the codec's bit allocation change how limited representation resources are used.

Check your understanding

A compressed image is enlarged and saved at a higher quality setting. Does that guarantee restoration of the details removed during the first compression?

Answer: No. The new file can preserve the current reconstruction more carefully, but it cannot uniquely recover information already discarded.

Related terms

  • Lossy compression
  • Quantization error
  • Blocking
  • Banding
  • Chroma subsampling
  • Generation loss
  • ringing
  • bitrate
  • deblocking
  • rate–distortion tradeoff

Learn next

Learn quantization and generation loss next. Encode a small set of images at several settings, compare the decoded outputs and identify which artifacts affect the intended viewing or analysis task most strongly.

  • Generation loss

More in MLOps and deployment

  • Compressed data structure - A compressed data structure stores information in a space-efficient representation while supporting useful operations without first expanding the entire...
  • Compressed pattern matching - Compressed pattern matching searches for a pattern in data represented in compressed form, using the compression structure or a suitable index to avoid...
  • Compressed suffix array - A compressed suffix array is a space-efficient representation supporting operations associated with a suffix array, such as searching a text for a pattern...
  • Compute - Compute is the processing capability or computational work used to run software.
  • Constant bitrate - Constant bitrate, or CBR, is a coding or delivery mode designed to maintain a specified bit consumption or output rate over the relevant interval and buffer...
  • Consumer group - A consumer group is a set of consumers that cooperate to read and process data from subscribed topics.

Sources

Adobe, JPEG format and compression overview: https://www.adobe.com/creativecloud/file-types/image/raster/jpeg-file.html ITU-T, H.265 video-coding specification resources: https://www.itu.int/rec/T-REC-H.265 Primary vendor and standards search excerpts consulted; full source and editorial review remain pending.

Previous: Compressed suffix array Next: Compressive sensing

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer