Log in

View Full Version : Avisynth+


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 [66] 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112

Reel.Deel
16th April 2017, 20:03
Not sure if this is a bug in avs+ or in shekh's VDub, or maybe I'm doing something wrong.

Using FFMS2000 test 3 (https://forum.doom9.org/showthread.php?t=174469) to load this 16-bit png (https://www.dropbox.com/s/jmfgenfq9hl797a/IMG_4699-16bit.png?dl=1).

FFImageSource("IMG_4699-16bit.png", colorspace="RGBP16")
Info()
ConvertBits(8)

I get this error is VDub:
Couldn't locate decompressor for format '8BPS' (unknown)

VirtualDub requires a Video for Windows (VFW) compatible codec to decompress video. DirectShow codecs, such as those used by Windows Media Player, are not suitable.

If I set FFimageSource to colorspace="RGBAP16" then there's no error message but I get a corrupted image: https://www.dropbox.com/s/d5dz4v6be3ueox8/IMG_4699-16bit_output.png?dl=1
Adding ConvertToRGB24/32 after ConvertBits(8) works without a problem.

Edit : added Enable_PlanarToPackedRGB = true to the beginning of the script, still the same problem.

LigH
16th April 2017, 20:04
Can we have "isreallyyuv"?

So, like, ... mysql_real_escape_string() ? :p

shekh
17th April 2017, 09:49
@Reel.Deel

8BPS is not implemented in vd, correct response
corrupted image is maybe error in avisynth
working way: use ConvertToRGB64()

Yanak
17th April 2017, 13:11
Hello all,

Sorry to ask if it's a simple thing but i used to add a logo as overlay on my videos using this code :

AVISource("F:movie.avi", audio=false).AssumeFPS(60,1)
ConvertToYV12(interlaced=False)
logo=ImageSource("F:\logo.png")
Overlay(logo, x=3, y=2, opacity=0.45, mode="luma")


Now after updating to the last r2455 x64 avs+ ( had a version of avs+ from the last trimester of last year if i recall correctly ) i try this and i get an error message saying :
"filter error ; Attempted to request a planar frame that wasn't mod2 in height!"

My logo picture is 90x 55px, if i resize it to 90x 56px it works.

But i don't understand what have changed to not accept the logo picture as overlay if it is not resized now.

Thanks in advance.

LigH
17th April 2017, 14:49
In YV12, chrominance difference values (U and V in YUV) are valid for a square of 2x2 pixels. Therefore, all clips need to have even (multiple of 2) dimensions, both width and height.

Yanak
17th April 2017, 15:16
Hello and thanks for the reply,

I guessed that now it needed to be a multiple of 2 for the overlay picture but was not sure why it worked before and not now.
Will keep this in mind for future uses and start to resize all logos i use or add transparent borders to png's so they get the proper sizes now.

Thank you


Also seems like i have an issue with something else, this used to work not so long ago :

AviSource("F:movie.avi", audio = false)
ConvertToYV12()
logo=ImageSource("F:\logo.png").Overlay(logo, x = 3, y=3, opacity=0.45, mode="luma")

Now if i leave the dot just before "Overlay" it returns me an error message " I don't know what 'logo' means "

I have now to leave a space instead of the dot to get it work :

logo=ImageSource("F:\logo.png") Overlay(logo, x = 3, y=3, opacity=0.45, mode="luma")

or of course like this in 2 lines :

logo=ImageSource("F:\logo.png")
Overlay(logo, x = 3, y=3, opacity=0.45, mode="luma")

But leaving all in one line with the dot between them doesn't seems to work anymore for the overlay command, still seems to works with other stuff like .Crop, .ChangeFPS, .Subtitle , all in a single line.

Thanks a lot for the help.

stax76
17th April 2017, 15:23
If you use the dot the logo variable is used in the overlay function before it was created so it makes sense that it don't work.

Yanak
17th April 2017, 15:49
Thanks Stax,
i'm a bit lost now, will have one of those days to install an older PC backup i have and see how i managed to get this working in the past, probably missing or mixing up something on this.

Anyways the thing I'm sure about is the logo size never asked to be resized before, but got this fixed now so it isn't an issue anymore.

Thank a lot for the answers guys, really appreciate.

StainlessS
17th April 2017, 19:57
AviSource("F:movie.avi", audio = false)
ConvertToYV24() # NOTE 24

# Fail, logo only asigned to AFTER whole line is processed, ie you try to use logo before assinging a value to it.
# logo=ImageSource("F:\logo.png").Overlay(logo, x = 3, y=3, opacity=0.45, mode="luma")

logo=ImageSource("F:\logo.png") # Logo now exist, has been assigned to
Overlay(logo, x = 3, y=3, opacity=0.45, mode="luma") # OK logo exists

# SomeClip.SomeFilter().Crop() works because you are not referenceing a clip that does not yet exist, assuming SomeClip exists.
# Someclip is passed through SomeFilter and on to Crop.


I hope some of that makes sense, was in a hurry to catch my bus, I missed it.

jpsdr
18th April 2017, 09:24
Can we have "isreallyyuv"?
IsYUV() && !IsY()

And i think that IsYUV is false for YUVA, don't know if it can bother you.

yup
18th April 2017, 10:10
Hi all!
Where can load last version Devil.dll?
I am try registering on SF, but can not access to files.
yup.

pinterf
18th April 2017, 10:16
https://sourceforge.net/projects/openil/files/DevIL%20Win32%20and%20Win64/
But 1.78 is included in the usual avisynth+ binary package.

pinterf
18th April 2017, 10:19
Find a slightly older tivtc version if tou want c code for everything. That's what I did. Obviously the c code doesn't match the asm because real men don't test things.
Thanks, I will do a post-check I think.

tormento
18th April 2017, 11:34
I have formatted PC after infinite inline updates of Win10 previews.

Is too much to ask for a installer with latest version? ;)

ajp_anton
18th April 2017, 13:26
Just a thought... why not have the Info() function return everything as a string instead of overlaying it onto a clip, with potential problems involving the clip resolution and text size. The user could then modify it and manually subtitle it into the video using more easily visible styling or colors.
You could add a bool parameter "return_string" or something, false by default.

yup
18th April 2017, 15:01
https://sourceforge.net/projects/openil/files/DevIL%20Win32%20and%20Win64/
But 1.78 is included in the usual avisynth+ binary package.
This package support high bit depth image? Y16 for example?
yup.

pinterf
18th April 2017, 15:13
This package support high bit depth image? Y16 for example?
yup.
DevIL DLL itself is capable to do that, but you need a new ImageSeq.dll which I have not released yet.

StainlessS
18th April 2017, 15:17
Just a thought... why not have the Info() function return everything as a string instead of overlaying it onto a clip, with potential problems involving the clip resolution and text size. The user could then modify it and manually subtitle it into the video using more easily visible styling or colors.
You could add a bool parameter "return_string" or something, false by default.

That was requested about a year or so ago.

EDIT: Further request, how about allowing YUV color of eg $008080 for both LetterBox and Addborders. (for masks)

yup
18th April 2017, 16:11
DevIL DLL itself is capable to do that, but you need a new ImageSeq.dll which I have not released yet.
:thanks:
Will be waiting.
yup.

qyot27
18th April 2017, 17:51
Just a thought... why not have the Info() function return everything as a string instead of overlaying it onto a clip, with potential problems involving the clip resolution and text size. The user could then modify it and manually subtitle it into the video using more easily visible styling or colors.
You could add a bool parameter "return_string" or something, false by default.
Styling...you mean like the font, size, text_color, and halo_color parameters (https://github.com/pinterf/AviSynthPlus/commit/1d561ea662311a47a3788820c62d405f5983091c) that were added to Info() back in August before the in-between bit depths were?

Yanak
19th April 2017, 11:24
AviSource("F:movie.avi", audio = false)
ConvertToYV24() # NOTE 24

# Fail, logo only asigned to AFTER whole line is processed, ie you try to use logo before assinging a value to it.
# logo=ImageSource("F:\logo.png").Overlay(logo, x = 3, y=3, opacity=0.45, mode="luma")

logo=ImageSource("F:\logo.png") # Logo now exist, has been assigned to
Overlay(logo, x = 3, y=3, opacity=0.45, mode="luma") # OK logo exists

# SomeClip.SomeFilter().Crop() works because you are not referenceing a clip that does not yet exist, assuming SomeClip exists.
# Someclip is passed through SomeFilter and on to Crop.


I hope some of that makes sense, was in a hurry to catch my bus, I missed it.
Sorry for the late reply and thank you,

ConvertToYV24() works with the old logo size of 90x 55px, perfect.

For the rest I don't know what what happened, feeling silly, probably mixed up some stuff or messed up somewhere when copying old avs parts of code i used before, had in mind it always worked before but nope, don't know what happened with my brain.

Thanks again.

ajp_anton
19th April 2017, 12:33
Styling...you mean like the font, size, text_color, and halo_color parameters (https://github.com/pinterf/AviSynthPlus/commit/1d561ea662311a47a3788820c62d405f5983091c) that were added to Info() back in August before the in-between bit depths were?
Sorry, is there an updated wiki/manual somewhere that includes all the new stuff?
Also, it still doesn't let you modify the info string, which I find unnecessary and feels like an easy fix (could be wrong, not a programming guru).

raffriff42
19th April 2017, 23:51
Sorry, is there an updated wiki/manual somewhere that includes all the new stuff?For now, see:
Oct 2016 Avisynth Plus Quick reference guide (https://forum.doom9.org/showthread.php?p=1783714#post1783714)
Nov 2016 New functions (https://forum.doom9.org/showthread.php?p=1785533#post1785533)
Apr 2017 AVS 2.60 vs. AVS+ r2455 (https://forum.doom9.org/showthread.php?p=1803414#post1803414)
(Are there other good resources? I'd like to know about them.)

Reel.Deel said he was starting a new documentation site; I don't know what's happening with it.Sounds great! I'll note any changes in the wiki (http://avisynth.nl/index.php/Special:Contributions/Raffriff42) for you....I don't know if listing all AVS+ changes alongside the 'official' documentation is a good idea. Might be a tad confusing.

MysteryX
20th April 2017, 04:27
There isn't just an issue with ScriptClip, but also with ConditionalFilter


vid = AviSource("file")
vid_blur = vid.Blur(1.5)
ConditionalFilter(vid, vid_blur, vid, "AverageLuma()", "lessthan", "20")
Prefetch(2)


This results in a message showing up in the video: "Average Plane: this filter can only be used within run-time filters". Without prefetch, it works fine.

Since these are purely internal filters, nothing prevents you from having AverageLuma as a local function called by ConditionalFilter instead of trying to handle it as a separate special plugin.

pinterf
20th April 2017, 08:04
(Are there other good resources? I'd like to know about them.)

Check the readme.txt in the binary package.

I was already practicing a bit on editing things on avisynth wiki pages, I have updated the masktools sections, worked a bit on mvtools and other references of my plugin updates.

But I still need help on the new function pages, at least to have a good hierarchy and dummy skeleton article pages to be fill up.
At the moment Avisynth+ has only one dedicated page on wiki (http://avisynth.nl/index.php/AviSynth%2B). I'd better not put all the readme stuff there as a flat section. Nor I want to edit the filter section of the classic Avisynth pages.
If someone would create a good (even dummy) layout for the new functions, it would help a lot on bringing the knowledge base online.

raffriff42
20th April 2017, 08:33
Personally, I'd like to see an AVS+ Infobox (https://en.wikipedia.org/wiki/Help:Infobox) on each classic filter page, explaining the differences in some standardized form. Something similar in appearance to the "Abstract" box currently seen on external filter pages like MaskTools2 (http://avisynth.nl/index.php/MaskTools2).

>If someone would create a good (even dummy) layout for the new functions, it would help a lot on bringing the knowledge base online.
I really don't feel like working on a site that is about to be made obsolescent by a fork (https://en.wikipedia.org/wiki/Wikipedia:Content_forking) site.
(If you didn't know, I have been one of the very few active content contributors there - I have made hundreds of edits (http://avisynth.nl/index.php/Special:Contributions/Raffriff42), maybe thousands. The only other users that active are Reel.Deel (http://avisynth.nl/index.php/Special:Contributions/Reel.Deal) and Wilbert (http://avisynth.nl/index.php/Special:Contributions/Admin), the administrator of the site. So that 'someone' would probably be me.)

EDIT okay, I'm reconsidering my position. Whatever Reel.Deal does or doesn't do, I will begin (oh god) the rather large task of documenting AVS+ on the mainstream Avisynth wiki, as time permits. Crudely at first, as you describe. And as always, subject to Wilbert's approval.

MysteryX
22nd April 2017, 05:01
When I build Avisynth+ from the Pinterf's source, I get this error when opening a script:

Avisynth open failure:
Script error: There is no function named 'Prefetch'.

What's going on here?

btw, there is code here that doesn't compile (Visual Studio 2017) because of 'y' being defined several times. It's easy to fix, you just have to rename the 2nd 'y'.
focus.cpp - af_horizontal_yuy2_c

qyot27
22nd April 2017, 05:16
git checkout MT

pinterf
22nd April 2017, 17:40
EDIT okay, I'm reconsidering my position. Whatever Reel.Deal does or doesn't do, I will begin (oh god) the rather large task of documenting AVS+ on the mainstream Avisynth wiki, as time permits. Crudely at first, as you describe. And as always, subject to Wilbert's approval.
Thank you "someone" :) It's really not too much people who keep this documentation site live, I appreciate your efforts.

pinterf
22nd April 2017, 17:49
git checkout MT
Btw, I have to mention another news from the past weeks; with the patient help of qyot27, we were able to successfully compile the project with gcc (under Linux but not for Linux, which was a nightmare and a hard learning curve for me, thanks again qyot27). I don't know if this is good or not, we are by far not on par with Vapoursynth's multiplatform design and I guess we'll never be.

MysteryX
22nd April 2017, 20:00
I looked at the code of ConditionalFilter and now I understand what the fuss is about in regards to ScriptClip and MT -- with current_frame not being found.

I don't like the design of it, but then, it supports complex scripting that can't be done otherwise.

I'm working on ConditionalFilterMT, which will be a limited subset of ConditionalFilter code that won't support complex expressions but that will work with MT. It's a hack, so not a solution for the core.

Btw, does VapourSynth support ScriptClip-like evaluation of expressions at run-time? How is it designed there?

TheFluff
23rd April 2017, 01:40
Btw, does VapourSynth support ScriptClip-like evaluation of expressions at run-time? How is it designed there?

Yes it does (http://www.vapoursynth.com/doc/functions/frameeval.html). Since you can attach metadata to frames in VS you don't need the silly "runtime functions" that inspect the state of a shared variable to figure out which frame to use.

Really, I think the fundamental issue with a lot of things tacked onto Avisynth over the years is that the people who added them didn't understand functional programming.

MysteryX
23rd April 2017, 03:14
Storing the frame number in a shared variable isn't viable in a MT environment no matter how we look at it.

Since that's what VS is doing... any way to support frame metadata without breaking old code?

Wait -- frame metadata won't help if we don't know the frame number!

gonca
23rd April 2017, 17:50
I've installed AvisynthPlus-r2455-MT x86 and x64
My x64 tool chain works as it should so far
However the x86 has not
I have two apps that require AVISynth and they report Avisynth is not installed
When I put the AVISynth.dll from version 2.60 (regular AVISynth) everything is good
I know, from other forums, that AVS+ x86 will work with these apps
Can someone check my avsinfo log and tell me if I am missing any dependencies

Log created with: AVSMeter 2.5.4 (x86)

[OS/Hardware info]
Operating system: Windows 10 (x64) (Build 14393)
CPU: Intel(R) Core(TM) i7-6900K CPU @ 3.20GHz
CPU features: MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, FMA3


[Avisynth info]
VersionString: AviSynth 2.60, build:Mar 31 2015 [16:38:54]
VersionNumber: 2.60
File version: 2.6.0.6
Interface Version: 6
Multi-threading support: No
Avisynth.dll location: C:\Windows\SysWoW64\avisynth.dll
Avisynth.dll time stamp: 2015-03-31, 06:40:57 (UTC)
PluginDir2_5 (HKLM, x86): C:\Program Files (x86)\AviSynth\plugins


[CPP 2.5 / 32 Bit plugins]
C:\Program Files (x86)\AviSynth\plugins\Decomb.dll
C:\Program Files (x86)\AviSynth\plugins\Decomb521.dll
C:\Program Files (x86)\AviSynth\plugins\Deen.dll
C:\Program Files (x86)\AviSynth\plugins\hqdn3d.dll
C:\Program Files (x86)\AviSynth\plugins\nicaudio.dll
C:\Program Files (x86)\AviSynth\plugins\RemoveGrainSSE2.dll
C:\Program Files (x86)\AviSynth\plugins\UnDot.dll [0.0.1.1]


[DLL dependencies (x86)]
C:\Program Files (x86)\AviSynth\plugins\Decomb.dll:
KERNEL32.dll
MSVCRT.dll

C:\Program Files (x86)\AviSynth\plugins\Decomb521.dll:
KERNEL32.dll
MSVCRT.dll

C:\Program Files (x86)\AviSynth\plugins\Deen.dll:
KERNEL32.dll
MSVCRT.dll

C:\Program Files (x86)\AviSynth\plugins\hqdn3d.dll:
KERNEL32.dll

C:\Program Files (x86)\AviSynth\plugins\nicaudio.dll:
KERNEL32.dll

C:\Program Files (x86)\AviSynth\plugins\RemoveGrainSSE2.dll:
KERNEL32.dll

C:\Program Files (x86)\AviSynth\plugins\UnDot.dll:
KERNEL32.dll



[Internal (core) functions]
AVIFileSource
AVISource
AddBorders
AlignedSplice
Amplify
AmplifydB
Animate
Apply
ApplyRange
Assert
AssumeBFF
AssumeFPS
AssumeFieldBased
AssumeFrameBased
AssumeSampleRate
AssumeScaledFPS
AssumeTFF
AudioDub
AudioDubEx
AudioTrim
AverageChromaU
AverageChromaV
AverageLuma
BicubicResize
BilinearResize
BlackmanResize
Blackness
BlankClip
Blur
Bob
Cache
ChangeFPS
Chr
ChromaUDifference
ChromaVDifference
ColorBars
ColorBarsHD
ColorKeyMask
ColorYUV
Compare
ComplementParity
ConditionalFilter
ConditionalReader
ConditionalSelect
ContinuedDenominator
ContinuedNumerator
ConvertAudio
ConvertAudioTo16bit
ConvertAudioTo24bit
ConvertAudioTo32bit
ConvertAudioTo8bit
ConvertAudioToFloat
ConvertBackToYUY2
ConvertFPS
ConvertToMono
ConvertToRGB
ConvertToRGB24
ConvertToRGB32
ConvertToY8
ConvertToYUY2
ConvertToYV12
ConvertToYV16
ConvertToYV24
ConvertToYV411
Crop
CropBottom
Default
Defined
DelayAudio
DeleteFrame
DirectShowSource
Dissolve
DoubleWeave
DuplicateFrame
Echo
EnsureVBRMP3Sync
Eval
Exist
FadeIO
FadeIO0
FadeIO2
FadeIn
FadeIn0
FadeIn2
FadeOut
FadeOut0
FadeOut2
FixBrokenChromaUpsampling
FixLuminance
FlipHorizontal
FlipVertical
FrameEvaluate
FreezeFrame
GaussResize
GeneralConvolution
GetChannel
GetChannels
GetLeftChannel
GetParity
GetRightChannel
Grayscale
Greyscale
HasAudio
HasVideo
Hex
Histogram
HorizontalReduceBy2
ImageReader
ImageSource
ImageSourceAnim
ImageWriter
Import
Info
Interleave
InternalCache
Invert
IsAudioFloat
IsAudioInt
IsBool
IsClip
IsFieldBased
IsFloat
IsFrameBased
IsInt
IsInterleaved
IsPlanar
IsRGB
IsRGB24
IsRGB32
IsString
IsY8
IsYUV
IsYUY2
IsYV12
IsYV16
IsYV24
IsYV411
KillAudio
KillVideo
Lanczos4Resize
LanczosResize
Layer
Letterbox
Levels
Limiter
LoadCPlugin
LoadPlugin
LoadVFAPIPlugin
LoadVirtualdubPlugin
Load_Stdcall_Plugin
Loop
LumaDifference
Mask
MaskHS
Max
Merge
MergeARGB
MergeChannels
MergeChroma
MergeLuma
MergeRGB
MessageClip
Min
MixAudio
MonoToStereo
Normalize
Null
OpenDMLSource
Ord
Overlay
PeculiarBlend
PixelType
PointResize
Preroll
Pulldown
RGBAdjust
RGBDifference
RGBDifferenceFromPrevious
RGBDifferenceToNext
ReduceBy2
ResampleAudio
ResetMask
Reverse
SSRC
ScriptClip
ScriptDir
ScriptFile
ScriptName
SegmentedAVISource
SegmentedDirectShowSource
Select
SelectEven
SelectEvery
SelectOdd
SelectRangeEvery
SeparateColumns
SeparateFields
SeparateRows
SetMemoryMax
SetPlanarLegacyAlignment
SetWorkingDir
Sharpen
ShowAlpha
ShowBlue
ShowFiveVersions
ShowFrameNumber
ShowGreen
ShowRed
ShowSMPTE
ShowTime
SincResize
SkewRows
SpatialSoften
Spline
Spline16Resize
Spline36Resize
Spline64Resize
StackHorizontal
StackVertical
String
Subtitle
Subtract
SuperEQ
SwapFields
SwapUV
TCPServer
TCPSource
TemporalSoften
Time
TimeStretch
Tone
Trim
Turn180
TurnLeft
TurnRight
Tweak
UDifferenceFromPrevious
UDifferenceToNext
UPlaneMax
UPlaneMedian
UPlaneMin
UPlaneMinMaxDifference
UToY
UToY8
UnalignedSplice
VDifferenceFromPrevious
VDifferenceToNext
VPlaneMax
VPlaneMedian
VPlaneMin
VPlaneMinMaxDifference
VToY
VToY8
Version
VersionNumber
VersionString
VerticalReduceBy2
WAVSource
Weave
WeaveColumns
WeaveRows
WriteFile
WriteFileEnd
WriteFileIf
WriteFileStart
YDifferenceFromPrevious
YDifferenceToNext
YPlaneMax
YPlaneMedian
YPlaneMin
YPlaneMinMaxDifference
YToUV
abs
acos
asin
atan
atan2
audiobits
audiochannels
audioduration
audiolength
audiolengthf
audiolengthhi
audiolengthlo
audiolengths
audiorate
bitand
bitchange
bitchg
bitclear
bitclr
bitlrotate
bitlshift
bitlshifta
bitlshiftl
bitlshifts
bitlshiftu
bitnot
bitor
bitrol
bitror
bitrrotate
bitrshifta
bitrshiftl
bitrshifts
bitrshiftu
bitsal
bitsar
bitset
bitshl
bitshr
bittest
bittst
bitxor
ceil
cos
cosh
exp
fillstr
findstr
float
floor
fmod
frac
framecount
framerate
frameratedenominator
frameratenumerator
height
hexvalue
int
lcase
leftstr
log
log10
midstr
muldiv
nop
pi
pow
rand
revstr
rightstr
round
sign
sin
sinh
sqrt
strcmp
strcmpi
strlen
tan
tanh
ucase
undefined
value
width


[External (plugin) functions]
BackwardClense
Clense
Decimate
Decomb521_Decimate
Decomb521_FieldDeinterlace
Decomb521_IsCombed
Decomb521_Telecide
Decomb_Decimate
Decomb_FieldDeinterlace
Decomb_IsCombed
Decomb_Telecide
Deen
Deen_Deen
FieldDeinterlace
ForwardClense
IsCombed
MCClense
NicAC3Source
NicBufferAudio
NicDTSSource
NicLPCMSource
NicMPASource
NicMPG123Source
NicRawPCMSource
RemoveGrain
RemoveGrainSSE2_BackwardClense
RemoveGrainSSE2_Clense
RemoveGrainSSE2_ForwardClense
RemoveGrainSSE2_MCClense
RemoveGrainSSE2_RemoveGrain
Telecide
UnDot
UnDot_UnDot
hqdn3d
hqdn3d_hqdn3d
nicaudio_NicAC3Source
nicaudio_NicBufferAudio
nicaudio_NicDTSSource
nicaudio_NicLPCMSource
nicaudio_NicMPASource
nicaudio_NicMPG123Source
nicaudio_NicRawPCMSource

Groucho2004
23rd April 2017, 18:02
Can someone check my avsinfo log and tell me if I am missing any dependencies
Nothing missing. However, the log shows that you have Avisynth 2.6 in syswow64, not Avisynth+.

gonca
23rd April 2017, 18:08
That is the only way I can make X86 version work with these apps
I'll redo the log with the AVS+ dll

Here is the new log

Log created with: AVSMeter 2.5.4 (x86)

[OS/Hardware info]
Operating system: Windows 10 (x64) (Build 14393)
CPU: Intel(R) Core(TM) i7-6900K CPU @ 3.20GHz
CPU features: MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, FMA3


[Avisynth info]
VersionString: AviSynth+ 0.1 (r2455, MT, i386)
VersionNumber: 2.60
File version: 0.1.0.0
Interface Version: 6
Multi-threading support: Yes
Avisynth.dll location: C:\Windows\SysWoW64\avisynth.dll
Avisynth.dll time stamp: 2017-03-16, 16:29:52 (UTC)
PluginDir+ (HKLM, x86): C:\Program Files (x86)\AviSynth+\plugins+
PluginDir2_5 (HKLM, x86): C:\Program Files (x86)\AviSynth\plugins


[CPP 2.5 / 32 Bit plugins]
C:\Program Files (x86)\AviSynth\plugins\Decomb.dll
C:\Program Files (x86)\AviSynth\plugins\Decomb521.dll
C:\Program Files (x86)\AviSynth\plugins\Deen.dll
C:\Program Files (x86)\AviSynth\plugins\hqdn3d.dll
C:\Program Files (x86)\AviSynth\plugins\nicaudio.dll
C:\Program Files (x86)\AviSynth\plugins\RemoveGrainSSE2.dll
C:\Program Files (x86)\AviSynth\plugins\UnDot.dll [0.0.1.1]

[CPP 2.6 / 32 Bit plugins]
C:\Program Files (x86)\AviSynth+\plugins+\ConvertStacked.dll
C:\Program Files (x86)\AviSynth+\plugins+\DirectShowSource.dll
C:\Program Files (x86)\AviSynth+\plugins+\ImageSeq.dll
C:\Program Files (x86)\AviSynth+\plugins+\Shibatch.dll
C:\Program Files (x86)\AviSynth+\plugins+\TimeStretch.dll
C:\Program Files (x86)\AviSynth+\plugins+\VDubFilter.dll


[DLL dependencies (x86)]
C:\Program Files (x86)\AviSynth\plugins\Decomb.dll:
KERNEL32.dll
MSVCRT.dll

C:\Program Files (x86)\AviSynth\plugins\Decomb521.dll:
KERNEL32.dll
MSVCRT.dll

C:\Program Files (x86)\AviSynth\plugins\Deen.dll:
KERNEL32.dll
MSVCRT.dll

C:\Program Files (x86)\AviSynth\plugins\hqdn3d.dll:
KERNEL32.dll

C:\Program Files (x86)\AviSynth\plugins\nicaudio.dll:
KERNEL32.dll

C:\Program Files (x86)\AviSynth\plugins\RemoveGrainSSE2.dll:
KERNEL32.dll

C:\Program Files (x86)\AviSynth\plugins\UnDot.dll:
KERNEL32.dll

C:\Program Files (x86)\AviSynth+\plugins+\ConvertStacked.dll:
KERNEL32.dll
VCRUNTIME140.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll

C:\Program Files (x86)\AviSynth+\plugins+\DirectShowSource.dll:
WINMM.dll
QUARTZ.dll
ole32.dll
USER32.dll
OLEAUT32.dll
KERNEL32.dll
VCRUNTIME140.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll

C:\Program Files (x86)\AviSynth+\plugins+\ImageSeq.dll:
DevIL.dll
MSVCP140.dll
KERNEL32.dll
VCRUNTIME140.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll

C:\Program Files (x86)\AviSynth+\plugins+\Shibatch.dll:
MSVCP140.dll
KERNEL32.dll
VCRUNTIME140.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll

C:\Program Files (x86)\AviSynth+\plugins+\TimeStretch.dll:
KERNEL32.dll
VCRUNTIME140.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll

C:\Program Files (x86)\AviSynth+\plugins+\VDubFilter.dll:
USER32.dll
KERNEL32.dll
VCRUNTIME140.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll



[Internal (core) functions]
AVIFileSource
AVISource
AddAlphaPlane
AddAutoloadDir
AddBorders
AlignedSplice
Amplify
AmplifydB
Animate
Apply
ApplyRange
Assert
AssumeBFF
AssumeFPS
AssumeFieldBased
AssumeFrameBased
AssumeSampleRate
AssumeScaledFPS
AssumeTFF
AudioDub
AudioDubEx
AudioTrim
AutoloadPlugins
AverageB
AverageChromaU
AverageChromaV
AverageG
AverageLuma
AverageR
BDifference
BDifferenceFromPrevious
BDifferenceToNext
BPlaneMax
BPlaneMedian
BPlaneMin
BPlaneMinMaxDifference
BicubicResize
BilinearResize
BitsPerComponent
BlackmanResize
Blackness
BlankClip
Blur
Bob
Cache
ChangeFPS
Chr
ChromaUDifference
ChromaVDifference
ClearAutoloadDirs
ColorBars
ColorBarsHD
ColorKeyMask
ColorSpaceNameToPixelType
ColorYUV
CombinePlanes
Compare
ComplementParity
ComponentSize
ConditionalFilter
ConditionalReader
ConditionalSelect
ContinuedDenominator
ContinuedNumerator
ConvertAudio
ConvertAudioTo16bit
ConvertAudioTo24bit
ConvertAudioTo32bit
ConvertAudioTo8bit
ConvertAudioToFloat
ConvertBackToYUY2
ConvertBits
ConvertFPS
ConvertTo16bit
ConvertTo8bit
ConvertToFloat
ConvertToMono
ConvertToPlanarRGB
ConvertToPlanarRGBA
ConvertToRGB
ConvertToRGB24
ConvertToRGB32
ConvertToRGB48
ConvertToRGB64
ConvertToY
ConvertToY8
ConvertToYUV411
ConvertToYUV420
ConvertToYUV422
ConvertToYUV444
ConvertToYUY2
ConvertToYV12
ConvertToYV16
ConvertToYV24
ConvertToYV411
Crop
CropBottom
Default
Defined
DelayAudio
DeleteFrame
Dissolve
DoubleWeave
DuplicateFrame
Echo
EnsureVBRMP3Sync
Eval
Exist
ExtractA
ExtractB
ExtractG
ExtractR
ExtractU
ExtractV
ExtractY
FadeIO
FadeIO0
FadeIO2
FadeIn
FadeIn0
FadeIn2
FadeOut
FadeOut0
FadeOut2
FixBrokenChromaUpsampling
FixLuminance
FlipHorizontal
FlipVertical
FrameEvaluate
FreezeFrame
FunctionExists
GDifference
GDifferenceFromPrevious
GDifferenceToNext
GPlaneMax
GPlaneMedian
GPlaneMin
GPlaneMinMaxDifference
GaussResize
GeneralConvolution
GetChannel
GetChannels
GetLeftChannel
GetParity
GetRightChannel
Grayscale
Greyscale
HasAlpha
HasAudio
HasVideo
Hex
Histogram
HorizontalReduceBy2
Import
Info
Interleave
InternalCache
InternalFunctionExists
Invert
Is420
Is422
Is444
IsAudioFloat
IsAudioInt
IsBool
IsClip
IsFieldBased
IsFloat
IsFrameBased
IsInt
IsInterleaved
IsPackedRGB
IsPlanar
IsPlanarRGB
IsPlanarRGBA
IsRGB
IsRGB24
IsRGB32
IsRGB48
IsRGB64
IsString
IsVideoFloat
IsY
IsY8
IsYUV
IsYUVA
IsYUY2
IsYV12
IsYV16
IsYV24
IsYV411
KillAudio
KillVideo
Lanczos4Resize
LanczosResize
Layer
Letterbox
Levels
Limiter
LoadCPlugin
LoadPlugin
Load_Stdcall_Plugin
LogMsg
Loop
LumaDifference
Mask
MaskHS
Max
Merge
MergeARGB
MergeChannels
MergeChroma
MergeLuma
MergeRGB
MessageClip
Min
MixAudio
MonoToStereo
Normalize
Null
NumComponents
OpenDMLSource
Ord
Overlay
PeculiarBlend
PixelType
PlaneToY
PointResize
Prefetch
Preroll
Pulldown
RDifference
RDifferenceFromPrevious
RDifferenceToNext
RGBAdjust
RGBDifference
RGBDifferenceFromPrevious
RGBDifferenceToNext
RPlaneMax
RPlaneMedian
RPlaneMin
RPlaneMinMaxDifference
ReduceBy2
RemoveAlphaPlane
ResampleAudio
ResetMask
Reverse
ScriptClip
ScriptDir
ScriptFile
ScriptName
SegmentedAVISource
SegmentedDirectShowSource
Select
SelectEven
SelectEvery
SelectOdd
SelectRangeEvery
SeparateColumns
SeparateFields
SeparateRows
SetFilterMTMode
SetLogParams
SetMemoryMax
SetPlanarLegacyAlignment
SetWorkingDir
Sharpen
ShowAlpha
ShowBlue
ShowFiveVersions
ShowFrameNumber
ShowGreen
ShowRed
ShowSMPTE
ShowTime
ShowU
ShowV
ShowY
SincResize
SkewRows
SpatialSoften
Spline
Spline16Resize
Spline36Resize
Spline64Resize
StackHorizontal
StackVertical
String
Subtitle
Subtract
SwapFields
SwapUV
TemporalSoften
Time
Tone
Trim
Turn180
TurnLeft
TurnRight
Tweak
UDifferenceFromPrevious
UDifferenceToNext
UPlaneMax
UPlaneMedian
UPlaneMin
UPlaneMinMaxDifference
UToY
UToY8
UnalignedSplice
VDifferenceFromPrevious
VDifferenceToNext
VPlaneMax
VPlaneMedian
VPlaneMin
VPlaneMinMaxDifference
VToY
VToY8
Version
VersionNumber
VersionString
VerticalReduceBy2
WAVSource
Weave
WeaveColumns
WeaveRows
WriteFile
WriteFileEnd
WriteFileIf
WriteFileStart
YDifferenceFromPrevious
YDifferenceToNext
YPlaneMax
YPlaneMedian
YPlaneMin
YPlaneMinMaxDifference
YToUV
abs
acos
asin
atan
atan2
audiobits
audiochannels
audioduration
audiolength
audiolengthf
audiolengthhi
audiolengthlo
audiolengths
audiorate
bitand
bitchange
bitchg
bitclear
bitclr
bitlrotate
bitlshift
bitlshifta
bitlshiftl
bitlshifts
bitlshiftu
bitnot
bitor
bitrol
bitror
bitrrotate
bitrshifta
bitrshiftl
bitrshifts
bitrshiftu
bitsal
bitsar
bitset
bitshl
bitshr
bittest
bittst
bitxor
ceil
cos
cosh
exp
fillstr
findstr
float
floor
fmod
frac
framecount
framerate
frameratedenominator
frameratenumerator
height
hexvalue
int
lcase
leftstr
log
log10
midstr
muldiv
nop
pi
pow
rand
replacestr
revstr
rightstr
round
sign
sin
sinh
sqrt
strcmp
strcmpi
strlen
tan
tanh
ucase
undefined
value
width


[External (plugin) functions]
BackwardClense
Clense
ConvertFromDoubleWidth
ConvertFromStacked
ConvertStacked_ConvertFromDoubleWidth
ConvertStacked_ConvertFromStacked
ConvertStacked_ConvertToDoubleWidth
ConvertStacked_ConvertToStacked
ConvertToDoubleWidth
ConvertToStacked
Decimate
Decomb521_Decimate
Decomb521_FieldDeinterlace
Decomb521_IsCombed
Decomb521_Telecide
Decomb_Decimate
Decomb_FieldDeinterlace
Decomb_IsCombed
Decomb_Telecide
Deen
Deen_Deen
DirectShowSource
DirectShowSource_DirectShowSource
FieldDeinterlace
ForwardClense
ImageReader
ImageSeq_ImageReader
ImageSeq_ImageSource
ImageSeq_ImageSourceAnim
ImageSeq_ImageWriter
ImageSource
ImageSourceAnim
ImageWriter
IsCombed
LoadVirtualdubPlugin
MCClense
NicAC3Source
NicBufferAudio
NicDTSSource
NicLPCMSource
NicMPASource
NicMPG123Source
NicRawPCMSource
RemoveGrain
RemoveGrainSSE2_BackwardClense
RemoveGrainSSE2_Clense
RemoveGrainSSE2_ForwardClense
RemoveGrainSSE2_MCClense
RemoveGrainSSE2_RemoveGrain
SSRC
Shibatch_SSRC
Shibatch_SuperEQ
SuperEQ
Telecide
TimeStretch
TimeStretch_TimeStretch
UnDot
UnDot_UnDot
VDubFilter_LoadVirtualdubPlugin
hqdn3d
hqdn3d_hqdn3d
nicaudio_NicAC3Source
nicaudio_NicBufferAudio
nicaudio_NicDTSSource
nicaudio_NicLPCMSource
nicaudio_NicMPASource
nicaudio_NicMPG123Source
nicaudio_NicRawPCMSource

Groucho2004
23rd April 2017, 18:09
That is the only way I can make X86 version work with these appsWhich apps?

I'll redo the log with the AVS+ dllOK.

gonca
23rd April 2017, 18:15
BD_RB and AVStoDVD
The x64 chain is basically my own scripts and command lines, and it works fine

Groucho2004
23rd April 2017, 18:25
BD_RB and AVStoDVDThe new log doesn't show any problems. If there were any, there would be a section "[Plugin errors/warnings]" after "[Avisynth info]".
There is no reason why the two programs should not work with AVS+, to my knowledge it's fully backward compatible to AVS2.6 except (ancient) v2.0 C/C++ plugins which are not supported by AVS+.

You'll have to pester the authors to change/extend their detection functions. ;) The Avisynth API provides a bunch of functions to determine the version reliably.

gonca
23rd April 2017, 21:33
OK
Thanks

MysteryX
24th April 2017, 02:11
Pinterf, I'll have to fix this for ConditionalMT, but that also needs to be fixed in Avisynth+ core since this needs to work without MT.
https://forum.doom9.org/showthread.php?p=1804874#post1804874

MysteryX
24th April 2017, 04:05
I'm getting a weird performance drop with ChangeFps in the middle of FrameRateConverter.


EM = EM.ChangeFPS(NewNum, NewDen)


CPU drops from 80% to 20% if I place a "return EM" after this line than before, with Prefetch(8). My guess is that the change of frame rate is screwing up the thread pool optimizer or something.

pinterf
24th April 2017, 13:06
Pinterf, I'll have to fix this for ConditionalMT, but that also needs to be fixed in Avisynth+ core since this needs to work without MT.
https://forum.doom9.org/showthread.php?p=1804874#post1804874
Answered in your other topic, copy code from the MT branch for doing statistics on non-8 bit data.

MysteryX
24th April 2017, 16:46
I was thinking about conditional functions. As we know, the problem is passing the current frame number, and storing it in a global var doesn't work in a multi-threaded environment -- and the code can't pass it directly to the functions within the expression because complex expressions are being handled by the Expression Evaluator.

How about passing frame_number to the Expression Evaluator, which when specified, gets passed to the filters through user_data?

It's kind of a hack but it might just work.

Edit: After looking at the code, Evaluate translates into env2->Invoke, which doesn't have user_data as parameter. For per-frame filters, it would make the most sense to take the frame_number as the first standard parameter.

So PExpression.Evaluate could have a second syntax that takes frame_count as parameter for frame-specific expressions. In that function, all function calls receive frame_count as the first parameter during invokes.

The issue isn't with MT really -- but instead of a badly designed per-frame expression evaluator that stored frame_count in a thread-specific global var as a hack.

Now that I'm at it, I might try to dig into the code myself, it doesn't look too hard. If I can't fix it, I'll let Pinterf do it :) Meanwhile Pinterf can look into the other issues I pointed out.

pinterf
24th April 2017, 17:36
Edit: After looking at the code, Evaluate translates into env2->Invoke, which doesn't have user_data as parameter. For per-frame filters, it would make the most sense to take the frame_number as the first standard parameter.

This is where the thread-local current_frame is lost, in ScriptEnvirontmentTLS.h

virtual bool __stdcall Invoke(AVSValue *result, const char* name, const AVSValue& args, const char* const* arg_names=0)
{
// This is why e.g. YDifferenceFromPrevious does not see "last" and "current_frame" defined in ScriptClip's GetFrame under MT.
// These variables are thread local to this very TLS but are not seen by core (core has a different subset of variables)
// invoking a runtime function here is losing the TLS scope
if (!_stricmp(name, "YDifferenceFromPrevious")) {
int x = 0; // debug stop
}
return core->Invoke(result, name, args, arg_names=0);
}


This is the "torture script" :)
BlankClip(width=640,height=480,length=50,pixel_type="YV24",color=$000000)
ScriptClip(last, "Subtitle(String(YDifferenceFromPrevious))")
Prefetch(2)

MysteryX
24th April 2017, 23:42
This is the "torture script" :)
ScriptClip is working :)

Just a few final details and I'll submit changes :)

No "hack" was needed :)

AverageLuma still brings a value of 6653 on ColorBarsHD in 14-bit :(

MysteryX
25th April 2017, 00:53
dammit.

I had done the changes over branch MT-pfmod instead of branch MT, and it was working.

Now I've ported the changes over to MT branch and am ready to submit.

**BUT** now there is a thread lock issue -- with something that changed since you merged the pfmod branch.

I'll submit anyway, and you can look at it from there. It *WAS* working!

Pull request submitted. (https://github.com/pinterf/AviSynthPlus/pull/10)

The solution was to treat per-frame functions differently. They now always take frame_number as second argument (after clip). ScriptParser now takes frame_number in its constructor, and automatically passes it to the per-frame functions as needed. It works beautifully.

Now you can also use this to write the average luma value of the 10th frame

Subtitle(string(AverageLuma(10)))

StainlessS
25th April 2017, 01:22
Now you can also use this to write the average luma value of the 10th frame

Subtitle(string(AverageLuma(10)))


Again I have not been following too closely, but would that be
AverageLuma(Offset=10) ie relative to current frame (whatever than may mean in this context).

raffriff42
25th April 2017, 01:36
>Subtitle(string(AverageLuma(10)))
Yes, that's how it's worked since AVS 2.61.
AverageLuma(clip [, int offset = 0])
http://avisynth.nl/index.php/Internal_functions#Average

>AverageLuma still brings a value of 6653 on ColorBarsHD in 14-bit
Which is fine.
6653/2^(14-8) == 6653/2^6 == 6653/64 == 103.953

MysteryX
25th April 2017, 01:42
Again I have not been following too closely, but would that be
AverageLuma(Offset=10) ie relative to current frame (whatever than may mean in this context).
hum.. we have to ensure there is no confusion between function versions.


ScriptClip(last, "Subtitle(String(AverageLuma(10)))")


AverageLuma will try functions in this order
- AverageLuma(10)
- AverageLuma(last, 10) # this version will be taken
- AverageLuma(last, n, 10) # we need to take this version

This will cause problems, as it will return AverageLuma of the 10th frame instead of applying an offset of 10 to the current frame.

If we reverse the order of look-up and check
- AverageLuma(last, n, 10) # we need to take this version
before
- AverageLuma(last, 10) # this version will be taken
when frame_number is specified, then it should fix the problem.

There is also the risk that some other standard function gets passed "frame_number" as its int argument when it shouldn't.

This, in contrast, should specify frame_number instead of offset. Previously, these filters couldn't be used outside of a conditional function.

Subtitle(String(AverageLuma(10)))