Log in

View Full Version : How to bypass resize ?


MrDarcy
27th April 2003, 12:35
Hi,
first of all, many many thanks to len0x and all others!!

I'm encoding a Divx at the same exact resolution as the input, so I don't need at all the resize filter.

The fastest way I found is to open the avs script and to comment the LanczosResize(...) command before starting to encode, but I was wondering if there is another way.

For example, is any of the resize filters smart enough to understand that if input resolution=output resolution it doesn't need to do anything?

Or maybe could GordianKnot itself recognize this situation and avoid to add the Resize command in the avs script?
Or maybe could it be another option in the "Save&Encode" window?

Bye!

butterw
27th April 2003, 13:36
I believe there is no actual resize in avisynth in x dimension if xin=xout, same goes for ydim if yin=yout. Therefore there should be no speed loss leaving the resize command in your script, but if I'm wrong please let me know.
The encoder will achieve better results if xdim and ydim are mod16 or even mod32.

MrDarcy
27th April 2003, 22:03
My doubt was if the "resizer" is able to recognize that no real resize is needed and therefore to bypass all its work.

Anyway, without the resize my encoding took 1 hour+28 minutes for 1st pass and VirtualDubMod crashed during the 2nd pass, when the estimated time was 58 minutes.

I restarted from scratch, I left the LanczosResize active and the 1st pass took 1 hour+39 minutes and the 2nd pass 1hour+12 minutes.

NB: This is not an accurate test because I was working with the PC, but it seems that some overhead exists.

Bye!

N_F
27th April 2003, 23:18
There is no "good" way to do it. The fastest way should be by pressing edit in the save .avs window.

MrDarcy
27th April 2003, 23:31
Originally posted by N_F
There is no "good" way to do it. The fastest way should be by pressing edit in the save .avs window.

This is exactly what I've done, but the Edit button is disabled when you code credits and movie separately. So you should open .avs file with Notepad and remove/comment the Resize command.

Would it be difficult to add a "No resize" choice among all other resize methods in this windows?

N_F
27th April 2003, 23:37
Yeah, if you're doing credits (with DivX) it's a bit more work.

Technically it would probably be very easy to do it, but I think len0x said the problem is the space. There are already 6 resizers and it may be hard fitting more.

I'm no programmer, but I can't imagine it being that hard telling Gordian Knot to comment the resizer if input and output is the same. But len0x is for vacation for a few weeks, so we'll have to wait.

binky the stunt cat
28th April 2003, 06:32
maybe having the resize filter as an option.....
and while i'm thinking about extra options....an auto-autocrop option :p
just something that some people (ie: me) would find handy.
I'm currently using GK to recode SVCDs and they're a mix of 4:3 and 16:9 format...so occasionaly i forget to hit the autocrop button...:rolleyes:

MrDarcy
28th April 2003, 20:36
Originally posted by N_F

Technically it would probably be very easy to do it, but I think len0x said the problem is the space. There are already 6 resizers and it may be hard fitting more.


You're right, but there is a bit of free space between resizer choices.
For example, the deinterlace options just below are much more close each other....

I'll submit this request to len0x when he'll be back.

hakko504
29th April 2003, 07:59
Originally posted by MrDarcy
My doubt was if the "resizer" is able to recognize that no real resize is needed and therefore to bypass all its work.

NB: This is not an accurate test because I was working with the PC, but it seems that some overhead exists.
Yes, there is a small overhead, but the resizers do check if there is any work needed before they go ahead and resize. Everyframe is passed to the resizer, it then checks both the horizontal and the vertical direction for the necessity of resizing. If it can't find anything it will just pass the original frame back to the filtergraph of AviSynth. This will take a few CPU cycles to do and slows the encoding down a little. If you are doing a very quick conversion, say without any filters, this may become noticeable but in most normal encodes you won't notice it at all.

butterw
29th April 2003, 09:26
I did a 5min 2Pass encoding test last night from a d2v without any filters and without working on the PC. There was no noticeable difference (<1 second)in speed between the case where the LancsosResize line was commented and the one where it was uncommented (no actual resize).

N_F
29th April 2003, 09:32
Did you use a fixed quants encoding? In that case, where there any difference in filesizes?