Remove doc and sdk
This commit is contained in:
parent
fe1aaef33f
commit
0c7b4c6660
227 changed files with 0 additions and 37738 deletions
|
@ -1,4 +0,0 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 632bdf4b310a3f3964e4f568bada4510
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
File diff suppressed because it is too large
Load diff
|
@ -1,272 +0,0 @@
|
|||
VSHelper4.h
|
||||
===========
|
||||
|
||||
Table of contents
|
||||
#################
|
||||
|
||||
Introduction_
|
||||
|
||||
|
||||
Macros_
|
||||
VSH_STD_PLUGIN_ID_
|
||||
|
||||
VSH_RESIZE_PLUGIN_ID_
|
||||
|
||||
VSH_TEXT_PLUGIN_ID_
|
||||
|
||||
VS_RESTRICT_
|
||||
|
||||
`VSH_ALIGNED_MALLOC <VSH_ALIGNED_MALLOC_c_>`_
|
||||
|
||||
`VSH_ALIGNED_FREE <VSH_ALIGNED_FREE_c_>`_
|
||||
|
||||
VSMIN_
|
||||
|
||||
VSMAX_
|
||||
|
||||
|
||||
Functions_
|
||||
`vsh_aligned_malloc <vsh_aligned_malloc_cpp_>`_
|
||||
|
||||
`vsh_aligned_free <vsh_aligned_free_cpp_>`_
|
||||
|
||||
isConstantFormat_
|
||||
|
||||
isSameVideoFormat_
|
||||
|
||||
isSameVideoPresetFormat_
|
||||
|
||||
isSameVideoInfo_
|
||||
|
||||
isSameAudioFormat_
|
||||
|
||||
isSameAudioInfo_
|
||||
|
||||
muldivRational_
|
||||
|
||||
addRational_
|
||||
|
||||
reduceRational_
|
||||
|
||||
int64ToIntS_
|
||||
|
||||
doubleToFloatS_
|
||||
|
||||
bitblt_
|
||||
|
||||
areValidDimensions_
|
||||
|
||||
|
||||
Introduction
|
||||
############
|
||||
|
||||
This is a collection of helpful macros and functions. Note that all functions (not macros)
|
||||
are either prefixed with `vsh_` in C mode or placed in the `vsh` namespace for C++. This documentation
|
||||
will use the C++ names for these function.
|
||||
|
||||
|
||||
Macros
|
||||
######
|
||||
|
||||
VSH_STD_PLUGIN_ID
|
||||
-----------------
|
||||
Macro defined to the internal std plugin id provided for convenience.
|
||||
|
||||
|
||||
VSH_RESIZE_PLUGIN_ID
|
||||
--------------------
|
||||
Macro defined to the internal resizer plugin id provided for convenience.
|
||||
|
||||
|
||||
VSH_TEXT_PLUGIN_ID
|
||||
------------------
|
||||
Macro defined to the internal std plugin id provided for convenience.
|
||||
|
||||
|
||||
VS_RESTRICT
|
||||
-----------
|
||||
|
||||
Attempts to provide a portable definition of the C99 ``restrict`` keyword,
|
||||
or its C++ counterpart.
|
||||
|
||||
|
||||
.. _vsh_aligned_malloc_c:
|
||||
|
||||
VSH_ALIGNED_MALLOC
|
||||
------------------
|
||||
|
||||
VSH_ALIGNED_MALLOC(pptr, size, alignment)
|
||||
|
||||
Expands to _aligned_malloc() in Windows, and posix_memalign() elsewhere. Note that
|
||||
the arguments are in the style of posix_memalign().
|
||||
|
||||
*pptr* is a pointer to a pointer.
|
||||
|
||||
|
||||
.. _vsh_aligned_free_c:
|
||||
|
||||
VSH_ALIGNED_FREE
|
||||
----------------
|
||||
|
||||
VSH_ALIGNED_FREE(ptr)
|
||||
|
||||
Expands to _aligned_free() in Windows, and free() elsewhere.
|
||||
|
||||
*ptr* is a pointer.
|
||||
|
||||
|
||||
VSMIN
|
||||
-----
|
||||
|
||||
VSMIN(a, b)
|
||||
|
||||
Returns the minimum of the two numbers.
|
||||
|
||||
|
||||
VSMAX
|
||||
-----
|
||||
|
||||
VSMAX(a, b)
|
||||
|
||||
Returns the maximum of the two numbers.
|
||||
|
||||
|
||||
Functions
|
||||
#########
|
||||
|
||||
.. _vsh_aligned_malloc_cpp:
|
||||
|
||||
vsh_aligned_malloc
|
||||
------------------
|
||||
|
||||
.. cpp:function:: T* vsh::vsh_aligned_malloc(size_t size, size_t alignment)
|
||||
|
||||
A templated aligned malloc for C++. It uses the same functions as the
|
||||
`VSH_ALIGNED_MALLOC <VSH_ALIGNED_MALLOC_c_>`_ macro but is easier to use.
|
||||
|
||||
|
||||
.. _vsh_aligned_free_cpp:
|
||||
|
||||
vsh_aligned_free
|
||||
----------------
|
||||
|
||||
.. cpp:function:: void vsh::vsh_aligned_free(void *ptr)
|
||||
|
||||
This simply uses the `VSH_ALIGNED_FREE <VSH_ALIGNED_FREE_c_>`_ macro.
|
||||
|
||||
|
||||
isConstantFormat
|
||||
----------------
|
||||
|
||||
.. cpp:function:: static inline bool vsh::isConstantFormat(const VSVideoInfo *vi)
|
||||
|
||||
Checks if a clip's format and dimensions are known (and therefore constant).
|
||||
|
||||
|
||||
isSameVideoFormat
|
||||
-----------------
|
||||
|
||||
.. cpp:function:: static inline bool vsh::isSameVideoFormat(const VSVideoInfo *v1, const VSVideoInfo *v2)
|
||||
|
||||
Checks if two clips have the same video format. If the format is
|
||||
unknown in both, it will be considered the same.
|
||||
|
||||
|
||||
isSameVideoPresetFormat
|
||||
-----------------------
|
||||
|
||||
.. cpp:function:: static inline bool vsh::isSameVideoPresetFormat(unsigned presetFormat, const VSVideoFormat *v, VSCore *core, const VSAPI *vsapi)
|
||||
|
||||
Checks if a clip has the same video format as the preset.
|
||||
|
||||
|
||||
isSameVideoInfo
|
||||
---------------
|
||||
|
||||
.. cpp:function:: static inline bool vsh::isSameVideoInfo(const VSVideoInfo *v1, const VSVideoInfo *v2)
|
||||
|
||||
Checks if two clips have the same video format and dimensions. If the format is
|
||||
unknown in both, it will be considered the same. This is also true for the
|
||||
dimensions. Framerate is not taken into consideration when comparing.
|
||||
|
||||
|
||||
|
||||
isSameAudioFormat
|
||||
-----------------
|
||||
|
||||
.. cpp:function:: static inline bool vsh::isSameAudioFormat(const VSAudioInfo *v1, const VSAudioInfo *v2)
|
||||
|
||||
Checks if two clips have the same audio format.
|
||||
|
||||
|
||||
isSameAudioInfo
|
||||
---------------
|
||||
|
||||
.. cpp:function:: static inline bool vsh::isSameAudioInfo(const VSAudioInfo *v1, const VSAudioInfo *v2)
|
||||
|
||||
Checks if two clips have the same audio format and samplerate.
|
||||
|
||||
|
||||
muldivRational
|
||||
--------------
|
||||
|
||||
.. cpp:function:: static inline void vsh::muldivRational(int64_t *num, int64_t *den, int64_t mul, int64_t div)
|
||||
|
||||
Multiplies two rational numbers and reduces the result, i.e.
|
||||
*num*\ /\ *den* \* *mul*\ /\ *div*. The result is stored in *num* and *den*.
|
||||
|
||||
The caller must ensure that *div* is not 0.
|
||||
|
||||
|
||||
reduceRational
|
||||
--------------
|
||||
|
||||
.. cpp:function:: static inline void vsh::reduceRational(int64_t *num, int64_t *den)
|
||||
|
||||
Reduces a rational number.
|
||||
|
||||
|
||||
addRational
|
||||
-----------
|
||||
|
||||
.. cpp:function:: static inline void vsh::addRational(int64_t *num, int64_t *den, int64_t addnum, int64_t addden)
|
||||
|
||||
Adds two rational numbers and reduces the result, i.e.
|
||||
*num*\ /\ *den* + *addnum*\ /\ *addden*. The result is stored in *num* and *den*.
|
||||
|
||||
|
||||
int64ToIntS
|
||||
-----------
|
||||
|
||||
.. cpp:function:: static inline int vsh::int64ToIntS(int64_t i)
|
||||
|
||||
Converts an int64_t to int with signed saturation. It's useful to silence
|
||||
warnings when reading integer properties from a VSMap and to avoid unexpected behavior on int overflow.
|
||||
|
||||
|
||||
doubleToFloatS
|
||||
--------------
|
||||
|
||||
.. cpp:function:: static inline int vsh::doubleToFloatS(double d)
|
||||
|
||||
Converts a double to float. It's useful to silence
|
||||
warnings when reading double properties from a VSMap and mostly exists to mirror `int64ToIntS`_.
|
||||
|
||||
|
||||
bitblt
|
||||
------
|
||||
|
||||
.. cpp:function:: static inline void vsh::bitblt(void *dstp, int dst_stride, const void *srcp, int src_stride, size_t row_size, size_t height)
|
||||
|
||||
Copies bytes from one plane to another. Basically, it is memcpy in a loop.
|
||||
|
||||
*row_size* is in bytes.
|
||||
|
||||
|
||||
areValidDimensions
|
||||
------------------
|
||||
|
||||
.. cpp:function:: static inline bool vsh::areValidDimensions(const VSFormat *fi, int width, int height)
|
||||
|
||||
Checks if the given dimensions are valid for a particular format, with regards
|
||||
to chroma subsampling.
|
|
@ -1,292 +0,0 @@
|
|||
VSScript4.h
|
||||
===========
|
||||
|
||||
Table of contents
|
||||
#################
|
||||
|
||||
Introduction_
|
||||
|
||||
|
||||
Structs_
|
||||
VSScript_
|
||||
|
||||
VSScriptAPI_
|
||||
|
||||
|
||||
Functions_
|
||||
getVSScriptAPI_
|
||||
|
||||
getApiVersion_
|
||||
|
||||
getVSAPI_
|
||||
|
||||
createScript_
|
||||
|
||||
getCore_
|
||||
|
||||
evaluateBuffer_
|
||||
|
||||
evaluateFile_
|
||||
|
||||
getError_
|
||||
|
||||
getExitCode_
|
||||
|
||||
getVariable_
|
||||
|
||||
setVariables_
|
||||
|
||||
getOutputNode_
|
||||
|
||||
getOutputAlphaNode_
|
||||
|
||||
getAltOutputMode_
|
||||
|
||||
freeScript_
|
||||
|
||||
evalSetWorkingDir_
|
||||
|
||||
|
||||
Introduction
|
||||
############
|
||||
|
||||
VSScript provides a convenient wrapper for VapourSynth's scripting interface(s), allowing the evaluation of VapourSynth scripts and retrieval of output clips.
|
||||
|
||||
For reasons unknown, the VSScript library is called ``VSScript`` in Windows and ``vapoursynth-script`` everywhere else.
|
||||
|
||||
At this time, VapourSynth scripts can be written only in Python (version 3).
|
||||
|
||||
Here are a few users of the VSScript library:
|
||||
|
||||
* `vspipe <https://github.com/vapoursynth/vapoursynth/blob/master/src/vspipe/vspipe.cpp>`_
|
||||
|
||||
* `vsvfw <https://github.com/vapoursynth/vapoursynth/blob/master/src/vfw/vsvfw.cpp>`_
|
||||
|
||||
* `an example program <https://github.com/vapoursynth/vapoursynth/blob/master/sdk/vsscript_example.c>`_
|
||||
|
||||
* the video player `mpv <https://github.com/mpv-player/mpv/blob/master/video/filter/vf_vapoursynth.c>`_
|
||||
|
||||
.. note::
|
||||
If libvapoursynth-script is loaded with dlopen(), the RTLD_GLOBAL flag must be used. If not, Python won't be able to import binary modules. This is due to Python's design.
|
||||
|
||||
|
||||
Structs
|
||||
#######
|
||||
|
||||
VSScript
|
||||
--------
|
||||
|
||||
A script environment. All evaluation and communication with evaluated scripts happens through a VSScript object.
|
||||
|
||||
|
||||
VSScriptAPI
|
||||
-----------
|
||||
|
||||
This struct is the way to access VSScript's public API.
|
||||
|
||||
|
||||
Functions
|
||||
#########
|
||||
|
||||
getVSScriptAPI
|
||||
--------------
|
||||
|
||||
.. c:function:: const VSSCRIPTAPI *getVSScriptAPI(int version)
|
||||
|
||||
Returns a struct containing function pointer for the api. Will return NULL is the specified *version* isn't supported.
|
||||
|
||||
It is recommended to always pass *VSSCRIPT_API_VERSION*.
|
||||
|
||||
|
||||
getApiVersion
|
||||
-------------
|
||||
|
||||
.. c:function:: int getApiVersion()
|
||||
|
||||
Returns the api version provided by vsscript.
|
||||
|
||||
|
||||
getVSAPI
|
||||
--------
|
||||
|
||||
.. c:function:: const VSAPI *getVSAPI(int version)
|
||||
|
||||
Retrieves the VSAPI struct. Exists mostly as a convenience so the vapoursynth module doesn't have to be explicitly loaded.
|
||||
|
||||
This could return NULL if the VapourSynth library doesn't provide the requested version.
|
||||
|
||||
|
||||
createScript
|
||||
------------
|
||||
|
||||
.. c:function:: VSScript *createScript(VSCore *core)
|
||||
|
||||
Creates an empty script environment that can be used to evaluate scripts. Passing a pre-created *core* can be usful to have custom core creation flags, log callbacks or plugins pre-loaded. Passing NULL will automatically create a new core with default settings.
|
||||
|
||||
Takes over ownership of the *core* regardless of success or failure. Returns NULL on error.
|
||||
|
||||
|
||||
getCore
|
||||
-------
|
||||
|
||||
.. c:function:: VSCore *getCore(VSScript *handle)
|
||||
|
||||
Retrieves the VapourSynth core that was created in the script environment. If a VapourSynth core has not been created yet, it will be created now, with the default options (see the :doc:`../pythonreference`).
|
||||
|
||||
VSScript retains ownership of the returned core object.
|
||||
|
||||
Returns NULL on error.
|
||||
|
||||
|
||||
|
||||
|
||||
evaluateBuffer
|
||||
--------------
|
||||
|
||||
.. c:function:: int evaluateBuffer(VSScript *handle, const char *buffer, const char *scriptFilename)
|
||||
|
||||
Evaluates a script contained in a C string. Can be called multiple times on the same script environment to successively add more processing.
|
||||
|
||||
*handle*
|
||||
Pointer to a script environment.
|
||||
|
||||
*buffer*
|
||||
The entire script to evaluate, as a C string.
|
||||
|
||||
*scriptFilename*
|
||||
A name for the script, which will be displayed in error messages. If this is NULL, the name "<string>" will be used.
|
||||
|
||||
The special ``__file__`` variable will be set to *scriptFilename*'s absolute path if this is not NULL.
|
||||
|
||||
Returns non-zero in case of errors. The error message can be retrieved with getError_\ (). If the script calls *sys.exit(code)* the exit code can be retrieved with getExitCode_\ (). The working directory behavior can be changed by calling evalSetWorkingDir_\ () before this function.
|
||||
|
||||
|
||||
evaluateFile
|
||||
------------
|
||||
|
||||
.. c:function:: int evaluateFile(VSScript **handle, const char *scriptFilename)
|
||||
|
||||
Evaluates a script contained in a file. This is a convenience function which reads the script from a file for you. It will only read the first 16 MiB which should be enough for everyone.
|
||||
|
||||
Behaves the same as evaluateBuffer\ ().
|
||||
|
||||
|
||||
getError
|
||||
--------
|
||||
|
||||
.. c:function:: const char *getError(VSScript *handle)
|
||||
|
||||
Returns the error message from a script environment, or NULL, if there is no error.
|
||||
|
||||
It is okay to pass NULL.
|
||||
|
||||
VSScript retains ownership of the pointer and it is only guaranteed to be valid until the next vsscript operation on the *handle*.
|
||||
|
||||
|
||||
getExitCode
|
||||
-----------
|
||||
|
||||
.. c:function:: int getExitCode(VSScript *handle)
|
||||
|
||||
Returns the exit code if the script calls *sys.exit(code)*, or 0, if the script fails for other reasons or calls *sys.exit(0)*.
|
||||
|
||||
It is okay to pass NULL.
|
||||
|
||||
|
||||
getVariable
|
||||
-----------
|
||||
|
||||
.. c:function:: int getVariable(VSScript *handle, const char *name, VSMap *dst)
|
||||
|
||||
Retrieves a variable from the script environment.
|
||||
|
||||
If a VapourSynth core has not been created yet in the script environment, one will be created now, with the default options (see the :doc:`../pythonreference`).
|
||||
|
||||
*name*
|
||||
Name of the variable to retrieve.
|
||||
|
||||
*dst*
|
||||
Map where the variable's value will be placed, with the key *name*.
|
||||
|
||||
Returns non-zero on error.
|
||||
|
||||
|
||||
setVariables
|
||||
------------
|
||||
|
||||
.. c:function:: int vsscript_setVariable(VSScript *handle, const VSMap *vars)
|
||||
|
||||
Sets variables in the script environment.
|
||||
|
||||
The variables are now available to the script.
|
||||
|
||||
If a VapourSynth core has not been created yet in the script environment, one will be created now, with the default options (see the :doc:`../pythonreference`).
|
||||
|
||||
*vars*
|
||||
Map containing the variables to set.
|
||||
|
||||
Returns non-zero on error.
|
||||
|
||||
|
||||
getOutputNode
|
||||
-------------
|
||||
|
||||
.. c:function:: VSNode *getOutputNode(VSScript *handle, int index)
|
||||
|
||||
Retrieves a node from the script environment. A node in the script must have been marked for output with the requested *index*.
|
||||
|
||||
The returned node has its reference count incremented by one.
|
||||
|
||||
Returns NULL if there is no node at the requested index.
|
||||
|
||||
|
||||
getOutputAlphaNode
|
||||
------------------
|
||||
|
||||
.. c:function:: VSNode *getOutputAlphaNode(VSScript *handle, int index)
|
||||
|
||||
Retrieves an alpha node from the script environment. A node with associated alpha in the script must have been marked for output with the requested *index*.
|
||||
|
||||
The returned node has its reference count incremented by one.
|
||||
|
||||
Returns NULL if there is no alpha node at the requested index.
|
||||
|
||||
|
||||
getAltOutputMode
|
||||
----------------
|
||||
|
||||
.. c:function:: int getAltOutputMode(VSScript *handle, int index)
|
||||
|
||||
Retrieves the alternative output mode settings from the script. This value has no fixed meaning but in vspipe and vsvfw it
|
||||
indicates that alternate output formats should be used when multiple ones are available. It is up to the client application to define the exact meaning or simply disregard it completely.
|
||||
|
||||
Returns 0 if there is no alt output mode set.
|
||||
|
||||
|
||||
freeScript
|
||||
----------
|
||||
|
||||
.. c:function:: void freeScript(VSScript *handle)
|
||||
|
||||
Frees a script environment. *handle* is no longer usable.
|
||||
|
||||
* Cancels any clips set for output in the script environment.
|
||||
|
||||
* Clears any variables set in the script environment.
|
||||
|
||||
* Clears the error message from the script environment, if there is one.
|
||||
|
||||
* Frees the VapourSynth core used in the script environment, if there is one.
|
||||
|
||||
Since this function frees the VapourSynth core, it must be called only after all frame requests are finished and all objects obtained from the script have been freed (frames, nodes, etc).
|
||||
|
||||
It is safe to pass NULL.
|
||||
|
||||
|
||||
evalSetWorkingDir
|
||||
-----------------
|
||||
|
||||
.. c:function:: void evalSetWorkingDir(VSScript *handle, int setCWD)
|
||||
|
||||
Set whether or not the working directory is temporarily changed to the same
|
||||
location as the script file when evaluateFile is called. Off by default.
|
|
@ -1,118 +0,0 @@
|
|||
VapourSynth C API Reference
|
||||
===========================
|
||||
|
||||
See the example filters in the sdk dir. Reading simplefilters.c, which contains
|
||||
several built-in functions, can also be very helpful.
|
||||
|
||||
Public Headers
|
||||
##############
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
api/*
|
||||
|
||||
Common Pitfalls
|
||||
###############
|
||||
|
||||
There are several minor pitfalls related to the threading and design that have to be taken into consideration. Most of them usually aren't a problem but here's a small checklist of things you have to watch out for sometimes.
|
||||
|
||||
General API
|
||||
-----------
|
||||
You may not pass objects (clips, functions and so on) owned by one core as arguments to filters in another core. A manual full deep copy of the data you want to pass on is required. This is generally not a problem since you should never need more than one core per filter graph.
|
||||
|
||||
Plugins
|
||||
-------
|
||||
Plugin code may run more multithreaded than it initially appears. *VapourSynthPluginInit* is the only function always guaranteed to not run in parallel. This means that the constructor and destructor of a filter may be run in parallel for several instances. Use proper synchronization if you need to initialize shared data.
|
||||
|
||||
The *GetFrame* function is a bit more complicated so see the reference of the constants. Do however note that the parallelism is per instance. Even if a filter is *fmUnordered* or *fmSerial* other instances may enter *GetFrame* simultaneously.
|
||||
|
||||
There are two common misconseptions about which mode should be used. A simple rule is that *fmSerial* should never be used. And source filters (those returning a frame on *arInitial*) that need locking should use *fmUnordered*.
|
||||
|
||||
Reserved Frame Properties
|
||||
#########################
|
||||
|
||||
All frames contain a map of key--value pairs. It is recommended that these
|
||||
properties are named using only a-z, A-Z, 0-9 using CamelCase. There is a
|
||||
special category of keys starting with _ which have strictly defined meanings
|
||||
specified below. It is acceptable to not set any of these keys if they are
|
||||
unknown. It is also a fatal error to set them to a value not specified below.
|
||||
|
||||
int _ChromaLocation
|
||||
|
||||
Chroma sample position in YUV formats.
|
||||
|
||||
0=left, 1=center, 2=topleft, 3=top, 4=bottomleft, 5=bottom.
|
||||
|
||||
int _ColorRange
|
||||
|
||||
Full or limited range (PC/TV range). Primarily used with YUV formats.
|
||||
|
||||
0=full range, 1=limited range.
|
||||
|
||||
int _Primaries
|
||||
|
||||
Color primaries as specified in ITU-T H.265 Table E.3.
|
||||
|
||||
int _Matrix
|
||||
|
||||
Matrix coefficients as specified in ITU-T H.265 Table E.5.
|
||||
|
||||
int _Transfer
|
||||
|
||||
Transfer characteristics as specified in ITU-T H.265 Table E.4.
|
||||
|
||||
int _FieldBased
|
||||
|
||||
If the frame is composed of two independent fields (interlaced).
|
||||
|
||||
0=frame based (progressive), 1=bottom field first, 2=top field first.
|
||||
|
||||
float _AbsoluteTime
|
||||
|
||||
The frame's absolute timestamp in seconds if reported by the source filter.
|
||||
Should only be set by the source filter and not be modified. Use durations
|
||||
for all operations that depend on frame length.
|
||||
|
||||
int _DurationNum, int _DurationDen
|
||||
|
||||
The frame's duration in seconds as a rational number. Filters that
|
||||
modify the framerate should also change these values.
|
||||
|
||||
This fraction should always be normalized.
|
||||
|
||||
bint _Combed
|
||||
|
||||
Whether or not the frame needs postprocessing, usually hinted from field
|
||||
matching filters.
|
||||
|
||||
int _Field
|
||||
|
||||
If the frame was produced by something like core.std.SeparateFields,
|
||||
this property signals which field was used to generate this frame.
|
||||
|
||||
0=from bottom field, 1=from top field.
|
||||
|
||||
string _PictType
|
||||
|
||||
A single character describing the frame type. It uses the common
|
||||
IPB letters but other letters may also be used for formats with
|
||||
additional frame types.
|
||||
|
||||
int _SARNum, int _SARDen
|
||||
|
||||
Pixel (sample) aspect ratio as a rational number.
|
||||
|
||||
bint _SceneChangeNext
|
||||
|
||||
If 1, this frame is the last frame of the current scene. The next frame starts a new scene.
|
||||
|
||||
bint _SceneChangePrev
|
||||
|
||||
If 1, this frame starts a new scene.
|
||||
|
||||
frame _Alpha
|
||||
|
||||
A clip's alpha channel can be attached to the clip one frame at a
|
||||
time using this property.
|
|
@ -1,31 +0,0 @@
|
|||
Applications and Libraries
|
||||
==========================
|
||||
|
||||
Applications
|
||||
############
|
||||
|
||||
* `D2V Witch <https://github.com/dubhater/D2VWitch>`_ -- creates indexes that can be opened by d2vsource
|
||||
* `Hybrid <https://www.selur.de/>`_ `(Doom9) <https://forum.doom9.org/showthread.php?t=153035>`__ -- encoding GUI with VapourSynth support
|
||||
* `mpv.net <https://github.com/stax76/mpv.net>`_ -- a media player with VapourSynth built-in
|
||||
* `SmoothVideo Project <https://www.svp-team.com/wiki/Main_Page>`_ -- a plugin/video player component for realtime frame interpolation
|
||||
* `StaxRip <https://github.com/staxrip/staxrip>`_ -- encoding GUI with extended VapourSynth scripting support
|
||||
* `VapourSynth Editor <https://github.com/YomikoR/VapourSynth-Editor>`_ `(Doom9) <https://forum.doom9.org/showthread.php?t=170965>`__ -- an editor with syntax completion and fast preview support
|
||||
* `VapourSynth Editor 2 <https://bitbucket.org/gundamftw/vapoursynth-editor-2/>`_ `(Doom9) <https://forum.doom9.org/showthread.php?t=181708>`__ -- a spiritual successor to VapourSynth Editor
|
||||
* `VirtualDub2 <https://sourceforge.net/projects/vdfiltermod/>`_ `(Doom9) <https://forum.doom9.org/showthread.php?t=172021>`__ -- VirtualDub with added support for high bitdepth colorspaces, useful for previewing
|
||||
* `vsmkv <https://github.com/fluxamp/vsmkv>`_ -- a FUSE-based virtual filesystem for exporting VapourSynth scripts as uncompressed videos in the Matroska (MKV) file format
|
||||
* `vspreview <https://github.com/Irrational-Encoding-Wizardry/vs-preview>`_ -- an advanced standalone previewer written in python with too many features to list
|
||||
* `vspreview-rs <https://github.com/quietvoid/vspreview-rs>`_ `(Doom9) <https://forum.doom9.org/showthread.php?t=183903>`__ -- minimal VapourSynth script previewer
|
||||
* `Wobbly <https://github.com/dubhater/Wobbly>`_ `(Doom9) <https://forum.doom9.org/showthread.php?t=172496>`__ -- IVTC assistant similar to YATTA
|
||||
* `Yuuno <https://git.encode.moe/irrational-encoding-wizardry/yuuno>`_ -- incorporates VapourSynth into Jupyter
|
||||
|
||||
Libraries
|
||||
#########
|
||||
|
||||
* `VapourSynth.nim <https://forum.doom9.org/showthread.php?p=1905351>`_ -- Bindings for the Nim programming language
|
||||
* `vapoursynth-rs <https://crates.io/crates/vapoursynth>`_ -- VapourSynth Rust wrapper
|
||||
* `vsxx <https://github.com/sekrit-twc/vsxx>`_ -- VapourSynth C++ API wrapper
|
||||
|
||||
Tools
|
||||
#####
|
||||
|
||||
* GitHub Action `install-vapoursynth <https://github.com/marketplace/actions/install-vapoursynth>`_ -- Installs vapoursynth in your GitHub Action.
|
|
@ -1,38 +0,0 @@
|
|||
Function Reference
|
||||
==================
|
||||
|
||||
General Functions
|
||||
#################
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:glob:
|
||||
|
||||
functions/general/*
|
||||
|
||||
Video Functions
|
||||
###############
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:glob:
|
||||
|
||||
functions/video/*
|
||||
|
||||
Text
|
||||
****
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:glob:
|
||||
|
||||
functions/video/text/*
|
||||
|
||||
Audio Functions
|
||||
###############
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:glob:
|
||||
|
||||
functions/audio/*
|
|
@ -1,5 +0,0 @@
|
|||
AssumeSampleRate
|
||||
================
|
||||
|
||||
.. function:: AssumeSampleRate(anode clip[, anode src, int samplerate])
|
||||
:module: std
|
|
@ -1,12 +0,0 @@
|
|||
AudioGain
|
||||
=========
|
||||
|
||||
.. function:: AudioGain(anode clip, float[] gain)
|
||||
:module: std
|
||||
|
||||
AudioGain can either change the volume of individual channels
|
||||
if a separate *gain* for each channel is given or if only a single
|
||||
*gain* value is supplied it's applied to all channels.
|
||||
|
||||
Negative *gain* values are allowed. Applying a too large gain will
|
||||
lead to clipping in integer formats.
|
|
@ -1,11 +0,0 @@
|
|||
AudioLoop
|
||||
=========
|
||||
|
||||
.. function:: AudioLoop(anode clip[, int times=0])
|
||||
:module: std
|
||||
|
||||
Returns a clip with the frames or samples repeated over and over again. If *times* is
|
||||
less than 1 the clip will be repeated until the maximum clip length is
|
||||
reached, otherwise it will be repeated *times* times.
|
||||
|
||||
In Python, std.AudioLoop can also be invoked :ref:`using the multiplication operator <pythonreference>`.
|
|
@ -1,38 +0,0 @@
|
|||
AudioMix
|
||||
========
|
||||
|
||||
.. function:: AudioMix(anode[] clips, float[] matrix, int[] channels_out)
|
||||
:module: std
|
||||
|
||||
AudioMix can mix and combine channels from different clips in the most
|
||||
general way possible.
|
||||
|
||||
Most of the returned clip's properties are implicitly determined from the
|
||||
first clip given to *clips*.
|
||||
|
||||
The *clips* parameter takes one or more clips with the same format. If the clips
|
||||
are different lengths they'll be zero extended to that of the longest.
|
||||
|
||||
The argument *matrix* applies the coefficients to each channel of each input clip where
|
||||
the channels are in the numerical order of their channel constants. For example a stereo clip
|
||||
will have its channels presented in the order FRONT_LEFT and then FRONT_RIGHT.
|
||||
|
||||
Output channels and order is determined by the *channels_out* array
|
||||
between input index and output channel happens on the order of lowest output channel
|
||||
identifier to the highest.
|
||||
|
||||
|
||||
|
||||
Below are some examples of useful operations.
|
||||
|
||||
Downmix stereo audio to mono::
|
||||
|
||||
AudioMix(clips=clip, matrix=[0.5, 0.5], channels_out=[vs.FRONT_CENTER])
|
||||
|
||||
Downmix 5.1 audio::
|
||||
|
||||
AudioMix(clips=clip, matrix=[1, 0, 0.7071, 0, 0.7071, 0, 0, 1, 0.7071, 0, 0, 0.7071], channels_out=[vs.FRONT_LEFT, vs.FRONT_RIGHT])
|
||||
|
||||
Copy stereo audio to 5.1 and zero the other channels::
|
||||
|
||||
AudioMix(clips=c, matrix=[1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], channels_out=[vs.FRONT_LEFT, vs.FRONT_RIGHT, vs.FRONT_CENTER, vs.LOW_FREQUENCY, vs.BACK_LEFT, vs.BACK_RIGHT])
|
|
@ -1,10 +0,0 @@
|
|||
AudioReverse
|
||||
============
|
||||
|
||||
.. function:: AudioReverse(anode clip)
|
||||
:module: std
|
||||
|
||||
Returns a clip with the frame or sample order reversed. For example, a clip with 3
|
||||
frames would have the frame order 2, 1, 0.
|
||||
|
||||
In Python, std.AudioReverse can also be invoked by :ref:`slicing a clip <pythonreference>`.
|
|
@ -1,12 +0,0 @@
|
|||
AudioSplice
|
||||
===========
|
||||
|
||||
.. function:: AudioSplice(anode[] clips)
|
||||
:module: std
|
||||
|
||||
Returns a clip with all *clips* appended in the given order.
|
||||
|
||||
Splicing clips with different formats or dimensions is
|
||||
considered an error unless *mismatch* is true.
|
||||
|
||||
In Python, std.AudioSplice can also be invoked :ref:`using the addition operator <pythonreference>`.
|
|
@ -1,10 +0,0 @@
|
|||
AudioTrim
|
||||
=========
|
||||
|
||||
.. function:: AudioTrim(anode clip[, int first=0, int last, int length])
|
||||
:module: std
|
||||
|
||||
AudioTrim performs exactly the same operation on audio clips but the unit is
|
||||
obviously samples instead of frames.
|
||||
|
||||
In Python, std.AudioTrim can also be invoked by :ref:`slicing a clip <pythonreference>`.
|
|
@ -1,20 +0,0 @@
|
|||
BlankAudio
|
||||
==========
|
||||
|
||||
.. function:: BlankAudio([anode clip, int[] channels=[FRONT_LEFT, FRONT_RIGHT], int bits=16, int sampletype=INTEGER, int samplerate=44100, int length=(10*samplerate), bint keep=0])
|
||||
:module: std
|
||||
|
||||
Generates a new empty clip. This can be useful to have when editing audio
|
||||
or for testing. The default is a 10 second long 44.1kHz 16 bit stereo clip.
|
||||
Instead of specifying every property individually, BlankAudio can also copy
|
||||
the properties from *clip*. If both an argument such as *sampletype*, and *clip*
|
||||
are set, then *sampletype* will take precedence.
|
||||
|
||||
The *channels* argument is a list of channel constants. Specifying the same channel twice
|
||||
is not allowed.
|
||||
|
||||
The possible *sampletype* values are currently INTEGER (0) and FLOAT (1).
|
||||
|
||||
If *keep* is set, a reference to the same frame is returned on every request.
|
||||
Otherwise a new frame is generated every time. There should usually be no
|
||||
reason to change this setting.
|
|
@ -1,7 +0,0 @@
|
|||
SetAudioCache
|
||||
=============
|
||||
|
||||
.. function:: SetAudioCache(anode clip[, int mode, int fixedsize, int maxsize, int historysize])
|
||||
:module: std
|
||||
|
||||
see SetVideoCache
|
|
@ -1,48 +0,0 @@
|
|||
ShuffleChannels
|
||||
===============
|
||||
|
||||
.. function:: ShuffleChannels(anode[] clips, int[] channels_in, int[] channels_out)
|
||||
:module: std
|
||||
|
||||
ShuffleChannels can extract and combine channels from different clips in the most
|
||||
general way possible.
|
||||
|
||||
Most of the returned clip's properties are implicitly determined from the
|
||||
first clip given to *clips*.
|
||||
|
||||
The *clips* parameter takes one or more clips with the same format. If the clips
|
||||
are different lengths they'll be zero extended to that of the longest.
|
||||
|
||||
The argument *channels_in* controls which of the input clips' channels to use and
|
||||
takes a channel constants as its argument. Specifying a non-existent channel
|
||||
is an error. If more *channels_in* than *clips* values are specified then the last
|
||||
clip in the *clips* list is reused as a source. In addition to the channel constant
|
||||
it's also possible to specify the nth channel by using negative numbers.
|
||||
|
||||
The output channel mapping is determined by *channels_out* and corresponds to the
|
||||
input channel order. The number of *channels_out* entries must be the same as the
|
||||
number of *channels_in* entries. Specifying the same output channel twice is an error.
|
||||
|
||||
|
||||
|
||||
Below are some examples of useful operations.
|
||||
|
||||
Extract the left channel (assuming it exists)::
|
||||
|
||||
ShuffleChannels(clips=clip, channels_in=vs.FRONT_LEFT, channels_out=vs.FRONT_LEFT)
|
||||
|
||||
Swap left and right audio channels in a stereo clip::
|
||||
|
||||
ShuffleChannels(clips=clip, channels_in=[vs.FRONT_RIGHT, vs.FRONT_LEFT], channels_out=[vs.FRONT_LEFT, vs.FRONT_RIGHT])
|
||||
|
||||
Swap left and right audio channels in a stereo clip (alternate ordering of arguments)::
|
||||
|
||||
ShuffleChannels(clips=clip, channels_in=[vs.FRONT_LEFT, vs.FRONT_RIGHT], channels_out=[vs.FRONT_RIGHT, vs.FRONT_LEFT])
|
||||
|
||||
Swap left and right audio channels in a stereo clip (alternate indexing)::
|
||||
|
||||
ShuffleChannels(clips=clip, channels_in=[-2, -1], channels_out=[vs.FRONT_LEFT, vs.FRONT_RIGHT])
|
||||
|
||||
Merge 2 mono audio clips into a single stereo clip::
|
||||
|
||||
ShuffleChannels(clips=[clipa, clipb], channels_in=[vs.FRONT_LEFT, vs.FRONT_LEFT], channels_out=[vs.FRONT_LEFT, vs.FRONT_RIGHT])
|
|
@ -1,8 +0,0 @@
|
|||
SplitChannels
|
||||
=============
|
||||
|
||||
.. function:: SplitChannels(anode clip)
|
||||
:module: std
|
||||
|
||||
SplitChannels returns each audio channel of the input as
|
||||
a separate clip.
|
|
@ -1,19 +0,0 @@
|
|||
LoadAllPlugins
|
||||
==============
|
||||
|
||||
.. function:: LoadAllPlugins(string path)
|
||||
:module: std
|
||||
|
||||
Loads all native VapourSynth plugins found in the
|
||||
specified *path*. Plugins that fail to load are
|
||||
silently skipped.
|
||||
|
||||
Beware of Python's escape character, this will fail::
|
||||
|
||||
LoadPlugin(path='c:\plugins')
|
||||
|
||||
Correct ways::
|
||||
|
||||
LoadPlugin(path='c:/plugins')
|
||||
LoadPlugin(path=r'c:\plugins')
|
||||
LoadPlugin(path='c:\\plugins\\')
|
|
@ -1,26 +0,0 @@
|
|||
LoadPlugin
|
||||
==========
|
||||
|
||||
.. function:: LoadPlugin(string path, bint altsearchpath = False)
|
||||
:module: std
|
||||
|
||||
Load a native VapourSynth plugin. If successful, the loaded plugin's
|
||||
functions will end up in their own namespace.
|
||||
|
||||
Returns an error if a plugin with the same identifier or namespace already
|
||||
has been loaded. This is to prevent naming collisions or multiple versions
|
||||
of the same plugin being loaded at once.
|
||||
|
||||
Plugins are normally loaded with a very specific search order for
|
||||
dependencies. Setting *altsearchpath* modifies this behavior to also
|
||||
include dlls in the PATH.
|
||||
|
||||
Beware of Python's escape character, this will fail::
|
||||
|
||||
LoadPlugin(path='c:\plugins\filter.dll')
|
||||
|
||||
Correct ways::
|
||||
|
||||
LoadPlugin(path='c:/plugins/filter.dll')
|
||||
LoadPlugin(path=r'c:\plugins\filter.dll')
|
||||
LoadPlugin(path='c:\\plugins\\filter.dll')
|
|
@ -1,44 +0,0 @@
|
|||
LoadPlugin (Avisynth Compatibility)
|
||||
===================================
|
||||
|
||||
.. function:: LoadPlugin(string path)
|
||||
:module: avs
|
||||
|
||||
Load an Avisynth 2.5 (32 bit only), 2.6 (32 and 64 bit) or Avisynth+ (32 and 64 bit) plugin.
|
||||
If successful, the loaded plugin's functions will end up in the avs namespace. Note that
|
||||
in the case of Avisynth+ there's no way to use the formats combined with alpha or
|
||||
higher bitdepth packed RGB. Coincidentally there are no plugins that use this in a
|
||||
meaningful way yet.
|
||||
|
||||
The compatibility module can work with a large number of Avisynth's plugins.
|
||||
However, the wrapping is not complete, so the following things will cause
|
||||
problems:
|
||||
|
||||
* The plugin expects YUY2 or RGB32 input. In this case provide input in
|
||||
either YUV422P8 or RGB24 format pass compatpack=True as an argument
|
||||
to the Avisynth function.
|
||||
* The plugin tries to call env->invoke().
|
||||
These calls are ignored when it is safe to do so, but otherwise they
|
||||
will most likely trigger a fatal error.
|
||||
* Plugins trying to read global variables.
|
||||
There are no global variables.
|
||||
|
||||
If there are function name collisions functions will have a number appended
|
||||
to them to make them distinct. For example if three functions are named
|
||||
*func* then they will be named *func*, *func_2* and *func_3*. This means
|
||||
that Avisynth functions that have multiple overloads (rare) will give
|
||||
each overload a different name.
|
||||
|
||||
Note that if you are really insane you can load Avisynth's VirtualDub plugin
|
||||
loader and use VirtualDub plugins as well. Function overloads are very common
|
||||
when dealing with VirtualDub.
|
||||
|
||||
Beware of Python's escape character, this will fail::
|
||||
|
||||
LoadPlugin(path='c:\plugins\filter.dll')
|
||||
|
||||
Correct ways::
|
||||
|
||||
LoadPlugin(path='c:/plugins/filter.dll')
|
||||
LoadPlugin(path=r'c:\plugins\filter.dll')
|
||||
LoadPlugin(path='c:\\plugins\\filter.dll')
|
|
@ -1,14 +0,0 @@
|
|||
SetMaxCPU
|
||||
=========
|
||||
|
||||
.. function:: SetMaxCPU(string cpu)
|
||||
:module: std
|
||||
|
||||
This function is only intended for testing and debugging purposes
|
||||
and sets the maximum used instruction set for optimized functions.
|
||||
|
||||
Possible values for x86: "avx2", "sse2", "none"
|
||||
|
||||
Other platforms: "none"
|
||||
|
||||
By default all supported cpu features are used.
|
|
@ -1,9 +0,0 @@
|
|||
AddBorders
|
||||
==========
|
||||
|
||||
.. function:: AddBorders(vnode clip[, int left=0, int right=0, int top=0, int bottom=0, float[] color=<black>])
|
||||
:module: std
|
||||
|
||||
Adds borders to frames. The arguments specify the number of pixels to add on
|
||||
each side. They must obey the subsampling restrictions.
|
||||
The newly added borders will be set to *color*.
|
|
@ -1,16 +0,0 @@
|
|||
AssumeFPS
|
||||
=========
|
||||
|
||||
.. function:: AssumeFPS(vnode clip[, vnode src, int fpsnum, int fpsden=1])
|
||||
:module: std
|
||||
|
||||
Returns a clip with the framerate changed. This does not in any way modify
|
||||
the frames, only their metadata.
|
||||
|
||||
The framerate to assign can either be read from another clip, *src*, or given
|
||||
as a rational number with *fpsnum* and *fpsden*.
|
||||
|
||||
It is an error to specify both *src* and *fpsnum*.
|
||||
|
||||
AssumeFPS overwrites the frame properties ``_DurationNum`` and
|
||||
``_DurationDen`` with the frame duration computed from the new frame rate.
|
|
@ -1,21 +0,0 @@
|
|||
AverageFrames
|
||||
=============
|
||||
|
||||
.. function:: AverageFrames(vnode[] clips, float[] weights[, float scale, bint scenechange, int[] planes])
|
||||
:module: std
|
||||
|
||||
AverageFrames has two main modes depending on whether one or multiple *clips* are supplied.
|
||||
The filter is named AverageFrames since using ones for weights is an easy way to average
|
||||
many frames together but it can also be seen as a temporal or multiple frame convolution.
|
||||
|
||||
If multiple *clips* are supplied then the frames from each of the *clips* are multiplied by
|
||||
the respective *weights*, summed together and divided by *scale* before being output. Note
|
||||
that only integer *weights* and *scale* are allowed for integer input formats.
|
||||
|
||||
If a single *clip* is supplied then an odd number of *weights* are needed and they will instead
|
||||
be temporally centered on the current frame of the *clip*. The rest works as multiple *clip* mode
|
||||
with the only difference being that *scenechange* can be set to avoid averaging frames over scene
|
||||
changes. If this happens then all the weights beyond a scene change are instead applied to the frame
|
||||
right before it.
|
||||
|
||||
At most 31 *weights* can be supplied.
|
|
@ -1,34 +0,0 @@
|
|||
Binarize/BinarizeMask
|
||||
=====================
|
||||
|
||||
.. function:: Binarize(vnode clip[, float[] threshold, float[] v0, float[] v1, int[] planes=[0, 1, 2]])
|
||||
BinarizeMask(vnode clip[, float[] threshold, float[] v0, float[] v1, int[] planes=[0, 1, 2]])
|
||||
:module: std
|
||||
|
||||
Turns every pixel in the image into either *v0*, if it's below
|
||||
*threshold*, or *v1*, otherwise. The *BinarizeMask* version is intended
|
||||
for use on mask clips where all planes have the same value range and
|
||||
only differs in the default values of *v0* and *v1*.
|
||||
|
||||
*clip*
|
||||
Clip to process. It must have integer sample type and bit depth
|
||||
between 8 and 16, or float sample type and bit depth of 32. If
|
||||
there are any frames with other formats, an error will be
|
||||
returned.
|
||||
|
||||
*threshold*
|
||||
Defaults to the middle point of range allowed by the format.
|
||||
Can be specified for each plane individually.
|
||||
|
||||
*v0*
|
||||
Value given to pixels that are below *threshold*. Can be specified
|
||||
for each plane individually. Defaults to the lower bound of the format.
|
||||
|
||||
*v1*
|
||||
Value given to pixels that are greater than or equal to *threshold*.
|
||||
Defaults to the maximum value allowed by the format. Can be specified
|
||||
for each plane individually. Defaults to the upper bound of the format.
|
||||
|
||||
*planes*
|
||||
Specifies which planes will be processed. Any unprocessed planes
|
||||
will be simply copied.
|
|
@ -1,24 +0,0 @@
|
|||
BlankClip
|
||||
=========
|
||||
|
||||
.. function:: BlankClip([vnode clip, int width=640, int height=480, int format=vs.RGB24, int length=(10*fpsnum)/fpsden, int fpsnum=24, int fpsden=1, float[] color=<black>, bint keep=0, bint varsize=0, bint varformat=0])
|
||||
:module: std
|
||||
|
||||
Generates a new empty clip. This can be useful to have when editing video or
|
||||
for testing. The default is a 640x480 RGB24 24fps 10 second long black clip.
|
||||
Instead of specifying every property individually, BlankClip can also copy
|
||||
the properties from *clip*. If both an argument such as *width*, and *clip*
|
||||
are set, then *width* will take precedence.
|
||||
|
||||
If *keep* is set, a reference to the same frame is returned on every request.
|
||||
Otherwise a new frame is generated every time. There should usually be no
|
||||
reason to change this setting.
|
||||
|
||||
If *varsize* is set, a clip with variable size will be returned. The frames
|
||||
themselves will still have the size given by the width and height arguments.
|
||||
|
||||
If *varformat* is set, a clip with variable format will be returned.
|
||||
The frames themselves will have the format given by the format argument.
|
||||
|
||||
It is never an error to use BlankClip.
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
BoxBlur
|
||||
=======
|
||||
|
||||
.. function:: BoxBlur(vnode clip[, int[] planes, int hradius = 1, int hpasses = 1, int vradius = 1, int vpasses = 1])
|
||||
:module: std
|
||||
|
||||
Performs a box blur which is fast even for large radius values. Using multiple *passes* can be used to fairly cheaply
|
||||
approximate a gaussian blur. A *radius* of 0 means no processing is performed.
|
|
@ -1,15 +0,0 @@
|
|||
ClipToProp
|
||||
==========
|
||||
|
||||
.. function:: ClipToProp(vnode clip, vnode mclip[, string prop='_Alpha'])
|
||||
:module: std
|
||||
|
||||
Stores each frame of *mclip* as a frame property named *prop* in *clip*. This
|
||||
is primarily intended to attach mask/alpha clips to another clip so that
|
||||
editing operations will apply to both. Unlike most other filters the output
|
||||
length is derived from the second argument named *mclip*.
|
||||
|
||||
If the attached *mclip* does not represent the alpha channel, you should set
|
||||
*prop* to something else.
|
||||
|
||||
It is the inverse of PropToClip().
|
|
@ -1,85 +0,0 @@
|
|||
Convolution
|
||||
===========
|
||||
|
||||
.. function:: Convolution(vnode clip, float[] matrix[, float bias=0.0, float divisor=0.0, int[] planes=[0, 1, 2], bint saturate=True, string mode="s"])
|
||||
:module: std
|
||||
|
||||
Performs a spatial convolution.
|
||||
|
||||
Here is how a 3x3 convolution is done. Each pixel in the 3x3
|
||||
neighbourhood is multiplied by the corresponding coefficient in
|
||||
*matrix*. The results of the nine multiplications are added together,
|
||||
then this sum is divided by *divisor*. Next, *bias* is added, and the
|
||||
result is rounded to the nearest larger integer. If this integer
|
||||
result is negative and the *saturate* parameter is False, it is
|
||||
multiplied by -1. Finally, the result is clamped to the format's range
|
||||
of valid values.
|
||||
|
||||
*clip*
|
||||
Clip to process. It must have integer sample type and bit depth
|
||||
between 8 and 16, or float sample type and bit depth of 32. If
|
||||
there are any frames with other formats, an error will be
|
||||
returned.
|
||||
|
||||
*matrix*
|
||||
Coefficients for the convolution.
|
||||
|
||||
When *mode* is "s", this must be an array of 9 or 25 numbers, for
|
||||
a 3x3 or 5x5 convolution, respectively.
|
||||
|
||||
When *mode* is not "s", this must be an array of 3 to 25 numbers,
|
||||
with an odd number of elements.
|
||||
|
||||
The values of the coefficients must be between -1023 and 1023
|
||||
(inclusive). The coefficients are rounded to integers when
|
||||
the input is an integer format.
|
||||
|
||||
This is how the elements of *matrix* correspond to the pixels in
|
||||
a 3x3 neighbourhood::
|
||||
|
||||
1 2 3
|
||||
4 5 6
|
||||
7 8 9
|
||||
|
||||
It's the same principle for the other types of convolutions. The
|
||||
middle element of *matrix* always corresponds to the center pixel.
|
||||
|
||||
*bias*
|
||||
Value to add to the final result of the convolution (before clamping
|
||||
the result to the format's range of valid values).
|
||||
|
||||
*divisor*
|
||||
Divide the output of the convolution by this value (before adding
|
||||
*bias*).
|
||||
|
||||
If this parameter is 0.0 (the default), the output of the convolution
|
||||
will be divided by the sum of the elements of *matrix*, or by 1.0,
|
||||
if the sum is 0.
|
||||
|
||||
*planes*
|
||||
Specifies which planes will be processed. Any unprocessed planes
|
||||
will be simply copied.
|
||||
|
||||
*saturate*
|
||||
The final result is clamped to the format's range of valid values
|
||||
(0 .. (2**bitdepth)-1). Therefore, if this parameter is True,
|
||||
negative values become 0. If this parameter is False, it's instead
|
||||
the absolute value that is clamped and returned.
|
||||
|
||||
*mode*
|
||||
Selects the type of convolution. Possible values are "s", for square,
|
||||
"h" for horizontal, "v" for vertical, and "hv" or "vh" for both
|
||||
horizontal and vertical.
|
||||
|
||||
How to apply a simple blur equivalent to Avisynth's Blur(1):
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
Convolution(matrix=[1, 2, 1, 2, 4, 2, 1, 2, 1])
|
||||
|
||||
How to apply a stronger blur equivalent to Avisynth's Blur(1.58):
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
Convolution(matrix=[1, 1, 1, 1, 1, 1, 1, 1, 1])
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
CopyFrameProps
|
||||
==============
|
||||
|
||||
.. function:: CopyFrameProps(vnode clip, vnode prop_src)
|
||||
:module: std
|
||||
|
||||
Returns *clip* but with all the frame properties replaced with the
|
||||
ones from the clip in *prop_src*. Note that if *clip* is longer
|
||||
than *prop_src* then the last existing frame's properties will be
|
||||
used instead.
|
|
@ -1,20 +0,0 @@
|
|||
Crop/CropAbs
|
||||
===============
|
||||
|
||||
.. function:: Crop(vnode clip[, int left=0, int right=0, int top=0, int bottom=0])
|
||||
CropAbs(vnode clip, int width, int height[, int left=0, int top=0])
|
||||
:module: std
|
||||
|
||||
Crops the frames in a clip.
|
||||
|
||||
Crop is the simplest to use of the two. The arguments specify how many
|
||||
pixels to crop from each side. This function used to be called CropRel
|
||||
which is still an alias for it.
|
||||
|
||||
CropAbs, on the other hand, is special, because it can accept clips with
|
||||
variable frame sizes and crop out a fixed size area, thus making it a fixed
|
||||
size clip.
|
||||
|
||||
Both functions return an error if the whole picture is cropped away, if the
|
||||
cropped area extends beyond the input or if the subsampling restrictions
|
||||
aren't met.
|
|
@ -1,44 +0,0 @@
|
|||
Deflate/Inflate
|
||||
===============
|
||||
|
||||
.. function:: Deflate(vnode clip[, int[] planes=[0, 1, 2], float threshold])
|
||||
:module: std
|
||||
|
||||
Replaces each pixel with the average of the eight pixels in its 3x3
|
||||
neighbourhood, but only if that average is less than the center pixel.
|
||||
|
||||
*clip*
|
||||
Clip to process. It must have integer sample type and bit depth
|
||||
between 8 and 16, or float sample type and bit depth of 32. If
|
||||
there are any frames with other formats, an error will be
|
||||
returned.
|
||||
|
||||
*planes*
|
||||
Specifies which planes will be processed. Any unprocessed planes
|
||||
will be simply copied.
|
||||
|
||||
*threshold*
|
||||
Allows to limit how much pixels are changed. Output pixels will not
|
||||
become less than ``input - threshold``. The default is no limit.
|
||||
|
||||
|
||||
.. function:: Inflate(vnode clip[, int[] planes=[0, 1, 2], int threshold=65535])
|
||||
:module: std
|
||||
|
||||
Replaces each pixel with the average of the eight pixels in its 3x3
|
||||
neighbourhood, but only if that average is greater than the center
|
||||
pixel.
|
||||
|
||||
*clip*
|
||||
Clip to process. It must have integer sample type and bit depth
|
||||
between 8 and 16, or float sample type and bit depth of 32. If
|
||||
there are any frames with other formats, an error will be
|
||||
returned.
|
||||
|
||||
*planes*
|
||||
Specifies which planes will be processed. Any unprocessed planes
|
||||
will be simply copied.
|
||||
|
||||
*threshold*
|
||||
Allows to limit how much pixels are changed. Output pixels will not
|
||||
become greater than ``input + threshold``. The default is no limit.
|
|
@ -1,11 +0,0 @@
|
|||
DeleteFrames
|
||||
============
|
||||
|
||||
.. function:: DeleteFrames(vnode clip, int[] frames)
|
||||
:module: std
|
||||
|
||||
Deletes the specified frames.
|
||||
|
||||
All frame numbers apply to the input clip.
|
||||
|
||||
Returns an error if the same frame is deleted twice or if all frames in a clip are deleted.
|
|
@ -1,23 +0,0 @@
|
|||
DoubleWeave
|
||||
===========
|
||||
|
||||
.. function:: DoubleWeave(vnode clip[, bint tff])
|
||||
:module: std
|
||||
|
||||
Weaves the fields back together from a clip with interleaved fields.
|
||||
|
||||
Since VapourSynth only has a weak notion of field order internally, *tff*
|
||||
may have to be set. Setting *tff* to true means top fields first and false
|
||||
means bottom fields first. Note that the ``_Field`` frame property, if present
|
||||
and in a valid combination, takes precedence over *tff*.
|
||||
|
||||
DoubleWeave's output has the same number of frames as the input. One must
|
||||
use DoubleWeave together with SelectEvery to undo the effect of
|
||||
SeparateFields::
|
||||
|
||||
sep = core.std.SeparateFields(source)
|
||||
...
|
||||
woven = core.std.DoubleWeave(sep)
|
||||
woven = core.std.SelectEvery(woven, 2, 0)
|
||||
|
||||
The ``_Field`` frame property is deleted and ``_FieldBased`` is set accordingly.
|
|
@ -1,11 +0,0 @@
|
|||
DuplicateFrames
|
||||
===============
|
||||
|
||||
.. function:: DuplicateFrames(vnode clip, int[] frames)
|
||||
:module: std
|
||||
|
||||
Duplicates the specified frames.
|
||||
|
||||
A frame may be duplicated several times.
|
||||
|
||||
All frame numbers apply to the input clip.
|
|
@ -1,118 +0,0 @@
|
|||
Expr
|
||||
====
|
||||
|
||||
.. function:: Expr(vnode[] clips, string[] expr[, int format])
|
||||
:module: std
|
||||
|
||||
Expr evaluates an expression per pixel for up to 26 input *clips*.
|
||||
The expression, *expr*, is written using reverse polish notation and can be
|
||||
specified for each plane individually.
|
||||
The expression given for the previous plane is used if the *expr* array
|
||||
contains fewer expressions than the input clip has planes.
|
||||
In practice this means that a single expression will be applied to all planes
|
||||
by default.
|
||||
|
||||
Specifying an empty string as the expression enables a fast plane copy from
|
||||
the first specified clip, when possible. If it is not possible due to the
|
||||
output *format* being incompatible, the plane contents will be undefined.
|
||||
|
||||
Since the expression is evaluated at runtime, there are a few pitfalls. In
|
||||
order to keep speed up, the input ranges are not normalized to the usual
|
||||
floating point ranges. Instead they are left as is, meaning that an 8 bit
|
||||
clip will have values in the 0-255 range and a 10 bit clip will have values
|
||||
in the 0-1023 range.
|
||||
Note that floating point clips are even more difficult, as most channels are
|
||||
stored in the 0-1 range with the exception of U, V, Co and Cg planes, which
|
||||
are in the -0.5-0.5 range.
|
||||
If you mix clips with different input formats this must be taken into
|
||||
consideration.
|
||||
|
||||
When the output format uses integer samples, the result of the expression is
|
||||
clamped to the [0, 2**bits_per_sample-1] range.
|
||||
When the output format uses float samples, the result of the expression is
|
||||
stored without any clamping.
|
||||
|
||||
By default the output *format* is the same as the first input clip's format.
|
||||
You can override it by setting *format*. The only restriction is that the
|
||||
output *format* must have the same subsampling as the input *clips* and be
|
||||
8..16 bit integer or 32 bit float. 16 bit float is also supported on cpus
|
||||
with the f16c instructions.
|
||||
|
||||
Logical operators are also a bit special, since everything is done in
|
||||
floating point arithmetic.
|
||||
All values greater than 0 are considered true for the purpose of comparisons.
|
||||
Logical operators return 0.0 for false and 1.0 for true in their operations.
|
||||
|
||||
Since the expression is being evaluated at runtime, there are also the stack
|
||||
manipulation operators, *swap* and *dup*. The former swaps the topmost and
|
||||
second topmost values, and the latter duplicates the topmost stack value.
|
||||
|
||||
These operators also have *swapN* and *dupN* forms that allow a value N
|
||||
steps up in the stack to be swapped or duplicated. The top value of the stack
|
||||
has index zero meaning that *dup* is equivalent to *dup0* and *swap* is
|
||||
equivalent to *swap1*. This is because *swapN* always swaps with the topmost
|
||||
value at index 0.
|
||||
|
||||
Expressions are converted to byte-code or machine-code by an optimizing
|
||||
compiler and are not guaranteed to evaluate in the order originally written.
|
||||
The compiler assumes that all input values are finite (i.e neither NaN nor
|
||||
INF) and that no operator will produce a non-finite value. Such expressions
|
||||
are invalid. This is especially important for the transcendental operators:
|
||||
|
||||
* exp - expression must not overflow (i.e. x <= 88)
|
||||
* log - input must be finite and non-negative (i.e. x >= 0 && x <= 3e+38)
|
||||
* pow - base must be finite and non-negative. Result must not overflow (i.e. x >= 0 && x <= 3e+38; 1e-38 <= result <= 3e+38)
|
||||
|
||||
Clip load operators::
|
||||
|
||||
x-z, a-w
|
||||
|
||||
The operators taking one argument are::
|
||||
|
||||
exp log sqrt sin cos abs not dup dupN
|
||||
|
||||
The operators taking two arguments are::
|
||||
|
||||
+ - * / max min pow > < = >= <= and or xor swap swapN
|
||||
|
||||
The operators taking three arguments are::
|
||||
|
||||
?
|
||||
|
||||
For example these operations::
|
||||
|
||||
a b c ?
|
||||
|
||||
d e <
|
||||
|
||||
f abs
|
||||
|
||||
Are equivalent to these operations in C::
|
||||
|
||||
a ? b : c
|
||||
|
||||
d < e
|
||||
|
||||
abs(f)
|
||||
|
||||
The sin/cos operators are approximated to within 2e-6 absolute error for
|
||||
inputs with magnitude up to 1e5, and there is no accuracy guarantees for
|
||||
inputs whose magnitude is larger than 2e5.
|
||||
|
||||
How to average the Y planes of 3 YUV clips and pass through the UV planes
|
||||
unchanged (assuming same format)::
|
||||
|
||||
std.Expr(clips=[clipa, clipb, clipc], expr=["x y + z + 3 /", "", ""])
|
||||
|
||||
How to average the Y planes of 3 YUV clips and pass through the UV planes
|
||||
unchanged (different formats)::
|
||||
|
||||
std.Expr(clips=[clipa16bit, clipb10bit, clipa8bit],
|
||||
expr=["x y 64 * + z 256 * + 3 /", ""])
|
||||
|
||||
Setting the output format because the resulting values are illegal in a 10
|
||||
bit clip (note that the U and V planes will contain junk since direct copy
|
||||
isn't possible)::
|
||||
|
||||
std.Expr(clips=[clipa10bit, clipb16bit, clipa8bit],
|
||||
expr=["x 64 * y + z 256 * + 3 /", ""], format=vs.YUV420P16)
|
|
@ -1,8 +0,0 @@
|
|||
FlipVertical/FlipHorizontal
|
||||
===========================
|
||||
|
||||
.. function:: FlipVertical(vnode clip)
|
||||
FlipHorizontal(vnode clip)
|
||||
:module: std
|
||||
|
||||
Flips the *clip* in the vertical or horizontal direction.
|
|
@ -1,77 +0,0 @@
|
|||
FrameEval
|
||||
=========
|
||||
|
||||
.. function:: FrameEval(vnode clip, func eval[, vnode[] prop_src, vnode[] clip_src])
|
||||
:module: std
|
||||
|
||||
Allows an arbitrary function to be evaluated every frame. The function gets
|
||||
the frame number, *n*, as input and should return a clip the output frame can
|
||||
be requested from.
|
||||
|
||||
The *clip* argument is only used to get the output format from since there is
|
||||
no reliable automatic way to deduce it.
|
||||
|
||||
When using the argument *prop_src* the function will also have an argument,
|
||||
*f*, containing the current frames. This is mainly so frame properties can be
|
||||
accessed and used to make decisions. Note that *f* will only be a list if
|
||||
more than one *prop_src* clip is provided.
|
||||
|
||||
The *clip_src* argument only exists as a way to hint which clips are referenced in the
|
||||
*eval* function which can improve caching and graph generation. Its use is encouraged
|
||||
but not required.
|
||||
|
||||
This function can be used to accomplish the same things as Animate,
|
||||
ScriptClip and all the other conditional filters in Avisynth. Note that to
|
||||
modify per frame properties you should use *ModifyFrame*.
|
||||
|
||||
How to animate a BlankClip to fade from white to black. This is the simplest
|
||||
use case without using the *prop_src* argument::
|
||||
|
||||
import vapoursynth as vs
|
||||
import functools
|
||||
|
||||
base_clip = vs.core.std.BlankClip(format=vs.YUV420P8, length=1000, color=[255, 128, 128])
|
||||
|
||||
def animator(n, clip):
|
||||
if n > 255:
|
||||
return clip
|
||||
else:
|
||||
return vs.core.std.BlankClip(format=vs.YUV420P8, length=1000, color=[n, 128, 128])
|
||||
|
||||
animated_clip = vs.core.std.FrameEval(base_clip, functools.partial(animator, clip=base_clip))
|
||||
animated_clip.set_output()
|
||||
|
||||
How to perform a simple per frame auto white balance. It shows how to access
|
||||
calculated frame properties and use them for conditional filtering::
|
||||
|
||||
import vapoursynth as vs
|
||||
import functools
|
||||
import math
|
||||
|
||||
def GrayWorld1Adjust(n, f, clip, core):
|
||||
small_number = 0.000000001
|
||||
red = f[0].props['PlaneStatsAverage']
|
||||
green = f[1].props['PlaneStatsAverage']
|
||||
blue = f[2].props['PlaneStatsAverage']
|
||||
max_rgb = max(red, green, blue)
|
||||
red_corr = max_rgb/max(red, small_number)
|
||||
green_corr = max_rgb/max(green, small_number)
|
||||
blue_corr = max_rgb/max(blue, small_number)
|
||||
norm = max(blue, math.sqrt(red_corr*red_corr + green_corr*green_corr + blue_corr*blue_corr) / math.sqrt(3), small_number)
|
||||
r_gain = red_corr/norm
|
||||
g_gain = green_corr/norm
|
||||
b_gain = blue_corr/norm
|
||||
return core.std.Expr(clip, expr=['x ' + repr(r_gain) + ' *', 'x ' + repr(g_gain) + ' *', 'x ' + repr(b_gain) + ' *'])
|
||||
|
||||
def GrayWorld1(clip, matrix_s=None):
|
||||
rgb_clip = vs.core.resize.Bilinear(clip, format=vs.RGB24)
|
||||
r_avg = vs.core.std.PlaneStats(rgb_clip, plane=0)
|
||||
g_avg = vs.core.std.PlaneStats(rgb_clip, plane=1)
|
||||
b_avg = vs.core.std.PlaneStats(rgb_clip, plane=2)
|
||||
adjusted_clip = vs.core.std.FrameEval(rgb_clip, functools.partial(GrayWorld1Adjust, clip=rgb_clip, core=vs.core), prop_src=[r_avg, g_avg, b_avg])
|
||||
return vs.core.resize.Bilinear(adjusted_clip, format=clip.format.id, matrix_s=matrix_s)
|
||||
|
||||
vs.core.std.LoadPlugin(path='BestSource.dll')
|
||||
main = vs.core.bs.VideoSource(source='...')
|
||||
main = GrayWorld1(main)
|
||||
main.set_output()
|
|
@ -1,18 +0,0 @@
|
|||
FreezeFrames
|
||||
============
|
||||
|
||||
.. function:: FreezeFrames(vnode clip, int[] first, int[] last, int[] replacement)
|
||||
:module: std
|
||||
|
||||
FreezeFrames replaces all the frames in the [*first*,\ *last*] range
|
||||
(inclusive) with *replacement*.
|
||||
|
||||
A single call to FreezeFrames can freeze any number of ranges::
|
||||
|
||||
core.std.FreezeFrames(input, first=[0, 100, 231], last=[15, 112, 300], replacement=[8, 50, 2])
|
||||
|
||||
This replaces [0,15] with 8, [100,112] with 50, and [231,300] with 2 (the
|
||||
original frame number 2, not frame number 2 after it was replaced with
|
||||
number 8 by the first range).
|
||||
|
||||
The frame ranges must not overlap.
|
|
@ -1,19 +0,0 @@
|
|||
Interleave
|
||||
==========
|
||||
|
||||
.. function:: Interleave(vnode[] clips[, bint extend=0, bint mismatch=0, bint modify_duration=True])
|
||||
:module: std
|
||||
|
||||
Returns a clip with the frames from all *clips* interleaved. For example,
|
||||
Interleave(clips=[A, B]) will return A.Frame 0, B.Frame 0, A.Frame 1,
|
||||
B.Frame...
|
||||
|
||||
The *extend* argument controls whether or not all input clips will be treated
|
||||
as if they have the same length as the longest clip.
|
||||
|
||||
Interleaving clips with different formats or dimensions is considered an
|
||||
error unless *mismatch* is true.
|
||||
|
||||
If *modify_duration* is set then the output clip's frame rate is the first
|
||||
input clip's frame rate multiplied by the number of input clips. The frame durations are divided
|
||||
by the number of input clips. Otherwise the first input clip's frame rate is used.
|
|
@ -1,21 +0,0 @@
|
|||
Invert/InvertMask
|
||||
=================
|
||||
|
||||
.. function:: Invert(vnode clip[, int[] planes=[0, 1, 2]])
|
||||
InvertMask(vnode clip[, int[] planes=[0, 1, 2]])
|
||||
:module: std
|
||||
|
||||
Inverts the pixel values. Specifically, it subtracts the value of the
|
||||
input pixel from the format's maximum allowed value. The *InvertMask*
|
||||
version is intended for use on mask clips where all planes have the
|
||||
same maximum value regardless of the colorspace.
|
||||
|
||||
*clip*
|
||||
Clip to process. It must have integer sample type and bit depth
|
||||
between 8 and 16, or float sample type and bit depth of 32. If
|
||||
there are any frames with other formats, an error will be
|
||||
returned.
|
||||
|
||||
*planes*
|
||||
Specifies which planes will be processed. Any unprocessed planes
|
||||
will be simply copied.
|
|
@ -1,39 +0,0 @@
|
|||
Levels
|
||||
======
|
||||
|
||||
.. function:: Levels(vnode clip[, float min_in, float max_in, float gamma=1.0, float min_out, float max_out, int[] planes=[0, 1, 2]])
|
||||
:module: std
|
||||
|
||||
Adjusts brightness, contrast, and gamma.
|
||||
|
||||
The range [*min_in*, *max_in*] is remapped into [*min_out*, *max_out*]. Note that the
|
||||
range behavior is unintuitive for YUV float formats since the assumed range will be
|
||||
0-1 even for the UV-planes.
|
||||
|
||||
For example, to convert from limited range YUV to full range (8 bit)::
|
||||
|
||||
clip = std.Levels(clip, min_in=16, max_in=235, min_out=0, max_out=255, planes=0)
|
||||
clip = std.Levels(clip, min_in=16, max_in=240, min_out=0, max_out=255, planes=[1,2])
|
||||
|
||||
The default value of *max_in* and *max_out* is the format's minimum and maximum
|
||||
allowed values respectively. Note that all input is clamped to the input range
|
||||
to prevent out of range output.
|
||||
|
||||
.. warning::
|
||||
The default ranges are 0-1 for floating point formats. This may have an undesired
|
||||
effect on YUV formats.
|
||||
|
||||
*clip*
|
||||
Clip to process. It must have integer sample type and bit depth
|
||||
between 8 and 16, or float sample type and bit depth of 32. If
|
||||
there are any frames with other formats, an error will be
|
||||
returned.
|
||||
|
||||
*gamma*
|
||||
Controls the degree of non-linearity of the conversion. Values
|
||||
greater than 1.0 brighten the output, while values less than 1.0
|
||||
darken it.
|
||||
|
||||
*planes*
|
||||
Specifies which planes will be processed. Any unprocessed planes
|
||||
will be simply copied.
|
|
@ -1,23 +0,0 @@
|
|||
Limiter
|
||||
=======
|
||||
|
||||
.. function:: Limiter(vnode clip[, float[] min, float[] max, int[] planes=[0, 1, 2]])
|
||||
:module: std
|
||||
|
||||
Limits the pixel values to the range [*min*, *max*].
|
||||
|
||||
*clip*
|
||||
Clip to process. It must have integer sample type and bit depth
|
||||
between 8 and 16, or float sample type and bit depth of 32. If
|
||||
there are any frames with other formats, an error will be
|
||||
returned.
|
||||
|
||||
*min*
|
||||
Lower bound. Defaults to the lowest allowed value for the input. Can be specified for each plane individually.
|
||||
|
||||
*max*
|
||||
Upper bound. Defaults to the highest allowed value for the input. Can be specified for each plane individually.
|
||||
|
||||
*planes*
|
||||
Specifies which planes will be processed. Any unprocessed planes
|
||||
will be simply copied.
|
|
@ -1,11 +0,0 @@
|
|||
Loop
|
||||
====
|
||||
|
||||
.. function:: Loop(vnode clip[, int times=0])
|
||||
:module: std
|
||||
|
||||
Returns a clip with the frames or samples repeated over and over again. If *times* is
|
||||
less than 1 the clip will be repeated until the maximum clip length is
|
||||
reached, otherwise it will be repeated *times* times.
|
||||
|
||||
In Python, std.Loop can also be invoked :ref:`using the multiplication operator <pythonreference>`.
|
|
@ -1,39 +0,0 @@
|
|||
Lut
|
||||
===
|
||||
|
||||
.. function:: Lut(vnode clip[, int[] planes, int[] lut, float[] lutf, func function, int bits, bint floatout])
|
||||
:module: std
|
||||
|
||||
Applies a look-up table to the given clip. The lut can be specified as either an array
|
||||
of 2^bits_per_sample values or given as a *function* having an argument named
|
||||
*x* to be evaluated. Either *lut*, *lutf* or *function* must be used. The lut will be
|
||||
applied to the planes listed in *planes* and the other planes will simply be
|
||||
passed through unchanged. By default all *planes* are processed.
|
||||
|
||||
If *floatout* is set then the output will be floating point instead, and either
|
||||
*lutf* needs to be set or *function* always needs to return floating point
|
||||
values.
|
||||
|
||||
How to limit YUV range (by passing an array):
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
luty = []
|
||||
for x in range(2**clip.format.bits_per_sample):
|
||||
luty.append(max(min(x, 235), 16))
|
||||
lutuv = []
|
||||
for x in range(2**clip.format.bits_per_sample):
|
||||
lutuv.append(max(min(x, 240), 16))
|
||||
ret = Lut(clip=clip, planes=0, lut=luty)
|
||||
limited_clip = Lut(clip=ret, planes=[1, 2], lut=lutuv)
|
||||
|
||||
How to limit YUV range (using a function):
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def limity(x):
|
||||
return max(min(x, 235), 16)
|
||||
def limituv(x):
|
||||
return max(min(x, 240), 16)
|
||||
ret = Lut(clip=clip, planes=0, function=limity)
|
||||
limited_clip = Lut(clip=ret, planes=[1, 2], function=limituv)
|
|
@ -1,40 +0,0 @@
|
|||
Lut2
|
||||
====
|
||||
|
||||
.. function:: Lut2(vnode clipa, vnode clipb[, int[] planes, int[] lut, float[] lutf, func function, int bits, bint floatout])
|
||||
:module: std
|
||||
|
||||
Applies a look-up table that takes into account the pixel values of two clips. The
|
||||
*lut* needs to contain 2^(clip1.bits_per_sample + clip2.bits_per_sample)
|
||||
entries and will be applied to the planes listed in *planes*. Alternatively
|
||||
a *function* taking *x* and *y* as arguments can be used to make the lut.
|
||||
The other planes will be passed through unchanged. By default all *planes*
|
||||
are processed.
|
||||
|
||||
Lut2 also takes an optional bit depth parameter, *bits*, which defaults to
|
||||
the bit depth of the first input clip, and specifies the bit depth of the
|
||||
output clip. The user is responsible for understanding the effects of bit
|
||||
depth conversion, specifically from higher bit depths to lower bit depths,
|
||||
as no scaling or clamping is applied.
|
||||
|
||||
If *floatout* is set then the output will be floating point instead, and either
|
||||
*lutf* needs to be set or *function* always needs to return floating point
|
||||
values.
|
||||
|
||||
How to average 2 clips:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
lut = []
|
||||
for y in range(2 ** clipy.format.bits_per_sample):
|
||||
for x in range(2 ** clipx.format.bits_per_sample):
|
||||
lut.append((x + y)//2)
|
||||
Lut2(clipa=clipa, clipb=clipb, lut=lut)
|
||||
|
||||
How to average 2 clips with a 10-bit output:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def f(x, y):
|
||||
return (x*4 + y)//2
|
||||
Lut2(clipa=clipa8bit, clipb=clipb10bit, function=f, bits=10)
|
|
@ -1,15 +0,0 @@
|
|||
MakeDiff
|
||||
========
|
||||
|
||||
.. function:: MakeDiff(vnode clipa, vnode clipb[, int[] planes])
|
||||
:module: std
|
||||
|
||||
Calculates the difference between *clipa* and *clipb* and clamps the result.
|
||||
By default all *planes* are processed. This function is usually used together with *MergeDiff*, which can be used to add back the difference.
|
||||
|
||||
Unsharp masking of luma::
|
||||
|
||||
blur_clip = core.std.Convolution(clip, matrix=[1, 2, 1, 2, 4, 2, 1, 2, 1], planes=[0])
|
||||
diff_clip = core.std.MakeDiff(clip, blur_clip, planes=[0])
|
||||
sharpened_clip = core.std.MergeDiff(clip, diff_clip, planes=[0])
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
MakeFullDiff
|
||||
============
|
||||
|
||||
.. function:: MakeFullDiff(vnode clipa, vnode clipb)
|
||||
:module: std
|
||||
|
||||
Calculates the difference between *clipa* and *clipb* and outputs a clip with a one higher bitdepth to avoid the clamping or wraparound issues
|
||||
that would otherwise happen with filters like *MakeDiff* when forming a difference.
|
||||
This function is usually used together with *MergeFullDiff*, which can be used to add back the difference.
|
||||
|
||||
Unsharp mask::
|
||||
|
||||
blur_clip = core.std.Convolution(clip, matrix=[1, 2, 1, 2, 4, 2, 1, 2, 1])
|
||||
diff_clip = core.std.MakeFullDiff(clip, blur_clip)
|
||||
sharpened_clip = core.std.MergeFullDiff(clip, diff_clip)
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
MaskedMerge
|
||||
===========
|
||||
|
||||
.. function:: MaskedMerge(vnode clipa, vnode clipb, vnode mask[, int[] planes, bint first_plane=0, bint premultiplied=0])
|
||||
:module: std
|
||||
|
||||
MaskedMerge merges *clipa* with *clipb* using the per pixel weights in the *mask*,
|
||||
where 0 means that *clipa* is returned unchanged.
|
||||
The *mask* clip is assumed to be full range for all planes and in the
|
||||
0-1 interval for float formats regardless of the colorspace.
|
||||
If *mask* is a grayscale clip or if *first_plane* is true, the mask's first
|
||||
plane will be used as the mask for merging all planes. The mask will be
|
||||
bilinearly resized if necessary.
|
||||
|
||||
If *premultiplied* is set the blending is performed as if *clipb* has been pre-multiplied
|
||||
with alpha. In pre-multiplied mode it is an error to try to merge two frames with
|
||||
mismatched full and limited range since it will most likely cause horrible unintended
|
||||
color shifts. In the other mode it's just a very, very bad idea.
|
||||
|
||||
By default all planes will be
|
||||
processed, but it is also possible to specify a list of the *planes* to merge
|
||||
in the output. The unprocessed planes will be copied from the first clip.
|
||||
|
||||
*clipa* and *clipb* must have the same dimensions and format, and the *mask* must be the
|
||||
same format as the clips or the grayscale equivalent.
|
||||
|
||||
How to apply a mask to the first plane::
|
||||
|
||||
MaskedMerge(clipa=A, clipb=B, mask=Mask, planes=0)
|
||||
|
||||
How to apply the first plane of a mask to the second and third plane::
|
||||
|
||||
MaskedMerge(clipa=A, clipb=B, mask=Mask, planes=[1, 2], first_plane=True)
|
||||
|
||||
The frame properties are copied from *clipa*.
|
|
@ -1,19 +0,0 @@
|
|||
Median
|
||||
======
|
||||
|
||||
.. function:: Median(vnode clip[, int[] planes=[0, 1, 2]])
|
||||
:module: std
|
||||
|
||||
Replaces each pixel with the median of the nine pixels in its 3x3
|
||||
neighbourhood. In other words, the nine pixels are sorted from lowest
|
||||
to highest, and the middle value is picked.
|
||||
|
||||
*clip*
|
||||
Clip to process. It must have integer sample type and bit depth
|
||||
between 8 and 16, or float sample type and bit depth of 32. If
|
||||
there are any frames with other formats, an error will be
|
||||
returned.
|
||||
|
||||
*planes*
|
||||
Specifies which planes will be processed. Any unprocessed planes
|
||||
will be simply copied.
|
|
@ -1,29 +0,0 @@
|
|||
Merge
|
||||
=====
|
||||
|
||||
.. function:: Merge(vnode clipa, vnode clipb[, float[] weight = 0.5])
|
||||
:module: std
|
||||
|
||||
Merges *clipa* and *clipb* using the specified *weight* for each plane. The default
|
||||
is to use a 0.5 *weight* for all planes. A zero *weight* means that *clipa*
|
||||
is returned unchanged and 1 means that *clipb* is returned unchanged. If a
|
||||
single *weight* is specified, it will be used for all planes. If two weights
|
||||
are given then the second value will be used for the third plane as well.
|
||||
|
||||
Values outside the 0-1 range are considered to be an error. Specifying more
|
||||
weights than planes in the clips is also an error. The clips must have the
|
||||
same dimensions and format.
|
||||
|
||||
How to merge luma::
|
||||
|
||||
Merge(clipa=A, clipb=B, weight=[1, 0])
|
||||
|
||||
How to merge chroma::
|
||||
|
||||
Merge(clipa=A, clipb=B, weight=[0, 1])
|
||||
|
||||
The average of two clips::
|
||||
|
||||
Merge(clipa=A, clipb=B)
|
||||
|
||||
The frame properties are copied from *clipa*.
|
|
@ -1,15 +0,0 @@
|
|||
MergeDiff
|
||||
=========
|
||||
|
||||
.. function:: MergeDiff(vnode clipa, vnode clipb[, int[] planes])
|
||||
:module: std
|
||||
|
||||
Merges back the difference in *clipb* to *clipa* and clamps the result.
|
||||
By default all *planes* are processed. This function is usually used together with *MakeDiff*, which is normally used to calculate the difference.
|
||||
|
||||
Unsharp masking of luma::
|
||||
|
||||
blur_clip = core.std.Convolution(clip, matrix=[1, 2, 1, 2, 4, 2, 1, 2, 1], planes=[0])
|
||||
diff_clip = core.std.MakeDiff(clip, blur_clip, planes=[0])
|
||||
sharpened_clip = core.std.MergeDiff(clip, diff_clip, planes=[0])
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
MergeFullDiff
|
||||
=============
|
||||
|
||||
.. function:: MergeFullDiff(vnode clipa, vnode clipb)
|
||||
:module: std
|
||||
|
||||
Merges back the difference in *clipb* to *clipa*. Note that the bitdepth of *clipb* has to be one higher than that of *clip*.
|
||||
This function is usually used together with *MakeFullDiff*, which is normally used to calculate the difference.
|
||||
|
||||
Unsharp mask::
|
||||
|
||||
blur_clip = core.std.Convolution(clip, matrix=[1, 2, 1, 2, 4, 2, 1, 2, 1])
|
||||
diff_clip = core.std.MakeFullDiff(clip, blur_clip)
|
||||
sharpened_clip = core.std.MergeFullDiff(clip, diff_clip)
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
Minimum/Maximum
|
||||
===============
|
||||
|
||||
.. function:: Minimum(vnode clip[, int[] planes=[0, 1, 2], float threshold, bint[] coordinates=[1, 1, 1, 1, 1, 1, 1, 1]])
|
||||
:module: std
|
||||
|
||||
Replaces each pixel with the smallest value in its 3x3 neighbourhood.
|
||||
This operation is also known as erosion.
|
||||
|
||||
*clip*
|
||||
Clip to process. It must have integer sample type and bit depth
|
||||
between 8 and 16, or float sample type and bit depth of 32. If
|
||||
there are any frames with other formats, an error will be
|
||||
returned.
|
||||
|
||||
*planes*
|
||||
Specifies which planes will be processed. Any unprocessed planes
|
||||
will be simply copied.
|
||||
|
||||
*threshold*
|
||||
Allows to limit how much pixels are changed. Output pixels will not
|
||||
become less than ``input - threshold``. The default is no limit.
|
||||
|
||||
*coordinates*
|
||||
Specifies which pixels from the 3x3 neighbourhood are considered.
|
||||
If an element of this array is 0, the corresponding pixel is not
|
||||
considered when finding the minimum value. This must contain exactly
|
||||
8 numbers.
|
||||
|
||||
Here is how each number corresponds to a pixel in the 3x3
|
||||
neighbourhood::
|
||||
|
||||
1 2 3
|
||||
4 5
|
||||
6 7 8
|
||||
|
||||
|
||||
.. function:: Maximum(vnode clip[, int[] planes=[0, 1, 2], float threshold, bint[] coordinates=[1, 1, 1, 1, 1, 1, 1, 1]])
|
||||
:module: std
|
||||
|
||||
Replaces each pixel with the largest value in its 3x3 neighbourhood.
|
||||
This operation is also known as dilation.
|
||||
|
||||
*clip*
|
||||
Clip to process. It must have integer sample type and bit depth
|
||||
between 8 and 16, or float sample type and bit depth of 32. If
|
||||
there are any frames with other formats, an error will be
|
||||
returned.
|
||||
|
||||
*planes*
|
||||
Specifies which planes will be processed. Any unprocessed planes
|
||||
will be simply copied.
|
||||
|
||||
*threshold*
|
||||
Allows to limit how much pixels are changed. Output pixels will not
|
||||
become less than ``input - threshold``. The default is no limit.
|
||||
|
||||
*coordinates*
|
||||
Specifies which pixels from the 3x3 neighbourhood are considered.
|
||||
If an element of this array is 0, the corresponding pixel is not
|
||||
considered when finding the maximum value. This must contain exactly
|
||||
8 numbers.
|
||||
|
||||
Here is how each number corresponds to a pixel in the 3x3
|
||||
neighbourhood::
|
||||
|
||||
1 2 3
|
||||
4 5
|
||||
6 7 8
|
|
@ -1,49 +0,0 @@
|
|||
ModifyFrame
|
||||
===========
|
||||
|
||||
.. function:: ModifyFrame(vnode clip, clip[] clips, func selector)
|
||||
:module: std
|
||||
|
||||
The *selector* function is called for every single frame and can modify the
|
||||
properties of one of the frames gotten from *clips*. The additional *clips*'
|
||||
properties should only be read and not modified because only one modified
|
||||
frame can be returned.
|
||||
|
||||
You must first copy the input frame to make it modifiable. Any frame may be
|
||||
returned as long as it has the same format as the *clip*.
|
||||
Failure to do so will produce an error. If for conditional reasons you do not
|
||||
need to modify the current frame's properties, you can simply pass it through.
|
||||
The selector function is passed *n*, the current frame number, and *f*, which
|
||||
is a frame or a list of frames if there is more than one clip specified.
|
||||
|
||||
If you do not need to modify frame properties but only read them, you should
|
||||
probably be using *FrameEval* instead.
|
||||
|
||||
How to set the property FrameNumber to the current frame number::
|
||||
|
||||
def set_frame_number(n, f):
|
||||
fout = f.copy()
|
||||
fout.props['FrameNumber'] = n
|
||||
return fout
|
||||
...
|
||||
ModifyFrame(clip=clip, clips=clip, selector=set_frame_number)
|
||||
|
||||
How to remove a property::
|
||||
|
||||
def remove_property(n, f):
|
||||
fout = f.copy()
|
||||
del fout.props['FrameNumber']
|
||||
return fout
|
||||
...
|
||||
ModifyFrame(clip=clip, clips=clip, selector=remove_property)
|
||||
|
||||
An example of how to copy certain properties from one clip to another
|
||||
(clip1 and clip2 have the same format)::
|
||||
|
||||
def transfer_property(n, f):
|
||||
fout = f[1].copy()
|
||||
fout.props['FrameNumber'] = f[0].props['FrameNumber']
|
||||
fout.props['_Combed'] = f[0].props['_Combed']
|
||||
return fout
|
||||
...
|
||||
ModifyFrame(clip=clip1, clips=[clip1, clip2], selector=transfer_property)
|
|
@ -1,14 +0,0 @@
|
|||
PEMVerifier
|
||||
===========
|
||||
|
||||
.. function:: PEMVerifier(vnode clip[, float[] upper, float[] lower])
|
||||
:module: std
|
||||
|
||||
The *PEMVerifier* is used to check for out-of-bounds pixel values during filter
|
||||
development. It is a public function so badly coded filters won't go
|
||||
unnoticed.
|
||||
|
||||
If no values are set, then *upper* and *lower* default to the max and min values
|
||||
allowed in the current format. If an out of bounds value is
|
||||
encountered a frame error is set and the coordinates of the first bad pixel
|
||||
are included in the error message.
|
|
@ -1,15 +0,0 @@
|
|||
PlaneStats
|
||||
==========
|
||||
|
||||
.. function:: PlaneStats(vnode clipa[, vnode clipb, int plane=0, string prop='PlaneStats'])
|
||||
:module: std
|
||||
|
||||
This function calculates the min, max and average normalized value of all
|
||||
the pixels in the specified *plane* and stores the values in the frame properties
|
||||
named *prop*\ Min, *prop*\ Max and *prop*\ Average.
|
||||
|
||||
If *clipb* is supplied, the absolute normalized difference between the two clips
|
||||
will be stored in *prop*\ Diff as well.
|
||||
|
||||
The normalization means that the average and the diff will always be floats
|
||||
between 0 and 1, no matter what the input format is.
|
|
@ -1,14 +0,0 @@
|
|||
PreMultiply
|
||||
===========
|
||||
|
||||
.. function:: PreMultiply(vnode clip, vnode alpha)
|
||||
:module: std
|
||||
|
||||
PreMultiply simply multiplies *clip* and *alpha* in order to make it more suitable for
|
||||
later operations. This will yield much better results when resizing and a clip with an
|
||||
alpha channel and :doc:`MaskedMerge <maskedmerge>` can use it as input. The *alpha* clip
|
||||
must be the grayscale format equivalent of *clip*.
|
||||
|
||||
Note that limited range pre-multiplied contents excludes the offset. For example with
|
||||
8 bit input 60 luma and 128 alpha would be calculated as ((60 - 16) * 128)/255 + 16
|
||||
and not (60 * 128)/255.
|
|
@ -1,26 +0,0 @@
|
|||
Prewitt/Sobel
|
||||
===================
|
||||
|
||||
.. function:: Prewitt(vnode clip[, int[] planes=[0, 1, 2], float scale=1])
|
||||
:module: std
|
||||
|
||||
Creates an edge mask using the Prewitt operator.
|
||||
|
||||
.. function:: Sobel(vnode clip[, int[] planes=[0, 1, 2], float scale=1])
|
||||
:module: std
|
||||
|
||||
Creates an edge mask using the Sobel operator.
|
||||
|
||||
*clip*
|
||||
Clip to process. It must have integer sample type and bit depth
|
||||
between 8 and 16, or float sample type and bit depth of 32. If
|
||||
there are any frames with other formats, an error will be
|
||||
returned.
|
||||
|
||||
*planes*
|
||||
Specifies which planes will be processed. Any unprocessed planes
|
||||
will be simply copied.
|
||||
|
||||
*scale*
|
||||
Multiply all pixels by scale before outputting. This can be used to
|
||||
increase or decrease the intensity of edges in the output.
|
|
@ -1,12 +0,0 @@
|
|||
PropToClip
|
||||
==========
|
||||
|
||||
.. function:: PropToClip(vnode clip[, string prop='_Alpha'])
|
||||
:module: std
|
||||
|
||||
Extracts a clip from the frames attached to the frame property *prop* in
|
||||
*clip*.
|
||||
This function is mainly used to extract a mask/alpha clip that was stored in
|
||||
another one.
|
||||
|
||||
It is the inverse of ClipToProp().
|
|
@ -1,9 +0,0 @@
|
|||
RemoveFrameProps
|
||||
================
|
||||
|
||||
.. function:: RemoveFrameProps(vnode clip[, string props[]])
|
||||
:module: std
|
||||
|
||||
Returns *clip* but with all the frame properties named in
|
||||
*props* removed. If *props* is unset them all frame properties
|
||||
are removed.
|
|
@ -1,286 +0,0 @@
|
|||
Resize
|
||||
======
|
||||
|
||||
.. function:: Bilinear(vnode clip[, int width, int height, int format, enum matrix, enum transfer, enum primaries, enum range, enum chromaloc, enum matrix_in, enum transfer_in, enum primaries_in, enum range_in, enum chromaloc_in, float filter_param_a, float filter_param_b, string resample_filter_uv, float filter_param_a_uv, float filter_param_b_uv, string dither_type="none", string cpu_type, float src_left, float src_top, float src_width, float src_height, float nominal_luminance])
|
||||
Bicubic(vnode clip[, ...])
|
||||
Point(vnode clip[, ...])
|
||||
Lanczos(vnode clip[, ...])
|
||||
Spline16(vnode clip[, ...])
|
||||
Spline36(vnode clip[, ...])
|
||||
Spline64(vnode clip[, ...])
|
||||
Bob(vnode clip, string filter="bicubic", bint tff[, ...])
|
||||
:module: resize
|
||||
|
||||
In VapourSynth the resizers have several functions. In addition to scaling,
|
||||
they also do colorspace conversions and conversions to and from the compat
|
||||
formats. Resize converts a clip of known or unknown format to another clip
|
||||
of known or unknown format, changing only the parameters specified by the
|
||||
user. The resize filters can handle varying size and format input clips
|
||||
and turn them into constant format clips.
|
||||
|
||||
If you do not know which resizer to choose, then try Bicubic. It usually
|
||||
makes a good neutral default.
|
||||
|
||||
*Bob* can be used as a rudimentary deinterlacer.
|
||||
|
||||
Arguments denoted as type *enum* may be specified by numerical index (see
|
||||
ITU-T H.265 Annex E.3) or by name. Enums specified by name have their
|
||||
argument name suffixed with "_s". For example, a destination matrix of
|
||||
BT 709 can be specified either with ``matrix=1`` or with ``matrix_s="709"``.
|
||||
|
||||
Note that *matrix* is not an optional argument when converting to YUV.
|
||||
Also note that if no matrix is specified in an input YUV frame's properties
|
||||
then *matrix_in* also needs to be set.
|
||||
|
||||
The function will return an error if the subsampling restrictions aren't
|
||||
followed.
|
||||
|
||||
If you get an error like::
|
||||
|
||||
Resize error 3074: no path between colorspaces (2/2/2 => 1/1/1).
|
||||
May need to specify additional colorspace parameters.
|
||||
|
||||
It usually means the matrix/transfer/primaries are unknown and you have to
|
||||
specify the input colorspace parameters yourself. Note: 2 means "unspecified"
|
||||
according to the ITU-T recommendation.
|
||||
|
||||
Resizing is performed per-field for interlaced images, as indicated by the
|
||||
*_FieldBased* frame property. Source filters may sometimes mark progressive
|
||||
video as interlaced, which can result in sub-optimal resampling quality
|
||||
unless *_FieldBased* is cleared.
|
||||
|
||||
*clip*:
|
||||
|
||||
Accepts all kinds of input.
|
||||
|
||||
*width*, *height*:
|
||||
|
||||
Output image dimensions.
|
||||
|
||||
*filter*:
|
||||
|
||||
Scaling method for deinterlacing. See *resample_filter_uv* for accepted values.
|
||||
|
||||
*tff*:
|
||||
|
||||
Field order for deinterlacing. Used when the *_FieldBased* property is not set.
|
||||
|
||||
*format*:
|
||||
|
||||
Output format id.
|
||||
|
||||
*matrix*, *transfer*, *primaries*:
|
||||
|
||||
Output colorspace specification. If not provided, the corresponding attributes from
|
||||
the input clip will be selected, except for YCoCg and RGB color families, where the
|
||||
corresponding matrix is set by default.
|
||||
|
||||
*range*:
|
||||
|
||||
Output pixel range. For integer formats, this allows selection of the legal code
|
||||
values. Even when set, out of range values (BTB/WTW) may be generated. If the input
|
||||
format is of a different color family, the default range is studio/limited for YUV
|
||||
and full-range for RGB.
|
||||
|
||||
*chromaloc*:
|
||||
|
||||
Output chroma location. For subsampled formats, specifies the chroma location. If
|
||||
the input format is 4:4:4 or RGB and the output is subsampled, the default location
|
||||
is left-aligned, as per MPEG. Possible chroma locations (ITU-T H.265 Figure E.1):
|
||||
*left*, *center*, *top_left*, *top*, *bottom_left*, *bottom*
|
||||
|
||||
*matrix_in*, *transfer_in*, *primaries_in*, *range_in*, *chromaloc_in*:
|
||||
|
||||
Input colorspace/format specification. If the corresponding frame property is set
|
||||
to a value other than unspecified, the frame property is used instead of this parameter.
|
||||
Default values are set for certain color families. See the equivalent output arguments
|
||||
for more information.
|
||||
|
||||
*filter_param_a*, *filter_param_b*:
|
||||
|
||||
Parameters for the scaler used for RGB and Y-channel. For the bicubic filter,
|
||||
filter_param_a/b represent the "b" and "c" parameters. For the lanczos filter,
|
||||
filter_param_a represents the number of taps.
|
||||
|
||||
*resample_filter_uv*:
|
||||
|
||||
Scaling method for UV channels. It defaults to the same as for the Y-channel. The
|
||||
following values can be used with *resample_filter_uv*: *point*, *bilinear*, *bicubic*,
|
||||
*spline16*, *spline36*, *lanczos*.
|
||||
|
||||
*filter_param_a_uv*, *filter_param_b_uv*:
|
||||
|
||||
Parameters for the scaler used for UV channels.
|
||||
|
||||
*dither_type*:
|
||||
|
||||
Dithering method. Dithering is used only for conversions resulting in an integer
|
||||
format. The following dithering methods are available: *none*, *ordered*, *random*,
|
||||
*error_diffusion*.
|
||||
|
||||
*cpu_type*:
|
||||
|
||||
Only used for testing.
|
||||
|
||||
*src_left*, *src_top*, *src_width*, *src_height*:
|
||||
|
||||
Used to select the source region of the input to use. Can also be used to shift the image.
|
||||
Defaults to the whole image.
|
||||
|
||||
*nominal_luminance*:
|
||||
|
||||
Determines the physical brightness of the value 1.0. The unit is in cd/m^2.
|
||||
|
||||
To convert to YV12::
|
||||
|
||||
Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709")
|
||||
|
||||
To resize and convert YUV with color information frame properties to planar RGB::
|
||||
|
||||
Bicubic(clip=clip, width=1920, height=1080, format=vs.RGB24)
|
||||
|
||||
To resize and convert YUV without color information frame properties to planar RGB::
|
||||
|
||||
Bicubic(clip=clip, width=1920, height=1080, format=vs.RGB24, matrix_in_s="709")
|
||||
|
||||
The following tables list values of selected colorspace enumerations and
|
||||
their abbreviated names. (Numerical value in parentheses.) For all possible values,
|
||||
see ITU-T H.265.
|
||||
|
||||
Matrix coefficients (ITU-T H.265 Table E.5)::
|
||||
|
||||
rgb (0) Identity
|
||||
The identity matrix.
|
||||
Typically used for GBR (often referred to as RGB);
|
||||
however, may also be used for YZX (often referred to as
|
||||
XYZ);
|
||||
709 (1) KR = 0.2126; KB = 0.0722
|
||||
ITU-R Rec. BT.709-5
|
||||
unspec (2) Unspecified
|
||||
Image characteristics are unknown or are determined by the
|
||||
application.
|
||||
fcc (4)
|
||||
470bg (5) KR = 0.299; KB = 0.114
|
||||
ITU-R Rec. BT.470-6 System B, G (historical)
|
||||
(functionally the same as the value 6 (170m))
|
||||
170m (6) KR = 0.299; KB = 0.114
|
||||
SMPTE 170M (2004)
|
||||
(functionally the same as the value 5 (470bg))
|
||||
240m (7) SMPTE 240M
|
||||
ycgco (8) YCgCo
|
||||
2020ncl (9) KR = 0.2627; KB = 0.0593
|
||||
Rec. ITU-R BT.2020 non-constant luminance system
|
||||
2020cl (10) KR = 0.2627; KB = 0.0593
|
||||
Rec. ITU-R BT.2020 constant luminance system
|
||||
chromancl (12) Chromaticity derived non-constant luminance system
|
||||
chromacl (13) Chromaticity derived constant luminance system
|
||||
ictcp (14) ICtCp
|
||||
|
||||
Transfer characteristics (ITU-T H.265 Table E.4)::
|
||||
|
||||
709 (1) V = a * Lc0.45 - ( a - 1 ) for 1 >= Lc >= b
|
||||
V = 4.500 * Lc for b > Lc >= 0
|
||||
Rec. ITU-R BT.709-5
|
||||
(functionally the same as the values 6 (601),
|
||||
14 (2020_10) and 15 (2020_12))
|
||||
unspec (2) Unspecified
|
||||
Image characteristics are unknown or are determined by the
|
||||
application.
|
||||
470m (4) ITU-R Rec. BT.470-6 System M
|
||||
470bg (5) ITU-R Rec. BT.470-6 System B, G (historical)
|
||||
601 (6) V = a * Lc0.45 - ( a - 1 ) for 1 >= Lc >= b
|
||||
V = 4.500 * Lc for b > Lc >= 0
|
||||
Rec. ITU-R BT.601-6 525 or 625
|
||||
(functionally the same as the values 1 (709),
|
||||
14 (2020_10) and 15 (2020_12))
|
||||
240m (7) SMPTE 240M
|
||||
linear (8) V = Lc for all values of Lc
|
||||
Linear transfer characteristics
|
||||
log100 (9) Log 1:100 contrast
|
||||
log316 (10) Log 1:316 contrast
|
||||
xvycc (11) IEC 61966-2-4
|
||||
srgb (13) IEC 61966-2-1
|
||||
2020_10 (14) V = a * Lc0.45 - ( a - 1 ) for 1 >= Lc >= b
|
||||
V = 4.500 * Lc for b > Lc >= 0
|
||||
Rec. ITU-R BT.2020
|
||||
(functionally the same as the values 1 (709),
|
||||
6 (601) and 15 (2020_12))
|
||||
2020_12 (15) V = a * Lc0.45 - ( a - 1 ) for 1 >= Lc >= b
|
||||
V = 4.500 * Lc for b > Lc >= 0
|
||||
Rec. ITU-R BT.2020
|
||||
(functionally the same as the values 1 (709),
|
||||
6 (601) and 14 (2020_10))
|
||||
st2084 (16) SMPTE ST 2084
|
||||
std-b67 (18) ARIB std-b67
|
||||
|
||||
Color primaries (ITU-T H.265 Table E.3)::
|
||||
|
||||
709 (1) primary x y
|
||||
green 0.300 0.600
|
||||
blue 0.150 0.060
|
||||
red 0.640 0.330
|
||||
white D65 0.3127 0.3290
|
||||
Rec. ITU-R BT.709-5
|
||||
unspec (2) Unspecified
|
||||
Image characteristics are unknown or are determined by the
|
||||
application.
|
||||
470m (4) ITU-R Rec. BT.470-6 System M
|
||||
470bg (5) ITU-R Rec. BT.470-6 System B, G (historical)
|
||||
170m (6) primary x y
|
||||
green 0.310 0.595
|
||||
blue 0.155 0.070
|
||||
red 0.630 0.340
|
||||
white D65 0.3127 0.3290
|
||||
SMPTE 170M (2004)
|
||||
(functionally the same as the value 7 (240m))
|
||||
240m (7) primary x y
|
||||
green 0.310 0.595
|
||||
blue 0.155 0.070
|
||||
red 0.630 0.340
|
||||
white D65 0.3127 0.3290
|
||||
SMPTE 240M (1999)
|
||||
(functionally the same as the value 6 (170m))
|
||||
film (8)
|
||||
2020 (9) primary x y
|
||||
green 0.170 0.797
|
||||
blue 0.131 0.046
|
||||
red 0.708 0.292
|
||||
white D65 0.3127 0.3290
|
||||
Rec. ITU-R BT.2020
|
||||
st428 (10) Commonly known as xyz
|
||||
xyz (10) Alias for st428
|
||||
st431-2 (11) DCI-P3 with traditional white point
|
||||
st432-1 (12) DCI-P3
|
||||
jedec-p22 (22) E.B.U. STANDARD FOR CHROMATICITY TOLERANCES FOR STUDIO MONITORS (3213-E)
|
||||
Also known as JEDEC P22
|
||||
|
||||
Pixel range (ITU-T H.265 Eq E-4 to E-15)::
|
||||
|
||||
limited (0) Studio (TV) legal range, 16-235 in 8 bits.
|
||||
Y = Clip1Y( Round( ( 1 << ( BitDepthY - 8 ) ) *
|
||||
( 219 * E'Y + 16 ) ) )
|
||||
Cb = Clip1C( Round( ( 1 << ( BitDepthC - 8 ) ) *
|
||||
( 224 * E'PB + 128 ) ) )
|
||||
Cr = Clip1C( Round( ( 1 << ( BitDepthC - 8 ) ) *
|
||||
( 224 * E'PR + 128 ) ) )
|
||||
|
||||
R = Clip1Y( ( 1 << ( BitDepthY - 8 ) ) *
|
||||
( 219 * E'R + 16 ) )
|
||||
G = Clip1Y( ( 1 << ( BitDepthY - 8 ) ) *
|
||||
( 219 * E'G + 16 ) )
|
||||
B = Clip1Y( ( 1 << ( BitDepthY - 8 ) ) *
|
||||
( 219 * E'B + 16 ) )
|
||||
full (1) Full (PC) dynamic range, 0-255 in 8 bits.
|
||||
Y = Clip1Y( Round( ( ( 1 << BitDepthY ) - 1 ) * E'Y ) )
|
||||
Cb = Clip1C( Round( ( ( 1 << BitDepthC ) - 1 ) * E'PB +
|
||||
( 1 << ( BitDepthC - 1 ) ) ) )
|
||||
Cr = Clip1C( Round( ( ( 1 << BitDepthC ) - 1 ) * E'PR +
|
||||
( 1 << ( BitDepthC - 1 ) ) ) )
|
||||
|
||||
R = Clip1Y( ( ( 1 << BitDepthY ) - 1 ) * E'R )
|
||||
G = Clip1Y( ( ( 1 << BitDepthY ) - 1 ) * E'G )
|
||||
B = Clip1Y( ( ( 1 << BitDepthY ) - 1 ) * E'B )
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
Reverse
|
||||
=======
|
||||
|
||||
.. function:: Reverse(vnode clip)
|
||||
:module: std
|
||||
|
||||
Returns a clip with the frame or sample order reversed. For example, a clip with 3
|
||||
frames would have the frame order 2, 1, 0.
|
||||
|
||||
In Python, std.Reverse can also be invoked by :ref:`slicing a clip <pythonreference>`.
|
|
@ -1,31 +0,0 @@
|
|||
SelectEvery
|
||||
===========
|
||||
|
||||
.. function:: SelectEvery(vnode clip, int cycle, int[] offsets[, bint modify_duration=True])
|
||||
:module: std
|
||||
|
||||
Returns a clip with only some of the frames in every *cycle* selected. The
|
||||
*offsets* given must be between 0 and *cycle* - 1.
|
||||
|
||||
Below are some examples of useful operations.
|
||||
|
||||
Return even numbered frames, starting with 0::
|
||||
|
||||
SelectEvery(clip=clip, cycle=2, offsets=0)
|
||||
|
||||
Return odd numbered frames, starting with 1::
|
||||
|
||||
SelectEvery(clip=clip, cycle=2, offsets=1)
|
||||
|
||||
Fixed pattern 1 in 5 decimation, first frame in every cycle removed::
|
||||
|
||||
SelectEvery(clip=clip, cycle=5, offsets=[1, 2, 3, 4])
|
||||
|
||||
Duplicate every fourth frame::
|
||||
|
||||
SelectEvery(clip=clip, cycle=4, offsets=[0, 1, 2, 3, 3])
|
||||
|
||||
In Python, std.SelectEvery can also be invoked by :ref:`slicing a clip <pythonreference>`.
|
||||
|
||||
If *modify_duration* is set the clip's frame rate is multiplied by the number
|
||||
of offsets and divided by *cycle*. The frame durations are adjusted in the same manner.
|
|
@ -1,20 +0,0 @@
|
|||
SeparateFields
|
||||
==============
|
||||
|
||||
.. function:: SeparateFields(vnode clip[, bint tff, bint modify_duration=True])
|
||||
:module: std
|
||||
|
||||
Returns a clip with the fields separated and interleaved.
|
||||
|
||||
The *tff* argument only has an effect when the field order isn't set for a frame.
|
||||
Setting *tff* to true means top field first and false means bottom field
|
||||
first.
|
||||
|
||||
If *modify_duration* is set then the output clip's frame rate is double that of the input clip.
|
||||
The frame durations will also be halved.
|
||||
|
||||
The ``_FieldBased`` frame property is deleted. The ``_Field`` frame
|
||||
property is added.
|
||||
|
||||
If no field order is specified in ``_FieldBased`` or *tff* an error
|
||||
will be returned.
|
|
@ -1,25 +0,0 @@
|
|||
SetFieldBased
|
||||
=============
|
||||
|
||||
.. function:: SetFieldBased(vnode clip, int value)
|
||||
:module: std
|
||||
|
||||
This is a convenience function. See *SetFrameProps* if you want to
|
||||
set other properties.
|
||||
|
||||
SetFieldBased sets ``_FieldBased`` to *value* and deletes
|
||||
the ``_Field`` frame property. The possible values are:
|
||||
|
||||
0 = Frame Based
|
||||
|
||||
1 = Bottom Field First
|
||||
|
||||
2 = Top Field First
|
||||
|
||||
For example, if you have source material that's progressive but has
|
||||
been encoded as interlaced you can set it to be treated as frame based
|
||||
(not interlaced) to improve resizing quality::
|
||||
|
||||
clip = core.bs.VideoSource("rule6.mkv")
|
||||
clip = core.std.SetFieldBased(clip, 0)
|
||||
clip = clip.resize.Bilinear(clip, width=320, height=240)
|
|
@ -1,20 +0,0 @@
|
|||
SetFrameProp
|
||||
============
|
||||
|
||||
.. function:: SetFrameProp(vnode clip, string prop[, int[] intval, float[] floatval, string[] data])
|
||||
:module: std
|
||||
|
||||
Adds a frame property to every frame in *clip*.
|
||||
|
||||
If there is already a property with the name *prop* in the frames,
|
||||
it will be overwritten.
|
||||
|
||||
The type of the property added depends on which of the *intval*,
|
||||
*floatval*, or *data* parameters is used.
|
||||
|
||||
The *data* parameter can only be used to add NULL-terminated strings,
|
||||
not arbitrary binary data.
|
||||
|
||||
For example, to set the field order to top field first::
|
||||
|
||||
clip = c.std.SetFrameProp(clip, prop="_FieldBased", intval=2)
|
|
@ -1,13 +0,0 @@
|
|||
SetFrameProps
|
||||
=============
|
||||
|
||||
.. function:: SetFrameProps(vnode clip, ...)
|
||||
:module: std
|
||||
|
||||
Adds the specified values as a frame property of every frame
|
||||
in *clip*. If a frame property with the same key already exists
|
||||
it will be replaced.
|
||||
|
||||
For example, to set the field order to top field first::
|
||||
|
||||
clip = c.std.SetFrameProps(clip, _FieldBased=2)
|
|
@ -1,27 +0,0 @@
|
|||
SetVideoCache
|
||||
=============
|
||||
|
||||
.. function:: SetVideoCache(vnode clip[, int mode, int fixedsize, int maxsize, int historysize])
|
||||
:module: std
|
||||
|
||||
Every filter node has a cache associated with it that
|
||||
may or may not be enabled depending on the dependencies
|
||||
and request patterns. This function allows all automatic
|
||||
behavior to be overridden.
|
||||
|
||||
The *mode* option has 3 possible options where 0 always
|
||||
disables caching, 1 always enables the cache and -1
|
||||
uses the automatically calculated settings. Note that
|
||||
setting *mode* to -1 will reset the other values to
|
||||
their defaults as well.
|
||||
|
||||
The other options are fairly self-explanatory where
|
||||
setting *fixedsize* prevents the cache from over time
|
||||
altering its *maxsize* based on request history. The
|
||||
final *historysize* argument controls how many previous
|
||||
and no longer cached requests should be considered when
|
||||
adjusting *maxsize*, generally this value should not
|
||||
be touched at all.
|
||||
|
||||
Note that setting *mode* will reset all other options
|
||||
to their defaults.
|
|
@ -1,48 +0,0 @@
|
|||
ShufflePlanes
|
||||
=============
|
||||
|
||||
.. function:: ShufflePlanes(vnode[] clips, int[] planes, int colorfamily)
|
||||
:module: std
|
||||
|
||||
ShufflePlanes can extract and combine planes from different clips in the most
|
||||
general way possible.
|
||||
This is both good and bad, as there are almost no error checks.
|
||||
|
||||
Most of the returned clip's properties are implicitly determined from the
|
||||
first clip given to *clips*.
|
||||
|
||||
The *clips* parameter takes between one and three clips for color families
|
||||
with three planes. In this case clips=[A] is equivalent to clips=[A, A, A]
|
||||
and clips=[A, B] is equivalent to clips=[A, B, B]. For the GRAY color
|
||||
family, which has one plane, it takes exactly one clip.
|
||||
|
||||
The argument *planes* controls which of the input clips' planes to use.
|
||||
Zero indexed. The first number refers to the first input clip, the second
|
||||
number to the second clip, the third number to the third clip.
|
||||
|
||||
The only thing that needs to be specified is *colorfamily*, which controls which
|
||||
color family (YUV, RGB, GRAY) the output clip will be.
|
||||
Properties such as subsampling are determined from the relative size of the
|
||||
given planes to combine.
|
||||
|
||||
ShufflePlanes accepts clips with variable format and dimensions only when
|
||||
extracting a single plane.
|
||||
|
||||
Below are some examples of useful operations.
|
||||
|
||||
Extract plane with index X. X=0 will mean luma in a YUV clip and R in an RGB
|
||||
clip. Likewise 1 will return the U and G channels, respectively::
|
||||
|
||||
ShufflePlanes(clips=clip, planes=X, colorfamily=vs.GRAY)
|
||||
|
||||
Swap U and V in a YUV clip::
|
||||
|
||||
ShufflePlanes(clips=clip, planes=[0, 2, 1], colorfamily=vs.YUV)
|
||||
|
||||
Merge 3 grayscale clips into a YUV clip::
|
||||
|
||||
ShufflePlanes(clips=[Yclip, Uclip, Vclip], planes=[0, 0, 0], colorfamily=vs.YUV)
|
||||
|
||||
Cast a YUV clip to RGB::
|
||||
|
||||
ShufflePlanes(clips=[YUVclip], planes=[0, 1, 2], colorfamily=vs.RGB)
|
|
@ -1,12 +0,0 @@
|
|||
Splice
|
||||
======
|
||||
|
||||
.. function:: Splice(vnode[] clips[, bint mismatch=0])
|
||||
:module: std
|
||||
|
||||
Returns a clip with all *clips* appended in the given order.
|
||||
|
||||
Splicing clips with different formats or dimensions is
|
||||
considered an error unless *mismatch* is true.
|
||||
|
||||
In Python, std.Splice can also be invoked :ref:`using the addition operator <pythonreference>`.
|
|
@ -1,8 +0,0 @@
|
|||
SplitPlanes
|
||||
===========
|
||||
|
||||
.. function:: SplitPlanes(vnode clip)
|
||||
:module: std
|
||||
|
||||
SplitPlanes returns each plane of the input as
|
||||
separate clips.
|
|
@ -1,12 +0,0 @@
|
|||
StackVertical/StackHorizontal
|
||||
=============================
|
||||
|
||||
.. function:: StackVertical(vnode[] clips)
|
||||
StackHorizontal(vnode[] clips)
|
||||
:module: std
|
||||
|
||||
Stacks all given *clips* together. The same format is a requirement. For
|
||||
StackVertical all clips also need to be the same width and for
|
||||
StackHorizontal all clips need to be the same height.
|
||||
|
||||
The frame properties are copied from the first clip.
|
|
@ -1,9 +0,0 @@
|
|||
ClipInfo
|
||||
========
|
||||
|
||||
.. function:: ClipInfo(vnode clip[, int alignment=7, int scale=1]])
|
||||
:module: text
|
||||
|
||||
Prints information about the *clip*, such as the format and framerate.
|
||||
|
||||
This is a convenience function for *Text*.
|
|
@ -1,10 +0,0 @@
|
|||
CoreInfo
|
||||
========
|
||||
|
||||
.. function:: CoreInfo([vnode clip=std.BlankClip(), int alignment=7, int scale=1])
|
||||
:module: text
|
||||
|
||||
Prints information about the VapourSynth core, such as version and memory
|
||||
use. If no *clip* is supplied, a default blank one is used.
|
||||
|
||||
This is a convenience function for *Text*.
|
|
@ -1,9 +0,0 @@
|
|||
FrameNum
|
||||
========
|
||||
|
||||
.. function:: FrameNum(vnode clip[, int alignment=7, int scale=1])
|
||||
:module: text
|
||||
|
||||
Prints the current frame number.
|
||||
|
||||
This is a convenience function for *Text*.
|
|
@ -1,10 +0,0 @@
|
|||
FrameProps
|
||||
==========
|
||||
|
||||
.. function:: FrameProps(vnode clip[, string props=[], int alignment=7, int scale=1])
|
||||
:module: text
|
||||
|
||||
Prints all properties attached to the frames, or if the *props* array is
|
||||
given only those properties.
|
||||
|
||||
This is a convenience function for *Text*.
|
|
@ -1,23 +0,0 @@
|
|||
Text
|
||||
====
|
||||
|
||||
.. function:: Text(vnode clip, string text[, int alignment=7, int scale=1])
|
||||
:module: text
|
||||
|
||||
Text is a simple text printing filter. It doesn't use any external libraries
|
||||
for drawing the text. It uses a built-in bitmap font: the not-bold, 8×16
|
||||
version of Terminus. The font was not modified, only converted from PCF to an
|
||||
array of bytes.
|
||||
|
||||
The font covers Windows-1252, which is a superset of ISO-8859-1 (aka latin1).
|
||||
Unprintable characters get turned into underscores. Long lines get wrapped in
|
||||
a dumb way. Lines that end up too low to fit in the frame are silently
|
||||
dropped.
|
||||
|
||||
The *alignment* parameter takes a number from 1 to 9, corresponding to the
|
||||
positions of the keys on a numpad.
|
||||
|
||||
The *scale* parameter sets an integer scaling factor for the bitmap font.
|
||||
|
||||
*ClipInfo*, *CoreInfo*, *FrameNum*, and *FrameProps* are convenience functions
|
||||
based on *Text*.
|
|
@ -1,18 +0,0 @@
|
|||
Transpose
|
||||
=========
|
||||
|
||||
.. function:: Transpose(vnode clip)
|
||||
:module: std
|
||||
|
||||
Flips the contents of the frames in the same way as a matrix transpose would
|
||||
do. Combine it with FlipVertical or FlipHorizontal to synthesize a left or
|
||||
right rotation. Calling Transpose twice in a row is the same as doing nothing
|
||||
(but slower).
|
||||
|
||||
Here is a picture to illustrate what Transpose does::
|
||||
|
||||
0 5 55
|
||||
0 1 1 2 3 1 8 89
|
||||
5 8 13 21 34 => 1 13 144
|
||||
55 89 144 233 377 2 21 233
|
||||
3 34 377
|
|
@ -1,17 +0,0 @@
|
|||
Trim
|
||||
====
|
||||
|
||||
.. function:: Trim(vnode clip[, int first=0, int last, int length])
|
||||
:module: std
|
||||
|
||||
Trim returns a clip with only the frames between the arguments *first* and
|
||||
*last*, or a clip of *length* frames, starting at *first*.
|
||||
Trim is inclusive so Trim(clip, first=3, last=3) will return one frame. If
|
||||
neither *last* nor *length* is specified, no frames are removed from the end
|
||||
of the clip.
|
||||
|
||||
Specifying both *last* and *length* is considered to be an error.
|
||||
Likewise is calling Trim in a way that returns no frames, as 0 frame clips are
|
||||
not allowed in VapourSynth.
|
||||
|
||||
In Python, std.Trim can also be invoked by :ref:`slicing a clip <pythonreference>`.
|
|
@ -1,7 +0,0 @@
|
|||
Turn180
|
||||
=======
|
||||
|
||||
.. function:: Turn180(vnode clip)
|
||||
:module: std
|
||||
|
||||
Turns the frames in a clip 180 degrees (to the left, not to the right).
|
|
@ -1,78 +0,0 @@
|
|||
Getting Started
|
||||
===============
|
||||
|
||||
So you managed to install VapourSynth. Now what?
|
||||
|
||||
If you don't know the basics of Python, you may want to check out a
|
||||
`tutorial <https://learnxinyminutes.com/docs/python3/>`_.
|
||||
|
||||
You can "play around" in the python interpreter if you want, but that's not how
|
||||
most scripts are created.
|
||||
|
||||
Example Script
|
||||
##############
|
||||
|
||||
It all starts with a *.vpy* script.
|
||||
Here's a sample script to be inspired by, it assumes that `BestSource <https://github.com/vapoursynth/bestsource>`_
|
||||
is installed and :doc:`auto-loaded <installation>`.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from vapoursynth import core # Get an instance of the core
|
||||
clip = core.bs.VideoSource(source='filename.mkv') # Load a video track in mkv file
|
||||
clip = core.std.FlipHorizontal(clip) # Flip the video clip in the horizontal direction
|
||||
clip.set_output() # Set the video clip to be accessible for output
|
||||
|
||||
Audio is also supported, use `BestSource <https://github.com/vapoursynth/bestsource>`_ to load your audio file.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from vapoursynth import core # Get an instance of the core
|
||||
clip = core.bs.AudioSource(source='filename.mkv') # Load an audio track in mkv file
|
||||
clip = core.std.AudioGain(clip,gain=2.0) # Gain all channels 2x
|
||||
clip.set_output() # Set the audio clip to be accessible for output
|
||||
|
||||
You can combine 2 operations in one script.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from vapoursynth import core
|
||||
video = core.bs.VideoSource(source='filename.mkv')
|
||||
audio = core.bs.AudioSource(source='filename.mkv')
|
||||
video = core.std.FlipHorizontal(video)
|
||||
audio = core.std.AudioGain(audio,gain=2.0)
|
||||
video.set_output(index=0)
|
||||
audio.set_output(index=1)
|
||||
|
||||
Remember that most VapourSynth objects have a quite nice string representation
|
||||
in Python, so if you want to know more about an instance just call ``print()``.
|
||||
|
||||
Preview
|
||||
#######
|
||||
|
||||
It's possible to directly open the script in `VapourSynth Editor <https://github.com/YomikoR/VapourSynth-Editor>`_
|
||||
or `VirtualDub FilterMod <https://sourceforge.net/projects/vdfiltermod/>`_ for previewing.
|
||||
|
||||
Output with VSPipe
|
||||
##################
|
||||
|
||||
VSPipe is very useful to pipe the output to various applications, for example x264 and flac for encoding.
|
||||
|
||||
Here are some examples of command lines that automatically pass on most video and audio attributes.
|
||||
|
||||
For x264::
|
||||
|
||||
vspipe -c y4m script.vpy - | x264 --demuxer y4m - --output encoded.264
|
||||
|
||||
For flac::
|
||||
|
||||
vspipe -c wav script.vpy - | flac - -o encoded.flac
|
||||
|
||||
For FFmpeg::
|
||||
|
||||
vspipe -c y4m script.vpy - | ffmpeg -i - encoded.mkv
|
||||
|
||||
For mpv::
|
||||
|
||||
vspipe -c y4m script.vpy - | mpv -
|
||||
vspipe -c wav script.vpy - | mpv -
|
|
@ -1,23 +0,0 @@
|
|||
Welcome to `VapourSynth <http://www.vapoursynth.com/>`_’s documentation!
|
||||
========================================================================
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
|
||||
introduction
|
||||
installation
|
||||
gettingstarted
|
||||
pythonreference
|
||||
functions
|
||||
output
|
||||
applications
|
||||
apireference
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`search`
|
|
@ -1,341 +0,0 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
Basic Program
|
||||
#############
|
||||
|
||||
The installation contains two main steps:
|
||||
|
||||
1. Install VapourSynth core library.
|
||||
2. Install the Python wrapper of VapourSynth.
|
||||
|
||||
After you completed the second step, you can test it by opening a Python command line
|
||||
and type this::
|
||||
|
||||
from vapoursynth import core
|
||||
print(core.version())
|
||||
|
||||
After pressing return at the final line, you should see the version printed along with a
|
||||
few other lines describing the options used when instantiating the Core object.
|
||||
In fact, these lines should be the same as the output result of ``vspipe --version``.
|
||||
|
||||
Windows Installation
|
||||
********************
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
First download and install the prerequisites:
|
||||
* `Python 3.11.x <http://www.python.org/>`_ or Python 3.8.x -- 32 or 64 bit version depending on which version of VapourSynth you want to install
|
||||
|
||||
Note that VapourSynth and Python have to be matched so both are either installed
|
||||
for all users or for only for the current user.
|
||||
|
||||
Also note that per user installs will not install the required Visual Studio
|
||||
2019 runtimes.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Simply run the `VapourSynth installer <https://github.com/vapoursynth/vapoursynth/releases>`_.
|
||||
It should automatically detect and install everything, including the Python wrapper.
|
||||
|
||||
If the tests mentioned at the beginning fails, there may be a bug in the installer or there are
|
||||
old copies of vapoursynth.pyd and vapoursynth.dll lying around.
|
||||
|
||||
Windows Installation (Portable)
|
||||
*******************************
|
||||
|
||||
First download and decompress the prerequisites:
|
||||
* `Python 3.11.x <http://www.python.org/>`_ or Python 3.8.x -- 32 or 64 bit embeddable version
|
||||
|
||||
Simply decompress the `portable VapourSynth archive <https://github.com/vapoursynth/vapoursynth/releases>`_
|
||||
into the Python dir and overwrite all existing files.Run ``vs-detect-python.bat``
|
||||
to configure it for the current Python version. Done.
|
||||
|
||||
You can also use the VapourSynth Editor by decompressing it into the same directory.
|
||||
|
||||
OS X Installation
|
||||
*****************
|
||||
|
||||
First download and install the prerequisites:
|
||||
* Xcode -- Available from the AppStore
|
||||
* `Homebrew <http://brew.sh/>`_ -- A package manager
|
||||
|
||||
Simply run these commands in a terminal and wait for them to complete::
|
||||
|
||||
brew install vapoursynth
|
||||
|
||||
Linux installation
|
||||
******************
|
||||
|
||||
Several distributions have VapourSynth packages. Note that those packages are usually OUT OF DATE.
|
||||
|
||||
Debian
|
||||
------
|
||||
The VapourSynth packages are provided by `deb-multimedia repository <https://www.deb-multimedia.org/>`_.
|
||||
You need to add the repository first following the guide on the official website.
|
||||
|
||||
Fedora, CentOS and RHEL
|
||||
-----------------------
|
||||
For Fedora, the VapourSynth packages can be downloaded from official repository directly.
|
||||
For CentOS and RHEL, you should install EPEL (Extra Packages for Enterprise Linux) repository first.
|
||||
|
||||
Gentoo
|
||||
------
|
||||
There is an `unofficial Portage tree <https://github.com/4re/vapoursynth-portage>`_ with all VapourSynth related ebuilds.
|
||||
Check the Github link for more information and instructions.
|
||||
|
||||
Arch Linux
|
||||
----------
|
||||
`VapourSynth-related packages <https://www.archlinux.org/packages/?q=vapoursynth>`_ are provided by the Community repository.
|
||||
|
||||
Nix and NixOS
|
||||
-------------
|
||||
``vapoursynth`` is available on nixpkgs, either via ``nixpkgs#vapoursynth`` or via ``nixpkgs#python3Packages.vapoursynth`` (currently on unstable only).
|
||||
Be aware that the derivation is broken on MacOS.
|
||||
|
||||
VapourSynth releases are not backported to the current stable branch.
|
||||
To get the newest version use the unstable branch.
|
||||
|
||||
Windows Compilation
|
||||
*******************
|
||||
|
||||
Preparing the Build Environment on Windows
|
||||
------------------------------------------
|
||||
|
||||
Default install paths are assumed in all projects and scripts, be prepared to adjust many things if you changed them
|
||||
|
||||
Required languages and applications:
|
||||
|
||||
* Needs `Visual Studio 2019 <https://visualstudio.microsoft.com/de/vs/>`_
|
||||
* It also needs both `32bit <https://www.python.org/>`_ and `64bit <https://www.python.org/>`_ Python 3.8.x and 3.11.x (the msvc project assumes that you installed python for all users.)
|
||||
* `InnoSetup <http://www.jrsoftware.org/isdl.php>`_ is needed to create the installer (default installation path assumed)
|
||||
* `7-zip <https://www.7-zip.org/>`_ is needed to compress the portable version (default installation path assumed)
|
||||
|
||||
Preparing the C++ Project
|
||||
-------------------------
|
||||
|
||||
* Clone VapourSynth
|
||||
* Clone VSRepo into the VapourSynth dir (``git clone https://github.com/vapoursynth/vsrepo``)
|
||||
* Clone zimg into the VapourSynth dir (``git clone https://github.com/sekrit-twc/zimg.git --recurse-submodules``)
|
||||
* Clone avs+ into the VapourSynth dir (``git clone https://github.com/AviSynth/AviSynthPlus.git``)
|
||||
* Clone libp2p into the VapourSynth dir (``git clone https://github.com/sekrit-twc/libp2p.git``)
|
||||
* Compile 32 and 64 bit releases using the VapourSynth solution
|
||||
|
||||
Preparing the Python Project
|
||||
----------------------------
|
||||
|
||||
* Run ``py -3.11 -m pip install -r python-requirements.txt`` for 64bit.
|
||||
* Run ``py -3.8 -m pip install -r python-requirements.txt`` for 64bit.
|
||||
* Run ``cython_build.bat`` to compile the Python modules
|
||||
* Run ``docs_build.bat`` to compile the documentation
|
||||
|
||||
Distribution
|
||||
------------
|
||||
|
||||
All the above steps are necessary to create the installer
|
||||
|
||||
You also need 7z.exe and 7z.dll from `7-zip <https://www.7-zip.org/>`_
|
||||
Both need to be placed in the "installer" dir.
|
||||
|
||||
You'll also have to grab the file ``pfm-192-vapoursynth-win.exe``
|
||||
which is only available from installations/portable releases.
|
||||
|
||||
Run ``make_portable.bat`` and ``make_installers.bat`` to package things.
|
||||
|
||||
.. note:: Note that the Avisynth side of AVFS won't work properly in debug builds (memory allocation and exceptions across module boundaries trolololol)
|
||||
|
||||
Linux and OS X Compilation
|
||||
**************************
|
||||
|
||||
These are the requirements:
|
||||
* Autoconf, Automake, and Libtool, probably recent versions
|
||||
|
||||
* pkg-config
|
||||
|
||||
* GCC 4.8 or newer, or Clang
|
||||
|
||||
* `zimg <https://github.com/sekrit-twc/zimg>`_
|
||||
|
||||
* Python 3
|
||||
|
||||
* Cython 0.28 or later installed in your Python 3 environment
|
||||
|
||||
* Sphinx for the documentation (optional)
|
||||
|
||||
Note: **any version of Python 3 will do.** A specific version is only
|
||||
required when using the official Windows binaries.
|
||||
|
||||
Required packages (OS X)
|
||||
------------------------
|
||||
|
||||
First download and install the prerequisites:
|
||||
* Xcode -- Available from the AppStore
|
||||
* `Homebrew <http://brew.sh/>`_ -- A package manager
|
||||
|
||||
Installation of the required packages is very easy. Simply run these
|
||||
commands in a terminal and wait for them to complete::
|
||||
|
||||
brew install python3 ffmpeg libass zimg imagemagick
|
||||
pip3 install cython
|
||||
|
||||
If you've already installed all the required packages and instead want
|
||||
to update them, simply run::
|
||||
|
||||
brew update && brew upgrade
|
||||
pip3 install --upgrade cython
|
||||
|
||||
Compilation
|
||||
-----------
|
||||
|
||||
If you haven't checked out the source code before, use git to do so::
|
||||
|
||||
git clone https://github.com/vapoursynth/vapoursynth.git
|
||||
|
||||
Or if you already have a copy of the source, update it with::
|
||||
|
||||
git pull
|
||||
|
||||
Enter the VapourSynth directory and run these commands to compile and install::
|
||||
|
||||
./autogen.sh
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
Depending on your operating system's configuration, VapourSynth may not
|
||||
work out of the box with the default prefix of /usr/local. Two errors
|
||||
may pop up when running ``vspipe --version``:
|
||||
|
||||
* "vspipe: error while loading shared libraries: libvapoursynth-script.so.0:
|
||||
cannot open shared object file: No such file or directory"
|
||||
|
||||
This is caused by the non-standard location of libvapoursynth-script.so.0.
|
||||
Your dynamic loader is not configured to look in /usr/local/lib. One
|
||||
way to work around this error is to use the LD_LIBRARY_PATH environment
|
||||
variable::
|
||||
|
||||
$ LD_LIBRARY_PATH=/usr/local/lib vspipe --version
|
||||
|
||||
* "Failed to initialize VapourSynth environment"
|
||||
|
||||
This is caused by the non-standard location of the Python module,
|
||||
vapoursynth.so. Your Python is not configured to look in
|
||||
/usr/local/lib/python3.x/site-packages. One way to work around this
|
||||
error is to use the PYTHONPATH environment variable::
|
||||
|
||||
$ PYTHONPATH=/usr/local/lib/python3.x/site-packages vspipe --version
|
||||
|
||||
Replace "x" with the correct number.
|
||||
|
||||
|
||||
The documentation can be built using its own Makefile::
|
||||
|
||||
$ make -C doc/ html
|
||||
|
||||
The documentation can be installed using the standard program ``cp``.
|
||||
|
||||
Plugins and Scripts
|
||||
###################
|
||||
|
||||
If you're looking for plugins and scripts then one of the most complete lists
|
||||
available can be found at `vsdb.top <http://vsdb.top/>`_.
|
||||
|
||||
Installing with VSRepo
|
||||
**********************
|
||||
|
||||
On windows you can use the included vsrepo.py to install and upgrade plugins and scripts.
|
||||
|
||||
Simply run ``vsrepo.py install <namespace or identifier>`` to install them.
|
||||
|
||||
If you need a list of known plugins and scripts you can run ``vsrepo.py available`` or visit `vsdb.top <http://vsdb.top/>`_.
|
||||
|
||||
For more reference, visit `vsrepo's repository <https://github.com/vapoursynth/vsrepo>`_
|
||||
|
||||
Installing Manually
|
||||
*******************
|
||||
|
||||
You can put your plugin (``.dll``) and script (``.py``) to where you think it is convenient.
|
||||
|
||||
For plugins, you can use ``std.LoadPlugin`` function to load it. there is also a plugin autoloading mechanism to save your time, see blow.
|
||||
|
||||
For scripts, you should add a relative path to ``python<your_python_version>._pth``, then you can import it in your script.
|
||||
|
||||
Plugin Autoloading
|
||||
******************
|
||||
|
||||
VapourSynth automatically loads all the native plugins located in certain
|
||||
folders. Autoloading works just like manual loading, with the exception
|
||||
that any errors encountered while loading a plugin are silently ignored.
|
||||
|
||||
.. note::
|
||||
|
||||
Avoid autoloading from folders that other applications might also
|
||||
use, such as /usr/lib or /usr/local/lib in a Linux system. Several
|
||||
users reported crashes when VapourSynth attempted to load some
|
||||
random libraries (\*cough\*wxgtk\*cough\*).
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
Windows has in total 3 different autoloading directories: user plugins, core plugins and global plugins. They are searched in that order.
|
||||
User plugins are always loaded first so that the current user can always decide which exact version of a plugin is used. Core plugins follow.
|
||||
Global plugins are placed last to prevent them from overriding any of the included plugins by accident.
|
||||
|
||||
The searched paths are:
|
||||
|
||||
#. *<AppData>*\\VapourSynth\\plugins32 or *<AppData>*\\VapourSynth\\plugins64
|
||||
#. *<VapourSynth path>*\\core\\plugins
|
||||
#. *<VapourSynth path>*\\plugins
|
||||
|
||||
Note that the per user path is not created by default.
|
||||
On modern Windows versions the *AppData* directory is located in *<user>*\\AppData\\Roaming by default.
|
||||
|
||||
Shortcuts to the global autoload directory are located in the start menu.
|
||||
|
||||
Avisynth plugins are never autoloaded. Support for this may be added in the future.
|
||||
|
||||
User plugins should never be put into the *core\\plugins* directory.
|
||||
|
||||
Windows Portable
|
||||
----------------
|
||||
|
||||
The searched paths are:
|
||||
|
||||
#. *<VapourSynth.dll path>*\\vapoursynth32\\coreplugins or *<VapourSynth.dll path>*\\vapoursynth64\\coreplugins
|
||||
#. *<VapourSynth.dll path>*\\vapoursynth32\\plugins or *<VapourSynth.dll path>*\\vapoursynth64\\plugins
|
||||
|
||||
User plugins should never be put into the *coreplugins* directory.
|
||||
|
||||
Linux
|
||||
-----
|
||||
|
||||
Autoloading can be configured using the file
|
||||
$XDG_CONFIG_HOME/vapoursynth/vapoursynth.conf,
|
||||
or $HOME/.config/vapoursynth/vapoursynth.conf if XDG_CONFIG_HOME is not
|
||||
defined.
|
||||
|
||||
To provide your own path to the config file, you can use $VAPOURSYNTH_CONF_PATH.
|
||||
|
||||
Two configuration options may be used: **UserPluginDir**, empty by default,
|
||||
and **SystemPluginDir**, whose default value is set at compile time to
|
||||
``$libdir/vapoursynth``, or to the location passed to the ``--with-plugindir``
|
||||
argument to ``configure``.
|
||||
|
||||
UserPluginDir is tried first, then SystemPluginDir.
|
||||
|
||||
Example vapoursynth.conf::
|
||||
|
||||
UserPluginDir=/home/asdf/vapoursynth/plugins
|
||||
SystemPluginDir=/special/non/default/location
|
||||
|
||||
|
||||
OS X
|
||||
----
|
||||
|
||||
Autoloading can be configured using the file
|
||||
$HOME/Library/Application Support/VapourSynth/vapoursynth.conf. Everything else is
|
||||
the same as in Linux.
|
||||
|
||||
Like on linux, you can use $VAPOURSYNTH_CONF_PATH to provide your own configuration.
|
|
@ -1,36 +0,0 @@
|
|||
Introduction
|
||||
============
|
||||
|
||||
VapourSynth is an application for video manipulation. Or a plugin. Or a library.
|
||||
It's hard to tell because it has a core library written in C++ and a Python
|
||||
module to allow video scripts to be created. It came to be when I started
|
||||
thinking about alternative designs for Avisynth and most of it was written
|
||||
over a 3 month period.
|
||||
|
||||
The software has been heavily inspired by `Avisynth <http://www.avisynth.org>`_
|
||||
and aims to be a 21st century rewrite, taking advantage of the advancements
|
||||
computers have made since the late 90s.
|
||||
The main features compared to Avisynth are:
|
||||
|
||||
* Multithreaded - Frame level multithreading that scales well
|
||||
* Generalized Colorspaces - New colorspaces can be specified at runtime
|
||||
* Per Frame Properties - Additional metadata can be attached to frames
|
||||
* Python Based - The scripting part is implemented as a Python module so you
|
||||
don't have to learn a special language
|
||||
* Support for video with format changes - Some video just can't stick to one
|
||||
format or frame size. VapourSynth can handle any kind of change
|
||||
* Compatible with a large number of already existing Avisynth plugins
|
||||
|
||||
About the author
|
||||
################
|
||||
|
||||
Fredrik Mellbin majored in electrical engineering with a focus on image analysis
|
||||
and processing with medical applications. He has previously worked with digital
|
||||
electronics and likes to plan his own software projects in his spare time.
|
||||
When he one day found himself out of work he needed something to do between
|
||||
sending out job applications and waiting for a reply. The natural choice for
|
||||
the author was to try to improve Avisynth, the software that once made him
|
||||
interested in video editing. VapourSynth is the result of all that time waiting.
|
||||
|
||||
Feel free to contact me at fredrik.mellbin that round thingy with an a gmail.com
|
||||
if you need help to port a filter or want to sponsor the development.
|
|
@ -1,125 +0,0 @@
|
|||
Output
|
||||
======
|
||||
|
||||
VSPipe
|
||||
######
|
||||
|
||||
Synopsis
|
||||
********
|
||||
|
||||
**vspipe** <script> <outfile> [options]
|
||||
|
||||
vspipe's main purpose is to evaluate VapourSynth scripts and output the
|
||||
frames to a file.
|
||||
|
||||
If *outfile* is a hyphen (``-``), vspipe will write to the standard output.
|
||||
|
||||
If *outfile* is a dot (``.``), vspipe will do everything as usual, except it
|
||||
will not write the video frames anywhere.
|
||||
|
||||
|
||||
Options
|
||||
*******
|
||||
|
||||
``-a, --arg key=value``
|
||||
Argument to pass to the script environment, it a key with this name and value (str typed) will be set in the globals dict
|
||||
|
||||
``-s, --start N``
|
||||
Set output frame range (first frame)
|
||||
|
||||
``-e, --end N``
|
||||
Set output frame range (last frame)
|
||||
|
||||
``-o, --outputindex N``
|
||||
Select output index
|
||||
|
||||
``-r, --requests N``
|
||||
Set number of concurrent frame requests
|
||||
|
||||
``-c, --container <y4m/wav/w64>``
|
||||
Add headers for the specified format to the output
|
||||
|
||||
``-t, --timecodes FILE``
|
||||
Write timecodes v2 file
|
||||
|
||||
``-p, --progress``
|
||||
Print progress to stderr
|
||||
|
||||
``--filter-time``
|
||||
Records the time spent in each filter and prints it out at the end of processing.
|
||||
|
||||
``-i, --info``
|
||||
Show video info and exit
|
||||
|
||||
``-g, --graph <simple/full>``
|
||||
Print output node filter graph in dot format to outfile and exit
|
||||
|
||||
``-v, --version``
|
||||
Show version info and exit
|
||||
|
||||
|
||||
Examples
|
||||
********
|
||||
|
||||
Show script info:
|
||||
``vspipe --info script.vpy -``
|
||||
|
||||
Write to stdout:
|
||||
``vspipe [options] script.vpy -``
|
||||
|
||||
Request all frames but don't output them:
|
||||
``vspipe [options] script.vpy .``
|
||||
|
||||
Write frames 5-100 to file:
|
||||
``vspipe --start 5 --end 100 script.vpy output.raw``
|
||||
|
||||
Pipe to x264 and write timecodes file:
|
||||
``vspipe script.vpy - --y4m --timecodes timecodes.txt | x264 --demuxer y4m -o script.mkv -``
|
||||
|
||||
Pass values to a script:
|
||||
``vspipe --arg deinterlace=yes --arg "message=fluffy kittens" script.vpy output.raw``
|
||||
|
||||
AVFS
|
||||
####
|
||||
|
||||
AV FileSystem is based on `AVFS <https://turtlewar.org/avfs/>`_ and shares most of its
|
||||
source code and functionality. This package has several uses. It can easily make
|
||||
a script file openable by any application, as it appears like a real,
|
||||
uncompressed avi file. It can also be used to bridge the 32/64 bit gap, since a
|
||||
plain file can always be read.
|
||||
|
||||
To use it simply run ``avfs`` in the ``core32`` or ``core64`` directories with the script name as argument.
|
||||
This will create a virtual file in ``C:\\Volumes``.
|
||||
|
||||
The *alt_output* argument of *set_output* is respected and can be used to get additional compatibility
|
||||
with professional applications.
|
||||
|
||||
Avisynth Support
|
||||
****************
|
||||
|
||||
Note that this AVFS version is also compatible with Avisynth 2.6 and Avisynth+. When using Avisynth+
|
||||
higher bitdepth output is also supported. The easiest way to obtain a recent version is to extract
|
||||
``avfs.exe`` from the portable VapourSynth archives.
|
||||
|
||||
VFW
|
||||
###
|
||||
|
||||
On windows, you can output video to VFW based programs.
|
||||
|
||||
If you install VapourSynth by installer, the VSVFW.dll is registered already
|
||||
|
||||
Else, you could register it manually, use register file below or use `theChaosCoder's batch <https://github.com/theChaosCoder/vapoursynth-portable-FATPACK/blob/master/VapourSynth64Portable/extras/enable_vfw_support.bat>`_.
|
||||
|
||||
::
|
||||
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{58F74CA0-BD0E-4664-A49B-8D10E6F0C131}]
|
||||
@="VapourSynth"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{58F74CA0-BD0E-4664-A49B-8D10E6F0C131}\InProcServer32]
|
||||
@="<your VSVFW.dll directory>\\VSVFW.dll"
|
||||
"ThreadingModel"="Apartment"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AVIFile\Extensions\VPY]
|
||||
@="{58F74CA0-BD0E-4664-A49B-8D10E6F0C131}"
|
File diff suppressed because it is too large
Load diff
|
@ -1,123 +0,0 @@
|
|||
/* Compatability shim for jQuery and underscores.js.
|
||||
*
|
||||
* Copyright Sphinx contributors
|
||||
* Released under the two clause BSD licence
|
||||
*/
|
||||
|
||||
/**
|
||||
* small helper function to urldecode strings
|
||||
*
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
||||
*/
|
||||
jQuery.urldecode = function(x) {
|
||||
if (!x) {
|
||||
return x
|
||||
}
|
||||
return decodeURIComponent(x.replace(/\+/g, ' '));
|
||||
};
|
||||
|
||||
/**
|
||||
* small helper function to urlencode strings
|
||||
*/
|
||||
jQuery.urlencode = encodeURIComponent;
|
||||
|
||||
/**
|
||||
* This function returns the parsed url parameters of the
|
||||
* current request. Multiple values per key are supported,
|
||||
* it will always return arrays of strings for the value parts.
|
||||
*/
|
||||
jQuery.getQueryParameters = function(s) {
|
||||
if (typeof s === 'undefined')
|
||||
s = document.location.search;
|
||||
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
||||
var result = {};
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
var tmp = parts[i].split('=', 2);
|
||||
var key = jQuery.urldecode(tmp[0]);
|
||||
var value = jQuery.urldecode(tmp[1]);
|
||||
if (key in result)
|
||||
result[key].push(value);
|
||||
else
|
||||
result[key] = [value];
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* highlight a given string on a jquery object by wrapping it in
|
||||
* span elements with the given class name.
|
||||
*/
|
||||
jQuery.fn.highlightText = function(text, className) {
|
||||
function highlight(node, addItems) {
|
||||
if (node.nodeType === 3) {
|
||||
var val = node.nodeValue;
|
||||
var pos = val.toLowerCase().indexOf(text);
|
||||
if (pos >= 0 &&
|
||||
!jQuery(node.parentNode).hasClass(className) &&
|
||||
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
||||
var span;
|
||||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
||||
if (isInSVG) {
|
||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||
} else {
|
||||
span = document.createElement("span");
|
||||
span.className = className;
|
||||
}
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
||||
document.createTextNode(val.substr(pos + text.length)),
|
||||
node.nextSibling));
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
if (isInSVG) {
|
||||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||
var bbox = node.parentElement.getBBox();
|
||||
rect.x.baseVal.value = bbox.x;
|
||||
rect.y.baseVal.value = bbox.y;
|
||||
rect.width.baseVal.value = bbox.width;
|
||||
rect.height.baseVal.value = bbox.height;
|
||||
rect.setAttribute('class', className);
|
||||
addItems.push({
|
||||
"parent": node.parentNode,
|
||||
"target": rect});
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!jQuery(node).is("button, select, textarea")) {
|
||||
jQuery.each(node.childNodes, function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
}
|
||||
}
|
||||
var addItems = [];
|
||||
var result = this.each(function() {
|
||||
highlight(this, addItems);
|
||||
});
|
||||
for (var i = 0; i < addItems.length; ++i) {
|
||||
jQuery(addItems[i].parent).before(addItems[i].target);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/*
|
||||
* backward compatibility for jQuery.browser
|
||||
* This will be supported until firefox bug is fixed.
|
||||
*/
|
||||
if (!jQuery.browser) {
|
||||
jQuery.uaMatch = function(ua) {
|
||||
ua = ua.toLowerCase();
|
||||
|
||||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(msie) ([\w.]+)/.exec(ua) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||
[];
|
||||
|
||||
return {
|
||||
browser: match[ 1 ] || "",
|
||||
version: match[ 2 ] || "0"
|
||||
};
|
||||
};
|
||||
jQuery.browser = {};
|
||||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
||||
}
|
903
Programs/doc/_static/basic.css
vendored
903
Programs/doc/_static/basic.css
vendored
|
@ -1,903 +0,0 @@
|
|||
/*
|
||||
* basic.css
|
||||
* ~~~~~~~~~
|
||||
*
|
||||
* Sphinx stylesheet -- basic theme.
|
||||
*
|
||||
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
/* -- main layout ----------------------------------------------------------- */
|
||||
|
||||
div.clearer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
div.section::after {
|
||||
display: block;
|
||||
content: '';
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- relbar ---------------------------------------------------------------- */
|
||||
|
||||
div.related {
|
||||
width: 100%;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
div.related h3 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.related ul {
|
||||
margin: 0;
|
||||
padding: 0 0 0 10px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.related li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.related li.right {
|
||||
float: right;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* -- sidebar --------------------------------------------------------------- */
|
||||
|
||||
div.sphinxsidebarwrapper {
|
||||
padding: 10px 5px 0 10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar {
|
||||
float: left;
|
||||
width: 230px;
|
||||
margin-left: -100%;
|
||||
font-size: 90%;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap : break-word;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul ul,
|
||||
div.sphinxsidebar ul.want-points {
|
||||
margin-left: 20px;
|
||||
list-style: square;
|
||||
}
|
||||
|
||||
div.sphinxsidebar ul ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sphinxsidebar form {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
div.sphinxsidebar input {
|
||||
border: 1px solid #98dbcc;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox form.search {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox input[type="text"] {
|
||||
float: left;
|
||||
width: 80%;
|
||||
padding: 0.25em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
div.sphinxsidebar #searchbox input[type="submit"] {
|
||||
float: left;
|
||||
width: 20%;
|
||||
border-left: none;
|
||||
padding: 0.25em;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* -- search page ----------------------------------------------------------- */
|
||||
|
||||
ul.search {
|
||||
margin: 10px 0 0 20px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul.search li {
|
||||
padding: 5px 0 5px 20px;
|
||||
background-image: url(file.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 7px;
|
||||
}
|
||||
|
||||
ul.search li a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.search li p.context {
|
||||
color: #888;
|
||||
margin: 2px 0 0 30px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
ul.keywordmatches li.goodmatch a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* -- index page ------------------------------------------------------------ */
|
||||
|
||||
table.contentstable {
|
||||
width: 90%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.contentstable p.biglink {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
a.biglink {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
span.linkdescr {
|
||||
font-style: italic;
|
||||
padding-top: 5px;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
/* -- general index --------------------------------------------------------- */
|
||||
|
||||
table.indextable {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.indextable td {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.indextable ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
table.indextable > tbody > tr > td > ul {
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
table.indextable tr.pcap {
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
table.indextable tr.cap {
|
||||
margin-top: 10px;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
img.toggler {
|
||||
margin-right: 3px;
|
||||
margin-top: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.modindex-jumpbox {
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 1em 0 1em 0;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
div.genindex-jumpbox {
|
||||
border-top: 1px solid #ddd;
|
||||
border-bottom: 1px solid #ddd;
|
||||
margin: 1em 0 1em 0;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
/* -- domain module index --------------------------------------------------- */
|
||||
|
||||
table.modindextable td {
|
||||
padding: 2px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
/* -- general body styles --------------------------------------------------- */
|
||||
|
||||
div.body {
|
||||
min-width: 360px;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
div.body p, div.body dd, div.body li, div.body blockquote {
|
||||
-moz-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
a.headerlink {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
h2:hover > a.headerlink,
|
||||
h3:hover > a.headerlink,
|
||||
h4:hover > a.headerlink,
|
||||
h5:hover > a.headerlink,
|
||||
h6:hover > a.headerlink,
|
||||
dt:hover > a.headerlink,
|
||||
caption:hover > a.headerlink,
|
||||
p.caption:hover > a.headerlink,
|
||||
div.code-block-caption:hover > a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
div.body p.caption {
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
div.body td {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.first {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
p.rubric {
|
||||
margin-top: 30px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
img.align-left, figure.align-left, .figure.align-left, object.align-left {
|
||||
clear: left;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
img.align-right, figure.align-right, .figure.align-right, object.align-right {
|
||||
clear: right;
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
img.align-center, figure.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.align-default, figure.align-default, .figure.align-default {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-default {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* -- sidebars -------------------------------------------------------------- */
|
||||
|
||||
div.sidebar,
|
||||
aside.sidebar {
|
||||
margin: 0 0 0.5em 1em;
|
||||
border: 1px solid #ddb;
|
||||
padding: 7px;
|
||||
background-color: #ffe;
|
||||
width: 40%;
|
||||
float: right;
|
||||
clear: right;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
p.sidebar-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
div.admonition, div.topic, blockquote {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* -- topics ---------------------------------------------------------------- */
|
||||
|
||||
nav.contents,
|
||||
aside.topic,
|
||||
div.topic {
|
||||
border: 1px solid #ccc;
|
||||
padding: 7px;
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
|
||||
p.topic-title {
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* -- admonitions ----------------------------------------------------------- */
|
||||
|
||||
div.admonition {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
div.admonition dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.admonition-title {
|
||||
margin: 0px 10px 5px 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.body p.centered {
|
||||
text-align: center;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
/* -- content of sidebars/topics/admonitions -------------------------------- */
|
||||
|
||||
div.sidebar > :last-child,
|
||||
aside.sidebar > :last-child,
|
||||
nav.contents > :last-child,
|
||||
aside.topic > :last-child,
|
||||
div.topic > :last-child,
|
||||
div.admonition > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sidebar::after,
|
||||
aside.sidebar::after,
|
||||
nav.contents::after,
|
||||
aside.topic::after,
|
||||
div.topic::after,
|
||||
div.admonition::after,
|
||||
blockquote::after {
|
||||
display: block;
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* -- tables ---------------------------------------------------------------- */
|
||||
|
||||
table.docutils {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
border: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-default {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table caption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
table caption span.caption-text {
|
||||
}
|
||||
|
||||
table.docutils td, table.docutils th {
|
||||
padding: 1px 8px 1px 5px;
|
||||
border-top: 0;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
table.citation td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
th > :first-child,
|
||||
td > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
th > :last-child,
|
||||
td > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* -- figures --------------------------------------------------------------- */
|
||||
|
||||
div.figure, figure {
|
||||
margin: 0.5em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.figure p.caption, figcaption {
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-number,
|
||||
figcaption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-text,
|
||||
figcaption span.caption-text {
|
||||
}
|
||||
|
||||
/* -- field list styles ----------------------------------------------------- */
|
||||
|
||||
table.field-list td, table.field-list th {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.field-list ul {
|
||||
margin: 0;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.field-list p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.field-name {
|
||||
-moz-hyphens: manual;
|
||||
-ms-hyphens: manual;
|
||||
-webkit-hyphens: manual;
|
||||
hyphens: manual;
|
||||
}
|
||||
|
||||
/* -- hlist styles ---------------------------------------------------------- */
|
||||
|
||||
table.hlist {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
table.hlist td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* -- object description styles --------------------------------------------- */
|
||||
|
||||
.sig {
|
||||
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
|
||||
}
|
||||
|
||||
.sig-name, code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sig-name {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
code.descname {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.sig-prename, code.descclassname {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.optional {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.sig-paren {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.sig-param.n {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* C++ specific styling */
|
||||
|
||||
.sig-inline.c-texpr,
|
||||
.sig-inline.cpp-texpr {
|
||||
font-family: unset;
|
||||
}
|
||||
|
||||
.sig.c .k, .sig.c .kt,
|
||||
.sig.cpp .k, .sig.cpp .kt {
|
||||
color: #0033B3;
|
||||
}
|
||||
|
||||
.sig.c .m,
|
||||
.sig.cpp .m {
|
||||
color: #1750EB;
|
||||
}
|
||||
|
||||
.sig.c .s, .sig.c .sc,
|
||||
.sig.cpp .s, .sig.cpp .sc {
|
||||
color: #067D17;
|
||||
}
|
||||
|
||||
|
||||
/* -- other body styles ----------------------------------------------------- */
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha;
|
||||
}
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha;
|
||||
}
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman;
|
||||
}
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman;
|
||||
}
|
||||
|
||||
:not(li) > ol > li:first-child > :first-child,
|
||||
:not(li) > ul > li:first-child > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
:not(li) > ol > li:last-child > :last-child,
|
||||
:not(li) > ul > li:last-child > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
ol.simple ol p,
|
||||
ol.simple ul p,
|
||||
ul.simple ol p,
|
||||
ul.simple ul p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
ol.simple > li:not(:first-child) > p,
|
||||
ul.simple > li:not(:first-child) > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
ol.simple p,
|
||||
ul.simple p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
aside.footnote > span,
|
||||
div.citation > span {
|
||||
float: left;
|
||||
}
|
||||
aside.footnote > span:last-of-type,
|
||||
div.citation > span:last-of-type {
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
aside.footnote > p {
|
||||
margin-left: 2em;
|
||||
}
|
||||
div.citation > p {
|
||||
margin-left: 4em;
|
||||
}
|
||||
aside.footnote > p:last-of-type,
|
||||
div.citation > p:last-of-type {
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
aside.footnote > p:last-of-type:after,
|
||||
div.citation > p:last-of-type:after {
|
||||
content: "";
|
||||
clear: both;
|
||||
}
|
||||
|
||||
dl.field-list {
|
||||
display: grid;
|
||||
grid-template-columns: fit-content(30%) auto;
|
||||
}
|
||||
|
||||
dl.field-list > dt {
|
||||
font-weight: bold;
|
||||
word-break: break-word;
|
||||
padding-left: 0.5em;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
dl.field-list > dd {
|
||||
padding-left: 0.5em;
|
||||
margin-top: 0em;
|
||||
margin-left: 0em;
|
||||
margin-bottom: 0em;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
dd > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
dd ul, dd table {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-top: 3px;
|
||||
margin-bottom: 10px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
dl > dd:last-child,
|
||||
dl > dd:last-child > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt:target, span.highlighted {
|
||||
background-color: #fbe54e;
|
||||
}
|
||||
|
||||
rect.highlighted {
|
||||
fill: #fbe54e;
|
||||
}
|
||||
|
||||
dl.glossary dt {
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.versionmodified {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.system-message {
|
||||
background-color: #fda;
|
||||
padding: 5px;
|
||||
border: 3px solid red;
|
||||
}
|
||||
|
||||
.footnote:target {
|
||||
background-color: #ffa;
|
||||
}
|
||||
|
||||
.line-block {
|
||||
display: block;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.line-block .line-block {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 1.5em;
|
||||
}
|
||||
|
||||
.guilabel, .menuselection {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.accelerator {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.classifier {
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
.classifier:before {
|
||||
font-style: normal;
|
||||
margin: 0 0.5em;
|
||||
content: ":";
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
abbr, acronym {
|
||||
border-bottom: dotted 1px;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
/* -- code displays --------------------------------------------------------- */
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
overflow-y: hidden; /* fixes display issues on Chrome browsers */
|
||||
}
|
||||
|
||||
pre, div[class*="highlight-"] {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
span.pre {
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
hyphens: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div[class*="highlight-"] {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
td.linenos pre {
|
||||
border: 0;
|
||||
background-color: transparent;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
table.highlighttable {
|
||||
display: block;
|
||||
}
|
||||
|
||||
table.highlighttable tbody {
|
||||
display: block;
|
||||
}
|
||||
|
||||
table.highlighttable tr {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
table.highlighttable td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.highlighttable td.linenos {
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
|
||||
table.highlighttable td.code {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.highlight .hll {
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.highlight pre,
|
||||
table.highlighttable pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.code-block-caption + div {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.code-block-caption {
|
||||
margin-top: 1em;
|
||||
padding: 2px 5px;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
div.code-block-caption code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
table.highlighttable td.linenos,
|
||||
span.linenos,
|
||||
div.highlight span.gp { /* gp: Generic.Prompt */
|
||||
user-select: none;
|
||||
-webkit-user-select: text; /* Safari fallback only */
|
||||
-webkit-user-select: none; /* Chrome/Safari */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* IE10+ */
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-number {
|
||||
padding: 0.1em 0.3em;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-text {
|
||||
}
|
||||
|
||||
div.literal-block-wrapper {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
code.xref, a code {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.viewcode-link {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.viewcode-back {
|
||||
float: right;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
div.viewcode-block:target {
|
||||
margin: -1px -10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
/* -- math display ---------------------------------------------------------- */
|
||||
|
||||
img.math {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.body div.math p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span.eqno {
|
||||
float: right;
|
||||
}
|
||||
|
||||
span.eqno a.headerlink {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
div.math:hover a.headerlink {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* -- printout stylesheet --------------------------------------------------- */
|
||||
|
||||
@media print {
|
||||
div.document,
|
||||
div.documentwrapper,
|
||||
div.bodywrapper {
|
||||
margin: 0 !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.sphinxsidebar,
|
||||
div.related,
|
||||
div.footer,
|
||||
#top-link {
|
||||
display: none;
|
||||
}
|
||||
}
|
1
Programs/doc/_static/css/badge_only.css
vendored
1
Programs/doc/_static/css/badge_only.css
vendored
|
@ -1 +0,0 @@
|
|||
.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
|
19
Programs/doc/_static/css/custom.css
vendored
19
Programs/doc/_static/css/custom.css
vendored
|
@ -1,19 +0,0 @@
|
|||
.wy-nav-content {
|
||||
max-width: none;
|
||||
padding: 1.618em 4.854em;
|
||||
}
|
||||
/* margin */
|
||||
h2, h3, h4, h5, h6 {
|
||||
margin-top: 32px !important;
|
||||
}
|
||||
/* decoration */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #3465a4;
|
||||
}
|
||||
h2 {
|
||||
padding-bottom: 6px;
|
||||
border-bottom: 2px solid #3465a4;
|
||||
}
|
||||
h4, h5, h6 {
|
||||
font-weight: 400;
|
||||
}
|
BIN
Programs/doc/_static/css/fonts/Roboto-Slab-Bold.woff
vendored
BIN
Programs/doc/_static/css/fonts/Roboto-Slab-Bold.woff
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2671
Programs/doc/_static/css/fonts/fontawesome-webfont.svg
vendored
2671
Programs/doc/_static/css/fonts/fontawesome-webfont.svg
vendored
File diff suppressed because it is too large
Load diff
Before Width: | Height: | Size: 434 KiB |
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue