VideoHelp Forum




+ Reply to Thread
Results 1 to 22 of 22
  1. Avidemux: Is there an alternate filter to swscale / swsresize ?

    Since I began using Avidemux 2.6.x I am tempted to change tool because of the poor quality of the (unique) resize filter "swsresize".

    I have to resize the typical anamorphic 720x576 to a non-anamorphic 720x404 (plus cropping to 720x304 if needed) but, despite it is a reduction and not an enlargement, I always get an unbearable smoothing of the images. I usually use the Lanczos method. I tryed both bicubic and bilinear but the images are even more smoothed.

    Here is an example:

    Click image for larger version

Name:	sws-resize.test03.option6.jpg
Views:	1420
Size:	77.3 KB
ID:	33023
    A frame resized using Irfanview

    Click image for larger version

Name:	sws-resize.test03.option3.jpg
Views:	1384
Size:	62.4 KB
ID:	33024
    The same frame resized using Avidemux with swsresize filter

    The question is: is there a (quite easy) way to have an alternate filter that can reduce an image without smoothing it?

    Thanks

    P.S.
    Please, don't answer "I don't use avidemux"...
    Last edited by Marco Bux; 7th Aug 2015 at 02:57.
    Quote Quote  
  2. Upsample by 2 or 3 or 4 (point resampling is OK), apply sharpen (up to you), resize down to desired size - perceived sharpness will be better.
    Cost is reduced speed.
    This is workaround if you will not find anything better.
    Quote Quote  
  3. I already tried such a thing. The image looks a bit better but sharp filters add brightness and contrast, even if configured at low levels of strength and threshold. So I decided to discard this solution.
    Quote Quote  
  4. Originally Posted by Marco Bux View Post
    I already tried such a thing. The image looks a bit better but sharp filters add brightness and contrast, even if configured at low levels of strength and threshold. So I decided to discard this solution.
    Seem exactly the same for sample you provided... workaround is nothing else than convolution of sharpen (high pass filter) and bilinear (lowpass filter) to provide same result as lanczos and/or similar resizers.
    Quote Quote  
  5. Originally Posted by pandy View Post
    This is workaround if you will not find anything better.
    Actually I'm avoiding resizing and I'm encoding in the original anamorphic PAL format 720x576, forcing the aspect ratio to 16:9. But I don't like this solution for a lot of reasons, among which:
    • For compatibility reasons I use nothing but 16:9 aspect ratio, so I have to avoid cropping even when needed. In most cases the result is the usual disgusting anamorphic letterbox.
    • Despite this, there are still some compatibility problems with some devices or players.
    • At constant CRF I get an increase of the bitrate around 40% (of which only 1-2% is due to Letterbox).
    Last edited by Marco Bux; 7th Aug 2015 at 08:42.
    Quote Quote  
  6. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by Marco Bux View Post
    For compatibility reasons I use nothing but 16:9 aspect ratio, so I have to avoid cropping even when needed. In most cases the result is the usual disgusting anamorphic letterbox.
    An anamorphic letterbox? Never saw one of those.

    Your video appears to be 2.4:1 image ratio (wide Panavision). You can't completely fill a 16:9 frame with an image that's wider than the frame, without distorting the image in some way. The alternative to distorting the image is to live with letterboxing for super-wide film. Or buy a 2.4:1 TV. It will work for 2.4:1 videos. Only problem is, all the smaller and more narrow videos will have side pillars, some small, some bigger.
    - My sister Ann's brother
    Quote Quote  
  7. Originally Posted by LMotlow View Post
    Your video appears to be 2.4:1 image ratio (wide Panavision). You can't completely fill a 16:9 frame with an image that's wider than the frame, without distorting the image in some way.


    The video above is only a sample to demonstrate the smoothing introduced by the swsresize filter. I mentioned the anamorphic and the letterbox only as a workaround to avoid resizing. I haven't opened this thread to talk about aspect ratios; the problem is the smoothing.
    Quote Quote  
  8. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Your sample images look like Panavision to me. I don't know what it's been through, but I see oversharpening artifacts.

    Use Spline36Resize or Spline64Resize. Lanczos is famous for ringing and oversharpening artifacts, I don't know how you get over-smoothing from that one. If you're of the mind that there are perfect resizers with no effects at all, you're expecting the impossible. Resizing still images and doing it with video are similar, but not quite the same. The Spline resizers are far better than older ones you mentioned. If you really want to get "video" about it, use Avisynth's dither plugin and resize with spline resizers in 16-bit mode to avoid banding, block noise, and other effects.
    - My sister Ann's brother
    Quote Quote  
  9. Originally Posted by Marco Bux View Post
    Here is an example:
    The first image is way over sharpened. It's full of over sharpening halos, has blown out brights, and will be full of buzzing edges when viewed in motion.
    Quote Quote  
  10. Originally Posted by LMotlow View Post
    Your sample images look like Panavision to me. I don't know what it's been through, but I see oversharpening artifacts. Use Spline36Resize or Spline64Resize. Lanczos is famous for ringing and oversharpening artifacts, I don't know how you get over-smoothing from that one. If you're of the mind that there are perfect resizers with no effects at all, you're expecting the impossible. Resizing still images and doing it with video are similar, but not quite the same. The Spline resizers are far better than older ones you mentioned. If you really want to get "video" about it, use Avisynth's dither plugin and resize with spline resizers in 16-bit mode to avoid banding, block noise, and other effects.
    I agree with you but unfortunately AviDemux 2.6.x offers only swsresize filter and you can choose only between Lanczos, bicubic and bilinear...
    Quote Quote  
  11. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Of course, if you're going to use automated or semi-auto GUIs for all your work, you have to live with what they can or can't accomplish. What you do seems to involve decoding and re-encoding anyway, so why not get into Avisynth or use an app like MEGUI or others that can accept Avisynth scripts and better methods for certain tasks? For years I used a popular push-button NLE for everything, but after learning more about video and the more I wanted to make my own decisions, I had to leave that one-stop app in the dust. If your software won't keep up with your needs, learn to use software that does. Video changes every 15 minutes nowadays anyway, so why not move ahead?.
    - My sister Ann's brother
    Quote Quote  
  12. I don't know what your expectations are - but they seem pretty unreasonable.

    Lanczos already causes ringing. What operations did you perform in irfanview ?

    Or maybe there is a problem with the way you are doing things in avidemux ? Or maybe there is a problem with that avidemux implementation ?
    Quote Quote  
  13. Originally Posted by jagabo View Post
    The first image is way over sharpened. It's full of over sharpening halos, has blown out brights, and will be full of buzzing edges when viewed in motion.
    The pictures above are ONLY for demonstration purposes. Don't waste your time to analyze them. They both are a compressed JPG of a frame. I posted them only to explain the problem "at a glance".
    Quote Quote  
  14. Originally Posted by poisondeathray View Post
    Lanczos already causes ringing.
    Yes, that's what I thought about Lanczos until I started using Avidemux 2.6.x With other tools I never had this problem while downsizing a picture or a video. To be mischievous, I start thinking that there could be something wrong/strange on the implementation of the resize algorithm in AviDemux, regardless the method chosen (Lanczos, Bilinear or Bicubic). Conversely of upsizing operations, I think that a downsize operation should never introduce smoothness.
    My expectation is only this.
    Quote Quote  
  15. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by Marco Bux View Post
    The pictures above are ONLY for demonstration purposes. Don't waste your time to analyze them.
    Then why not post a sample of what you're actually working with?

    I believe your basic questions were answered:
    Yes, there are alternative resizers but your choices are limited by the software you use.
    No, there are no resizing operations that don't affect image qualities in some way or other.

    To answer a question you didn't ask:
    You proposed to resize anamorphic video for 16:9 square pixel work to 720x404. Because most quality work is based on mod-8 at least and mod-16 at best, you should resize to 720x400 (a smidgeon more narrow than 1.77777778:1) or 720x408 (a smidgeon wider than 1.77777778:1, but either way you'll never see the difference at 16:9). Many encoders, resizers, filters, etc., have a rough time with mod-2 or mod-4 dimensions like 404. It might give you a better chance at decent results.

    Originally Posted by Marco Bux View Post
    Conversely of upsizing operations, I think that a downsize operation should never introduce smoothness.
    That's not possible, as downsizing interpolates multiple pixels into fewer pixels, so some detail is lost. Downsizing is often used to smooth aliasing and dot crawl, so your expectations are unreasonable. Effectively, downsizing vertically or horizontally acts like a low-pass filter that helps mask high-frequency artifacts.
    Last edited by LMotlow; 10th Aug 2015 at 11:28.
    - My sister Ann's brother
    Quote Quote  
  16. Originally Posted by Marco Bux View Post
    I think that a downsize operation should never introduce smoothness.
    Unless your source is blurry a downsize should introduce smoothness. Otherwise you will get buzzing edges and other noise.
    Quote Quote  
  17. Thanks to everybody for the contributions and suggestions. I found more than some post of people complaining about similar problems. Someone of them suggest to turn off Horizontal Deblocking and Vertical Deblocking, that in Avidemux are turned on by default. I'm doing some test right now. I'll update this thread as soon as I'll have some news.

    Click image for larger version

Name:	avidemux.03.png
Views:	900
Size:	15.6 KB
ID:	33139
    Quote Quote  
  18. Disabling deblocking won't help with your "blurry" downscales. You'll just end up with more blocky artifacts.
    Quote Quote  
  19. Unfortunately I obtained exactly the same results.
    I think these settings were already disabled...

    Name:  avidemux.04.png
Views: 4231
Size:  7.7 KB

    Quote Quote  
  20. You typically want to use deblocking with MPEG 2 and Divx/Xvid sources.
    Quote Quote  
  21. Time passed after the last message, but i cannot resist asking - did you sharpen in IrfanView? Because there is a checkbox there -- "Sharpen after resize" - which, if forgotten from previous tasks will remain checked until you uncheck it.
    Best wishes,
    UP
    Quote Quote  
  22. Hi,
    the "sharpen after resize" is NOT checked. In any case, after a lot of boring tests, I guess I unraveled the mystery. The smoothing I was perceiving was absolutely real but probably wasn't due to the resize filter but to the x264 "FILM" preset. If seems that, in some circumstances, this setting tends to smooth a little too much. Since I started using "GRAIN" instead of "FILM", it seems I fixed the excess of smoothing.

    Bye

    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!