Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th July 2008, 17:10   #21  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by vcmohan View Post
I do not presently thinking of changing the center coordinates x and y also to float. It probably will entail almost complete recoding.
I'm surprised to hear that - I would have naively expected it to work internally in floating point anyway. Clearly then, it's more sophisticated than that.

As a workaround, could rotation about an arbitrary center point (x, y) be achieved as follows? :
- use the fractional crop feature of the resizers to shift (x, y) in the image to the nearest integral point (x', y');
- apply the rotation about (x', y')
- reverse the shift

If this approach is valid, it could be done in a script wrapper by the user, or even built into the plugin itself if you think it is useful.
Gavino is offline   Reply With Quote
Old 29th July 2008, 03:10   #22  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Yes it works on floats internally. But I use my this rotation helper function in several of my other pieces of software and changing this may render others disfunctional. Thats the reason I had the objection.
On second thoughts I will try to make a different helper for this effectrotation as soon as I get time. As I am using only bilinear interpolation, possibly I will change it to bicubic to improve quality. The speed will suffer. Is this worth all the trouble? Where exactly you need rotation axis at fractional pixel values?
The other approaches you suggest are feasible but as they involve one additional interpolation the quality is likely to suffer.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 29th July 2008, 08:25   #23  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
I was going along with Gavino, I thought it would have been fairly easy to do. Subpixel (x,y) precision is always nice to have, but if its too much of a pain don't worry about it. I don't have a specific need for it; i could see that if someone used animate, it would be nice to have float precision.

Any chance that you could select the resizer function, have a speed/quality variable? like 0-2, 0 being Nearest Neighbor, 1 bilinear, 2 bicubic.
mikeytown2 is offline   Reply With Quote
Old 29th July 2008, 08:56   #24  |  Link
pandy
Registered User
 
Join Date: Mar 2006
Posts: 1,049
Quote:
Originally Posted by mikeytown2 View Post
Any chance that you could select the resizer function, have a speed/quality variable? like 0-2, 0 being Nearest Neighbor, 1 bilinear, 2 bicubic.
Simply resize (x2, x4, x8 etc) video before rotation (at this stage i prefer PointResize) then do rotation and resize video back with prefered resize algorithm.
pandy is offline   Reply With Quote
Old 30th July 2008, 12:44   #25  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Quote:
Originally Posted by mikeytown2 View Post
I was going along with Gavino, I thought it would have been fairly easy to do. Subpixel (x,y) precision is always nice to have.
There are various issues while dealing with positive and negative values internally. Since my plugin accepts rotation center to be anywhere in frame (or outside also with certain restrictions) some complications arise. However I started work on it.
Quote:
Any chance that you could select the resizer function, have a speed/quality variable? like 0-2, 0 being Nearest Neighbor, 1 bilinear, 2 bicubic.
It should be possible. Most likely I will take it out of EffectsMany and make it a separate plugin.

I am curious. How much precision in the rotation axis is really required? 0.5, 0.25? or any arbitrary precision?
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 30th July 2008, 20:12   #26  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
i have shift, zoom and rotation engine in my Depan plugin (up to bicubic), but it is slow and uglyest code I ever wrote.
So I made attempt to rewrote it.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 30th July 2008, 20:41   #27  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
What are the chances of one of these rotate code bases going into the avisynth core? I think it's one of the fundamental effects that you can do to an image/video so it wouldn't be out of place if it did go in. I have no idea how that process takes place, but I do believe a rotate function does belong in the core. Following Gimp, positive rotation would be clockwise.
You could have named functions just like resize
PointRotate
BilinearRotate
BicubicRotate
ect..


@vcmohan I really don't see a need for anything more then 1/2 pixel, but if if you can have arbitrary precision like in the resize's crop option then that is always a plus; limiting what can be done codewise is not always the best idea. Gimp's UI limits center x/y to int's unless you type it in; it also allows the center to be out of bounds of the image.
mikeytown2 is offline   Reply With Quote
Old 3rd August 2008, 15:10   #28  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Please see the post Spinner in the usage section.
__________________
mohan
my plugins are now hosted here

Last edited by vcmohan; 7th August 2008 at 03:22. Reason: thread name change
vcmohan is offline   Reply With Quote
Old 29th November 2008, 16:41   #29  |  Link
PeaceAnt
also known as GrassHoppeR
 
Join Date: Mar 2006
Location: Poland
Posts: 30
hello,

how about source and destination PAR parameters?

pozdrawiam
PeaceAnt is offline   Reply With Quote
Old 30th November 2008, 12:57   #30  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
source and destination PAR parameters are OK.
Fizick is offline   Reply With Quote
Old 1st December 2008, 11:00   #31  |  Link
PeaceAnt
also known as GrassHoppeR
 
Join Date: Mar 2006
Location: Poland
Posts: 30
i work on PAL Widescreen (anamorphic) clips so when i want to rotate i must do something like:
Code:
lanczosresize(1024,576).Rotate(-45).lanczosresize(720,576)
or is in your filter a PAR correction parameter?

http://img224.imageshack.us/img224/1997/par1vg9.jpg
without and with PAR correction

pozdrawiam

Last edited by PeaceAnt; 1st December 2008 at 11:02.
PeaceAnt is offline   Reply With Quote
Old 1st December 2008, 13:32   #32  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
The fast triple shear algorithm assumes square pixels, so this filter cannot be made to directly compensate for PAR.

Mohan's version uses the slower direct 2d interpolation, for that algorithm PAR compensation would be possible.
IanB is offline   Reply With Quote
Old 19th May 2009, 07:54   #33  |  Link
ivar
Registered User
 
Join Date: Apr 2009
Location: Norway
Posts: 30
Hi, great plug-in. If one rotates an image & expands it, I think the new width & height that will fit the rotated image is given by h2 = round( w*sin(a)+h*cos(a) ) and w2 = round( w*cos(a)+h*sin(a) ), maybe one could just choose false or true to expand the image to this size
ivar is offline   Reply With Quote
Old 19th May 2009, 08:09   #34  |  Link
ivar
Registered User
 
Join Date: Apr 2009
Location: Norway
Posts: 30
Sometimes I also get an CAVISynthStream system exception access violation at ... reading from ...
when specifying values for the new width & height. I get this error often ih the new width & height are larger than h2/w2 I mentioned in my last post. Does the new width/height have to be divisible by 2 or 4 or something like that?

Ivar
ivar is offline   Reply With Quote
Old 30th August 2009, 02:50   #35  |  Link
Terrachild
Registered User
 
Join Date: Aug 2009
Posts: 10
Rotate endangle?

If I use Rotate, it works fine for the entire file, but if I do this:
"Rotate(angle = 10 ,endangle = 180)", it doesn't gradually change the rotation angle.

This "Rotate(angle = 10 ,start = 20, end = 100, endangle = 180)", also doesn't gradually rotate the frames. It does rotate the frames starting at 20 and ending at 100 though. So I know it is partially working.

Thanks for the help,

...anyone....anyone?
Terrachild is offline   Reply With Quote
Old 9th September 2009, 20:19   #36  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Terrachild, fixed in new v1.3.3
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 10th September 2009, 17:39   #37  |  Link
tin3tin
Registered User
 
tin3tin's Avatar
 
Join Date: Mar 2005
Posts: 366
I wonder if the Zoom plugin could benefit of this rotation code by somehow replacing the rotation calculations?
__________________
DVD slideshow GUI(Freeware).
tin3tin is offline   Reply With Quote
Old 11th September 2009, 08:19   #38  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
@tin3tin
I considered incorporating a separate rotate plugin (like Fizick's) for KBE() but decide against it last year. So that almost became a complete replacement for Zoom()
mikeytown2 is offline   Reply With Quote
Old 11th September 2009, 13:36   #39  |  Link
tin3tin
Registered User
 
tin3tin's Avatar
 
Join Date: Mar 2005
Posts: 366
Zoom is offers al lot of posibilities with 20 optional keyframes and such - but the quality and speed could be better - so the question is if this rotation code more or less could be liftet into Zoom?
__________________
DVD slideshow GUI(Freeware).
tin3tin is offline   Reply With Quote
Old 11th September 2009, 22:44   #40  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by tin3tin View Post
Zoom is offers al lot of posibilities with 20 optional keyframes and such
Not sure what you're referring to here. Perhaps that you can pass in a Spline expression giving intermediate parameter values? But that is not limited to 20.

If that's what you mean, note that you can do the same thing with any filter (including Rotate) by using Spline inside ScriptClip.
Gavino is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump


All times are GMT +1. The time now is 10:28.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.