AVS Forum banner

61 - 80 of 212 Posts

·
AVS Forum Special Member
Joined
·
11,139 Posts
^^^Expert dr1394's reply here , in a thread about DCI-color displays, might offer some related information. Noticed his home-page thread in the calibration forum just introduced a test pattern for extended color. -- John
 

·
Registered
Joined
·
1,005 Posts
OK, if I keep waiting until I get a chance to build graphs I'm never going to get to this, so let's see if we can continue where we left off, sans visual aids.

Quote:
Originally Posted by madshi /forum/post/16237134


If you were right shouldn't Bilinear scaling produce the best results (apart from not doing sharpening)?

No, because the whole point is that the quality of the scaling is determined by how natural-looking the interpolation is. There's no particular reason to think that a straight-line interpolation will look good, and in fact multiple theoretical reasons to think it wouldn't look very good. And in fact it doesn't look good. It's better than nearest neighbor, but still not that great. Sharpening is only part of it.

Quote:
You seem to think that using more than 2 pixels (more than Bilinear) only helps sharpness. I'm sorry to say, but I think you're wrong here. Using more than 2 pixels helps sharpness, but it also allows a smoother (less jaggied) interpolation of curves.

I absolutely grant you that in the specific samples you posted, some of the curves looked better using 4 lobe filters. But there's no specific theoretical reason to think that a 4-lobe would produce smoother curves across the board. They do in many of the cases in the specific image that you provided and in the lighthouse, but I'd want to see a lot more images before I'd make a blanket claim that 4-lobe in general produces smoother curves.


But even the ones that looked better, looked better because of a specific change in the filter curve at the edge - the specific curve interpolated in between a black pixel and a white pixel. Using energy gathered from 4 pixels away to decide what shape the interpolation curve should have makes no physical sense. It makes sense when you analyze interpolation in frequency space, but our eyes don't analyze edges in frequency space.


Moreover, if you decided you liked that interpolation curve better, there's no reason to go look at the pixels far away to get that curve. Just design a shorter filter kernel that produces that specific curve. Done.


The thing is, if we gather information from many taps, then we end up with energy migrating across the image in a completely non-physical way. No optical or imaging system causes the kinds of ripples that long sinc filters produce.


Here's a thought experiment. Imagine curved edge on a black field sitting on a white field. The interpolated curve is awesome-looking. I drop a black pixel 4 pixels away from the edge. Should the edge interpolation change? Of course not. In reality, I can stick a dot in the image, and that doesn't tell you anything about an edge 4 pixels away. What if the pixel is bright red? Should the edge interpolation incorporate some red? Or the complementary color? If I move the red pixel left or right, it changes whether the edge is slightly red or slightly cyan. Why? Does that make physical sense?


Say I'm interpolating in one dimension and I have as my original pixels this line (in a single channel):


1 1 1 1 0 0 0 0


The interpolation between the middle pixels (the 1 and 0) is going to be some curve. Depending on our algorithm, it'll be some shape which will look better or worse. If you believe the Lanczos4 is a good idea, then you're arguing that I should use a subtly different curve between that middle 1 and 0 if my original data is:


0 1 1 1 0 0 0 1


Or


0 0 1 1 0 0 1 1


That makes no sense, physical or otherwise. Changing a value four pixels away cannot possibly have any physical effect on the local image area. If the local interpolation gets better, it's a coincidental effect of Lanczos4 happening to have an interpolation curve that is "smoother looking," but there's no particular need to gather all the extra data in order to have that smoother looking curve.

Quote:
My "non-ringing" algorithm is based on allowing ringing in some areas of the image and not allowing it in others. So I think it could be tweaked a little to accommodate your likings, but I haven't tried that yet, because personally I can't stand any ringing, no matter how small it is. The only reason that my algorithm allows ringing in some parts of the image is that if I suppressed any and all ringing, the image would lose all its smooth curves for whatever reason.

I think your algorithm is a huge improvement, but I still think it's sub-optimal to use a ringing filter, then suppress the ringing. You can easily design a short filter that will produce the exact same curve on the edges you care about, but doesn't ring in the first place. Of course, maybe that's what you're doing, in which case: I approve.



But look at the specific curve generated between a black and white (or dark gray and light gray, etc.) by your favorite filter and ask yourself - how could I design a short filter that would produce exactly that curve on that same edge. And would that be the optimal curve across the board? The answers should be interesting.

Quote:
Please check out especially the up/downscale. If you look at the ringing Lanczos4 up/downscale, you should notice that it looks almost identical to the original, while the Catmull-Rom result looks a lot softer.

Going up then back down to the same size isn't actually the best way to test a filter. Lousy filters do seriously degrade the image when doing it, but as you note, doing upsampling to a simple integer ratio followed by downsampling to the original size makes it seem like long sinc filters are optimal, because they preserve more of the original image. Since the filter lobes during the downscale exactly line up with the ringing in the image, the ringing you get on the upscale gets largely erased on the downscale. That doesn't tell you whether the upscale looks good or not, and I think we all agree that many-lobe filters have issues (though maybe not so much with your improvements).


Anyway, this came out sounding negative and I didn't intend that. I love what you're doing, and I hope you take my arguments as encouragement to continue. Keep it up! Dig deeper! Prove me wrong!



Best,

Don
 

·
Registered
Joined
·
8,142 Posts

Quote:
Originally Posted by dmunsil /forum/post/16381517


I absolutely grant you that in the specific samples you posted, some of the curves looked better using 4 lobe filters. But there's no specific theoretical reason to think that a 4-lobe would produce smoother curves across the board. They do in many of the cases in the specific image that you provided and in the lighthouse, but I'd want to see a lot more images before I'd make a blanket claim that 4-lobe in general produces smoother curves.

Well, if you have some good image samples, I can scale and upload them for you. That way you wouldn't have to do the work yourself, you'd just have to provide the samples...

Quote:
Originally Posted by dmunsil /forum/post/16381517


Say I'm interpolating in one dimension and I have as my original pixels this line (in a single channel):


1 1 1 1 0 0 0 0


The interpolation between the middle pixels (the 1 and 0) is going to be some curve. Depending on our algorithm, it'll be some shape which will look better or worse. If you believe the Lanczos4 is a good idea, then you're arguing that I should use a subtly different curve between that middle 1 and 0 if my original data is:


0 1 1 1 0 0 0 1


Or


0 0 1 1 0 0 1 1


That makes no sense, physical or otherwise. Changing a value four pixels away cannot possibly have any physical effect on the local image area.

You are discussing this from a logical, non-scientific point of view. I like that. But here comes the problem: If you were consequent with what you wrote above shouldn't you strictly only use 1-tap filters? Why is the filter of your choice a 2-tap filter then? You say a value 4 pixels away can not have any physical effect. Then why would a value two pixels away be so important? And even stranger: From a logical, non-scientific point of view: Why does it make any sense to actually *substract* the values which are 2 pixels away? Which is what both Catmull-Rom and Lanczos are doing! I'm curious to hear your logical explanation about why negative lobes make sense. Can you explain that without mentioning the frequency space?


Quote:
Originally Posted by dmunsil /forum/post/16381517


Here's a thought experiment. Imagine curved edge on a black field sitting on a white field. The interpolated curve is awesome-looking. I drop a black pixel 4 pixels away from the edge. Should the edge interpolation change? Of course not. In reality, I can stick a dot in the image, and that doesn't tell you anything about an edge 4 pixels away. What if the pixel is bright red? Should the edge interpolation incorporate some red? Or the complementary color? If I move the red pixel left or right, it changes whether the edge is slightly red or slightly cyan. Why? Does that make physical sense?

What you describe above sounds more like computer graphics and less like real life image content to me. I'm coming from audio resampling. In that area there are test sounds like a simple pulse. If you use a typical audio resampling filter to resample such a pulse, the final resampled curve looks really bad (compared to the original). If you want to faithfully resample a pulse, you should use a different audio resampling filter, which however would produce awful results for real audio content. I think the same is true for video content: If you want to faithfully resample computer graphics, you should use a different resample filter than for real life images/photos.

Quote:
Originally Posted by dmunsil /forum/post/16381517


Going up then back down to the same size isn't actually the best way to test a filter. Lousy filters do seriously degrade the image when doing it, but as you note, doing upsampling to a simple integer ratio followed by downsampling to the original size makes it seem like long sinc filters are optimal, because they preserve more of the original image. Since the filter lobes during the downscale exactly line up with the ringing in the image, the ringing you get on the upscale gets largely erased on the downscale. That doesn't tell you whether the upscale looks good or not, and I think we all agree that many-lobe filters have issues

I tested various combinations of up/down filters. E.g. upscaling with Lanczos4, downscaling with Catmull-Rom and vice versa. Or Mitchell/Mitchell, or Catmull-Rom/Catmull-Rom. Etc... To my eyes, everytime I threw in Lanczos4, the final image was nearer to the original than when not using Lanczos. The simple reason was that using any other filter blurred the image quite noticeably (compared to the original).


I've also seen a test (can't seem to find the URL right now, unfortunately) where they rotated an image 360° in 1° steps. Using a sinc filter the final image was quite near to the original. Using Catmull-Rom was a blurry mess.

Quote:
Originally Posted by dmunsil /forum/post/16381517


Keep it up! Dig deeper! Prove me wrong!

I'll try...
Unfortunately I'm far from a science guy. So I feel that I don't have the knowledge to prove you wrong on a scientific level. I can only do tests and compare the results. So that's what I'll be doing.

Quote:
Originally Posted by dmunsil /forum/post/16381517


Moreover, if you decided you liked that interpolation curve better, there's no reason to go look at the pixels far away to get that curve. Just design a shorter filter kernel that produces that specific curve. Done.


[...]


I think your algorithm is a huge improvement, but I still think it's sub-optimal to use a ringing filter, then suppress the ringing. You can easily design a short filter that will produce the exact same curve on the edges you care about, but doesn't ring in the first place. Of course, maybe that's what you're doing, in which case: I approve.

Here is a new comparison (upscaled 425%) based on your suggestions to shorten the Lanczos4 filter to less taps. I've also thrown in Lanczos64, just for fun.


Please note that my resampling algorithm is probably overextended by Lanczos64 calculations cause I'm using simple integer math. So some of the artifacts might be caused by math not being exact enough.




When comparing Bilinear to Catmull-Rom, I notice the following changes:


(1) more taps

(2) less aliasing

(3) form of the fonts is better reconstructed

(4) sharper

(5) ringing is added


When I compare Catmull-Rom to Lanczos4 (4 taps), I notice *exactly* the same changes as listed above!! That tells me that going from 1 tap to 2 taps has a similar effect than going from 2 taps to 4 taps. Remember above, where I asked for the reason why you were using 2 taps instead of 1? I think whatever reason you can find me for that, the same reason will probably also apply for using 4 taps instead of 2 taps.


The "Lanczos4 (2 taps)" screenshot uses the normal Lanczos4 resampling coefficients - but shortened to 2 taps. Same with "Lanczos64 (2 taps)". To me the shortened images look less smooth compared to the full taps images. Furthermore ringing is actually worse with Lanczos4 (2 taps) compared to Lanczos4 (4 taps). To my eyes Lanczos4 (4 taps) looks clearly better than Lanczos4 (2 taps). Lanczos64 (64 taps) looks awful due to excessive artifacts, but I think that the fonts are formed most natural of all.


There are three areas which I find especially interesting in the screenshots:


(1) Look at the "t" in "meter". In the "Bilinear" image it almost looks like having two vertical lines. That is still the case (but less so) in the Catmull-Rom image. The Lanczos64 (64 taps) image gets it best: There it actually looks like a normal "t". The shortened filters do quite well here, too, though.


(2) Look at the first "a" in "No parking at". I like the "a" best in the Lanczos64 (64 taps) image compared to all other images. Unfortunately the extremely excessive ringing hurts image quality so much that it it's even worth talking about Lanczos64 at all.


(3) Look at the separation between the two letters "OU" in "OUT OF ORDER". In the Lanczos64 (64 taps) image we can see that the letters are nicely separated. In all other images they are more or less connected.


All screenshots above were made without using my anti-ringing tweaks.


Edit: Obviously 64taps is totally overkill and I think most probably the coefficients of the first few taps is what makes the fonts look nicer. So shorting e.g. 64bit coefficients would be an option. However, the shortened results look over sharpened to me compared to the unshortened filters. So shortening doesn't really look good to me, either.
 

·
Registered
Joined
·
559 Posts
This is a very interesting thread!



Maybe my knowledge about scaling algorithms is not advanced enough. But in my understanding (and to my eyes) the frequency response of the algorithm is a very important parameter. Real world images are always filtered to not harm Nyquist-Shannon's sampling theorem and to avoid aliasing. So in my eyes it is no problem to use a scaling algorithm like Lanczos 8 which has a very good frequency response and very low beats/aliasing, because the introduced ringing occurs on very high frequencies which a filtered DVD/Blu-ray barely contain. And the inherent ringing of the medium is usually much stronger.

There are still a few parts (like letters) where introduced ringing is visible, but on the other hand the more of detail and less of aliasing improves the picture a lot. Of course it is just a compromise and a matter of taste. I'm very sensitive to aliasing so I prefer Lanczos 8 over Lanczos 3 or Catmull-Rom.


Btw., I measured the frequency response of a few algorithms using a H-sweep from the AVIA disc scaled to 1920x1080 and a waveform monitor.




Bilinear: bad frequency response and much aliasing. No ringing.



Bicubic: better frequency response. Still beats and aliasing and very slight ringing.



Lanczos 10: very good frequency response, nearly no aliasing/beats. But very strong ringing on the step (left).



Again no real world DVD contains such a step, because it breaks Shannon's law. Computer graphics may be a different story (but also here Shannon's law is valid). I hope the visualizations of the frequency response can help a bit in this discussion.
 

·
AVS Forum Special Member
Joined
·
11,139 Posts
^^^Far less scaling algorithm knowhow here, but your mention of 'real-world' video and plots showing 1920-line test-pattern falloff reminded me of sspears' OP image regarding picture details, plus sspears' '03 archived AVS post :
Quote:
A spectrum analyzer was used to look at high frequency information. This was done on the Restaurant scene and on several motion pictures. This is how the 1300 vs. 800 was calculated.

AIUI, those measurements were from HD-D5 pro tapes (~250 Mbps?) and showed typical limits for optically filtered movies (cameras) as well as motion CGI. Hope it's not OT to inquire whether Blu-ray discs and masters, say using HDCAM-SRs, and even 4k downconversions, now exceed these maximum effective horizontal resolutions. -- John
 

·
Registered
Joined
·
4,936 Posts

Quote:
Originally Posted by FoLLgoTT /forum/post/16428164


This is a very interesting thread!


Maybe my knowledge about scaling algorithms is not advanced enough. But in my understanding (and to my eyes) the frequency response of the algorithm is a very important parameter. Real world images are always filtered to not harm Nyquist-Shannon's sampling theorem and to avoid aliasing. So in my eyes it is no problem to use a scaling algorithm like Lanczos 8 which has a very good frequency response and very low beats/aliasing, because the introduced ringing occurs on very high frequencies which a filtered DVD/Blu-ray barely contain. And the inherent ringing of the medium is usually much stronger.

Certainly not correct for all the wide screen top and bottom edges from black to bright material. Properly done there is no ringing there. Using a ringing filter there will be.
 

·
Registered
Joined
·
559 Posts

Quote:
Originally Posted by mhafner /forum/post/16429117


Certainly not correct for all the wide screen top and bottom edges from black to bright material. Properly done there is no ringing there. Using a ringing filter there will be.

I never thought about that, because usually there is inherent ringing on the border to the black bars. But you are right. In fact filling the picture of a cinemascope movie with black pixels to the full 480/576 ends in an image that breaks Shannon's law and leads to ringing when upscaled.
 

·
Registered
Joined
·
4,936 Posts

Quote:
Originally Posted by FoLLgoTT /forum/post/16429161


I never thought about that, because usually there is inherent ringing on the border to the black bars. But you are right. In fact filling the picture of a cinemascope movie with black pixels to the full 480/576 ends in an image that breaks Shannon's law and leads to ringing when upscaled.

Usually it would be downscaled a bit, from 2K to 1080p, or a lot from 4K to 1080p. I suspect the best results happen when the 2K is from 4K scanning and then simply a bit cropped to get 1080p. No resampling applied.
 

·
Registered
Joined
·
2,631 Posts

Quote:
Originally Posted by mhafner /forum/post/16432804


Usually it would be downscaled a bit, from 2K to 1080p, or a lot from 4K to 1080p. I suspect the best results happen when the 2K is from 4K scanning and then simply a bit cropped to get 1080p. No resampling applied.

And even when resampling, I always lay a Mod16 black matte over the scaled image to make sure that the matte precisely overlays block boundaries. That should eliminate ringing extending into the matte area at least.


One test of a scaling algorithm is that there shouldn't be any obvious "sweet spot" at 2x, 3x, etcetera.
 

·
Registered
Joined
·
8,142 Posts

Quote:
Originally Posted by benwaggoner /forum/post/16343208


Downsampling and upsampling are different beasts, of course. I like to arrange my affairs to that I'm never upsampling on either axis. Downsampling I've grown quite to like the Super Sampling implementation in Expression Encoder 2 SP1.

Do you know (and are you allowed to say) how that Super Sampling implementation works technically? Is it a completely different technique compared to e.g. Bicubic or Lanczos resampling?
 

·
Registered
Joined
·
3,314 Posts

Quote:
Originally Posted by mhafner /forum/post/16432804


Usually it would be downscaled a bit, from 2K to 1080p, or a lot from 4K to 1080p. I suspect the best results happen when the 2K is from 4K scanning and then simply a bit cropped to get 1080p. No resampling applied.

From some comparisons I've done it would appear that most 1080p transfers are simply cropped from 2048 to 1920 rather than resized. good news.



BAD NEWS



However there is still some sort of resize going on for reasons that are beyond me and frankly infuriating. I've ballparked it at about 0.03 rescale (seemingly not centred) in addition to the simple 1920 crop.


Its definitely not 1:1 pixel with the 2k scans but with seemingly no good reason for it not to be.


End result...what I'm seeing on BD isn't even close to the 2k in terms of sharpness. I'd estimate its closer to 1k. I'm comparing 2k with frame grabs from TMT which are unfortunately jpegs but even so its a shocking difference.


Always possible that the compression and jpeging is getting in the way but I find it impossible to believe its entirely to blame.


These are big budget films I'm talking about ..I can't post the comparisons and I won't divulge the titles of the films so please don't ask.


They are generally regarded as having excellent transfers though.
 

·
Banned
Joined
·
19,253 Posts

Quote:
Originally Posted by Mr.D /forum/post/16952641


From some comparisons I've done it would appear that most 1080p transfers are simply cropped from 2048 to 1920 rather than resized. good news.



BAD NEWS



However there is still some sort of resize going on for reasons that are beyond me and frankly infuriating. I've ballparked it at about 0.03 rescale (seemingly not centred) in addition to the simple 1920 crop.


Its definitely not 1:1 pixel with the 2k scans but with seemingly no good reason for it not to be.


End result...what I'm seeing on BD isn't even close to the 2k in terms of sharpness. I'd estimate its closer to 1k. I'm comparing 2k with frame grabs from TMT which are unfortunately jpegs but even so its a shocking difference.


Always possible that the compression and jpeging is getting in the way but I find it impossible to believe its entirely to blame.


These are big budget films I'm talking about ..I can't post the comparisons and I won't divulge the titles of the films so please don't ask.


They are generally regarded as having excellent transfers though.

Is the 2K scan done at 4:4:4?
 

·
Registered
Joined
·
3,314 Posts

Quote:
Originally Posted by Lee Stewart /forum/post/16953387


Is the 2K scan done at 4:4:4?

10bit log RGB.
 

·
Registered
Joined
·
2,818 Posts

Quote:
Originally Posted by Mr.D /forum/post/16952641


I'm comparing 2k with frame grabs from TMT which are unfortunately jpegs but even so its a shocking difference.

I've never been able to get TMT working on my own computer to see for sure, but many caps that I've seen from others seem inaccurate vs the DirectShow method.
 

·
Registered
Joined
·
1,071 Posts

Quote:
Originally Posted by mhafner /forum/post/16946561


Are there any Linux tools to convert 10 bit DPX RGB to optimally dithered 8 bit YUV 4:2:0?

No more than what's available for Windows.
 

·
Registered
Joined
·
3,314 Posts

Quote:
Originally Posted by ChuckZ /forum/post/16955872


That's why they (all major studios) should be doing 4K DI so they can supersample down.

2k scans are already downsampled from 4k these days. They need to crop 2048 to 1920 and not do any resampling.
 

·
Registered
Joined
·
5,233 Posts
Cropping 2048 to 1920 doesn't sound like a good idea. Wouldn't you lose a good portion of the image and screw up the aspect ratio?
 

·
Registered
Joined
·
4,936 Posts

Quote:
Originally Posted by Kram Sacul /forum/post/16957423


Cropping 2048 to 1920 doesn't sound like a good idea. Wouldn't you lose a good portion of the image and screw up the aspect ratio?

No. The ratio would not change. You lose a bit on top and bottom too. If that looks much sharper I can do without all the extra edge information which is practically never relevant (neither for content or esthetics).
 
61 - 80 of 212 Posts
Top