The best deblock filter settings in VapourSynth depend on your source material, but for most heavily compressed 1080p or 720p content destined for AI upscaling to 4K, the strongest starting point is Deblock (the classic f3kdb-based plugin) with strength set between 20 and 30, combined with a light spatial smoothing pass such as vspipe-friendly debanding via f3kdb itself, or a modern alternative like DeblockPP7 or the DCT-based deblocking available through havsfunc's Deblock wrapper. If you are working with H.264 or HEVC sources that show visible 8x8 or 16x16 block artifacts in dark gradients, a strength value of 25 with a range of 4 usually removes the blocking without destroying fine texture. For lightly compressed Blu-ray sources, drop that to 10-15 or skip deblocking entirely, because over-deblocking is one of the most common and most damaging mistakes people make before feeding frames into an AI upscaler like Real-ESRGAN, RIFE-based frame interpolation pipelines, or commercial 4K upscaling tools.
Why Deblocking Matters Before AI Upscaling
Also worth reading: What Are the Best K Restoration Settings for Upscaling Videos to 4K? · What Is the Best Local 4K Upscaler for AI Video Upscaling? · How Does K AI Video Upscaling to 4K Work in 2026?
AI upscalers are trained on pairs of low-resolution and high-resolution images, and they infer detail by pattern recognition. When your input frames contain compression artifacts, the model does not know the difference between real texture and artifact. A blocky 8x8 DCT boundary in a dark sky can be interpreted as intentional detail, and the upscaler will faithfully enlarge and sharpen that block structure into your 4K output. Once that happens, no amount of post-filtering removes it cleanly, because the artifact is now baked into interpolated pixels at four times the resolution.
This is why the preprocessing stage matters more in AI upscaling workflows than in traditional encoding workflows. In a normal encode-decode cycle, a slightly imperfect deblock pass costs you a little detail. In an AI upscale, the same imperfection gets amplified and made permanent. The general rule among restoration-focused VapourSynth users is: clean the source as much as possible at native resolution, then upscale, then do any final sharpening or grain management at the target resolution. Deblocking sits at the very front of that chain.
There is also a bandwidth and processing argument. AI upscaling is computationally expensive, often taking several seconds per frame at 4K output on consumer GPUs. Running that expensive operation on frames full of artifacts wastes compute on garbage detail. A deblock pass costs milliseconds per frame on a modern CPU, so it is essentially free insurance for the quality of the final render.
The Main Deblock Filters Available in VapourSynth
VapourSynth has several deblocking options, and they differ meaningfully in algorithm and appropriate use case. The most commonly referenced is Deblock, which wraps the f3kdb (Flash3kyuu Deband) plugin's deblocking mode. It works on a strength and range model: strength controls how aggressively block boundaries are smoothed, and range controls the spatial radius of the smoothing operation. The second major option is DeblockPP7, a port of the PP7 post-processing filter from MPlayer, which uses a per-block quantization-based approach and tends to preserve edges better than naive smoothing. Third, there are DCT-domain filters like dctdf or the deblocking modes inside tools such as vs-deblock plugins maintained on the VapourSynth plugin repository, which operate on 8x8 blocks directly and are well suited to MPEG-2 and early H.264 sources.
For anime and animated content, many script writers combine deblocking with debanding, since both artifacts cluster in flat gradients. f3kdb handles both in a single pass, which is part of why it remains popular despite its age. For live-action film sources with heavy HEVC compression, DeblockPP7 with moderate settings often produces more natural results because it adapts to local block content rather than applying uniform smoothing.
| Feature | Deblock (f3kdb) | DeblockPP7 | DCT-based filters |
|---|---|---|---|
| Algorithm | Range-based spatial smoothing | Quantization-aware per-block processing | 8x8 DCT coefficient analysis |
| Best source type | Anime, gradients, H.264 | Live action, HEVC | MPEG-2, DVD, early H.264 |
| Typical strength range | 15-30 | 3-6 (qp mode) | 1-3 |
| Edge preservation | Moderate | Good | Variable |
| Speed | Fast | Moderate | Slower |
| Debanding included | Yes | No | No |
| Learning curve | Low | Moderate | Moderate |
For a 720p or 1080p H.264 web source (streaming rips, YouTube downloads at moderate bitrates), start with Deblock strength 25, range 4, and a planes parameter limited to chroma if the luma looks acceptable. Streaming services often crush chroma harder than luma, so chroma-only deblocking at strength 30 with luma at 15 is a common refinement. For HEVC sources from streaming platforms, which use larger CTU sizes and produce different artifact patterns, DeblockPP7 with a qp value around 4 to 5 tends to outperform f3kdb-based smoothing.
For DVD and MPEG-2 sources, blocking is usually accompanied by ringing and mosquito noise. Deblock strength 20 to 30 works, but you should follow it with a deringing pass, since deblocking alone leaves the mosquito noise around high-contrast edges intact. For Blu-ray sources at 20-35 Mbps, visible blocking is rare, and applying deblocking at all is usually a mistake; the slight softening it introduces will be interpreted by the AI upscaler as a lack of detail, producing a blurrier 4K result than if you had done nothing.
A practical threshold to remember: if you cannot see blocking at 100% zoom on a static frame in a dark scene, do not deblock. If you can see it, start at strength 15 and increase in steps of 5 until the blocking disappears, then back off by 5. This iterative approach takes five minutes and prevents the most common failure mode, which is cranking strength to 40+ and turning a slightly blocky source into a soft, waxy one.
Practical Workflow: Building the Script
A typical VapourSynth script for AI-upscale preprocessing looks like this in structure: import the source with ffms2 or L-SMASH, apply any field or frame-rate correction first, then deblock, then deband if needed, then optionally denoise lightly, and finally pass frames to the upscaler via vs-mlrt or an external tool. The ordering matters. Deblocking before denoising is standard because denoisers can mistake block boundaries for noise and smear them rather than remove them. Debanding after deblocking is standard because deblocking can expose banding in gradients that was previously masked by block noise.
A representative snippet using f3kdb's combined mode would set strength for both deblocking and debanding in one call, with grain parameter set to a low value like 1 or 2 if you want to re-introduce a trace of grain to prevent the AI upscaler from producing banding of its own in the output. That last point is worth emphasizing: AI upscalers sometimes generate their own banding in smooth gradients when fed perfectly clean input, so a tiny amount of synthetic grain at the preprocessing stage is a legitimate technique, not a compromise.
Test on three or four representative clips rather than one. Pick a dark scene, a high-motion scene, and a detailed static scene. Blocking shows up worst in dark low-motion content, so if your test clip is a bright action sequence you will under-filter, and if it is a dark static shot you will over-filter relative to the rest of the video. Preview with a crop of a 512x512 region at native resolution before and after, since full-frame viewing at fit-to-window zoom hides both blocking and over-smoothing.
Common Mistakes and How to Avoid Them
The single most common mistake is over-deblocking. Strength values above 35 on f3kdb-style filters visibly soften skin texture, fabric weave, and foliage, and the AI upscaler cannot recover that texture; it will hallucinate plausible-looking but wrong detail instead. The result is the so-called plastic or waxy look that gives AI upscaling a bad reputation. The second common mistake is deblocking sources that do not need it, particularly high-bitrate Blu-ray remuxes, where the filter costs detail and gains nothing.
The third mistake is ignoring chroma. Many users apply uniform deblocking across all planes when the actual blocking is concentrated in chroma channels due to 4:2:0 subsampling and aggressive chroma quantization in streaming encodes. Splitting your strength values by plane, for example luma 15 and chroma 30, frequently produces better results than a uniform 25. The fourth mistake is deblocking after upscaling. Running a deblock filter on 4K upscaled output is far less effective because the block boundaries have been spatially distorted by the interpolation process and no longer align to the 8x8 grid the filters expect. Always deblock at source resolution.
A fifth mistake is stacking multiple deblock filters. Running Deblock followed by DeblockPP7 followed by a denoiser with a spatial mode effectively triple-filters the image, and the cumulative softening is severe. Choose one deblocking approach, evaluate it honestly, and move on to the next stage of the pipeline.
Deblocking Versus Denoising: Knowing the Difference
Deblocking and denoising are frequently confused, and using the wrong tool produces poor results. Deblocking targets structured, periodic artifacts at fixed block boundaries introduced by DCT-based video compression. Denoising targets stochastic noise, whether sensor noise, film grain, or compression dither. A deblock filter applied to a noisy but unblocked source will do almost nothing useful, and a denoiser applied to a blocked source will smear the block boundaries into blurry patches rather than removing them cleanly.
That said, the two interact. Heavy compression produces both blocking and mosquito noise, and after a successful deblock pass you will often notice the remaining noise more clearly because the structured artifact that masked it is gone. This is why the standard pipeline order is deblock, then deband, then denoise, with each stage tuned independently. Some combined tools blur the line, and BM3D-based denoisers in particular can reduce mild blocking as a side effect, but relying on a denoiser to do a deblocker's job is unreliable.
A useful diagnostic: pause on a static frame and zoom to 400%. If you see regular square grid patterns aligned across the frame, that is blocking and needs a deblocker. If you see random speckle that changes frame to frame, that is noise and needs a denoiser. If you see stepped bands in gradients with no grid structure, that is banding and needs f3kdb or a similar debander. Diagnosing correctly before filtering saves hours of trial and error.
When to Deblock and When to Skip It
Deblock when your source is a low-bitrate stream rip, an old DVD, a heavily compressed H.264 or HEVC file below roughly 3 Mbps at 1080p, or any source where you can visibly identify block boundaries at zoom. Skip it when your source is a high-bitrate Blu-ray remux, a lossless or near-lossless master, or professionally mastered content above roughly 15 Mbps at 1080p. Between those extremes, test and decide per title rather than applying a blanket rule.
Timing matters as well as whether. Deblock immediately after source decoding and any inverse telecine or deinterlacing, and always before the AI upscale step. If your pipeline includes frame interpolation, deblock before interpolation as well, because interpolators will propagate block artifacts across newly generated frames. The full ordering for a restoration-grade pipeline is: decode, field correction, crop, deblock, deband, denoise, upscale, grain/grain management, encode.
Cost is not a factor in the filtering stage itself. VapourSynth, f3kdb, DeblockPP7, and the associated plugin ecosystem are all free and open source. The real cost consideration is your time: expect to spend 30 to 90 minutes tuning settings per source type the first time, after which your presets transfer to similar sources with minor adjustments. Compared to the GPU hours consumed by the 4K upscale itself, which can run from minutes to hours per film depending on your hardware, the deblocking stage is trivially cheap and disproportionately impactful on final quality.
Tuning for Specific AI Upscalers
Different upscaling models respond differently to preprocessed input. Real-ESRGAN and its video variants tend to sharpen aggressively, which means any residual block edges will be emphasized, so slightly stronger deblocking (strength 25-30) is justified. Models based on ESRGAN architectures trained on game or anime data are more tolerant of clean, smooth input and will hallucinate texture where none exists, so erring on the cleaner side is fine. Commercial tools with their own internal preprocessing, such as those that apply automatic artifact reduction before upscaling, may make your manual deblocking redundant or even counterproductive, since two deblocking passes stack the same way stacked filters do in VapourSynth.
If your upscaler accepts a tiling parameter, note that very aggressive deblocking followed by tiled upscaling can produce visible tile seams if the model's receptive field crosses tile boundaries inconsistently. Reducing deblock strength slightly and increasing tile size, where memory allows, mitigates this. As a general calibration, aim for a source that looks clean at 200% zoom but still shows natural texture at 400% zoom; that state gives AI upscalers the best raw material to work with.
Final Recommendations
For the majority of users upscaling compressed 1080p video to 4K, the definitive starting recipe is: Deblock with strength 20-25 and range 4 on luma, strength 25-30 on chroma, followed by f3kdb debanding with strength 16-24 and a grain setting of 1-2, then a light denoise only if the source warrants it. For HEVC streaming sources, substitute DeblockPP7 at qp 4-5. For high-bitrate sources, skip deblocking entirely. Validate every setting on dark, static scenes at 200-400% zoom before committing to a full render, and never deblock after upscaling. These settings will not make a bad source perfect, but they prevent the single largest quality loss in the AI upscaling pipeline, which is feeding artifacts to a model that will faithfully enlarge them.