AviSynthPlugins のバックアップの現在との差分(No.3)


  • 追加された行はこの色です。
  • 削除された行はこの色です。
**プラグイン [#f54be8df]
* プラグイン [#f54be8df]

これらの関数を用いて、AviSynthに外部関数を追加することができます。
これらの関数を用いて、AviSynthに外部プラグインを追加することができます。これらのプラグインの多くは、''とっても''役に立ちます!

 LoadPlugin(string filename [, ...])

LoadPluginは、1つ以上の外部プラグインを読み込みます。これらのプラグインは、AviSynth外部プラグイン・インターフェイスを使用していなければなりません。これに関しては、[[FilterSDK]]において、いくつかの予備のドキュメントが入手可能です。

 LoadVirtualDubPlugin(string filename, string filtername, int preroll)

LoadVirtualDubPluginは、VirtualDub向けに書かれたプラグインを読み込みます。"filename"は、.vdfファイルの名前です。この関数を呼び出した後、AviSynthにおいて、そのフィルタは"filtername"として知られるでしょう。VirtualDubフィルタは、RGB32のみをサポートしています。いくつかのフィルタの出力は、前のフレームに依存しています。それらのフレームを得るために、prerollは、少なくとも、フィルタがバッファをいっぱいにし、そして/または、内部変数を更新するために、前処理(pre-process)するのに必要なフレーム数に設定されるべきです。

Convenient AviSynth-style interfaces to many VirtualDub plugins are available in the file vdub_filters.avs, which is included in some AviSynth distributions and in the ShareFunctions section. To use it, edit the VirtualDub_plugin_directory variable at the top of the file to point to your VirtualDub plugin directory and import the file in your script (using [[Import]] from ScriptFunctions).
多くのVirtualDubプラグイン用の便利なAviSynth風インターフェイスが、vdub_filters.avsというファイルで利用できます。vdub_filters.avsは、いくつかのAviSynthのディストリビューションやShareFunctionsのセクションに含まれています。それを使用するためには、ファイルの一番上にある変数VirtualDub_plugin_directoryを、あなたのVirtualDubプラグイン・ディレクトリに向くように編集し、そのファイルを(ScriptFunctionsにある[[Import]]を使って)あなたのスクリプトの中にインポートしてください。

 LoadVFAPIPlugin(string filename, string filtername)

allows you to use VFAPI plugins, which are also TMPGEnc import plugins although TMPG support appears to be buggy at the moment.
LoadVFAPIPluginによって、VFAPIプラグインを利用できるようになります。VFAPIプラグインはTMPGEncのインポートプラグインでもありますが、TMPGのサポートは、今のところ、バギーなようです。

Though the preceding commands still exist, starting with v2.06 of AviSynth you can specify a plugin directory for AviSynth to use. By putting all plugins, both native AviSynth and VirtualDub ones (not sure about VFAPI) in this directory, these commands become obsolete. Note that most applications using AviSynth such as GordianKnot has not been updated to reflect this change and automatically generated .avs files should have these functions removed.
前述のコマンドは依然として存在しますが、AviSynthのv2.06から、AviSynthが使用するプラグイン・ディレクトリを明示することが出来るようになりました。すべてのプラグイン、ネイティブなAviSynthプラグインとVirtualDubプラグイン(VFAPIについては確かではない)を、このディレクトリに置くことによって、これらのコマンドは不要の長物と化します。GordianKnotのようなAviSynthを利用するほとんどのアプリケーションは、この変更を反映するような更新がなされておらず、自動的に生成される.avsファイルから、これらの関数が削除されるべきであるということに注意してください。

 LoadCPlugin?(string filename [, ...])
 LoadCPlugin(string filename [, ...])

C-plugins must be loaded with LoadCPlugin using AviSynth v2.52 or older versions, and can also be loaded with LoadPlugin starting from AviSynth v2.53. Advice: keep this plugin outside your auto plugin loading directory to prevent crashes. [[[discussion]:http://forum.doom9.org/showthread.php?s=&threadid=58840]] [[[AVISynth C API (by kevina20723)]:http://kevin.atkinson.dhs.org/avisynth_c/]]
C-プラグインは、LoadCPluginを使って読み込まれなければなりません。アドバイス: クラッシュを避けるために、このプラグインは、プラグインのオートローディング(自動読み込み)用ディレクトリの外に置いてください。[[[ディスカッション]:http://forum.doom9.org/showthread.php?s=&threadid=58840]] [[[AVISynth C API (by kevina20723)]:http://kevin.atkinson.dhs.org/avisynth_c/]]

**Plugin autoload and name precedence v2 [#d4bf64b8]
* プラグインのオートローディングと関数名の優先度 v2 [#d4bf64b8]

It is possible to put all plugins and script files with user-defined functions or (global) variables in a directory from where all files with the extension .AVS and .DLL are loaded at startup, unloaded and then loaded dynamically as the script needs them.
すべてのプラグインとユーザー定義関数や(グローバル)変数が書かれたスクリプトファイルを、拡張子.AVSと.DLLのあらゆるファイルが、スタートアップ時に読み込まれ(load)、読み込み解除(unload)され、そして、スクリプトが必要とする時に動的に読み込まれる、そのようなディレクトリに置くことが可能です。

Scripts in this directory should only contain function definitions and global variables, no main processing section (else strange errors may occur), it also is not recommended to put other files in that directory.
このディレクトリに置かれるスクリプトは、関数の定義やグローバル変数だけを含むべきであり、メインの処理を行う部門を含むべきではありません(さもなければ、おかしなエラーが起こるかもしれません)。また、そのディレクトリに他のファイルを置くことも勧められません。

The directory is stored in the registry (the registry key has changed for v2.5). You can use double-clicking a .REG-file with the following lines to set the path (of course inserting your actual path): 
そのディレクトリは、レジストリに登録されています(レジストリキーは、v2.5で変更されました)。パスを設定するために、次の行を含む.REGファイルをダブルクリックして実行することができます(もちろん、あなたの実際のパスを書き入れてください):

 REGEDIT4
 
 [HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth]
 "PluginDir2_5"="c:\\program files\\avisynth\\plugins"

The order in which function names take precedence is as follows:
関数名の優先順位は、次のとおりです:

+user-defined function (always have the highest priority)
+plugin-function (have higher priority than built-in functions - they will override a built-in function)
+built-in function
+ユーザー定義関数(つねに最も高い優先度を持ちます)
+プラグイン関数(内蔵関数より高い優先度を持ちます - 内蔵関数をオーバーライドするでしょう)
+内蔵関数

Inside those groups the function loaded at last takes precedence, there is no error in a namespace conflict. 
それらのグループの内部で、最終的に読み込まれる関数が優先します。そのため、名前空間(namespace)の衝突((訳者註: 「[[通信用語の基礎知識 - #名前空間:http://www.wdic.org/?word=%CC%BE%C1%B0%B6%F5%B4%D6+:TECH]]」、および、「[[通信用語の基礎知識 - #名前衝突:http://www.wdic.org/?word=%CC%BE%C1%B0%BE%D7%C6%CD+:TECH]]」を参照。))におけるエラーはありません。

**Plugin autoload and conflicting function names v2.55 [#k8da2d4c]
* プラグインのオートローディングと衝突する関数名 v2.55 [#k8da2d4c]

Starting from v2.55 there is DLLName_function() support. The problem is that two plugins can have different functions which are named the same. To call the needed one, DLLName_function() support is added. It only works for auto-loaded plugins. It doesn't auto-generate the additional names for plug-ins loaded with LoadPlugin.
v2.55から、DLLName_function()のサポートが開始されました。問題は、2つのプラグインが同じ名前を付けられた異なる関数を持っているということにあります。必要とされる方の関数を呼び出すために、DLLName_function()のサポートが追加されました。それは、オートローディングされたプラグインとLoadPluginで読み込まれたプラグインの両方に対して、追加の名前を自動生成します。

Some examples: 
いくつかのサンプル:

 # using fielddeinterlace from decomb510.dll
 # decomb510.dllからfielddeinterlaceを使用
 AviSource("D:\captures\jewel.avi")
 decomb510_fielddeinterlace(blend=false)

Suppose you have the plugins mpeg2dec.dll and mpeg2dec3.dll in your auto plugin dir, and you want to load a d2v file with mpeg2dec.dll (which outputs YUY2):
自動プラグインディレクトリの中にmpeg2dec.dllとmpeg2dec3.dllの2つのプラグインがあり、なおかつ、mpeg2dec.dllを使ってd2vファイルを読み込みたい場合(YUY2で出力します):

 # using mpeg2source from mpeg2dec.dll
 # mpeg2dec.dllからmpeg2sourceを使用
 mpeg2dec_mpeg2source("F:\From_hell\from_hell.d2v")

 # using mpeg2source from mpeg2dec3.dll
 # mpeg2dec3.dllからmpeg2sourceを使用
 mpeg2dec3_mpeg2source("F:\From_hell\from_hell.d2v")

You can find a large selection of AviSynth plugins to download in [[[FAQ #3.4] :http://www.avisynth.org/index.php?page=Section+3%3A+Filters%2C+plugins+and+colorspaces#q3.4]] and [[[FAQ #3.5]:http://www.avisynth.org/index.php?page=Section+3%3A+Filters%2C+plugins+and+colorspaces#q3.5]].
[[[FAQ #3.4] :http://www.avisynth.nl/index.php?page=Section+3%3A+Filters%2C+plugins+and+colorspaces#q3.4]] と[[[FAQ #3.5]:http://www.avisynth.nl/index.php?page=Section+3%3A+Filters%2C+plugins+and+colorspaces#q3.5]]では、ダウンロードすることのできる、巨大なAviSynthプラグイン選集を見つけることができます。((訳者註: [[外部プラグイン]]のページも参照。))

#hr
註: このページは、http://www.avisynth.org/AviSynthPluginsの日本語訳です。

註: このページは、http://www.avisynth.nl/AviSynthPluginsの日本語訳です。