PDA

View Full Version : Resize error.


AssassiNBG
17th March 2007, 17:35
Hello guys,

I'm trying to resize using LanczosResize to 640x480, but it gives out the error:

Resize: Source image too small for this resize method

How can it be too small ? I've barelly cropped 8 pixels to the left and 6 to the right, which makes a total of 14 pixels cut. But the original source is 720x480.

What should I do now ? Must I resize to a lower resolution ? If yes, then what is the next width:hight standard settings that I could use ?

Wilbert
17th March 2007, 17:38
Post your script and avs version.

AssassiNBG
17th March 2007, 17:44
Here it is:

Import("vdub_filters.avs ")
Loadplugin("F:\DVDRips\2ndtry\MaskTools-v1.5.8\masktools.dll")
Loadplugin("F:\DVDRips\2ndtry\WarpSharp.dll")

LoadPlugin("F:\DVDRips\2ndtry\Decomb.dll")
AVISource("F:\DVDRips\2ndtry\dgindex_project_for_vdub_d2v_vfapi.avi")
ConvertToYUY2()
AssumeTFF()
Telecide(guide=0,post=2,vthresh=43,blend=true)
Decimate(5)

function LimitedSharpen (....) // The whole function is in the avs file, but I'm not copying it because it'll take too much space

ConvertToRGB32()
VD_SmartSmoothHiQ(5, 55, 254, "weighted")

Crop(8,0,0,6)
LanczosResize(640,480)
ConvertToYUY2()
LimitedSharpen()

Using AviSynth 2.5

PS I tried resizing to a lower res (512x386) but it gave out the same error. (386 is quite lower than 480)

Didée
17th March 2007, 19:12
Your crop() line is producing an output which is only 6 pixels in height. O_o

You wanted to write crop(8,0,-6,-0) instead.
(Avisynth comes shipping with a manual, there you can read up on the correct usage of parameters.)

AssassiNBG
17th March 2007, 21:43
OMG lol

I had totally forgotten that. It seems it's been long enough since I've dealt with encoding and video editing.

Thanks for the quick responses!

Also that I've posted my script now, is it ok that I've put the different filters in this order? I mean, can there be conflicts or could I speed it up by rearranging it ?

foxyshadis
18th March 2007, 14:10
It looks almost as if you plopped limitedsharpen into a script from 2002. ;) Nearly the same as my first scripts, before I got comfortable with avisynth. You're doing to many color conversions, and ultimately this will screw up your colors. Try starting with mpeg2source from dgdecoe instead of vfapi, to start with. And make sure you get the LimitedSharpenFaster (www.avisynth.org/mediawiki/LimitedSharpen) variant, it's much much faster.

There's also a native version of smart smooth hq that works in yuy2 (no yv12 support), though if you're cleaning anime, frfun7 is a favorite among anime encoders. If it's not for a cartoon, sshq is a bad choice, since it practically turns stuff into a cartoon. Plus it's terribly slow for what it does. Look at fft3dfilter or mvdegrain for strong correction, or degrainmedian, fluxsmooth, and/or mipsmooth for light and fast.

The basic order of filters is okay, source->deint/ivtc->smooth->resize->sharpen is a good template to start from. LimitedSharpenFaster does have dest_x/y parameters so that you can combine sharpen and resize into one step. Seesaw, another Didée sharpener, can actually combine smooth, sharpen, and resize in one!

AssassiNBG
18th March 2007, 18:44
Yes, I am encoding a cartoon. But my new script is almost nothing like the previous one. I figured it the SSHiQ filter was too old, so I use fft3dgpu (to make use of my 6600GT) and LimitedSharpenFaster.

I tried SeeSaw, but it produced ringing around edges, so I just stick to the following script:


...
ConvertToYUY2()
AssumeTFF()
Telecide(guide=0,post=2,vthresh=43,blend=true)
Decimate(5)

antialiasing()
FFT3DGPU(sigma=3, bt=1)

Crop(8,0,-6,0)
LanczosResize(640,480)
LimitedSharpenFaster()

Also I want to ask you something about Decomb's IVTC for toons. I had it recommended by a fellow encoder, but I have a few questions. Actually, I should say that I'm dealing with TMNT 2003, and from what I've heard and seen, it is very hard to ivtc. Decomb seems to do a pretty good job, but there are still interlaced frames left. And the funny thing is those frames, after looking at them, are marked to be deinterlaced by decomb but are still left there.

When I used
Telecide(guide=0,post=3,vthresh=43,show=true)
the frames that pass through the filter have a [chosen: **] value which is far greater than the vtresh I've specified. And they're marked but yet manage to pass through the filter.

Sorry for going quite a bit out of topic, but since we've started the discussion, I thought it'll be ok to finish it here. :)

foxyshadis
19th March 2007, 01:48
Not sure, maybe neuron2 can answer if he sees this thread. I usually stick to TFM/TDecimate for anything that gets hard to ivtc, though; it handles borderline cases better, especially hybrid.