Mosquito noise

On this page 7

Mosquito noise is a compression artifact that appears as faint, shimmering specks or ringing around sharp edges and fine text in lossy compressed video. In video quality assessment, it belongs to the family of coding artifacts together with blocking and banding, and its name comes from the way the specks swarm and flicker over time around object outlines, like insects around a lamp.

The artifact originates in coarse quantization of high-frequency transform coefficients within each coded block. It is most visible in low-bitrate streams, in content with crisp graphics or titles over flat backgrounds, and on large, bright displays where the viewer is close to the screen.

How quantization creates mosquito noise

Block-based codecs such as MPEG-2, H.264/AVC, HEVC and AV1 transform each block of residual pixels into frequency coefficients, usually with a discrete cosine transform or a close relative. A sharp edge needs many high-frequency coefficients to be represented accurately. The encoder then quantizes these coefficients, dividing them by a step size and rounding the result.

At low bitrates the quantization step is large, so many high-frequency coefficients are rounded to zero or to a wrong value. Reconstructing the block from this incomplete spectrum produces oscillations near the edge, the same effect known in signal processing as the Gibbs phenomenon. Because the error is confined to the block that contains the edge, the noise forms a halo limited by block boundaries.

The temporal component comes from frame-to-frame variation. Each frame, or each reference refresh, quantizes the edge region slightly differently, so the ringing pattern changes position and intensity. The eye is highly sensitive to such temporal flicker in otherwise static areas, which makes mosquito noise more annoying than its spatial size would suggest.

Factors that make it worse

Mosquito noise depends on the interaction of content, encoder settings and viewing conditions. The table below lists the main factors and the direction of their effect.

Rate control plays a central role. In constant bitrate encoding, a complex scene with fast motion consumes most of the bit budget, so static graphics in the same frame receive coarse quantization and develop ringing. Constant quality or capped variable bitrate modes protect such regions better, because the quantizer is not forced upward simply to meet a short-term rate target.

FactorEffectReason
High quantization parameterStronger noiseMore high-frequency detail discarded
Sharp graphics and textStronger noiseEdges need many high-frequency coefficients
Flat surrounding areasMore visible noiseNo texture to mask the ringing
Larger transform sizesWider halosError spreads across a bigger block
Strong deblocking or deringing filtersWeaker noiseFilters smooth oscillations near edges
Large screen, short viewing distanceMore visible noiseArtifacts subtend a larger visual angle
Factors influencing mosquito noise

Modern codecs reduce the problem with in-loop filters. HEVC adds sample adaptive offset, which corrects systematic ringing around edges, and AV1 adds the constrained directional enhancement filter that smooths along edge directions. These tools reduce mosquito noise substantially but cannot remove it when the bitrate is far too low.

Mosquito noise compared with other artifacts

Mosquito noise is easy to confuse with other impairments, because several of them can appear in the same frame. Correct identification matters, since each one has a different cause and remedy.

ArtifactAppearanceMain cause
Mosquito noiseFlickering specks around edgesQuantized high-frequency coefficients
Blocking artifactsVisible square gridIndependent coding of adjacent blocks
BandingSteps in smooth gradientsInsufficient bit depth or quantized low frequencies
RingingStatic halos beside edgesSame spectral loss, without temporal change
Video noiseGrain across the whole imageSensor noise or film grain in the source
Mosquito noise and neighboring artifacts

The distinguishing marks are location and behavior over time: mosquito noise stays near edges and moves while the edge itself is still. Source noise covers the whole frame, and blocking follows the coding grid rather than object contours.

Measuring mosquito noise

Full-reference metrics register mosquito noise only indirectly. PSNR treats the error like any other pixel difference and underestimates how distracting it is. SSIM responds better because it compares local structure, and VMAF, which models perceived quality, generally penalizes edge degradation more appropriately.

None of these metrics weights temporal flicker strongly, so dedicated tests still rely on expert viewing of critical sequences, such as scrolling credits, scoreboard overlays and screen recordings with sharp user interface elements. Many quality teams keep a small set of such stress clips precisely to catch edge artifacts that average scores hide.

Reducing mosquito noise in practice

The most effective cure is enough bits for the content. When that is not possible, encoder tuning, preprocessing and playback filtering help. The decision table below summarizes common situations.

SituationRecommended actionReason
Graphics-heavy content at low bitrateRaise bitrate for that rung of the encoding ladderEdges need more coefficients
Screen recordingsUse screen content coding tools or a lossless region modeDesigned for sharp synthetic edges
Noisy source before encodingApply mild denoisingFrees bits for real edges
Legacy MPEG-2 playbackEnable deringing or post-processingCodec lacks in-loop deringing
Fixed bitrate capUse slower presets and adaptive quantizationBetter bit allocation per block
Choosing a remedy
  • Avoid excessive sharpening before encoding; it creates edges that are expensive to code.
  • Check that deblocking and loop filters are enabled, since some low-latency presets weaken them.
  • Be careful with aggressive post-filters on TVs, which can turn mild ringing into smeared detail.

In simple terms

When video is squeezed to a small file, the encoder throws away fine detail it thinks you will not miss. Sharp edges, such as white letters on a dark background, suffer most. The result is a fuzzy cloud of tiny dots that buzz around the letters.

Because the dots change from frame to frame, they seem to move like a swarm of mosquitoes around a light. Giving the video more data to work with usually makes the swarm disappear.

A practical example

A sports streaming service receives complaints that the score bug in the top corner looks dirty on large televisions. Engineers inspect the 1080p rung at 4.5 Mbps and see flickering specks around the white digits and logo outlines, while the moving players look acceptable. VMAF for the full frame stays above 90, which explains why automated checks never flagged the issue.

The team enables adaptive quantization to give more bits to high-contrast flat regions and switches to a slower encoder preset. It also removes a sharpening step applied to the graphics feed before encoding. After the change, the overlay is clean at the same bitrate, the overall score barely moves, and viewer complaints about the score display stop.