Lanczos vs Bicubic comparison - Page 4 - AVS Forum | Home Theater Discussions And Reviews
Forum Jump: 
Closed Thread
 
Thread Tools
post #91 of 111 Old 12-15-2004, 02:24 AM
AVS Forum Special Member
 
JohnAd's Avatar
 
Join Date: Jun 2000
Location: London
Posts: 1,687
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 16
Quote:
Originally posted by Mr.D
I do suspect that on todays machines you could comfortably do it in real time but many developers either don't bother as no-one else does or simply don't know about it.
I think you could probably just about delinearise and put things back again in real time in software but you wouldn't have any cycles left for anything else. The main issue would be the extra precision you would need in RGB linear space to be able to get back to where you started and at least obey "do no harm" to the video. More tricks may be possible using the graphics chips as floating point operations are faster but I think the killer would be the lookups required.

John

My Company - Upsilon Software
Free Projects - DScaler & hcfr fork
JohnAd is offline  
Sponsored Links
Advertisement
 
post #92 of 111 Old 12-15-2004, 08:16 AM
AVS Forum Special Member
 
Nima's Avatar
 
Join Date: May 2001
Location: Germany
Posts: 1,438
Mentioned: 9 Post(s)
Tagged: 0 Thread(s)
Quoted: 233 Post(s)
Liked: 136
Quote:
Originally posted by Wilbert
It has BicubicResize. BicubicResize(x, x, 0, 0.5) is the Catmull-Rom spline.

At least, according to the avisynth docs ...
How does this translate into ffdshow settings ? Parameter, Luma and Chroma ?

Cheers
Nima
Nima is offline  
post #93 of 111 Old 12-16-2004, 03:58 AM
Member
 
VictorD's Avatar
 
Join Date: Jan 2004
Posts: 32
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
dmunsil

"I adjust sharpness by combining a modified sharpening kernel with the basic scaling kernel."

Your info about scalling is VERY usefull, but can you provide some info about sharpening after resize ?
What is your recomendation from the "avisynth world" ?
Or maybe some info.
Thanx.
VictorD is offline  
Sponsored Links
Advertisement
 
post #94 of 111 Old 12-16-2004, 01:57 PM
Member
 
Wilbert's Avatar
 
Join Date: Oct 2004
Location: Netherlands
Posts: 21
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Nima,

I don't know how to do it by selecting the Resizer box (I don't think you can select the latter two parameters of BicubicResize). What you can do is the following:

You chould check the AviSynth box and add

BicubicResize(320,240,0,0.5)

in the text box (or whatever size you want).
Wilbert is offline  
post #95 of 111 Old 12-19-2004, 06:46 AM
Senior Member
 
AndyIEG's Avatar
 
Join Date: Oct 2003
Posts: 255
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
nice thread :)

atm im puzzling what i want do next, so lemme ask some question's.

Is the yuy2 to yv12 conversion done by ffdshow still a problem? Means is it importand to not do this conversion or is yv12 oki? If its a problem and we want to work on the yuy2 input many (better a small selection) of filters have to be changed to also work on yuy2 input direct.

For the resize algos... im still confused but i just looked at the Avisynth alpha 3.0 code wich has a clean and understandable implementation, the mplayer code is a mess if it comes to understanding.

Here is the code for calcing the coef's.

MitchellNetravali::MitchellNetravali(double b, double c)
{
p0 = ( 6. - 2. * b ) / 6.;
p2 = ( -18. + 12. * b + 6. * c ) / 6.;
p3 = ( 12. - 9. * b - 6. * c ) / 6.;
q0 = ( 8. * b + 24. * c ) / 6.;
q1 = ( - 12. * b - 48. * c ) / 6.;
q2 = ( 6. * b + 30. * c ) / 6.;
q3 = ( - b - 6. * c ) / 6.;

}

double MitchellNetravali::operator ()(double x) const
{
x = fabs(x);

return (x < 1.0) ? (p0 + x * x * (p2 + x * p3))
: (x < 2.0) ? (q0 + x * (q1 + x * (q2 + x * q3)))
: 0.0;
}


double Lanczos3::operator ()(double x) const
{
x = fabs(x);

static double const pi = 3.14159265358979323846;
static double const pi3 = pi / 3;

return (x < 3.0) ? boost::math::sinc_pi(pi * x) * boost::math::sinc_pi(pi3 * x)
: 0.0;
}


So for lanczos2-10 its pretty clear, i just have to change the parameter for the sinc window.

If i understand the Catmull-Rom-Spline right its a normal Bicubic algo with b=0 and c=0.5?
While b=1/3 and c=1/3, are the org. Mitchell/Netravali values?

So u want lanczos2 to at least lanczos4 (maybe up to 10) and those 2 other settings for resize? If i also understand it right u want nearly 100% correct algo's since CPU time isnt a problem anymore?

Im still looking for other examples else than avisynth and mplayer for implementation of resize algos. Avisynth is the best to understand atm, but its pretty straight coded wich means not as tricky as the mplayer implementation. Is there any other project wich use resize algos and has opensource?

PS: are xvid rips encoded in yv12 or yuy2 or ..? How about DVD?
AndyIEG is offline  
post #96 of 111 Old 12-19-2004, 07:41 AM
AVS Forum Special Member
 
Li On's Avatar
 
Join Date: Apr 1999
Posts: 4,022
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 6 Post(s)
Liked: 11
I think YV12 is fine. It's the fastest and 2 most popular decoders DScaler5 and NVDVD 4.0 (with NVPP) support YV12 out.

regards,

Li On
Li On is offline  
post #97 of 111 Old 12-19-2004, 07:54 AM
AVS Forum Special Member
 
karos's Avatar
 
Join Date: Jul 2000
Posts: 1,000
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 10 Post(s)
Liked: 12
andy

your ffdshow (in your sig) is earlier than the 10-12 release. is it more stable?
karos is offline  
post #98 of 111 Old 12-19-2004, 07:59 AM
Senior Member
 
AndyIEG's Avatar
 
Join Date: Oct 2003
Posts: 255
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally posted by karos
andy

your ffdshow (in your sig) is earlier than the 10-12 release. is it more stable?
"more stable" ? im not aware that the actual versions are realy "unstable" but to answer your question, nope its not more stable.
AndyIEG is offline  
post #99 of 111 Old 12-19-2004, 01:12 PM
Member
 
.....'s Avatar
 
Join Date: May 2004
Location: Oslo, Norway
Posts: 198
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally posted by AndyIEG
PS: are xvid rips encoded in yv12 or yuy2 or ..? How about DVD?
AFAIK, both DVD, XviD and all other mpeg1, 2 and 4 use YV12.
..... is offline  
post #100 of 111 Old 12-20-2004, 03:49 AM
Advanced Member
 
vairulez's Avatar
 
Join Date: Dec 2002
Posts: 674
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
dvd uses both yuy2 or yv12 depending of the decoder

sorry for my poor english but I'm french !!!!
vairulez is offline  
post #101 of 111 Old 12-20-2004, 05:01 AM
AVS Forum Special Member
 
trbarry's Avatar
 
Join Date: Jan 2000
Location: Gainesville FL USA
Posts: 9,884
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
DVD and HDTV use MPEG-2. While MPEG-2 has a 4:2:2 studio profile I believe that all commercial material you are likely to see on either DVD or HDTV will be encoded in 4:2:0. However depending upon your decoder, graphics card, drivers, or Direct-X level it may be converted to 4:2:2 on output prior to display.

- Tom

Why don't we power our electric cars from greener, cheaper Liquid Fluoride Thorium Reactors?

Tom Barry - Find my video filters at www.trbarry.com
trbarry is offline  
post #102 of 111 Old 12-24-2004, 05:25 PM
AVS Forum Special Member
 
dmunsil's Avatar
 
Join Date: Mar 2000
Location: Kirkland, WA, USA
Posts: 1,005
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 30
Sorry for the delay... on vacation.

Quote:
Originally posted by Charles Black
Have you actually done a comparison between gamma corrected video and linear-light video scaling in a streaming system?
Yes.

Quote:
If so what was the hardware you used? What would be the data rate of the linear-light stream. How much computing power is needed? How did you evaluate the results?
Ordinary PCs. The other answers I either don't know or can't say.

Quote:
Do you know of any specific problems processing Y'CbCr where the result is bad and not fixable with careful coding?
It's always bad working in Y'CbCr, because as mentioned before it's not a linear space. Any normal linear math you might want to do, like interpolation, completely fails because the final R, G, and B values are all dependent on more than one of Y', Cb, and Cr. Interpolated Y'CbCr values do not map to the same colors as the equivalent RGB values equivalently interpolated.

In R'G'B' it's a little better, but not much. Again, linear operations (like interpolation) produce incorrect results. The short version of the problem is that all edges get pulled toward black.

The "careful coding" solution is simple: convert to linear.

Quote:
Do you have an issue with 4:4:4 other than data rate?
No, not at all. I meant to type "4:2:2." Chroma subsampling is not the free lunch people seem to think it is. However, it may be that it's a decent tradeoff, given the problems caused by overquantizing. If we didn't subsample the chroma channels, we'd have to quantize them more severely to get the same compression ratios, and that might look even worse.

Quote:
That's funny since you just recommended doing exactly that (Y'CbCr->R'G'B'->RGB...) in your best pipeline for scaling scenario.
Not at all. I said you can't linearize Y'CbCr, and you can't. You can convert it to R'G'B', and then linearize that to RGB. Y', for example, cannot be converted directly to Y. You can convert Y'CbCr to R'G'B', then R'G'B' to RGB, and then calculate Y from that, but there is no simple calculation to get directly from Y' to Y. This is what Poynton is getting at when he says that luma (Y') isn't luminance (Y). Luma isn't even gamma-corrected luminance, which is why the abbreviation Y' is misleading.

Don
dmunsil is offline  
post #103 of 111 Old 01-25-2005, 01:27 PM
Advanced Member
 
Herc's Avatar
 
Join Date: Apr 2004
Posts: 680
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 10
Many years ago I remember watching a CGI clip on a 486 Cd-rom and the computer froze for a second on a frame. I remember thinking, that the static image looked like junk but when animated the image looked sharper. This was with a clip that was below 320x240.

This was probably with uncompressed video (imagine the bandwidth)and I suppose to get the most quality each frame was made uniquely. I noticed how different aliasing methods were used on a bar that wasn't moving in the video. Where a aliasing would occur instead of inserting a grey, relative to the neighbouring pixels, that pixel would flicker different shades of grey and when in motion it certainly was a sharpening technique.

So has anybody examined the inherit benefits from temporal interpolation? How does a 854x480x48Hz bicubic compare to a 1280x720x24Hz bicubic?

Or even better why not alternate a frame of linear(1280x720)+lanczos (1280x720)+bicubic(1280x720)=72frames/sec


This would certainly ramp the noise but personally I don't mind noise. It's alot like the crack and hissing on a record. However I do dispise any sort EE.

While i'm here are there any kind of metrics on measuring video sharpness? Shouldn't renderers analyze the video and apply more appropriate filters. Personally very soft transfers (mainly first runs from China) look worse when I apply any sort of filtering
Herc is offline  
post #104 of 111 Old 01-25-2005, 04:18 PM
AVS Forum Addicted Member
 
stanger89's Avatar
 
Join Date: Nov 2002
Location: Marion, IA
Posts: 23,130
Mentioned: 34 Post(s)
Tagged: 0 Thread(s)
Quoted: 4156 Post(s)
Liked: 2388
Trimention DNM does exactly what you're talking about (I think), but it is VERY processor intensive, and has recieved mixed reviews, working wonders on some things and destroying others.
stanger89 is offline  
post #105 of 111 Old 01-25-2005, 05:31 PM
AVS Forum Special Member
 
cyberbri's Avatar
 
Join Date: May 2004
Location: San Jose, CA
Posts: 8,103
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 2 Post(s)
Liked: 54
What about Avisynth LimitedSharpen for a better sharpening tool? Resize can even be put within the script, taking out the extra step in ffdshow and reducing CPU usage.
http://forum.doom9.org/showthread.php?s=&threadid=84196


Also discussed here at home:
https://www.avsforum.com/avs-vb/showt...hreadid=469464
cyberbri is offline  
post #106 of 111 Old 03-06-2005, 06:54 PM
Advanced Member
 
Isochroma's Avatar
 
Join Date: Mar 2005
Posts: 625
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 18
Why not use a mathematical simulation of an optically perfect lens (raytracing) to enlarge an image?
Isochroma is offline  
post #107 of 111 Old 03-06-2005, 07:18 PM
AVS Forum Special Member
 
hdkhang's Avatar
 
Join Date: Aug 2004
Location: Sydney, Australia
Posts: 2,164
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 19
@cyberbri

AVISynth resizing does not reduce CPU usage, in fact it increases it as it is not optimised the way the directshow version is.

Cheers...
Duy-Khang Hoang
hdkhang is offline  
post #108 of 111 Old 03-07-2005, 03:00 AM
AVS Forum Special Member
 
jimwhite's Avatar
 
Join Date: Sep 2001
Location: Saint Petersburg, FL USA
Posts: 5,344
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
"Why not use a mathematical simulation of an optically perfect lens (raytracing) to enlarge an image?"

nice big, fat pixels :D

Jim White
St. Petersburg, FL
jimwhite is offline  
post #109 of 111 Old 03-07-2005, 05:05 AM
AVS Forum Special Member
 
trbarry's Avatar
 
Join Date: Jan 2000
Location: Gainesville FL USA
Posts: 9,884
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
"nice big fat pixels"

Some fixed pixel display have well defined borders, like displaying square pixels on a checker board. I think this in turn may require some extra filtering to avoid motion dithering on highly detailed moving scenes.

But the simplest solution I could think of would indeed be "nice fat pixels", overlapping somewhat. This could probably be done at home for RP's, by just unfocusing them a tiny bit. I think even some DLP movie theaters might look better from the front rows if they unfocussed it some, just enough so adjacent pixels slightly overlapped.

Though higher resolution displays also likely solve the problem.

I wonder if there are known video sizing & fltering algorithms that adjust for these issues with fixed pixel displays?

- Tom

Why don't we power our electric cars from greener, cheaper Liquid Fluoride Thorium Reactors?

Tom Barry - Find my video filters at www.trbarry.com
trbarry is offline  
post #110 of 111 Old 07-25-2005, 11:37 AM
Senior Member
 
NiToNi's Avatar
 
Join Date: Jul 2001
Posts: 480
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 19 Post(s)
Liked: 13
bump
NiToNi is offline  
post #111 of 111 Old 05-01-2006, 11:09 PM
Senior Member
 
pcdvdguy's Avatar
 
Join Date: Sep 2001
Location: Southern California
Posts: 263
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by dmunsil
Lobes vs. Taps. The short version. :)
Any signal-processing filter has "taps" which are the discrete input values that are used to calculate each output value. In audio processing it's pretty straightforward - a 20-tap FIR resampling filter takes 20 audio samples, multiplies each by one value in a 20-element filter "kernel," adds all the results together, and spits out a single output sample. Lather, rinse, repeat. In video it's a little different, but that's the rough idea.
...

For upsampling (making the image larger), the filter is sized such that the entire equation falls across 4 input samples, making it a 4-tap filter. It doesn't matter how big the output image is going to be - it's still just 4 taps.

...
Don
I might have to design or at least recommend the architecture for a hardware video-scaler, so to ressurect an old thread -- I noticed ATI's AVIVO whitepaper (http://www.ati.com/technology/Avivo/...Whitepaper.pdf) claims "10x6" output filtering. Based on what you said, for upscaling, the additional taps (beyond 4x4) are totally superfluous?
pcdvdguy is offline  
Sponsored Links
Advertisement
 
Closed Thread Home Theater Computers

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off