Avisynth Bicubic Resize Parameters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • george11
    Junior Member
    Junior Member
    • Nov 2003
    • 12

    Avisynth Bicubic Resize Parameters

    Are b and c parameters in bicubic resize positive or negative? For example b=0 and
    c= (+-) 0.5.
    I noticed in VirtualDub it has parameters -0.6, -0.75 and -1 for bicubic resize.
    Must I use in avisynth positive or negative values?
    Example: BicubicResize(x,y,0,0.5) or BicubicResize(x,y,0,-0.5) ?
    What is the right thing to do?
  • Enchanter
    Old member
    • Feb 2002
    • 5417

    #2
    Taken from Avisynth documentation:

    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.

    With b = 0 and c = 0.75 the filter is exactly the same as VirtualDub's "precise bicubic," and the results are identical except for the VirtualDub scaling problem mentioned above. The default is b = 1/3 and c = 1/3, which were the values recommended by Mitchell and Netravali as yielding the most visually pleasing results in subjective tests of human beings. Larger values of b and c can produce interesting op-art effects--for example, try b = 0 and c = -5.

    If you are magnifying your video, you will get much better-looking results with BicubicResize than with BilinearResize. However, if you are shrinking it, you are probably just as well off, or even better off, with BilinearResize. Although VirtualDub's bicubic filter does produce better-looking images than its bilinear filter, this is mainly because the bicubic filter sharpens the image, not because it samples it better. Sharp images are nice to look at--until you try to compress them, at which point they turn nasty on you very quickly. The BicubicResize default doesn't sharpen nearly as much as VirtualDub's bicubic, but it still sharpens more than the bilinear. If you plan to encode your video at a low bitrate, I wouldn't be at all surprised if BilinearResize yields better quality.

    You have to set
    b + 2 * c = 1
    for the numerically most accurate filter.
    This gives for b = 0 the maximum value for c = 0.5, which is the Catmull-Rom spline and a goog suggestion for sharpness.

    From c>0.6 the filter starts to "ring". You won't get real sharpness, what you'll get is crispening like on a TV set.
    No negative values are allowed for b. Then stay on b=0.



    Seriously though, what are you trying to achieve by this? have you tried the even better Lanczos resizer filter?

    Regards.
    Last edited by Enchanter; 9 Dec 2003, 11:41 PM.

    Comment

    • george11
      Junior Member
      Junior Member
      • Nov 2003
      • 12

      #3
      Thanks for answering Enchanter!

      You Wrote:

      "Seriously though, what are you trying to achieve by this? Have you tried the even better Lanczos resizer filter? "

      Achieve?
      Nothing really!
      I was just curious(curiosity kill the cat) because of this:

      VirtualDub documentation:
      "Three different modes are given, A=-1.0, A=-.75, and A=-0.6 (notice the negative values). These vary the "stiffness" of the cubic spline and control the peaking of the filter, which perceptually alters the sharpness of the output. A=-0.6 gives the most consistent results mathematically."

      and...

      Avisynth documentation
      "With b = 0 and c = 0.75 the filter is exactly the same as VirtualDub's "precise bicubic" and the results are identical (positive value). You have to set b + 2 * c = 1 for the numerically most accurate filter. This gives for b = 0 the maximum value for c = 0.5."


      So if I use BicubicResize(x,y,0,0.75) this would be the same as in VirtualDub with A=-.75
      But one value is positive and other is negative.

      So I made some tests:

      BicubicResize(x,y,0,0.75) - very sharp output like Lanczos
      BicubicResize(x,y,0,-0.75) - very soft output like Bilinear

      conclusion:
      Higher c sharper output, lower c (even below zero) softer output.
      Am i wrong?

      Comment

      • Enchanter
        Old member
        • Feb 2002
        • 5417

        #4
        "Higher c sharper output, lower c (even below zero) softer output.
        Am i wrong?"


        It's been some time since I last tested this out (so much headache over this simple musing), and I do not quite remember the details. However, I would say that you are correct on this. The c parameter effectively acts like a sharpening parameter.

        Regards.

        Comment

        Working...