Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Thread Tools Search this Thread Display Modes
Old 19th June 2021, 07:41   #1  |  Link
orion44's Avatar
Join Date: Jul 2007
Location: The Background
Posts: 265
Can AviSynth's BicubicResize look the same as FFmpeg's Bicubic scaler?

I really like the look of FFmpeg's Bicubic scaler. It looks sharper than AviSynth's BicubicResize,
which looks a bit blurry with default values (BicubicResize(960,720,b=1./3.,c=1./3.)).

Does anyone know what values of b and c should I use so that it would look exactly the same as FFmpeg's bicubic scaler?

Is there a way to find out what exact values FFmpeg's bicubic scaler uses?
orion44 is offline   Reply With Quote
Old 19th June 2021, 11:35   #2  |  Link
Pig on the wing
Boulder's Avatar
Join Date: Mar 2002
Location: Finland
Posts: 5,416
You could test b=0, c=0.5 or 0.6, they are the most common ones I think. It's true that the default values cause a bit soft image.
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 19th June 2021, 13:33   #3  |  Link
HeartlessS Usurer
StainlessS's Avatar
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,228
From Wiki:- http://avisynth.nl/index.php/Resize


BicubicResize(clip clip, int target_width, int target_height [, float b, float c,
float src_left, float src_top, float src_width, float src_height ] )

BicubicResize is similar to BilinearResize, except that instead of a linear filtering function it uses the Mitchell-Netravali two-part cubic. The parameters b and c can be used to adjust the properties of the cubic; they are sometimes referred to as "blurring" and "ringing" respectively.

If you are enlarging your video, you will get sharper results with BicubicResize than with BilinearResize. However, if you are shrinking it, you may prefer BilinearResize as it performs some antialiasing.
parameters b and c

float b, c = 1/3

The default for both b and c is 1/3, which were recommended by Mitchell and Netravali for having the most visually pleasing results.

Set [b + 2c = 1] for the most numerically accurate filter. This gives, for b=0, the maximum value of 0.5 for c, which is the Catmull-Rom spline and a good suggestion for sharpness.

Larger values of b and c can produce interesting op-art effects – for example, try (b=0, c= -5.0).

As c exceeds 0.6, the filter starts to "ring" or overshoot. You won't get true sharpness – what you'll get is exaggerated edges. Negative values for b (although allowed) give undesirable results, so use b=0 for values of c > 0.5.

With (b=0, c=0.75) the filter is the same as VirtualDub's "Precise Bicubic".

BicubicResize may be the most visually pleasing of the Resize filters for downsizing to half-size or less.doom9
Try the default setting, (b=0, c=0.75) as above, or (b= -0.5, c=0.25). [EDIT: I think "default" here refers to VDub default "Precise Bicubic"]
Links missing from above quote.
Mitchell-Netravali-Filter:- https://de.wikipedia.org/wiki/Mitchell-Netravali-Filter
Spatial anti-aliasing:- https://en.wikipedia.org/wiki/Spatia...asing#Examples
Catmull–Rom spline:- https://en.wikipedia.org/wiki/Cubic_...0.93Rom_spline
Ringing artifacts:- https://en.wikipedia.org/wiki/Ringing_artifacts
VirtualDub's "Precise Bicubic":- http://www.virtualdub.org/blog2/entry_095.html
downsizing to half-size or less [suggest see this thread for downsize]:- https://forum.doom9.org/showthread.php?t=172871&page=2

A pretty image at bottom of this page:- https://superuser.com/questions/3757...ose-for-videos
or here:-

Bicubic (by default Catmull-Rom in ffmpeg) <<<<<<========== HERE ======
Here:- https://github.com/HandBrake/HandBrake/issues/1515
So [as Boulder suggests using] ffmpeg uses [presumably in above image as CATROM], b=0.0, c=0.5
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 19th June 2021 at 16:39.
StainlessS is offline   Reply With Quote
Old 20th June 2021, 06:35   #4  |  Link
Registered User
Join Date: Jun 2020
Posts: 215
By default, Avidemux uses the ffmpeg default for resizing.

It is stated as being b=0, c=0.6 so a little sharper than CATROM.
butterw2 is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 07:00.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.