Added AviSynth language definition (#3071)
This commit is contained in:
parent
ffb2043909
commit
746a4b1adf
File diff suppressed because one or more lines are too long
|
@ -160,6 +160,11 @@
|
|||
"title": "AutoIt",
|
||||
"owner": "Golmote"
|
||||
},
|
||||
"avisynth": {
|
||||
"title": "AviSynth",
|
||||
"alias": "avs",
|
||||
"owner": "Zinfidel"
|
||||
},
|
||||
"avro-idl": {
|
||||
"title":"Avro IDL",
|
||||
"alias": "avdl",
|
||||
|
|
|
@ -0,0 +1,188 @@
|
|||
// http://avisynth.nl/index.php/The_full_AviSynth_grammar
|
||||
(function (Prism) {
|
||||
|
||||
function replace(pattern, replacements) {
|
||||
return pattern.replace(/<<(\d+)>>/g, function (m, index) {
|
||||
return replacements[+index];
|
||||
});
|
||||
}
|
||||
|
||||
function re(pattern, replacements, flags) {
|
||||
return RegExp(replace(pattern, replacements), flags || '');
|
||||
}
|
||||
|
||||
var types = /clip|int|float|string|bool|val/.source;
|
||||
var internals = [
|
||||
// bools
|
||||
/is(?:bool|clip|float|int|string)|defined|(?:var|(?:internal)?function)?exists?/.source,
|
||||
// control
|
||||
/apply|assert|default|eval|import|select|nop|undefined/.source,
|
||||
// global
|
||||
/set(?:memorymax|cachemode|maxcpu|workingdir|planarlegacyalignment)|opt_(?:allowfloataudio|usewaveextensible|dwchannelmask|avipadscanlines|vdubplanarhack|enable_(?:v210|y3_10_10|y3_10_16|b64a|planartopackedrgb))/.source,
|
||||
// conv
|
||||
/hex(?:value)?|value/.source,
|
||||
// numeric
|
||||
/max|min|muldiv|floor|ceil|round|fmod|pi|exp|log(?:10)?|pow|sqrt|abs|sign|frac|rand|spline|continued(?:numerator|denominator)?/.source,
|
||||
// trig
|
||||
/a?sinh?|a?cosh?|a?tan[2h]?/.source,
|
||||
// bit
|
||||
/(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/.source,
|
||||
// runtime
|
||||
/average(?:luma|chroma[uv]|[bgr])|(?:luma|chroma[uv]|rgb|[rgb]|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/.source,
|
||||
// script
|
||||
/script(?:name(?:utf8)?|file(?:utf8)?|dir(?:utf8)?)|setlogparams|logmsg|getprocessinfo/.source,
|
||||
// string
|
||||
/[lu]case|str(?:toutf8|fromutf8|len|cmpi?)|(?:rev|left|right|mid|find|replace|fill)str|format|trim(?:left|right|all)|chr|ord|time/.source,
|
||||
// version
|
||||
/version(?:number|string)|isversionorgreater/.source,
|
||||
// helper
|
||||
/buildpixeltype|colorspacenametopixeltype/.source,
|
||||
// avsplus
|
||||
/setfiltermtmode|prefetch|addautoloaddir|on(?:cpu|cuda)/.source
|
||||
].join('|');
|
||||
var properties = [
|
||||
// content
|
||||
/has(?:audio|video)/.source,
|
||||
// resolution
|
||||
/width|height/.source,
|
||||
// framerate
|
||||
/frame(?:count|rate)|framerate(?:numerator|denominator)/.source,
|
||||
// interlacing
|
||||
/is(?:field|frame)based|getparity/.source,
|
||||
// color format
|
||||
/pixeltype|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:y2|va?))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|hasalpha|componentsize|numcomponents|bitspercomponent/.source,
|
||||
// audio
|
||||
/audio(?:rate|duration|length(?:[fs]|lo|hi)?|channels|bits)|isaudio(?:float|int)/.source
|
||||
].join('|');
|
||||
var filters = [
|
||||
// source
|
||||
/avi(?:file)?source|opendmlsource|directshowsource|image(?:reader|source|sourceanim)|segmented(?:avisource|directshowsource)|wavsource/.source,
|
||||
// color
|
||||
/coloryuv|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:444|422|420|411)|YUY2)|convertbacktoyuy2|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:luma|chroma)|rgbadjust|show(?:red|green|blue|alpha)|swapuv|tweak|[uv]toy8?|ytouv/.source,
|
||||
// overlay
|
||||
/(?:colorkey|reset)mask|mask(?:hs)?|layer|merge|overlay|subtract/.source,
|
||||
// geometry
|
||||
/addborders|crop(?:bottom)?|flip(?:horizontal|vertical)|letterbox|(?:horizontal|vertical)?reduceby2|(?:bicubic|bilinear|blackman|gauss|lanczos|lanczos4|point|sinc|spline(?:16|36|64))resize|skewrows|turn(?:left|right|180)/.source,
|
||||
// pixel
|
||||
/blur|sharpen|generalconvolution|(?:spatial|temporal)soften|fixbrokenchromaupsampling/.source,
|
||||
// timeline
|
||||
/trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|out|io)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/.source,
|
||||
// interlace
|
||||
/assume(?:frame|field)based|assume[bt]ff|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|rows|fields)|swapfields|weave(?:columns|rows)?/.source,
|
||||
// audio
|
||||
/amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|supereq|ssrc|timestretch/.source,
|
||||
// conditional
|
||||
/conditional(?:filter|select|reader)|frameevaluate|scriptclip|writefile(?:if|start|end)?|animate|applyrange|tcp(?:server|source)/.source,
|
||||
// export
|
||||
/imagewriter/.source,
|
||||
// debug
|
||||
/subtitle|blankclip|blackness|colorbars(?:hd)?|compare|dumpfiltergraph|setgraphanalysis|echo|histogram|info|messageclip|preroll|showfiveversions|show(?:framenumber|smpte|time)|stack(?:horizontal|vertical)|tone|version/.source
|
||||
].join('|');
|
||||
var allinternals = [internals, properties, filters].join('|');
|
||||
|
||||
Prism.languages.avisynth = {
|
||||
'comment': [
|
||||
{
|
||||
// Matches [* *] nestable block comments, but only supports 1 level of nested comments
|
||||
// /\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|<self>)*\*\]/
|
||||
pattern: /(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,
|
||||
lookbehind: true,
|
||||
greedy: true
|
||||
},
|
||||
{
|
||||
// Matches /* */ block comments
|
||||
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
||||
lookbehind: true,
|
||||
greedy: true
|
||||
},
|
||||
{
|
||||
// Matches # comments
|
||||
pattern: /(^|[^\\$])#.*/,
|
||||
lookbehind: true,
|
||||
greedy: true
|
||||
}
|
||||
],
|
||||
|
||||
// Handle before strings because optional arguments are surrounded by double quotes
|
||||
'argument': {
|
||||
pattern: re(/\b(?:<<0>>)\s+("?)\w+\1/.source, [types], 'i'),
|
||||
inside: {
|
||||
'keyword': /^\w+/
|
||||
}
|
||||
},
|
||||
|
||||
// Optional argument assignment
|
||||
'argument-label': {
|
||||
pattern: /([,(][\s\\]*)\w+\s*=(?!=)/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'argument-name': {
|
||||
pattern: /^\w+/,
|
||||
alias: 'punctuation'
|
||||
},
|
||||
'punctuation': /=$/
|
||||
}
|
||||
},
|
||||
|
||||
'string': [
|
||||
{
|
||||
// triple double-quoted
|
||||
pattern: /"""[\s\S]*?"""/,
|
||||
greedy: true,
|
||||
},
|
||||
{
|
||||
// single double-quoted
|
||||
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
||||
greedy: true,
|
||||
inside: {
|
||||
'constant': {
|
||||
// These *are* case-sensitive!
|
||||
pattern: /\b(?:DEFAULT_MT_MODE|(?:SCRIPT|MAINSCRIPT|PROGRAM)DIR|(?:USER|MACHINE)_(?:PLUS|CLASSIC)_PLUGINS)\b/
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
// The special "last" variable that takes the value of the last implicitly returned clip
|
||||
'variable': /\b(?:last)\b/i,
|
||||
|
||||
'boolean': /\b(?:true|false|yes|no)\b/i,
|
||||
|
||||
'keyword': /\b(?:function|global|return|try|catch|if|else|while|for|__END__)\b/i,
|
||||
|
||||
'constant': /\bMT_(?:NICE_FILTER|MULTI_INSTANCE|SERIALIZED|SPECIAL_MT)\b/,
|
||||
|
||||
// AviSynth's internal functions, filters, and properties
|
||||
'builtin-function': {
|
||||
pattern: re(/\b(?:<<0>>)\b/.source, [allinternals], 'i'),
|
||||
alias: 'function'
|
||||
},
|
||||
|
||||
'type-cast': {
|
||||
pattern: re(/\b(?:<<0>>)(?=\s*\()/.source, [types], 'i'),
|
||||
alias: 'keyword'
|
||||
},
|
||||
|
||||
// External/user-defined filters
|
||||
'function': {
|
||||
pattern: /\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,
|
||||
lookbehind: true
|
||||
},
|
||||
|
||||
// Matches a \ as the first or last character on a line
|
||||
'line-continuation': {
|
||||
pattern: /(^[ \t]*)\\|\\(?=[ \t]*$)/m,
|
||||
lookbehind: true,
|
||||
alias: 'punctuation'
|
||||
},
|
||||
|
||||
'number': /\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,
|
||||
|
||||
'operator': /\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,
|
||||
|
||||
'punctuation': /[{}\[\]();,.]/
|
||||
};
|
||||
|
||||
Prism.languages.avs = Prism.languages.avisynth;
|
||||
|
||||
}(Prism));
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,24 @@
|
|||
<h2>Full Example</h2>
|
||||
<pre><code>/*
|
||||
* Example AviSynth script for PrismJS demonstration.
|
||||
* By Zinfidel
|
||||
*/
|
||||
|
||||
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
|
||||
AddAutoloadDir("MAINSCRIPTDIR/programs/plugins")
|
||||
|
||||
# Multiplies clip size and changes aspect ratio to 4:3
|
||||
function CorrectAspectRatio(clip c, int scaleFactor, bool "useNearestNeighbor") {
|
||||
useNearestNeighbor = default(useNearestNeighbor, false)
|
||||
stretchFactor = (c.Height * (4 / 3)) / c.Width
|
||||
|
||||
return useNearestNeighbor \
|
||||
? c.PointResize(c.Width * scaleFactor * stretchFactor, c.Height * scaleFactor) \
|
||||
: c.Lanczos4Resize(c.Width * scaleFactor * stretchFactor, c.Height * scaleFactor)
|
||||
}
|
||||
|
||||
AviSource("myclip.avi")
|
||||
last.CorrectAspectRatio(3, yes)
|
||||
|
||||
|
||||
Prefetch(4)</code></pre>
|
|
@ -172,6 +172,7 @@
|
|||
"js": "javascript",
|
||||
"g4": "antlr4",
|
||||
"adoc": "asciidoc",
|
||||
"avs": "avisynth",
|
||||
"avdl": "avro-idl",
|
||||
"shell": "bash",
|
||||
"shortcode": "bbcode",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -43,6 +43,8 @@
|
|||
"asm6502": "6502 Assembly",
|
||||
"autohotkey": "AutoHotkey",
|
||||
"autoit": "AutoIt",
|
||||
"avisynth": "AviSynth",
|
||||
"avs": "AviSynth",
|
||||
"avro-idl": "Avro IDL",
|
||||
"avdl": "Avro IDL",
|
||||
"basic": "BASIC",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,117 @@
|
|||
hasaudio
|
||||
hasvideo
|
||||
width
|
||||
height
|
||||
framecount
|
||||
framerate
|
||||
frameratenumerator
|
||||
frameratedenominator
|
||||
isfieldbased
|
||||
isframebased
|
||||
getparity
|
||||
|
||||
pixeltype
|
||||
isplanar
|
||||
isinterleaved
|
||||
isrgb
|
||||
isrgb24
|
||||
isrgb32
|
||||
isyuv
|
||||
isyuy2
|
||||
isy8
|
||||
isyv12
|
||||
isyv16
|
||||
isyv24
|
||||
isyv411
|
||||
is420
|
||||
is422
|
||||
is444
|
||||
isy
|
||||
isyuva
|
||||
isrgb48
|
||||
isrgb64
|
||||
ispackedrgb
|
||||
isplanarrgb
|
||||
isplanarrgba
|
||||
hasalpha
|
||||
componentsize
|
||||
numcomponents
|
||||
bitspercomponent
|
||||
|
||||
audiorate
|
||||
audioduration
|
||||
audiolength
|
||||
audiolengthf
|
||||
audiolengths
|
||||
audiolengthlo
|
||||
audiolengthhi
|
||||
audiochannels
|
||||
audiobits
|
||||
isaudiofloat
|
||||
isaudioint
|
||||
|
||||
xyzisaudiointxyz
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["builtin-function", "hasaudio"],
|
||||
["builtin-function", "hasvideo"],
|
||||
["builtin-function", "width"],
|
||||
["builtin-function", "height"],
|
||||
["builtin-function", "framecount"],
|
||||
["builtin-function", "framerate"],
|
||||
["builtin-function", "frameratenumerator"],
|
||||
["builtin-function", "frameratedenominator"],
|
||||
["builtin-function", "isfieldbased"],
|
||||
["builtin-function", "isframebased"],
|
||||
["builtin-function", "getparity"],
|
||||
|
||||
["builtin-function", "pixeltype"],
|
||||
["builtin-function", "isplanar"],
|
||||
["builtin-function", "isinterleaved"],
|
||||
["builtin-function", "isrgb"],
|
||||
["builtin-function", "isrgb24"],
|
||||
["builtin-function", "isrgb32"],
|
||||
["builtin-function", "isyuv"],
|
||||
["builtin-function", "isyuy2"],
|
||||
["builtin-function", "isy8"],
|
||||
["builtin-function", "isyv12"],
|
||||
["builtin-function", "isyv16"],
|
||||
["builtin-function", "isyv24"],
|
||||
["builtin-function", "isyv411"],
|
||||
["builtin-function", "is420"],
|
||||
["builtin-function", "is422"],
|
||||
["builtin-function", "is444"],
|
||||
["builtin-function", "isy"],
|
||||
["builtin-function", "isyuva"],
|
||||
["builtin-function", "isrgb48"],
|
||||
["builtin-function", "isrgb64"],
|
||||
["builtin-function", "ispackedrgb"],
|
||||
["builtin-function", "isplanarrgb"],
|
||||
["builtin-function", "isplanarrgba"],
|
||||
["builtin-function", "hasalpha"],
|
||||
["builtin-function", "componentsize"],
|
||||
["builtin-function", "numcomponents"],
|
||||
["builtin-function", "bitspercomponent"],
|
||||
|
||||
["builtin-function", "audiorate"],
|
||||
["builtin-function", "audioduration"],
|
||||
["builtin-function", "audiolength"],
|
||||
["builtin-function", "audiolengthf"],
|
||||
["builtin-function", "audiolengths"],
|
||||
["builtin-function", "audiolengthlo"],
|
||||
["builtin-function", "audiolengthhi"],
|
||||
["builtin-function", "audiochannels"],
|
||||
["builtin-function", "audiobits"],
|
||||
["builtin-function", "isaudiofloat"],
|
||||
["builtin-function", "isaudioint"],
|
||||
|
||||
"\r\n\r\nxyzisaudiointxyz"
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
All internal functions, filters, and properties can be used in the following formats:
|
||||
intFunc == intFunc() == last.intFunc == last.intFunc()
|
||||
They must not appear within other words.
|
|
@ -0,0 +1,131 @@
|
|||
[* comment [* global *] DEFAULT_MT_MODE *]
|
||||
|
||||
notacomment
|
||||
|
||||
/* comment
|
||||
global "a string"
|
||||
DEFAULT_MT_MODE */
|
||||
|
||||
notacomment
|
||||
|
||||
# comment global DEFAULT_MT_MODE
|
||||
|
||||
notacomment
|
||||
|
||||
"a simple string"
|
||||
|
||||
"""a
|
||||
complex
|
||||
string"""
|
||||
|
||||
"DEFAULT_MT_MODE"
|
||||
"SCRIPTDIR"
|
||||
"MAINSCRIPTDIR"
|
||||
"PROGRAMDIR"
|
||||
"USER_PLUS_PLUGINS"
|
||||
"MACHINE_PLUS_PLUGINS"
|
||||
"USER_CLASSIC_PLUGINS"
|
||||
"MACHINE_CLASSIC_PLUGINS"
|
||||
|
||||
"default_mt_mode"
|
||||
"scriptdir"
|
||||
"mainscriptdir"
|
||||
"programdir"
|
||||
"user_plus_plugins"
|
||||
"machine_plus_plugins"
|
||||
"user_classic_plugins"
|
||||
"machine_classic_plugins"
|
||||
|
||||
DEFAULT_MT_MODE
|
||||
# SCRIPTDIR is also an internal function
|
||||
MAINSCRIPTDIR
|
||||
PROGRAMDIR
|
||||
USER_PLUS_PLUGINS
|
||||
MACHINE_PLUS_PLUGINS
|
||||
USER_CLASSIC_PLUGINS
|
||||
MACHINE_CLASSIC_PLUGINS
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["comment", "[* comment [* global *] DEFAULT_MT_MODE *]"],
|
||||
|
||||
"\r\n\r\nnotacomment\r\n\r\n",
|
||||
|
||||
["comment", "/* comment\r\nglobal \"a string\"\r\nDEFAULT_MT_MODE */"],
|
||||
|
||||
"\r\n\r\nnotacomment\r\n\r\n",
|
||||
|
||||
["comment", "# comment global DEFAULT_MT_MODE"],
|
||||
|
||||
"\r\n\r\nnotacomment\r\n\r\n",
|
||||
|
||||
["string", ["\"a simple string\""]],
|
||||
|
||||
["string", "\"\"\"a\r\ncomplex\r\nstring\"\"\""],
|
||||
|
||||
["string", [
|
||||
"\"",
|
||||
["constant", "DEFAULT_MT_MODE"],
|
||||
"\""
|
||||
]],
|
||||
["string", [
|
||||
"\"",
|
||||
["constant", "SCRIPTDIR"],
|
||||
"\""
|
||||
]],
|
||||
["string", [
|
||||
"\"",
|
||||
["constant", "MAINSCRIPTDIR"],
|
||||
"\""
|
||||
]],
|
||||
["string", [
|
||||
"\"",
|
||||
["constant", "PROGRAMDIR"],
|
||||
"\""
|
||||
]],
|
||||
["string", [
|
||||
"\"",
|
||||
["constant", "USER_PLUS_PLUGINS"],
|
||||
"\""
|
||||
]],
|
||||
["string", [
|
||||
"\"",
|
||||
["constant", "MACHINE_PLUS_PLUGINS"],
|
||||
"\""
|
||||
]],
|
||||
["string", [
|
||||
"\"",
|
||||
["constant", "USER_CLASSIC_PLUGINS"],
|
||||
"\""
|
||||
]],
|
||||
["string", [
|
||||
"\"",
|
||||
["constant", "MACHINE_CLASSIC_PLUGINS"],
|
||||
"\""
|
||||
]],
|
||||
|
||||
["string", ["\"default_mt_mode\""]],
|
||||
["string", ["\"scriptdir\""]],
|
||||
["string", ["\"mainscriptdir\""]],
|
||||
["string", ["\"programdir\""]],
|
||||
["string", ["\"user_plus_plugins\""]],
|
||||
["string", ["\"machine_plus_plugins\""]],
|
||||
["string", ["\"user_classic_plugins\""]],
|
||||
["string", ["\"machine_classic_plugins\""]],
|
||||
|
||||
"\r\n\r\nDEFAULT_MT_MODE\r\n",
|
||||
["comment", "# SCRIPTDIR is also an internal function"],
|
||||
"\r\nMAINSCRIPTDIR\r\nPROGRAMDIR\r\nUSER_PLUS_PLUGINS\r\nMACHINE_PLUS_PLUGINS\r\nUSER_CLASSIC_PLUGINS\r\nMACHINE_CLASSIC_PLUGINS"
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Block comments should not allow any other tokens within them, and should work over multiple lines.
|
||||
Single line comments are the same, but just one line.
|
||||
Known issue: square bracket block comments can be nested, but regular languages can't do that.
|
||||
|
||||
Single line strings should be surrounded by double quotes, and allow no tokens within them except for predefined symbols.
|
||||
Triple quote strings can span multiple lines and allow no tokens within them.
|
||||
|
||||
Predefined symbols must appear within single line strings. They are case sensitive.
|
|
@ -0,0 +1,391 @@
|
|||
isbool
|
||||
isclip
|
||||
isfloat
|
||||
isint
|
||||
isstring
|
||||
exist
|
||||
defined
|
||||
functionexists
|
||||
internalfunctionexists
|
||||
varexist
|
||||
|
||||
apply
|
||||
eval
|
||||
import
|
||||
select
|
||||
default
|
||||
assert
|
||||
nop
|
||||
undefined
|
||||
|
||||
setmemorymax
|
||||
setcachemode
|
||||
setmaxcpu
|
||||
setworkingdir
|
||||
setplanarlegacyalignment
|
||||
opt_allowfloataudio
|
||||
opt_usewaveextensible
|
||||
opt_dwchannelmask
|
||||
opt_avipadscanlines
|
||||
opt_vdubplanarhack
|
||||
opt_enable_v210
|
||||
opt_enable_y3_10_10
|
||||
opt_enable_y3_10_16
|
||||
opt_enable_b64a
|
||||
opt_enable_planartopackedrgb
|
||||
|
||||
value
|
||||
hexvalue
|
||||
hex
|
||||
|
||||
max
|
||||
min
|
||||
muldiv
|
||||
floor
|
||||
ceil
|
||||
round
|
||||
fmod
|
||||
pi
|
||||
exp
|
||||
log
|
||||
log10
|
||||
pow
|
||||
sqrt
|
||||
abs
|
||||
sign
|
||||
frac
|
||||
rand
|
||||
spline
|
||||
continuednumerator
|
||||
continueddenominator
|
||||
|
||||
sin
|
||||
cos
|
||||
tan
|
||||
asin
|
||||
acos
|
||||
atan
|
||||
atan2
|
||||
sinh
|
||||
cosh
|
||||
tanh
|
||||
|
||||
bitand
|
||||
bitnot
|
||||
bitor
|
||||
bitxor
|
||||
bitlshift
|
||||
bitshl
|
||||
bitsal
|
||||
bitrshifta
|
||||
bitrshifts
|
||||
bitsar
|
||||
bitrshiftl
|
||||
bitrshiftu
|
||||
bitshr
|
||||
bitlrotate
|
||||
bitrol
|
||||
bitrrotatel
|
||||
bitror
|
||||
bittest
|
||||
bittst
|
||||
bitset
|
||||
bitsetcount
|
||||
bitclear
|
||||
bitclr
|
||||
bitchange
|
||||
bitchg
|
||||
|
||||
averageluma
|
||||
averagechromau
|
||||
averagechromav
|
||||
averageb
|
||||
averageg
|
||||
averager
|
||||
lumadifference
|
||||
chromaudifference
|
||||
chromavdifference
|
||||
rgbdifference
|
||||
bdifference
|
||||
gdifference
|
||||
rdifference
|
||||
ydifferencefromprevious
|
||||
udifferencefromprevious
|
||||
vdifferencefromprevious
|
||||
rgbdifferencefromprevious
|
||||
bdifferencefromprevious
|
||||
gdifferencefromprevious
|
||||
rdifferencefromprevious
|
||||
ydifferencetonext
|
||||
udifferencetonext
|
||||
vdifferencetonext
|
||||
rgbdifferencetonext
|
||||
rdifferencetonext
|
||||
gdifferencetonext
|
||||
bdifferencetonext
|
||||
yplanemedian
|
||||
uplanemedian
|
||||
vplanemedian
|
||||
bplanemedian
|
||||
gplanemedian
|
||||
rplanemedian
|
||||
yplanemin
|
||||
uplanemin
|
||||
vplanemin
|
||||
bplanemin
|
||||
gplanemin
|
||||
rplanemin
|
||||
yplanemax
|
||||
uplanemax
|
||||
vplanemax
|
||||
bplanemax
|
||||
gplanemax
|
||||
rplanemax
|
||||
yplaneminmaxdifference
|
||||
uplaneminmaxdifference
|
||||
vplaneminmaxdifference
|
||||
bplaneminmaxdifference
|
||||
gplaneminmaxdifference
|
||||
rplaneminmaxdifference
|
||||
|
||||
scriptname
|
||||
scriptnameutf8
|
||||
scriptfile
|
||||
scriptfileutf8
|
||||
scriptdir
|
||||
scriptdirutf8
|
||||
setlogparams
|
||||
logmsg
|
||||
getprocessinfo
|
||||
|
||||
lcase
|
||||
ucase
|
||||
strtoutf8
|
||||
strfromutf8
|
||||
strlen
|
||||
revstr
|
||||
leftstr
|
||||
rightstr
|
||||
midstr
|
||||
findstr
|
||||
replacestr
|
||||
format
|
||||
fillstr
|
||||
strcmp
|
||||
strcmpi
|
||||
trimleft
|
||||
trimright
|
||||
trimall
|
||||
chr
|
||||
ord
|
||||
time
|
||||
|
||||
versionnumber
|
||||
versionstring
|
||||
isversionorgreater
|
||||
|
||||
buildpixeltype
|
||||
colorspacenametopixeltype
|
||||
|
||||
kevincosner
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["builtin-function", "isbool"],
|
||||
["builtin-function", "isclip"],
|
||||
["builtin-function", "isfloat"],
|
||||
["builtin-function", "isint"],
|
||||
["builtin-function", "isstring"],
|
||||
["builtin-function", "exist"],
|
||||
["builtin-function", "defined"],
|
||||
["builtin-function", "functionexists"],
|
||||
["builtin-function", "internalfunctionexists"],
|
||||
["builtin-function", "varexist"],
|
||||
|
||||
["builtin-function", "apply"],
|
||||
["builtin-function", "eval"],
|
||||
["builtin-function", "import"],
|
||||
["builtin-function", "select"],
|
||||
["builtin-function", "default"],
|
||||
["builtin-function", "assert"],
|
||||
["builtin-function", "nop"],
|
||||
["builtin-function", "undefined"],
|
||||
|
||||
["builtin-function", "setmemorymax"],
|
||||
["builtin-function", "setcachemode"],
|
||||
["builtin-function", "setmaxcpu"],
|
||||
["builtin-function", "setworkingdir"],
|
||||
["builtin-function", "setplanarlegacyalignment"],
|
||||
["builtin-function", "opt_allowfloataudio"],
|
||||
["builtin-function", "opt_usewaveextensible"],
|
||||
["builtin-function", "opt_dwchannelmask"],
|
||||
["builtin-function", "opt_avipadscanlines"],
|
||||
["builtin-function", "opt_vdubplanarhack"],
|
||||
["builtin-function", "opt_enable_v210"],
|
||||
["builtin-function", "opt_enable_y3_10_10"],
|
||||
["builtin-function", "opt_enable_y3_10_16"],
|
||||
["builtin-function", "opt_enable_b64a"],
|
||||
["builtin-function", "opt_enable_planartopackedrgb"],
|
||||
|
||||
["builtin-function", "value"],
|
||||
["builtin-function", "hexvalue"],
|
||||
["builtin-function", "hex"],
|
||||
|
||||
["builtin-function", "max"],
|
||||
["builtin-function", "min"],
|
||||
["builtin-function", "muldiv"],
|
||||
["builtin-function", "floor"],
|
||||
["builtin-function", "ceil"],
|
||||
["builtin-function", "round"],
|
||||
["builtin-function", "fmod"],
|
||||
["builtin-function", "pi"],
|
||||
["builtin-function", "exp"],
|
||||
["builtin-function", "log"],
|
||||
["builtin-function", "log10"],
|
||||
["builtin-function", "pow"],
|
||||
["builtin-function", "sqrt"],
|
||||
["builtin-function", "abs"],
|
||||
["builtin-function", "sign"],
|
||||
["builtin-function", "frac"],
|
||||
["builtin-function", "rand"],
|
||||
["builtin-function", "spline"],
|
||||
["builtin-function", "continuednumerator"],
|
||||
["builtin-function", "continueddenominator"],
|
||||
|
||||
["builtin-function", "sin"],
|
||||
["builtin-function", "cos"],
|
||||
["builtin-function", "tan"],
|
||||
["builtin-function", "asin"],
|
||||
["builtin-function", "acos"],
|
||||
["builtin-function", "atan"],
|
||||
["builtin-function", "atan2"],
|
||||
["builtin-function", "sinh"],
|
||||
["builtin-function", "cosh"],
|
||||
["builtin-function", "tanh"],
|
||||
|
||||
["builtin-function", "bitand"],
|
||||
["builtin-function", "bitnot"],
|
||||
["builtin-function", "bitor"],
|
||||
["builtin-function", "bitxor"],
|
||||
["builtin-function", "bitlshift"],
|
||||
["builtin-function", "bitshl"],
|
||||
["builtin-function", "bitsal"],
|
||||
["builtin-function", "bitrshifta"],
|
||||
["builtin-function", "bitrshifts"],
|
||||
["builtin-function", "bitsar"],
|
||||
["builtin-function", "bitrshiftl"],
|
||||
["builtin-function", "bitrshiftu"],
|
||||
["builtin-function", "bitshr"],
|
||||
["builtin-function", "bitlrotate"],
|
||||
["builtin-function", "bitrol"],
|
||||
["builtin-function", "bitrrotatel"],
|
||||
["builtin-function", "bitror"],
|
||||
["builtin-function", "bittest"],
|
||||
["builtin-function", "bittst"],
|
||||
["builtin-function", "bitset"],
|
||||
["builtin-function", "bitsetcount"],
|
||||
["builtin-function", "bitclear"],
|
||||
["builtin-function", "bitclr"],
|
||||
["builtin-function", "bitchange"],
|
||||
["builtin-function", "bitchg"],
|
||||
|
||||
["builtin-function", "averageluma"],
|
||||
["builtin-function", "averagechromau"],
|
||||
["builtin-function", "averagechromav"],
|
||||
["builtin-function", "averageb"],
|
||||
["builtin-function", "averageg"],
|
||||
["builtin-function", "averager"],
|
||||
["builtin-function", "lumadifference"],
|
||||
["builtin-function", "chromaudifference"],
|
||||
["builtin-function", "chromavdifference"],
|
||||
["builtin-function", "rgbdifference"],
|
||||
["builtin-function", "bdifference"],
|
||||
["builtin-function", "gdifference"],
|
||||
["builtin-function", "rdifference"],
|
||||
["builtin-function", "ydifferencefromprevious"],
|
||||
["builtin-function", "udifferencefromprevious"],
|
||||
["builtin-function", "vdifferencefromprevious"],
|
||||
["builtin-function", "rgbdifferencefromprevious"],
|
||||
["builtin-function", "bdifferencefromprevious"],
|
||||
["builtin-function", "gdifferencefromprevious"],
|
||||
["builtin-function", "rdifferencefromprevious"],
|
||||
["builtin-function", "ydifferencetonext"],
|
||||
["builtin-function", "udifferencetonext"],
|
||||
["builtin-function", "vdifferencetonext"],
|
||||
["builtin-function", "rgbdifferencetonext"],
|
||||
["builtin-function", "rdifferencetonext"],
|
||||
["builtin-function", "gdifferencetonext"],
|
||||
["builtin-function", "bdifferencetonext"],
|
||||
["builtin-function", "yplanemedian"],
|
||||
["builtin-function", "uplanemedian"],
|
||||
["builtin-function", "vplanemedian"],
|
||||
["builtin-function", "bplanemedian"],
|
||||
["builtin-function", "gplanemedian"],
|
||||
["builtin-function", "rplanemedian"],
|
||||
["builtin-function", "yplanemin"],
|
||||
["builtin-function", "uplanemin"],
|
||||
["builtin-function", "vplanemin"],
|
||||
["builtin-function", "bplanemin"],
|
||||
["builtin-function", "gplanemin"],
|
||||
["builtin-function", "rplanemin"],
|
||||
["builtin-function", "yplanemax"],
|
||||
["builtin-function", "uplanemax"],
|
||||
["builtin-function", "vplanemax"],
|
||||
["builtin-function", "bplanemax"],
|
||||
["builtin-function", "gplanemax"],
|
||||
["builtin-function", "rplanemax"],
|
||||
["builtin-function", "yplaneminmaxdifference"],
|
||||
["builtin-function", "uplaneminmaxdifference"],
|
||||
["builtin-function", "vplaneminmaxdifference"],
|
||||
["builtin-function", "bplaneminmaxdifference"],
|
||||
["builtin-function", "gplaneminmaxdifference"],
|
||||
["builtin-function", "rplaneminmaxdifference"],
|
||||
|
||||
["builtin-function", "scriptname"],
|
||||
["builtin-function", "scriptnameutf8"],
|
||||
["builtin-function", "scriptfile"],
|
||||
["builtin-function", "scriptfileutf8"],
|
||||
["builtin-function", "scriptdir"],
|
||||
["builtin-function", "scriptdirutf8"],
|
||||
["builtin-function", "setlogparams"],
|
||||
["builtin-function", "logmsg"],
|
||||
["builtin-function", "getprocessinfo"],
|
||||
|
||||
["builtin-function", "lcase"],
|
||||
["builtin-function", "ucase"],
|
||||
["builtin-function", "strtoutf8"],
|
||||
["builtin-function", "strfromutf8"],
|
||||
["builtin-function", "strlen"],
|
||||
["builtin-function", "revstr"],
|
||||
["builtin-function", "leftstr"],
|
||||
["builtin-function", "rightstr"],
|
||||
["builtin-function", "midstr"],
|
||||
["builtin-function", "findstr"],
|
||||
["builtin-function", "replacestr"],
|
||||
["builtin-function", "format"],
|
||||
["builtin-function", "fillstr"],
|
||||
["builtin-function", "strcmp"],
|
||||
["builtin-function", "strcmpi"],
|
||||
["builtin-function", "trimleft"],
|
||||
["builtin-function", "trimright"],
|
||||
["builtin-function", "trimall"],
|
||||
["builtin-function", "chr"],
|
||||
["builtin-function", "ord"],
|
||||
["builtin-function", "time"],
|
||||
|
||||
["builtin-function", "versionnumber"],
|
||||
["builtin-function", "versionstring"],
|
||||
["builtin-function", "isversionorgreater"],
|
||||
|
||||
["builtin-function", "buildpixeltype"],
|
||||
["builtin-function", "colorspacenametopixeltype"],
|
||||
|
||||
"\r\n\r\nkevincosner"
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
All internal functions, filters, and properties can be used in the following formats:
|
||||
intFunc == intFunc() == last.intFunc == last.intFunc()
|
||||
They must not appear within other words.
|
|
@ -0,0 +1,429 @@
|
|||
avisource
|
||||
avifilesource
|
||||
opendmlsource
|
||||
directshowsource
|
||||
imagereader
|
||||
imagesource
|
||||
imagesourceanim
|
||||
segmentedavisource
|
||||
segmenteddirectshowsource
|
||||
wavsource
|
||||
|
||||
coloryuv
|
||||
convertbacktoyuy2
|
||||
converttorgb
|
||||
converttorgb24
|
||||
converttorgb32
|
||||
converttorgb48
|
||||
converttorgb64
|
||||
converttoplanarrgb
|
||||
converttoplanarrgba
|
||||
converttoyuy2
|
||||
converttoyv24
|
||||
converttoyv16
|
||||
converttoyv12
|
||||
converttoy8
|
||||
converttoyuv444
|
||||
converttoyuv422
|
||||
converttoyuv420
|
||||
converttoyuva444
|
||||
converttoyuva422
|
||||
converttoyuva420
|
||||
converttoyuv411
|
||||
fixluminance
|
||||
greyscale
|
||||
grayscale
|
||||
invert
|
||||
levels
|
||||
limiter
|
||||
mergergb
|
||||
mergeargb
|
||||
mergeluma
|
||||
mergechroma
|
||||
rgbadjust
|
||||
showred
|
||||
showgreen
|
||||
showblue
|
||||
showalpha
|
||||
swapuv
|
||||
tweak
|
||||
utoy
|
||||
utoy8
|
||||
vtoy
|
||||
vtoy8
|
||||
ytouv
|
||||
|
||||
colorkeymask
|
||||
layer
|
||||
mask
|
||||
maskhs
|
||||
merge
|
||||
overlay
|
||||
resetmask
|
||||
subtract
|
||||
|
||||
addborders
|
||||
crop
|
||||
cropbottom
|
||||
fliphorizontal
|
||||
flipvertical
|
||||
letterbox
|
||||
horizontalreduceby2
|
||||
verticalreduceby2
|
||||
reduceby2
|
||||
bicubicresize
|
||||
bilinearresize
|
||||
blackmanresize
|
||||
gaussresize
|
||||
lanczosresize
|
||||
lanczos4resize
|
||||
pointresize
|
||||
sincresize
|
||||
spline16resize
|
||||
spline36resize
|
||||
spline64resize
|
||||
|
||||
skewrows
|
||||
turnleft
|
||||
turnright
|
||||
turn180
|
||||
|
||||
blur
|
||||
sharpen
|
||||
generalconvolution
|
||||
spatialsoften
|
||||
temporalsoften
|
||||
fixbrokenchromaupsampling
|
||||
|
||||
alignedsplice
|
||||
unalignedsplice
|
||||
assumefps
|
||||
assumescaledfps
|
||||
changefps
|
||||
convertfps
|
||||
deleteframe
|
||||
dissolve
|
||||
duplicateframe
|
||||
fadein0
|
||||
fadein
|
||||
fadein2
|
||||
fadeout0
|
||||
fadeout
|
||||
fadeout2
|
||||
fadeio0
|
||||
fadeio
|
||||
fadeio2
|
||||
freezeframe
|
||||
interleave
|
||||
loop
|
||||
reverse
|
||||
selecteven
|
||||
selectodd
|
||||
selectevery
|
||||
selectrangeevery
|
||||
trim
|
||||
|
||||
assumeframebased
|
||||
assumefieldbased
|
||||
assumebff
|
||||
assumetff
|
||||
bob
|
||||
complementparity
|
||||
doubleweave
|
||||
peculiarblend
|
||||
pulldown
|
||||
separatecolumns
|
||||
separaterows
|
||||
separatefields
|
||||
swapfields
|
||||
weave
|
||||
weavecolumns
|
||||
weaverows
|
||||
|
||||
amplify
|
||||
amplifydb
|
||||
assumesamplerate
|
||||
audiodub
|
||||
audiodubex
|
||||
audiotrim
|
||||
convertaudioto8bit
|
||||
convertaudioto16bit
|
||||
convertaudioto24bit
|
||||
convertaudioto32bit
|
||||
convertaudiotofloat
|
||||
converttomono
|
||||
delayaudio
|
||||
ensurevbrmp3sync
|
||||
getchannel
|
||||
getleftchannel
|
||||
getrightchannel
|
||||
killaudio
|
||||
killvideo
|
||||
mergechannels
|
||||
mixaudio
|
||||
monotostereo
|
||||
normalize
|
||||
resampleaudio
|
||||
supereq
|
||||
ssrc
|
||||
timestretch
|
||||
|
||||
conditionalfilter
|
||||
frameevaluate
|
||||
scriptclip
|
||||
conditionalselect
|
||||
conditionalreader
|
||||
writefile
|
||||
writefileif
|
||||
writefilestart
|
||||
writefileend
|
||||
animate
|
||||
applyrange
|
||||
tcpserver
|
||||
tcpsource
|
||||
|
||||
imagewriter
|
||||
|
||||
blankclip
|
||||
blackness
|
||||
colorbars
|
||||
colorbarshd
|
||||
compare
|
||||
dumpfiltergraph
|
||||
setgraphanalysis
|
||||
echo
|
||||
histogram
|
||||
info
|
||||
messageclip
|
||||
preroll
|
||||
showfiveversions
|
||||
showframenumber
|
||||
showsmpte
|
||||
showtime
|
||||
stackhorizontal
|
||||
stackvertical
|
||||
subtitle
|
||||
tone
|
||||
version
|
||||
|
||||
pantone
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["builtin-function", "avisource"],
|
||||
["builtin-function", "avifilesource"],
|
||||
["builtin-function", "opendmlsource"],
|
||||
["builtin-function", "directshowsource"],
|
||||
["builtin-function", "imagereader"],
|
||||
["builtin-function", "imagesource"],
|
||||
["builtin-function", "imagesourceanim"],
|
||||
["builtin-function", "segmentedavisource"],
|
||||
["builtin-function", "segmenteddirectshowsource"],
|
||||
["builtin-function", "wavsource"],
|
||||
|
||||
["builtin-function", "coloryuv"],
|
||||
["builtin-function", "convertbacktoyuy2"],
|
||||
["builtin-function", "converttorgb"],
|
||||
["builtin-function", "converttorgb24"],
|
||||
["builtin-function", "converttorgb32"],
|
||||
["builtin-function", "converttorgb48"],
|
||||
["builtin-function", "converttorgb64"],
|
||||
["builtin-function", "converttoplanarrgb"],
|
||||
["builtin-function", "converttoplanarrgba"],
|
||||
["builtin-function", "converttoyuy2"],
|
||||
["builtin-function", "converttoyv24"],
|
||||
["builtin-function", "converttoyv16"],
|
||||
["builtin-function", "converttoyv12"],
|
||||
["builtin-function", "converttoy8"],
|
||||
["builtin-function", "converttoyuv444"],
|
||||
["builtin-function", "converttoyuv422"],
|
||||
["builtin-function", "converttoyuv420"],
|
||||
["builtin-function", "converttoyuva444"],
|
||||
["builtin-function", "converttoyuva422"],
|
||||
["builtin-function", "converttoyuva420"],
|
||||
["builtin-function", "converttoyuv411"],
|
||||
["builtin-function", "fixluminance"],
|
||||
["builtin-function", "greyscale"],
|
||||
["builtin-function", "grayscale"],
|
||||
["builtin-function", "invert"],
|
||||
["builtin-function", "levels"],
|
||||
["builtin-function", "limiter"],
|
||||
["builtin-function", "mergergb"],
|
||||
["builtin-function", "mergeargb"],
|
||||
["builtin-function", "mergeluma"],
|
||||
["builtin-function", "mergechroma"],
|
||||
["builtin-function", "rgbadjust"],
|
||||
["builtin-function", "showred"],
|
||||
["builtin-function", "showgreen"],
|
||||
["builtin-function", "showblue"],
|
||||
["builtin-function", "showalpha"],
|
||||
["builtin-function", "swapuv"],
|
||||
["builtin-function", "tweak"],
|
||||
["builtin-function", "utoy"],
|
||||
["builtin-function", "utoy8"],
|
||||
["builtin-function", "vtoy"],
|
||||
["builtin-function", "vtoy8"],
|
||||
["builtin-function", "ytouv"],
|
||||
|
||||
["builtin-function", "colorkeymask"],
|
||||
["builtin-function", "layer"],
|
||||
["builtin-function", "mask"],
|
||||
["builtin-function", "maskhs"],
|
||||
["builtin-function", "merge"],
|
||||
["builtin-function", "overlay"],
|
||||
["builtin-function", "resetmask"],
|
||||
["builtin-function", "subtract"],
|
||||
|
||||
["builtin-function", "addborders"],
|
||||
["builtin-function", "crop"],
|
||||
["builtin-function", "cropbottom"],
|
||||
["builtin-function", "fliphorizontal"],
|
||||
["builtin-function", "flipvertical"],
|
||||
["builtin-function", "letterbox"],
|
||||
["builtin-function", "horizontalreduceby2"],
|
||||
["builtin-function", "verticalreduceby2"],
|
||||
["builtin-function", "reduceby2"],
|
||||
["builtin-function", "bicubicresize"],
|
||||
["builtin-function", "bilinearresize"],
|
||||
["builtin-function", "blackmanresize"],
|
||||
["builtin-function", "gaussresize"],
|
||||
["builtin-function", "lanczosresize"],
|
||||
["builtin-function", "lanczos4resize"],
|
||||
["builtin-function", "pointresize"],
|
||||
["builtin-function", "sincresize"],
|
||||
["builtin-function", "spline16resize"],
|
||||
["builtin-function", "spline36resize"],
|
||||
["builtin-function", "spline64resize"],
|
||||
|
||||
["builtin-function", "skewrows"],
|
||||
["builtin-function", "turnleft"],
|
||||
["builtin-function", "turnright"],
|
||||
["builtin-function", "turn180"],
|
||||
|
||||
["builtin-function", "blur"],
|
||||
["builtin-function", "sharpen"],
|
||||
["builtin-function", "generalconvolution"],
|
||||
["builtin-function", "spatialsoften"],
|
||||
["builtin-function", "temporalsoften"],
|
||||
["builtin-function", "fixbrokenchromaupsampling"],
|
||||
|
||||
["builtin-function", "alignedsplice"],
|
||||
["builtin-function", "unalignedsplice"],
|
||||
["builtin-function", "assumefps"],
|
||||
["builtin-function", "assumescaledfps"],
|
||||
["builtin-function", "changefps"],
|
||||
["builtin-function", "convertfps"],
|
||||
["builtin-function", "deleteframe"],
|
||||
["builtin-function", "dissolve"],
|
||||
["builtin-function", "duplicateframe"],
|
||||
["builtin-function", "fadein0"],
|
||||
["builtin-function", "fadein"],
|
||||
["builtin-function", "fadein2"],
|
||||
["builtin-function", "fadeout0"],
|
||||
["builtin-function", "fadeout"],
|
||||
["builtin-function", "fadeout2"],
|
||||
["builtin-function", "fadeio0"],
|
||||
["builtin-function", "fadeio"],
|
||||
["builtin-function", "fadeio2"],
|
||||
["builtin-function", "freezeframe"],
|
||||
["builtin-function", "interleave"],
|
||||
["builtin-function", "loop"],
|
||||
["builtin-function", "reverse"],
|
||||
["builtin-function", "selecteven"],
|
||||
["builtin-function", "selectodd"],
|
||||
["builtin-function", "selectevery"],
|
||||
["builtin-function", "selectrangeevery"],
|
||||
["builtin-function", "trim"],
|
||||
|
||||
["builtin-function", "assumeframebased"],
|
||||
["builtin-function", "assumefieldbased"],
|
||||
["builtin-function", "assumebff"],
|
||||
["builtin-function", "assumetff"],
|
||||
["builtin-function", "bob"],
|
||||
["builtin-function", "complementparity"],
|
||||
["builtin-function", "doubleweave"],
|
||||
["builtin-function", "peculiarblend"],
|
||||
["builtin-function", "pulldown"],
|
||||
["builtin-function", "separatecolumns"],
|
||||
["builtin-function", "separaterows"],
|
||||
["builtin-function", "separatefields"],
|
||||
["builtin-function", "swapfields"],
|
||||
["builtin-function", "weave"],
|
||||
["builtin-function", "weavecolumns"],
|
||||
["builtin-function", "weaverows"],
|
||||
|
||||
["builtin-function", "amplify"],
|
||||
["builtin-function", "amplifydb"],
|
||||
["builtin-function", "assumesamplerate"],
|
||||
["builtin-function", "audiodub"],
|
||||
["builtin-function", "audiodubex"],
|
||||
["builtin-function", "audiotrim"],
|
||||
["builtin-function", "convertaudioto8bit"],
|
||||
["builtin-function", "convertaudioto16bit"],
|
||||
["builtin-function", "convertaudioto24bit"],
|
||||
["builtin-function", "convertaudioto32bit"],
|
||||
["builtin-function", "convertaudiotofloat"],
|
||||
["builtin-function", "converttomono"],
|
||||
["builtin-function", "delayaudio"],
|
||||
["builtin-function", "ensurevbrmp3sync"],
|
||||
["builtin-function", "getchannel"],
|
||||
["builtin-function", "getleftchannel"],
|
||||
["builtin-function", "getrightchannel"],
|
||||
["builtin-function", "killaudio"],
|
||||
["builtin-function", "killvideo"],
|
||||
["builtin-function", "mergechannels"],
|
||||
["builtin-function", "mixaudio"],
|
||||
["builtin-function", "monotostereo"],
|
||||
["builtin-function", "normalize"],
|
||||
["builtin-function", "resampleaudio"],
|
||||
["builtin-function", "supereq"],
|
||||
["builtin-function", "ssrc"],
|
||||
["builtin-function", "timestretch"],
|
||||
|
||||
["builtin-function", "conditionalfilter"],
|
||||
["builtin-function", "frameevaluate"],
|
||||
["builtin-function", "scriptclip"],
|
||||
["builtin-function", "conditionalselect"],
|
||||
["builtin-function", "conditionalreader"],
|
||||
["builtin-function", "writefile"],
|
||||
["builtin-function", "writefileif"],
|
||||
["builtin-function", "writefilestart"],
|
||||
["builtin-function", "writefileend"],
|
||||
["builtin-function", "animate"],
|
||||
["builtin-function", "applyrange"],
|
||||
["builtin-function", "tcpserver"],
|
||||
["builtin-function", "tcpsource"],
|
||||
|
||||
["builtin-function", "imagewriter"],
|
||||
|
||||
["builtin-function", "blankclip"],
|
||||
["builtin-function", "blackness"],
|
||||
["builtin-function", "colorbars"],
|
||||
["builtin-function", "colorbarshd"],
|
||||
["builtin-function", "compare"],
|
||||
["builtin-function", "dumpfiltergraph"],
|
||||
["builtin-function", "setgraphanalysis"],
|
||||
["builtin-function", "echo"],
|
||||
["builtin-function", "histogram"],
|
||||
["builtin-function", "info"],
|
||||
["builtin-function", "messageclip"],
|
||||
["builtin-function", "preroll"],
|
||||
["builtin-function", "showfiveversions"],
|
||||
["builtin-function", "showframenumber"],
|
||||
["builtin-function", "showsmpte"],
|
||||
["builtin-function", "showtime"],
|
||||
["builtin-function", "stackhorizontal"],
|
||||
["builtin-function", "stackvertical"],
|
||||
["builtin-function", "subtitle"],
|
||||
["builtin-function", "tone"],
|
||||
["builtin-function", "version"],
|
||||
|
||||
"\r\n\r\npantone"
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
All internal functions, filters, and properties can be used in the following formats:
|
||||
intFunc == intFunc() == last.intFunc == last.intFunc()
|
||||
They must not appear within other words.
|
|
@ -0,0 +1,78 @@
|
|||
function
|
||||
global
|
||||
return
|
||||
try
|
||||
catch
|
||||
if
|
||||
else
|
||||
while
|
||||
for
|
||||
__END__
|
||||
|
||||
|
||||
MT_NICE_FILTER
|
||||
MT_MULTI_INSTANCE
|
||||
MT_SERIALIZED
|
||||
MT_SPECIAL_MT
|
||||
|
||||
mt_nice_filter
|
||||
mt_multi_instance
|
||||
mt_serialized
|
||||
mt_special_mt
|
||||
|
||||
TEXTMT_NICE_FILTERTEXT
|
||||
|
||||
true
|
||||
FALSE
|
||||
yEs
|
||||
no
|
||||
|
||||
knot
|
||||
|
||||
laST
|
||||
|
||||
blasted
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "function"],
|
||||
["keyword", "global"],
|
||||
["keyword", "return"],
|
||||
["keyword", "try"],
|
||||
["keyword", "catch"],
|
||||
["keyword", "if"],
|
||||
["keyword", "else"],
|
||||
["keyword", "while"],
|
||||
["keyword", "for"],
|
||||
["keyword", "__END__"],
|
||||
|
||||
["constant", "MT_NICE_FILTER"],
|
||||
["constant", "MT_MULTI_INSTANCE"],
|
||||
["constant", "MT_SERIALIZED"],
|
||||
["constant", "MT_SPECIAL_MT"],
|
||||
|
||||
"\r\n\r\nmt_nice_filter\r\nmt_multi_instance\r\nmt_serialized\r\nmt_special_mt\r\n\r\nTEXTMT_NICE_FILTERTEXT\r\n\r\n",
|
||||
|
||||
["boolean", "true"],
|
||||
["boolean", "FALSE"],
|
||||
["boolean", "yEs"],
|
||||
["boolean", "no"],
|
||||
|
||||
"\r\n\r\nknot\r\n\r\n",
|
||||
|
||||
["variable", "laST"],
|
||||
|
||||
"\r\n\r\nblasted"
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Keywords just have word boundaries. Keywords can actually be used as parameter names in functions, but this
|
||||
scenario is an extreme edge and we do not bother handling it.
|
||||
|
||||
Constants are case sensitive, and must not appear within other words.
|
||||
|
||||
Bools are case insensitive, come in 4 flavors, and must not appear within other words.
|
||||
|
||||
The Last special variable is case insensitive, and must not appear within other words.
|
|
@ -0,0 +1,88 @@
|
|||
+
|
||||
++
|
||||
-
|
||||
!
|
||||
!=
|
||||
<
|
||||
<=
|
||||
>
|
||||
>=
|
||||
=
|
||||
==
|
||||
&&
|
||||
||
|
||||
?
|
||||
:
|
||||
%
|
||||
/
|
||||
*
|
||||
|
||||
$abcdef
|
||||
$89abcdef
|
||||
123.89032
|
||||
.902834
|
||||
|
||||
$9abcdef
|
||||
a$123456a
|
||||
|
||||
()
|
||||
{}
|
||||
[]
|
||||
;
|
||||
,
|
||||
.
|
||||
\
|
||||
|
||||
\ 1.0 \
|
||||
|
||||
1.0 \ 1.0
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["operator", "+"],
|
||||
["operator", "++"],
|
||||
["operator", "-"],
|
||||
["operator", "!"],
|
||||
["operator", "!="],
|
||||
["operator", "<"],
|
||||
["operator", "<="],
|
||||
["operator", ">"],
|
||||
["operator", ">="],
|
||||
["operator", "="],
|
||||
["operator", "=="],
|
||||
["operator", "&&"],
|
||||
["operator", "||"],
|
||||
["operator", "?"],
|
||||
["operator", ":"],
|
||||
["operator", "%"],
|
||||
["operator", "/"],
|
||||
["operator", "*"],
|
||||
|
||||
["number", "$abcdef"],
|
||||
["number", "$89abcdef"],
|
||||
["number", "123.89032"],
|
||||
["number", ".902834"],
|
||||
|
||||
"\r\n\r\n$9abcdef\r\na$123456a\r\n\r\n",
|
||||
|
||||
["punctuation", "("], ["punctuation", ")"],
|
||||
["punctuation", "{"], ["punctuation", "}"],
|
||||
["punctuation", "["], ["punctuation", "]"],
|
||||
["punctuation", ";"],
|
||||
["punctuation", ","],
|
||||
["punctuation", "."],
|
||||
["line-continuation", "\\"],
|
||||
|
||||
["line-continuation", "\\"], ["number", "1.0"], ["line-continuation", "\\"],
|
||||
|
||||
["number", "1.0"], " \\ ", ["number", "1.0"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Numbers can be specified in decimal form, with or without a leading value. So 0.0 and .0 both work.
|
||||
Numbers can also be specified as 6- or 8- digit hexadecimal strings for colors. They begin with a $.
|
||||
Numbers can not be bounded by words.
|
||||
|
||||
Line continuations must be either the first or last character in a line, less some whitespace.
|
|
@ -0,0 +1,119 @@
|
|||
function test(clip input, int interleavedFields, float precision, string "floatingDesync", bool "useQTGMC", val "chromaNoise")
|
||||
{
|
||||
castTest = clip(chromaNoise)
|
||||
castTest = int(chromaNoise)
|
||||
castTest = float(chromaNoise)
|
||||
castTest = string(chromaNoise)
|
||||
castTest = bool(chromaNoise)
|
||||
castTest = val(chromaNoise)
|
||||
|
||||
return interleavedClip
|
||||
}
|
||||
|
||||
test(5, 0.5, floatingDesync="progressive")
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "function"],
|
||||
["function", "test"],
|
||||
["punctuation", "("],
|
||||
["argument", [
|
||||
["keyword", "clip"],
|
||||
" input"
|
||||
]],
|
||||
["punctuation", ","],
|
||||
["argument", [
|
||||
["keyword", "int"],
|
||||
" interleavedFields"
|
||||
]],
|
||||
["punctuation", ","],
|
||||
["argument", [
|
||||
["keyword", "float"],
|
||||
" precision"
|
||||
]],
|
||||
["punctuation", ","],
|
||||
["argument", [
|
||||
["keyword", "string"],
|
||||
" \"floatingDesync\""
|
||||
]],
|
||||
["punctuation", ","],
|
||||
["argument", [
|
||||
["keyword", "bool"],
|
||||
" \"useQTGMC\""
|
||||
]],
|
||||
["punctuation", ","],
|
||||
["argument", [
|
||||
["keyword", "val"],
|
||||
" \"chromaNoise\""
|
||||
]],
|
||||
["punctuation", ")"],
|
||||
|
||||
["punctuation", "{"],
|
||||
|
||||
"\r\n\tcastTest ",
|
||||
["operator", "="],
|
||||
["type-cast", "clip"],
|
||||
["punctuation", "("],
|
||||
"chromaNoise",
|
||||
["punctuation", ")"],
|
||||
|
||||
"\r\n\tcastTest ",
|
||||
["operator", "="],
|
||||
["type-cast", "int"],
|
||||
["punctuation", "("],
|
||||
"chromaNoise",
|
||||
["punctuation", ")"],
|
||||
|
||||
"\r\n\tcastTest ",
|
||||
["operator", "="],
|
||||
["type-cast", "float"],
|
||||
["punctuation", "("],
|
||||
"chromaNoise",
|
||||
["punctuation", ")"],
|
||||
|
||||
"\r\n\tcastTest ",
|
||||
["operator", "="],
|
||||
["type-cast", "string"],
|
||||
["punctuation", "("],
|
||||
"chromaNoise",
|
||||
["punctuation", ")"],
|
||||
|
||||
"\r\n\tcastTest ",
|
||||
["operator", "="],
|
||||
["type-cast", "bool"],
|
||||
["punctuation", "("],
|
||||
"chromaNoise",
|
||||
["punctuation", ")"],
|
||||
|
||||
"\r\n\tcastTest ",
|
||||
["operator", "="],
|
||||
["type-cast", "val"],
|
||||
["punctuation", "("],
|
||||
"chromaNoise",
|
||||
["punctuation", ")"],
|
||||
|
||||
["keyword", "return"], " interleavedClip\r\n",
|
||||
["punctuation", "}"],
|
||||
|
||||
["function", "test"],
|
||||
["punctuation", "("],
|
||||
["number", "5"],
|
||||
["punctuation", ","],
|
||||
["number", "0.5"],
|
||||
["punctuation", ","],
|
||||
["argument-label", [
|
||||
["argument-name", "floatingDesync"],
|
||||
["punctuation", "="]
|
||||
]],
|
||||
["string", ["\"progressive\""]],
|
||||
["punctuation", ")"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Optional arguments check for preceeding types to match before getting matched as a string, and should not be matched as strings.
|
||||
Incidental names of types in an arguments list (such as "interleavedFields" containing "int") should not get highlighted.
|
||||
Types can be used as casts, and should not be highlighted as user-functions.
|
||||
Incidental names of types elsewhere (such as "interleavedClip" in a function body) should not get highlighted.
|
||||
Explicitly-named optional arguments in function calls get lowlighted (including the '=').
|
|
@ -0,0 +1,53 @@
|
|||
function CustomUserFunction() {
|
||||
|
||||
QTGMC()
|
||||
last.QTGMC
|
||||
last.QTGMC()
|
||||
|
||||
QTGMC
|
||||
1func()
|
||||
last.1func
|
||||
last.1func()
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
[
|
||||
["keyword", "function"],
|
||||
["function", "CustomUserFunction"],
|
||||
["punctuation", "("],
|
||||
["punctuation", ")"],
|
||||
["punctuation", "{"],
|
||||
|
||||
["function", "QTGMC"],
|
||||
["punctuation", "("],
|
||||
["punctuation", ")"],
|
||||
|
||||
["variable", "last"],
|
||||
["punctuation", "."],
|
||||
["function", "QTGMC"],
|
||||
|
||||
["variable", "last"],
|
||||
["punctuation", "."],
|
||||
["function", "QTGMC"],
|
||||
["punctuation", "("],
|
||||
["punctuation", ")"],
|
||||
|
||||
"\r\n\r\nQTGMC\r\n1func",
|
||||
["punctuation", "("],
|
||||
["punctuation", ")"],
|
||||
|
||||
["variable", "last"],
|
||||
["punctuation", "."],
|
||||
"1func\r\n",
|
||||
|
||||
["variable", "last"],
|
||||
["punctuation", "."],
|
||||
"1func",
|
||||
["punctuation", "("],
|
||||
["punctuation", ")"]
|
||||
]
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
Valid identifiers (starts with [a-zA-Z_]) proceeding a '.', preceeding a '(', or both are user/external functions.
|
||||
User/external functions that don't match the above are technically valid but indistinguisable from variables.
|
Loading…
Reference in New Issue