View Full Version : AviSynth 2.5 alpha status and thoughts
JohnMK
17th November 2002, 01:41
Shodan or somebody else perhaps?
Would you be willing to recompile the alpha with the latest additions? Vlad59 added SelectRangeEvery, amongst other modifications I suppose.
CruNcher
17th November 2002, 05:50
At some time during the encoding, the picture stalls. The encoding finishes up to the correct end frame number, but the end of the avi contains only one still picture, sometimes jumping around a bit.
The combination of this (order) gets rid off it (for me) hope it helps :)
MPEG2Source("D:\uranusproject.d2v",idct=5,iPP=false)
SelectOdd()
DoubleWeave
TomsMoComp(0,0,0) <- important other values destroy some frames
Convolution3D(preset="vhsBQ")
BicubicResize(512,384)
Bidoche
17th November 2002, 18:31
Rewrite parser to provide 'hooks' that can be used by the script environment (and thus, GUIs & other programs), as well as fix currently intractable bugs like this and this
I'm not that much into the script parser, so I have ignored this. I think that hooks for GUI's will be a very good thing!
I just looked into the parser code and I think we can fix the negation bug like this :
PExpression ScriptParser::ParseAddition(bool negationOnHold) //update exterior calls to ParseAddition(false)
{
PExpression left = ParseMultiplication(negationOnHold);
bool plus = tokenizer.IsOperator('+');
bool minus = tokenizer.IsOperator('-');
bool doubleplus = tokenizer.IsOperator('++');
if (plus || minus || doubleplus) {
tokenizer.NextToken();
PExpression right = ParseAddition(minus);
if (doubleplus)
return new ExpDoublePlus(left, right);
else
return new ExpPlus(left, right); //no longer ExpMinus 'right' will be negated when needed
}
else
return left;
}
PExpression ScriptParser::ParseMultiplication(bool negationOnHold)
{
PExpression left = ParseUnary();
bool mult = tokenizer.IsOperator('*');
bool div = tokenizer.IsOperator('/');
bool mod = tokenizer.IsOperator('%');
if (mult || div || mod) {
tokenizer.NextToken();
PExpression right = ParseMultiplication(false);
if (mult)
left = new ExpMult(left, right);
else if (div)
left = new ExpDiv(left, right);
else
left = new ExpMod(left, right);
}
if (negationOnHold) //negate the factorised result if needed
left = new ExpNegate(result);
return left;
}
Like this it does not substract, but add the opposite. (add in complexity)
By the way, it would probably be a good idea to rewrire parser/scanner as generated by a compiler compiler program (would be easier to modify/add features).
If nobody else is up to the task I can look into it.
Richard Berg
18th November 2002, 04:05
That would be nice indeed -- I'm not very good with bison, but it would sure be cool to have some of its features.
Along similar lines, has anyone else seen these revisions (http://sourceforge.net/tracker/index.php?func=detail&aid=638436&group_id=57023&atid=482676)? Dunno whom to thank, but looks sweet...
sh0dan
18th November 2002, 09:42
Originally posted by Wilbert
1) Adding a line ConvertToYUY2 results in an error message that the width/height must be a multiple of four (I know that this must be the case for YV12).
2) When loading a divx4 file in avisynth and adding the line ConvertToYUY2 (ConvertToYV12 gives exactly the same results) results in a clip like this: (see attachment) I didn't test divx5/xvid clips.
1) I added YUY2 Mod4 width requirement, because HuffYUV has bug with non-mod4 widths - it displays chroma garbage on the leftmost pixels. This is also the case for older versions! We could leave it out, but since both DivX and Xvid encodes garbage on non-mod4 widths, I dont' see much of a point.
2) I have experienced U/V swapping with MJPEG-files, but I haven't tested DivX4, but it seems like it also has the bug. I have planned of adding SwapUV, but haven't got around to it yet.
@JohnMK:
Humbly request that SelectRangeEvery be worked into the latest build of Avisynth.
Already done - not released yet, since I still have a bug in separatefields() I would like to fix. Also I haven't tested filter compatebility with my latest changes, and I don't want to break to much, too sudden.
@Richard:
Along similar lines, has anyone else seen these revisions? Dunno whom to thank, but looks sweet...
Yes, indeed! I'll see if I can get the time to implement them ASAP!
Abond
18th November 2002, 10:55
A report for encode with AviSynth2.5.
The source: reported from DVD2AVI as PAL, 4:3, interlaced, Running Man R2, about 144000 frames. The most weird source I have seen (well, only 80 videos, not big experience). Ghosting effects at movement, horizontal lines, blended frames at scene change - I assume bad 29,976>25, NTSC>PAL conversion.
The script:
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynth25\mpeg2dec3.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynth25\UnFilter.dll")
mpeg2source("C:\temp\runing.d2v")
trim(0,136800)
crop(12,72,680,434)
UnFilter(-20,-20)
BicubicResize(512,300,0,0.75)
resulted in thick green line at right side (but not at the edge see the image). Other weird thing is that after the first pass were reported about 129 000 encoded frames (see trim()), but at the end the whole movie was there. Without UnFilter() the encoding was correct (no green line, reported 136800 frames)
Oops, I'm sorry, don't know how to attach the image.
HarryM
18th November 2002, 11:18
'SegmentedAviSource' isn't implemented in v2.5, please???
cult
18th November 2002, 13:44
@abond
for the green line take a look in unfilter thread
sh0dan
18th November 2002, 13:47
Originally posted by HarryM
'SegmentedAviSource' isn't implemented in v2.5, please???
It isn't??? What happends when you use it?
ErMaC
18th November 2002, 14:01
Shodan - on the Mod4 requirement for converting to YUY2... I think it's a bad idea.
Say I have a filter chain and I need to convert a non-mode4-width video to YUY2 just so I can run a specific filter on it, then I convert back to RGB afterwards. I'm not planning on encoding anything in YUY2, I just need to use a YUY2 filter. Should I be forced to resize my video just so I can run said filter on it?
Instead of throwing an Assert() on the ConvertToYUY2, you could instead throw an Assert() if the return clip from the script is in YUY2 but isn't mod4. Thus:
Blackness(width=318,height=240,fps=30)
ConvertToYUY2()
will throw an exception when you open the AVIfile anyways, but:
Blackness(width=318,height=240,fps=30)
ConvertToYUY2()
ImaginaryFilter()
ConvertToRGB()
won't throw one.
I hope all that made sense. ^_^ probably shouldn't do too much thinking about video processing at 5AM.
sh0dan
18th November 2002, 14:47
Originally posted by ErMaC
Shodan - on the Mod4 requirement for converting to YUY2... I think it's a bad idea.
Mod 4 YUY2 is only for output, you can still use mod2 internally. Only, if you try to output an YUY2 with non-mod4, you'll get an error.
ErMaC
18th November 2002, 15:12
Ah OK guess we were both thinking the same thing then. :) Glad to hear it.
Bidoche
18th November 2002, 18:51
@Richard Berg
That would be nice indeed -- I'm not very good with bison, but it would sure be cool to have some of its features.
Bison does not do C++, I dunno if it may be a problem or not...
I am currently investigating CppCC (http://cppcc.sourceforge.net) who can do C++ and has some nice features too :)
And it has the advantage to produce both scanner and parser (only one prog to learn :p)
@all
I attached a first version of an avisynth grammar, tell me if it seems ok to you.
In it, Eval and co are considered normal function and so not considered.
I did not take into account the difference between avsfunctions ( which return clip) and script functions (which don't), but it can be done.
Boulder
18th November 2002, 22:47
Originally posted by sh0dan
2) I have experienced U/V swapping with MJPEG-files, but I haven't tested DivX4, but it seems like it also has the bug. I have planned of adding SwapUV, but haven't got around to it yet.
I've had U/V swapping when loading DivX3, 4 and 5 files in AviSynth. It seems that the DivX5.02 decompressor screws the colors up. PicVideo MJPEG files don't seem to have this problem.
Hope you'll get the SwapUV function added rather soon.
Wilbert
19th November 2002, 15:52
Another (possible?) bug: (maybe it is a bug of VDubMod)
When loading DivX5 clip with AC3 audio in VDubMod works fine, but making an avs-script (containing just AviSource(divx5+AC3)) and loading this in VDubMod doesn't work. VDubMod can't load the audio.
mfluder
20th November 2002, 04:24
Hi sh0dan,
It looks like I found a bug in Bicubic and LanczosResize while Bilinear looks fine. I am using latest alpha, but I tried also with older builds and the bug is there. I attached 3 screenshots in png format (Bicubic, Lanczos and Bilinear) where you can clearly see the bug. The best I can describe is that there are some strange white dots around letters. The script I used was very simple, and only contains croping and resizing:
LoadPlugin("D:\Ripping\Avisynth\plugins\MPEG2Dec3.dll")
mpeg2source("D:\Trailers\LePacte\LePacte.d2v")
crop(16,92,688,416)
BicubicResize(640,272,0,0.75)
mfluder
sh0dan
20th November 2002, 19:09
@mfluder: Interesting. Do you have a source (perhaps a very short huffyuv), so I can reproduce the bug? Does it help to put at Limiter() instruction before the resize?
@wilbert: Doesn't sound like it has anything to do with AviSynth - or is it me?
@all: Sorry for the lack of updates - I'm very busy at work atm. And I'm also rebuiling my home computer, and getting internet at home. So I hope to be back soon!
mfluder
20th November 2002, 20:51
Originally posted by sh0dan
@mfluder: Interesting. Do you have a source (perhaps a very short huffyuv), so I can reproduce the bug? Does it help to put at Limiter() instruction before the resize?
Yes, I have the source. I can make short huffyuv clip out of it. Just tell me if you want it to be full PAL resolution, or to crop the black borders or to resize it to some other size. The only problem is that I have a dial-up connection and currently I don't have any web space and huffyuv clips, even if very short, if in very high resolution can be very large in size. But if you give me your e-mail I'll send it to you. Oh yes, I also tried with Limiter() before resize but it doesn't help.
mfluder
Wilbert
21st November 2002, 10:32
@wilbert: Doesn't sound like it has anything to do with AviSynth - or is it me?
Maybe you are right. I will post it at the VDubMod page. But do you have any idea why it can't read the audio part of those files?
Is the audio converted to uncompressed 5.1 channel WAV when putting divx5+AC3 in an AviSynth script?
@all,
Regarding the problems I had: I installed AviSynth 2.5 11/11 and mpeg2dec3 v0.92 and the crashes (using divx5 or xvid) disappeared. I suspect the problems was mpeg2dec3 v0.90, but I'm not sure about that ...
wing1
21st November 2002, 17:03
@Sh0dan and @all
I am sorry to interrupt this thread with a request/question. I don't want to open another unnecessary thread for this.
2.5 version are great. I just recently switch over and all went well. I use tweak and convertfps functions on all my script. However, these functions still operate under yuy2 mode in 2.5 which means I have to do a converttoyuy2() to adjust and then converttoyv12(). My question is are these functions on the todo list or they are not to be converted?
sh0dan
22nd November 2002, 11:12
Originally posted by wing1
I use tweak and convertfps functions on all my script. However, these functions still operate under yuy2 mode in 2.5 which means I have to do a converttoyuy2() to adjust and then converttoyv12(). My question is are these functions on the todo list or they are not to be converted?
ConvertFPS is not a hight priority. As for tweak, a C-version should be pretty fast to write (we can do assembler later). You could try ColorYUV - it has most of the tweak functionalities.
Originally posted by Wilbert
Is the audio converted to uncompressed 5.1 channel WAV when putting divx5+AC3 in an AviSynth script?
Yes - it might be a larger problem, that Vdub doesn't support >2 audio channel, except for direct stream copy. AVS2AVI will probably be able to handle this more gracefully.
sh0dan
22nd November 2002, 11:20
@all: A new alpha has been uploaded - changes are:
* Added general property handling to avisynth.h (Also TFF, BFF to videoinfo - isn't reliable yet!)
* Added some debugging to avisynth.cpp
* Added the following planar (YV12) operators:
o SwapUV(clip) - Swaps chroma channels.
o UToY(clip) Copies chroma U plane to Y plane (image is now half as big)
o VToY(clip) as above, but V plane.
o YToUV(clipU,clipV) - puts the luma channels of the two clips as U and V channels. Image is now twice as big, and luma is 50% grey. Use MergeLuma, if you want to add luma values.
* Blankclip now works!
* Fixed bug in chroma horizontalreduceby2.
* Fixed ceil, floor and round functions.
* Added following functions to script: IsRGB24(), IsRGB32(), VersionNumber(), VersionString(), Int(float), Frac(float), Float(int), Value(string), HexValue(string). (feature request [ 636143 ]). Needs to be documented!
* Version is now defined in internal.h
I also made i priority list for 2.5 beta, 2.5 release and 2.5.1 - feel free to comment!
sh0dan
22nd November 2002, 11:51
Originally posted by Bidoche
PExpression ScriptParser::ParseAddition(bool negationOnHold) //update exterior calls to ParseAddition(false)
{
[...]
}
PExpression ScriptParser::ParseMultiplication(bool negationOnHold)
{
[...]
if (negationOnHold) //negate the factorised result if needed
left = new ExpNegate(result);
return left;
}
Like this it does not substract, but add the opposite. (add in complexity)
I assume left = new ExpNegate(result); should be left = new ExpNegate(left);? How well is this tested? I don't want to break anything, since we're about to do 2.0.7 very soon.
Bidoche
22nd November 2002, 14:38
@sh0dan
Yes, you are right it should be left = new ExpNegate(left);
(there is no 'result' in fact)
Since I haven't managed to compile avisynth yet, (i didn't try to hard either, but C++ Builder does not like avisynth code... :/)
it is untested so far. :p
Anyway, I have started writing a complete parser for avisynth.
It only handles int, float and bool expressions made of literals so far, (ie the part that doesn't mess with the internals)
I will post a test version of this soon.
The rest will require some internal modificiations
(for ex: my parser is fully typed when avs is not for now, so var and functions should be asked for return type for it to work)
I need too some input about the expected behavior of metafunctions Import, Eval, Apply.
Does Import switch the parser to the other source and after continue, or does it just execute directive and learn function ?
Does Eval and Apply expect evaluable arg at parse time (easier) or at run time (arghhh :/)
trbarry
22nd November 2002, 14:51
Most previously existing Avisynth filters are probably video only filters that check for YUY2 as needed. I don't think there are as many external audio filters.
So before all this is carved in stone I guess I really have to ask ... Is there any way that at least that subset of filters could be made to work on YUY2 or RGB data without having to be recompiled?
Maybe it is just not possible but it sure would be nice for legacy filters that are probably not going to be converted soon, or at all.
I'm not talking about any auto conversion to YUY2 here. Probably just trying to lay out the control blocks so the most important video related fields stay the same size and place. But I haven't tried to go study the code to see what has changed.
- Tom
benf2
24th November 2002, 17:51
Must have missed it, but after searching thru many many threads i havent found a link to download avisynth 2.5...only 2.0* versions.
Would someone please point me to the link...thanks
trbarry
24th November 2002, 18:47
See the YV12 sticky at the top of the forum.
- Tom
benf2
24th November 2002, 19:03
Thanks...told u i missed it ;)
JohnMK
24th November 2002, 20:43
I'm still very much unclear on the status of SelectRangeEvery. Is it in now?
HarryM
25th November 2002, 09:26
Originally posted by JohnMK
I'm still very much unclear on the status of SelectRangeEvery. Is it in now?
Yes, in Avisynth 2.5 build 21112002 is SelectRangeEvery implemented. I test it, it is fully functional! O.K. :D
Brother Darrell
16th February 2003, 08:56
Originally posted by cult
...Installed everything under win98 partition so I wont get a mess with my avisynth 2.06....
Does anyone know of a way to use the 2.06 version concurrently with 2.5 on win2k? I would love to be able to swap between the 2 of them without having to do a separate partition or re-installing and rebooting everytime. I like them both (mostly 2.06 because of all the filters available that will not work with 2.50)A way to have them co-exist would be cool.
sh0dan
16th February 2003, 11:45
@Brother Darrell: Use search - this has been discussed several times.
JuanC
16th February 2003, 18:00
Originally posted by Brother Darrell
Does anyone know of a way to use the 2.06 version concurrently with 2.5 on win2k? I would love to be able to swap between the 2 of them without having to do a separate partition or re-installing and rebooting everytime. I like them both (mostly 2.06 because of all the filters available that will not work with 2.50)A way to have them co-exist would be cool. Here's what I did:[list=1] Install VirtualDubMod in its own folder somewhere in your disk.
Install AviSynth 2.5 beta
Move the avisynth dll from \windows\system32 to VirtualDubMod's folder
Install Avisynth 2.07
Put the plugins for each Avisynth version into the corresponding folder[/list=1]That's it! This way you should be able to use 2.5beta from VDMod and 2.07 from any other program...
Brother Darrell
16th February 2003, 18:26
Search is how I found This thread...looking for the very same thing...hmmm, maybe not using the right keywords?..will try again..thanks,at least I know it's here somewhere.
Brother Darrell
16th February 2003, 18:29
Originally posted by JuanC
Here's what I did:[list=1] Install VirtualDubMod in its own folder somewhere in your disk.
Install AviSynth 2.5 beta
Move the avisynth dll from \windows\system32 to VirtualDubMod's folder
Install Avisynth 2.07
Put the plugins for each Avisynth version into the corresponding folder[/list=1]That's it! This way you should be able to use 2.5beta from VDMod and 2.07 from any other program...
Thank you!...though I will still look for the threads some more..I ain't so lazy as not to put SOME effort into it.
sh0dan
16th February 2003, 19:13
thread (http://forum.doom9.org/showthread.php?s=&threadid=44029&highlight=script+2.5+2.07)
When figuring out how to do this - put it up somewhere on avisynth.org!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.