Compression Artifacts: Understanding, Detecting and Mitigating Distortion in Digital Media

In the world of digital imaging and video, compression is essential. It allows vast streams of content to be stored, transmitted and streamed efficiently. But every method of compression introduces some distortions known as compression artifacts. These artefacts can range from barely noticeable to glaring, depending on the codec, the bitrate, the content and the viewing conditions. This guide unpacks what compression artifacts are, why they appear, where you are most likely to encounter them, and how to minimise their impact without sacrificing file size or workflow efficiency.
What are Compression Artifacts?
Compression artefacts—also called compression artifacts in American spelling—are distortions that arise when information is encoded to reduce file size. In lossy compression, some data is permanently discarded to achieve smaller files. The trade-off is that the decoded image or audio is not a perfect reproduction of the original, which can produce visible or audible irregularities. These artefacts are not errors in the sense of corrupted data; rather they are the side effects of the compression process, often introduced when the encoder discards or reorganises information deemed less perceptually important.
Different media exhibit different kinds of distortions. Still images and photographs (often JPEG or WebP) reveal some artefacts, while video (MPEG-4, H.264/AVC, HEVC, AV1) can show temporal and spatial distortions. Audio compression (MP3, AAC) introduces its own set of compromises, such as artefacts during high‑motion scenes or at low bitrates. In practice, you’ll encounter a mix of compression artefacts across multimedia content, depending on how the file was created and how it is consumed.
Common Types of Compression Artifacts
Blocking and Grid Artifacts
Blocking is one of the most recognisable compression artefacts, particularly in JPEG imagery. JPEG uses 8×8 blocks for its transform coding; when the quantisation step is aggressive, these blocks become visible as a grid. The effect can resemble tiny squares across smooth areas and is often more pronounced in low‑contrast regions or at the edges of high‑frequency detail.
Blurring and Smearing
Blurring occurs when high‑frequency detail is quantised too coarsely. Fine textures—grass, hair, fabric weave—lose sharpness and appear smeared or waxy. This is common in lower‑quality JPEGs or when a video codec reduces detail to maintain a playable bitrate.
Ringing, Haloing and Edge Artifacts
Ringing artefacts resemble faint outlines or halos around strong edges. They arise from the way transform coding and deblocking filters approximate sharp transitions. In photos and video, you may notice bright or dark fringes along object boundaries, particularly around high‑contrast edges such as metal, text or glass.
Colour Banding and Posterisation
Colour banding occurs when the continuous range of tones is reduced to a limited set of levels. It is especially noticeable in skies, gradients and subtle shading, where smooth variation should occur. Posterisation is a related phenomenon where limited bit depth and aggressive quantisation yield distinct colour steps instead of a seamless blend.
Mosquito Noise and Temporal Instability
Mosquito noise describes speckled specks that appear around high‑contrast edges in video, especially under temporal compression. Temporally, video can exhibit fluttering or shimmering across frames when motion is present and the encoder sacrifices temporal coherence to save bits.
Quantisation Noise
Quantisation noise is the inherent error introduced when continuous signal values are mapped to a finite set of discrete levels. It’s particularly evident in flat regions of an image where small tonal differences are amplified by the quantisation process, producing a duller appearance or subtle grain.
Texture Loss and Detail Smoothing
Fine textures can disappear under heavy compression, leaving surfaces looking flatter than in the original. This artefact is common in high‑compression photographs and animated content where texture fidelity is critical to realism.
Temporal Blocking in Video
In video streams, differences between frames can create a stuttering or pulsing effect when inter‑frame compression is not well matched to motion in the scene. Temporal blocking can manifest as visible blocks or differences from frame to frame, notably in fast‑moving or complex scenes.
Why Do Compression Artefacts Occur?
Compression artefacts occur due to a combination of factors related to how lossy codecs operate. The core ideas are: reducing data by transforming the signal, quantising the result, and discarding information deemed less important to perceptual quality. The bottlenecks typically arise from the following decisions:
- Bitrate and Quantisation: Lower bitrates force coarser quantisation, increasing the likelihood of blocking, blurring, and banding as more data is discarded.
- Transform Coding and Subsampling: Techniques such as discrete cosine transform (DCT) in JPEG and video codecs, and chroma subsampling (for example 4:2:0) reduce colour resolution to save space. This can lead to colour artefacts and reduced edge fidelity.
- Intra- and Inter-frame Encoding: Intra-frame compression treats each frame independently, while inter-frame compression relies on temporal differences. Poor motion estimation or aggressive prediction can yield temporal artefacts and blockiness between frames.
- Entropy Coding and Header Information: The way data is packed and the choice of quantisation tables influence artefact visibility, especially at difficult textures or subtle gradients.
- Content Characteristics: Highly textured scenes, fast motion, or smooth colour gradients can stress a codec differently, revealing particular artefact patterns more than others.
Where You See Compression Artifacts: A Content‑Specific View
Different media formats manifest artefacts in distinct ways. Understanding the typical behaviour of JPEG, MPEG, H.264/AVC, HEVC/H.265 and AV1 helps content creators and technicians preemptively mitigate problems.
JPEG and Photo Compression
In still images, artefacts are often visible as blocking and jagged edges around high‑contrast transitions. Colour banding may appear in skies or subtle gradients, and texture may appear less dense after aggressive compression. Tuning the quality setting, using progressive encoding options, and selecting an optimal quantisation table can help reduce these artefacts while preserving essential detail.
MPEG‑4, H.264/AVC and HEVC/H.265 Video
Video codecs rely on motion compensation and transform coding. Blocking is common in low‑bitrate clips, while ringing and mosquito noise may appear around sharp edges or bright highlights. Chroma subsampling (4:2:0 is standard in many profiles) can produce colour artefacts in gradient areas, particularly in skin tones or skies. Modern codecs offer advanced filters and perceptual tools to mitigate these issues, but the balance between bitrate and quality remains content‑dependent.
AV1 and Next‑Generation Codecs
AV1, a newer video codec, aims to deliver higher quality at comparable bitrates. While it reduces some artefacts common in older codecs, its complexity can introduce artefacts under constrained encoding settings or hardware limitations. When working with AV1, it’s prudent to test across diverse scenes to understand how artefacts manifest and adjust CRF or bitrate targets accordingly.
Measuring and Evaluating Compression Artifacts
Assessing compression artefacts requires both subjective viewing and objective metrics. No single metric perfectly captures perceived quality across all content, but several commonly used tools and approaches help professionals compare encoders, presets and bitrates.
- PSNR (Peak Signal-to-Noise Ratio): A mathematical measure of similarity between original and compressed content. While easy to compute, it often correlates poorly with perceived visual quality for complex scenes.
- SSIM (Structural Similarity Index): A perceptual metric that focuses on structural information, luminance and contrast. It tends to align better with human visual assessment than PSNR.
- VMAF (Video Multimethod Assessment Fusion): A more sophisticated perceptual metric developed by Netflix, combining multiple features to estimate perceived quality. Widely used in streaming quality assurance.
- Subjective Evaluation: Pairwise comparisons, double‑stimulus tests and real‑world viewing conditions remain the gold standard for quality assessment, especially for critical content.
When evaluating compression artefacts, it’s best to combine objective metrics with viewer feedback from representative devices and screens. Different displays can mask or exaggerate artefacts, so testing across a range of scenarios is valuable.
Practical Techniques to Minimise Compression Artefacts
Whether you’re encoding photographs for the web, producing a broadcast video, or delivering streaming media, a thoughtful approach to encoding settings can markedly reduce compression artefacts. The following strategies are commonly used by professionals to preserve quality while maintaining manageable file sizes.
1. Optimise Bitrate and Encoding Settings
Effective management of bitrate is fundamental. If artefacts are visible, increasing the bitrate or enabling advanced rate control can help. For video, consider CRF (constant rate factor) settings that match content complexity; lower CRF values yield higher quality. For JPEG, choosing a higher quality slider or more robust quantisation tables can reduce blocking.
2. Choose the Right Codec and Profile
Newer codecs and profiles often deliver better efficiency with fewer artefacts at a given quality. If you must work with lossy compression, favour modern codecs like HEVC or AV1 over older standards, and select professional profiles designed for perceptual quality. In professional workflows, enabling high‑bitrate presets and tuning for film or photography content can make a noticeable difference.
3. Colour Management and Subsampling
Chroma subsampling reduces colour resolution to save bits. In many scenarios, 4:2:0 is sufficient; however, for content with large flat colour areas or fine skin tones, 4:2:2 or 4:4:4 can dramatically reduce chroma artefacts. If your pipeline allows, consider using higher chroma fidelity, especially for archival or high‑end presentation material.
4. Bit Depth and High‑Dynamic Range
Increasing bit depth (10‑bit or 12‑bit) helps retain smooth gradients and reduces colour banding. HDR content, with its broader tonal range, can also mitigate banding if encoded and displayed correctly. When feasible, preserve higher bit depth throughout the pipeline to minimise artefacts later in post‑production.
5. Pre‑Processing and Post‑Processing
Pre‑processing with moderate denoising can reduce the burden on the encoder by smoothing noisy areas that would otherwise require additional bits. Conversely, over‑denoising can create unnatural flatness and artefacts. Post‑processing with mild sharpening sparingly applied after decoding can recover some perceived sharpness without reintroducing artefacts.
6. Deblocking and Sample‑Adaptive Filters
Many codecs incorporate deblocking filters to reduce visible blocks. In some cases, turning off aggressive deblocking can increase artefact visibility; in others, a slightly stronger filter reduces it. Understanding the content and testing are essential to find the right balance for each project.
7. Encoder Tuning for Content Type
Different content types—nature landscapes, cityscapes, sports, animation—respond differently to encoding decisions. Some encoders offer content‑aware presets or tuning options (e.g., “film”, “animation”, “grain”). Selecting the right tuning can help preserve critical detail while minimising artefacts.
8. Scalable and Two‑Pass Encoding
Two‑pass encoding analyses the content first to allocate bits intelligently, often resulting in more consistent quality and fewer artefacts across complex scenes. Scalable bitstreams allow adaptive quality depending on connection and device capabilities, reducing artefact visibility for lower bandwidth viewers.
9. Dithering and Quantisation Management
In some cases, adding a touch of dithering can help smooth transitions in gradients, reducing posterisation. Although not a universal remedy, dithering can improve perceived quality in particular scenarios where colour depth is clearly limited by the format.
10. Archive and Delivery Considerations
For archival purposes, lossless or visually lossless compression is ideal to avoid artefacts altogether. For consumer delivery, aim for a pragmatic balance: preserve essential detail, keep artefacts away from faces and text, and ensure motion remains natural. When necessary, re‑encode problematic segments with adjusted settings rather than altering the entire file.
Practical Scenarios: What to Do in Real‑World Projects
Scenario A: Web Publication of Photographs
A photographer exports JPEGs for a portfolio website. If visitors frequently report blocky textures or posterised skies, try increasing the JPEG quality from 75 to 85, enable progressive rendering, and experiment with a more neutral quantisation table. Consider saving a lossless TIFF or a WebP variant for critical images to preserve detail and reduce artefacts during dynamic web display.
Scenario B: Short Form Video for Streaming
For a streaming short with fast motion, artefacts may appear in the corners of moving subjects or highlighted areas. Use a modern codec like AV1 or HEVC with a moderate CRF value, enable reference frame improvements, and test with 4:2:0 and, if allowed, 4:2:2 colour depth. Review frames with quick eye tests to confirm the artefact reduction is perceptible without inflating file size.
Scenario C: Broadcast‑Quality Content
Broadcast workflows often demand consistent quality across scenes. A two‑pass or CRF‑optimised approach coupled with a higher bitrate ceiling (within the broadcast spec) can mitigate artefacts, particularly in scenes with dense textures or fast action. If hardware constraints cause bandwidth penalties, consider scene‑adaptive encoding to allocate bits more efficiently to complex frames.
The Future of Compression Artefact Reduction
As codecs evolve and artificial intelligence becomes more integrated into encoding and restoration, the landscape for artefact reduction is changing. AI‑assisted de artefacting and super‑resolution approaches can restore detail lost to compression, often with careful post‑processing to avoid creating new distortions. The takeaway is not to rely on post‑processing alone but to adopt a pipeline that minimises artefacts at the source while keeping options open for refinement in the finishing stages.
Best Practices Checklist for Reducing Compression Artifacts
- Assess content complexity and choose a codec and settings that balance quality and size for that content type.
- Prefer higher bitrates or quality targets for areas with subtle gradients or fine texture.
- Consider higher chroma fidelity where colour accuracy and gradient transitions are critical.
- Apply gentle pre‑processing to reduce noise before encoding, but avoid overly aggressive smoothing that creates a flat appearance.
- Test across representative devices and displays to understand artefact visibility in real viewing scenarios.
- Combine objective metrics (SSIM, VMAF) with subjective viewer feedback for a holistic quality assessment.
- Document encoding settings for reproducibility and future quality assurance.
Glossary of Key Terms
To help navigate the jargon you may encounter when dealing with compression artefacts:
- Artefacts (British spelling) or artifacts (US spelling): distortions introduced by compression.
- Blocking: visible square blocks caused by block‑based transforms.
- Chroma Subsampling: reducing colour resolution relative to luminance (e.g., 4:2:0).
- Deblocking Filter: a filter used to smooth block edges after encoding.
- Quantisation: reducing the precision of transform coefficients to save bits.
- PSNR, SSIM, VMAF: objective metrics for assessing perceptual quality.
- CRF: Constant Rate Factor, a method of controlling quality in certain encoders.
- Intra‑frame/Inter‑frame: encoding methods for individual frames versus predictive frames.
Conclusion: A Balanced Approach to Compression Artifacts
Compression artefacts are an inherent trade‑off in the pursuit of smaller files and quicker delivery. With a grounded understanding of how artefacts arise and where they tend to appear, you can tailor your encoding workflow to maximise perceptual quality while still achieving efficient file sizes. The best practice is proactive: choose appropriate codecs and settings for the content, perform careful pre‑ and post‑processing, test across typical viewing scenarios, and stay informed about advances in codecs and restoration technologies. By embracing both the art and science of compression, you can produce media that looks, feels and performs optimally—even in the face of inevitable compression artefacts.