View Full Version : Alternative Crop Filter?


Blight
21st March 2002, 05:29
Perhaps I'm just lazy, but I'd like to see an alternative crop filter.

Currently crop uses the following parameters "xofs,yofs,width,height". It would be nice if it would instead use "left-crop,top-crop,right-crop,bottom-crop", make it a bit more like virtual dub, so you can just type in VDub values instead of doing the bit of math in your head.

trbarry
21st March 2002, 05:55
Somebody could probably even modify the same one to take negative values for the 3rd & 4th parm to mean crops instead of sizes.

- Tom

Richard Berg
25th March 2002, 01:01
I know it's customary these days to write plugin DLLs instead of updating the source on the CVS server, but for this sort of mod I had little choice. As you might expect it took infinitely more time to get everything set up than it did to write the 5 extra lines of code. In particular,

(1) the files as I got them off Sourceforge apparently were subjected to an extra "Unix -> DOS" conversion: newlines were marked by [0x0d 0x0d 0x0a] instead of [0x0d 0x0a], making things quite hard to read

(2) the ASM file needed a way to get built & linked; VS won't do it automatically, apparently

I hesitate to call my workarounds for these issues true fixes, but they're included in the source package anyway - have a look if you care.

Note: project & solution files are for VS.NET. I can post a walkthrough of the edits I made in case anyone wants to duplicate them in VC6.

ftp://anonymous@richardberg.net:2281/Hosted/Operes/Code/avisynth%20crop%20fix/avisynth_binary.rar

ftp://anonymous@richardberg.net:2281/Hosted/Operes/Code/avisynth%20crop%20fix/avisynth_source.rar

DDogg
25th March 2002, 03:29
Showing nothing in the RAr. Attach to a message and send me a pm so I can validate it quickly. Edit: come to think of it I'll bet you are using a later version of rar than I so disregard unless somebody else has problems. Zips are good as the version never changes :o

trbarry
25th March 2002, 04:21
Richard -

Nifty. You would not believe how many times I've considered doing that and then been too lazy. ;) Nice to see you over here on Doom9 for a change.

Is the Sourceforge project going to need VS7? I really didn't want to spend the money to upgrade.

- Tom

Richard Berg
25th March 2002, 05:14
Given that there are no less than 4 threads on this topic on the first page, perhaps the new behavior should be the default? I.e., negative numbers => old syntax with width/height. Couldn't exactly make that decision myself, though...who's in charge of the Avisynth project, anyway?

Unfortunately I don't know of any way to "save as" VS6 files in VS7, and I'm definitely not going back to the old IDE. (If anything, I need to get off my lazy butt and install the final version - still using Beta 2.) The source should be 100% compatible, though the new compiler (hopefully) will produce faster binaries.

DDog - I have RAR as a very convenient shell extension, and it seems to compress significantly better than Zip. Don't worry though, if I ever post anything to Sourceforge or something more public than Doom9 it'll be in a more "standard" format.

trbarry
25th March 2002, 06:07
Given that there are no less than 4 threads on this topic on the first page, perhaps the new behavior should be the default?

Richard -

I'm afraid I'm of the "don't fix it if it ain't broke" school on that one. There are a few utilities and a whole number of people who already expect it as it is. So it might not be a good idea to change it. But I could live with it either way if everyone else wanted it. And it is certainly not up to me anyway.

- Tom