├── .cvsignore ├── CHANGELOG.txt ├── distrib ├── AVS_UI.exe ├── AVS_UI.rc ├── AviSynth_2.5.nsi ├── AviSynth_Template.reg ├── Examples │ ├── Audio.avs │ ├── Authors.avs │ ├── Editing.avs │ ├── Equalizer Presets.zip │ ├── Processing.avs │ ├── Syntax.avs │ └── Version.avs ├── Languages │ ├── AVS_Czech.nsh │ ├── AVS_English.nsh │ ├── AVS_French.nsh │ ├── AVS_German.nsh │ ├── AVS_Greek.nsh │ ├── AVS_Italian.nsh │ ├── AVS_Japanese.nsh │ ├── AVS_Polish.nsh │ ├── AVS_Portuguese.nsh │ ├── AVS_PortugueseBR.nsh │ └── AVS_Russian.nsh ├── Un_AviSynth.ico ├── bin │ ├── avisynth_c.dll │ ├── debug │ │ └── devil-d.dll │ ├── devil.dll │ └── msvcp60.dll ├── color_presets │ ├── colors_rgb.avsi │ └── colors_rgb.txt ├── docs │ ├── english.chm │ ├── german.chm │ └── pictures.chm ├── ffvfwAVIS.exe ├── gpl-cs.txt ├── gpl-de.txt ├── gpl-el.txt ├── gpl-fr.txt ├── gpl-it.txt ├── gpl-ja.txt ├── gpl-pl.txt ├── gpl-pt.txt ├── gpl-pt_br.txt ├── gpl-ru.txt ├── gpl.txt ├── include │ ├── SoftWire │ │ ├── Assembler.cpp │ │ ├── Assembler.hpp │ │ ├── CodeGenerator.cpp │ │ ├── CodeGenerator.hpp │ │ ├── Emulator.cpp │ │ ├── Emulator.hpp │ │ ├── Encoding.cpp │ │ ├── Encoding.hpp │ │ ├── Error.cpp │ │ ├── Error.hpp │ │ ├── Instruction.cpp │ │ ├── Instruction.hpp │ │ ├── InstructionSet.cpp │ │ ├── InstructionSet.hpp │ │ ├── Intrinsics.hpp │ │ ├── License.txt │ │ ├── Link.hpp │ │ ├── Linker.cpp │ │ ├── Linker.hpp │ │ ├── Loader.cpp │ │ ├── Loader.hpp │ │ ├── Operand.cpp │ │ ├── Operand.hpp │ │ ├── Optimizer.cpp │ │ ├── Optimizer.hpp │ │ ├── RegisterAllocator.cpp │ │ ├── RegisterAllocator.hpp │ │ ├── SoftWire.dsp │ │ ├── StaticLibrary-VC8.vcproj │ │ ├── String.hpp │ │ ├── Synthesizer.cpp │ │ ├── Synthesizer.hpp │ │ └── Whence.txt │ ├── SoundTouch │ │ ├── 3dnow_win.cpp │ │ ├── AAFilter.cpp │ │ ├── AAFilter.h │ │ ├── BPMDetect.h │ │ ├── COPYING.TXT │ │ ├── FIFOSampleBuffer.cpp │ │ ├── FIFOSampleBuffer.h │ │ ├── FIFOSamplePipe.h │ │ ├── FIRFilter.cpp │ │ ├── FIRFilter.h │ │ ├── InterpolateShannon.cpp │ │ ├── RateTransposer.cpp │ │ ├── RateTransposer.h │ │ ├── STTypes.h │ │ ├── SoundTouch.cpp │ │ ├── SoundTouch.dsp │ │ ├── SoundTouch.h │ │ ├── SoundTouch.vcproj │ │ ├── TDStretch.cpp │ │ ├── TDStretch.h │ │ ├── cpu_detect.h │ │ ├── cpu_detect_x86_gcc.cpp │ │ ├── cpu_detect_x86_win.cpp │ │ ├── mmx_optimized.cpp │ │ ├── sse_optimized.cpp │ │ └── whence.txt │ ├── il │ │ └── il.h │ └── pfc │ │ ├── bit_array.h │ │ ├── bit_array_impl.h │ │ ├── byte_order_helper.cpp │ │ ├── byte_order_helper.h │ │ ├── cfg_memblock.h │ │ ├── cfg_var.cpp │ │ ├── cfg_var.h │ │ ├── chainlist.h │ │ ├── critsec.h │ │ ├── foobar2000.h │ │ ├── guid.cpp │ │ ├── guid.h │ │ ├── license.txt │ │ ├── list.h │ │ ├── mem_block.cpp │ │ ├── mem_block.h │ │ ├── mem_block_mgr.h │ │ ├── other.h │ │ ├── pfc.dsp │ │ ├── pfc.h │ │ ├── pfc.vcproj │ │ ├── profiler.cpp │ │ ├── profiler.h │ │ ├── ptr_list.cpp │ │ ├── ptr_list.h │ │ ├── stdafx.cpp │ │ ├── string.cpp │ │ ├── string.h │ │ └── utf8.cpp ├── lgpl_for_used_libs.txt ├── lib │ ├── DevIL.lib │ └── debug │ │ └── DevIL-d.lib ├── off.bmp ├── on.bmp └── upx.exe ├── filtersdk ├── AMDOptimizationGuide.htm ├── AVSLinkage.html ├── AssemblerOptimizing.htm ├── AviSynthInterfaceVersion.htm ├── AviSynthTwoFiveAudio.htm ├── AviSynthTwoFivePixelType.htm ├── AviSynthTwoFiveSDK.htm ├── BensAviSynthDocs.htm ├── C_api.htm ├── ChangeFrameSize.htm ├── ColorSpaces.htm ├── ColorspaceProperties.htm ├── CompilingAvisynthPlugins.htm ├── Cplusplus_api.htm ├── DataAlignment.htm ├── DataStorageInAviSynth.htm ├── DebuggingAvisynthPlugins.htm ├── DualPlugins.htm ├── EnvInvoke.htm ├── EnvSaveString.htm ├── FilterSDK.htm ├── GeneralPurposeToMMXRegisters.htm ├── GettingStartedWithAudio.htm ├── GradientMask.htm ├── InstructionPairing.htm ├── IntegerSSE.htm ├── IntelOptimizationGuide.htm ├── InterleavedImageFormat.htm ├── IntermediateMmxOptimization.htm ├── InternalFunctions.htm ├── InvertNeg.htm ├── IsMovntqFaster.htm ├── MMX.htm ├── Non-ClipSample.htm ├── Pictures │ ├── Compiling_plugins_msvc2010_001.jpg │ ├── Compiling_plugins_msvc2010_002.jpg │ ├── Compiling_plugins_msvc2010_003.jpg │ ├── Compiling_plugins_msvc2010_004.jpg │ ├── Compiling_plugins_msvc2010_005.jpg │ ├── Compiling_plugins_msvc2010_006.jpg │ ├── Compiling_plugins_msvc2010_007.jpg │ ├── Compiling_plugins_msvc2010_008.jpg │ ├── Compiling_plugins_msvc2010_009.jpg │ ├── Debugging_con_applications_msvc2010_001.jpg │ ├── Debugging_con_applications_msvc2010_002.jpg │ ├── Debugging_exported_functions_001.jpg │ ├── Debugging_plugins_msvc2010_001.jpg │ ├── Debugging_plugins_msvc2010_002.jpg │ ├── Debugging_plugins_msvc2010_003.jpg │ ├── Debugging_plugins_msvc2010_004.jpg │ ├── Debugging_plugins_msvc2010_005.jpg │ ├── compiling_plugins.png │ ├── compiling_plugins2.png │ ├── compiling_plugins3.png │ ├── compiling_plugins4.png │ ├── compiling_plugins5.png │ ├── debugging_plugins1a.png │ ├── debugging_plugins1b.png │ ├── debugging_plugins2.png │ ├── debugging_plugins3.png │ ├── debugging_plugins4.png │ ├── debugging_plugins5.png │ ├── debugging_plugins6.png │ └── debugging_plugins7.png ├── PlanarImageFormat.htm ├── SDKHistory.htm ├── SDKLicense.htm ├── SDKNecessaries.htm ├── SimpleMmxOptimization.htm ├── SimpleSample.htm ├── SimpleSample10b.htm ├── SimpleSample11.htm ├── SimpleSample12.htm ├── SimpleSample13a.htm ├── SimpleSample14.htm ├── SimpleSample15a.htm ├── SimpleSample16.htm ├── SimpleSample17.htm ├── SimpleSampleClass.htm ├── TwoFiveFastInvert.htm ├── TwoFiveInvert.htm ├── VideoInfo.htm ├── WorkingWithImages.htm ├── WorkingWithPlanarImages.htm ├── avs2pcm.htm ├── avs2yuv.htm ├── filtersdk.css └── sig.gif └── src ├── audio ├── audio.cpp ├── audio.h ├── avs-soundtouch.cpp ├── avs-soundtouch.h ├── convertaudio.cpp ├── convertaudio.h ├── dbesi0.c ├── math_shared.h ├── paramlist.h ├── ssrc-convert.cpp ├── ssrc-convert.h ├── ssrc.cpp ├── ssrc.h ├── supereq.cpp └── supereq.h ├── avisynth.dsp ├── avisynth.dsw ├── avisynth.sln ├── avisynth.vcproj ├── convert ├── convert.cpp ├── convert.h ├── convert_a.asm ├── convert_matrix.cpp ├── convert_matrix.h ├── convert_planar.cpp ├── convert_planar.h ├── convert_rgb.cpp ├── convert_rgb.h ├── convert_rgbtoy8.cpp ├── convert_rgbtoy8.h ├── convert_yuy2.cpp ├── convert_yuy2.h ├── convert_yuy2torgb.cpp ├── convert_yuy2torgb.h ├── convert_yv12.cpp └── convert_yv12.h ├── core ├── Error.h ├── alignplanar.cpp ├── alignplanar.h ├── avisynth.cpp ├── avisynth.def ├── avisynth.h ├── avisynth.rc ├── avisynth_c.cpp ├── avisynth_c.h ├── cache.cpp ├── cache.h ├── clip_info.h ├── info.h ├── interface.cpp ├── main.cpp ├── memcpy_amd.cpp ├── memcpy_amd.h ├── parser │ ├── expression.cpp │ ├── expression.h │ ├── script.cpp │ ├── script.h │ ├── scriptparser.cpp │ ├── scriptparser.h │ ├── tokenizer.cpp │ └── tokenizer.h ├── plugins.cpp ├── resource.h ├── softwire_helpers.cpp └── softwire_helpers.h ├── filters ├── color.cpp ├── color.h ├── combine.cpp ├── combine.h ├── conditional │ ├── conditional.cpp │ ├── conditional.h │ ├── conditional_functions.cpp │ ├── conditional_functions.h │ ├── conditional_reader.cpp │ └── conditional_reader.h ├── convolution.cpp ├── convolution.h ├── debug.cpp ├── debug.h ├── edit.cpp ├── edit.h ├── field.cpp ├── field.h ├── focus.cpp ├── focus.h ├── fps.cpp ├── fps.h ├── greyscale.cpp ├── greyscale.h ├── histogram.cpp ├── histogram.h ├── layer.cpp ├── layer.h ├── levels.cpp ├── levels.h ├── limiter.cpp ├── limiter.h ├── merge.cpp ├── merge.h ├── misc.cpp ├── misc.h ├── overlay │ ├── 444convert.cpp │ ├── 444convert.h │ ├── OF_add.cpp │ ├── OF_blend.cpp │ ├── OF_darken.cpp │ ├── OF_difference.cpp │ ├── OF_exclusion.cpp │ ├── OF_lighten.cpp │ ├── OF_lumachroma.cpp │ ├── OF_multiply.cpp │ ├── OF_softhardlight.cpp │ ├── OF_subtract.cpp │ ├── blend_asm.cpp │ ├── blend_asm.h │ ├── imghelpers.h │ ├── overlay.cpp │ ├── overlay.h │ └── overlayfunctions.h ├── planeswap.cpp ├── planeswap.h ├── resample.cpp ├── resample.h ├── resample_functions.cpp ├── resample_functions.h ├── resize.cpp ├── resize.h ├── text-overlay.cpp ├── text-overlay.h ├── transform.cpp ├── transform.h ├── turn.cpp ├── turn.h ├── turnfunc.cpp └── turnfunc.h ├── initguid.cpp ├── internal.h ├── plugins ├── DirectShowSource │ ├── DirectShowSource.dsp │ ├── DirectShowSource.dsw │ ├── DirectShowSource.vcproj │ ├── avisynth.h │ ├── directshow_source.cpp │ ├── directshow_source.h │ ├── directshow_source.rc │ └── resource.h └── TCPDeliver │ ├── ClientGUI.rc │ ├── ServerGUICode.h │ ├── StdAfx.cpp │ ├── StdAfx.h │ ├── TCPClient.cpp │ ├── TCPClient.h │ ├── TCPCommon.cpp │ ├── TCPCommon.h │ ├── TCPCompression.cpp │ ├── TCPCompression.h │ ├── TCPDeliver.cpp │ ├── TCPDeliver.dsp │ ├── TCPDeliver.dsw │ ├── TCPDeliver.vcproj │ ├── TCPServer.cpp │ ├── TCPServer.h │ ├── avisynth.h │ ├── huffman.c │ ├── huffman.h │ ├── lzo │ ├── Debug │ │ └── LZO.lib │ ├── Release │ │ └── LZO.lib │ └── include │ │ ├── lzo1.h │ │ ├── lzo16bit.h │ │ ├── lzo1a.h │ │ ├── lzo1b.h │ │ ├── lzo1c.h │ │ ├── lzo1f.h │ │ ├── lzo1x.h │ │ ├── lzo1y.h │ │ ├── lzo1z.h │ │ ├── lzo2a.h │ │ ├── lzoconf.h │ │ └── lzoutil.h │ ├── resource.h │ └── zlib │ ├── include │ ├── zconf.h │ └── zlib.h │ └── lib │ └── zlibstat.lib ├── resource.h ├── sources ├── ImageSeq.cpp ├── ImageSeq.h ├── avi │ ├── AVIIndex.cpp │ ├── AVIIndex.h │ ├── AVIReadHandler.cpp │ ├── AVIReadHandler.h │ ├── AudioSource.cpp │ ├── AudioSource.h │ ├── DubSource.cpp │ ├── DubSource.h │ ├── FastReadStream.cpp │ ├── FastReadStream.h │ ├── File64.cpp │ ├── File64.h │ ├── Fixes.h │ ├── VD_Audio.cpp │ ├── VD_Audio.h │ ├── VD_misc.cpp │ ├── VD_misc.h │ ├── clip_info.h │ ├── cpuaccel.cpp │ ├── list.cpp │ └── list.h ├── avi_source.cpp ├── msvcpxx.h └── source.cpp ├── stdafx.cpp └── stdafx.h /.cvsignore: -------------------------------------------------------------------------------- 1 | *.aps 2 | *.dsw 3 | *.ncb 4 | *.opt 5 | *.plg 6 | Package 7 | $(SystemRoot) 8 | src/Debug 9 | src/Release 10 | src/plugins/DirectShowSource/Release/*.* 11 | src/plugins/DirectShowSource/Debug/*.* 12 | 13 | Temp 14 | -------------------------------------------------------------------------------- /CHANGELOG.txt: -------------------------------------------------------------------------------- 1 | $Log: CHANGELOG.txt,v $ 2 | Revision 1.1 2003/11/27 09:32:49 sh0dan 3 | - Restructured source into dirs. 4 | 5 | Revision 1.1 2003/11/19 20:35:30 wilbertd 6 | log file 7 | -------------------------------------------------------------------------------- /distrib/AVS_UI.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/AVS_UI.exe -------------------------------------------------------------------------------- /distrib/AVS_UI.rc: -------------------------------------------------------------------------------- 1 | #include "resource.h" 2 | 3 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 4 | 5 | IDD_SELCOM DIALOGEX 0, 0, 300, 140 6 | STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD 7 | FONT 8, "MS Shell Dlg", 0, 0, 0x1 8 | BEGIN 9 | LTEXT "",IDC_INTROTEXT,0,0,300,25,NOT WS_GROUP 10 | CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,25,102,15 11 | LTEXT "",IDC_TEXT2,0,40,95,78,NOT WS_GROUP 12 | LTEXT "",IDC_SPACEREQUIRED,0,118,100,22,NOT WS_GROUP 13 | COMBOBOX IDC_COMBO1,102,25,195,71,CBS_DROPDOWNLIST | NOT 14 | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP 15 | CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS | 16 | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | 17 | WS_BORDER | WS_TABSTOP,102,40,195,60 18 | GROUPBOX "",1042,102,100,195,40 19 | LTEXT "",1043,107,110,185,29,NOT WS_GROUP 20 | END 21 | -------------------------------------------------------------------------------- /distrib/AviSynth_2.5.nsi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/AviSynth_2.5.nsi -------------------------------------------------------------------------------- /distrib/AviSynth_Template.reg: -------------------------------------------------------------------------------- 1 | Windows Registry Editor Version 5.00 2 | 3 | [HKEY_CLASSES_ROOT\CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}] 4 | @="AviSynth" 5 | 6 | [HKEY_CLASSES_ROOT\CLSID\{E6D6B700-124D-11D4-86F3-DB80AFD98778}\InProcServer32] 7 | @="%INSTALLDIR%\AviSynth.dll" 8 | "ThreadingModel"="Apartment" 9 | 10 | [HKEY_CLASSES_ROOT\Media Type\Extensions\.avs] 11 | @="" 12 | "Source Filter"="{D3588AB0-0781-11CE-B03A-0020AF0BA770}" 13 | 14 | [HKEY_CLASSES_ROOT\.avs] 15 | @="avsfile" 16 | 17 | [HKEY_CLASSES_ROOT\avsfile] 18 | @="AviSynth Script" 19 | 20 | [HKEY_CLASSES_ROOT\avsfile\DefaultIcon] 21 | @="%INSTALLDIR%\AviSynth.dll,0" 22 | 23 | [HKEY_CLASSES_ROOT\.avsi] 24 | @="avs_auto_file" 25 | 26 | [HKEY_CLASSES_ROOT\avs_auto_file] 27 | @="AviSynth Autoload Script" 28 | 29 | [HKEY_CLASSES_ROOT\avs_auto_file\DefaultIcon] 30 | @="%INSTALLDIR%\AviSynth.dll,0" 31 | 32 | [HKEY_CLASSES_ROOT\AVIFile\Extensions\AVS] 33 | @="{E6D6B700-124D-11D4-86F3-DB80AFD98778}" 34 | 35 | [HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth] 36 | @="%INSTALLDIR%" 37 | "plugindir2_5"="%INSTALLDIR%\plugins" 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /distrib/Examples/Audio.avs: -------------------------------------------------------------------------------- 1 | # Generates colorbar image at the size 320x240, Adds a 440Hz tone that pulses in the right speaker 2 | 3 | Colorbars(320,240) 4 | 5 | # Selects the right channel 6 | 7 | GetRightChannel() 8 | 9 | # Amplifies the signal down 3DB, and puts the result into the variable 'signal' 10 | 11 | signal = AmplifyDB(-3) 12 | 13 | # Puts the new signal as right channel, leaving the sound from GetRightChannel as new left channel. 14 | 15 | MonoToStereo(signal) 16 | 17 | # Left channel now contains a pulsing signal (from ColorBars). 18 | # Right channel now contains the same signal at -3dB. -------------------------------------------------------------------------------- /distrib/Examples/Authors.avs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Examples/Authors.avs -------------------------------------------------------------------------------- /distrib/Examples/Editing.avs: -------------------------------------------------------------------------------- 1 | # Generates colorbar image at the size 320x240 2 | 3 | Colorbars(320, 240) 4 | 5 | # Converts the image to greyscale 6 | 7 | Greyscale() 8 | 9 | # Adds framenumbers to the image 10 | 11 | Showframenumber() 12 | 13 | # Selects the range 0 to 50000 14 | 15 | Trim (0, 50000) 16 | 17 | # Selects every second frame. Fps is now half of 29.97 18 | 19 | SelectEven() 20 | 21 | # Selects first 1000 frames inside the stream, and assigns it to variable substream 22 | 23 | substream = Trim (0, -1000) 24 | 25 | # Loop the substream 25 times 26 | 27 | substream = Loop(substream, 25) 28 | 29 | # Put the substream on bottom of the original 30 | 31 | Stackvertical(substream) 32 | 33 | -------------------------------------------------------------------------------- /distrib/Examples/Equalizer Presets.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Examples/Equalizer Presets.zip -------------------------------------------------------------------------------- /distrib/Examples/Processing.avs: -------------------------------------------------------------------------------- 1 | # Generates colorbar image at the size 512x384 2 | 3 | Colorbars(512,384) 4 | 5 | # Resizes the image using the lanczos3 algorithm 6 | 7 | LanczosResize(640,480) 8 | 9 | # Now the image is 640x480 10 | # Now crop 16 pixels off the entire image all the way around. 11 | 12 | Crop(16, 16, -16, -16) 13 | 14 | # Convert to greyscale 15 | 16 | Greyscale() 17 | 18 | -------------------------------------------------------------------------------- /distrib/Examples/Syntax.avs: -------------------------------------------------------------------------------- 1 | # Generates colorbar image and converts it to YUY2 2 | # The image and sound is now "current clip" 3 | 4 | Colorbars(320,240) 5 | ConvertToYUY2() 6 | 7 | # Take the "current clip", and add greayscale to this. 8 | # The result is now in the variable Grey. 9 | # Current clip is still the original Colorbars(320,240) 10 | 11 | Grey = Greyscale() 12 | 13 | # Now you can use Grey as an alternative clip, instead if the current clip 14 | # This creates a new variable called Grey_Half_Size, that contains the grey colorbar at half the height. 15 | # Current clip is still the original Colorbars(320,240) 16 | 17 | Grey_Half_Size = VerticalReduceBy2(Grey) 18 | 19 | # If we specify more parameters, but don't want it used on the current clip, 20 | # we can either specify the clip in front of the filter, using '.' 21 | # or specify the clip as the first parameter. 22 | 23 | Grey_Same_Size = Grey_half_size.AddBorders(0,60,0,60) 24 | 25 | # which is the same as: 26 | 27 | Grey_Same_Size = AddBorders(Grey_half_size,0,60,0,60) 28 | 29 | # More examples: 30 | 31 | Combined = MergeLuma(grey_same_size) 32 | #Combined = MergeChroma(Combined, grey_same_size) 33 | #Grey_same_size=mergeluma(combined) 34 | # Add titles to clips: 35 | 36 | Thisclip = Subtitle("Current Clip") 37 | Grey_Half_size = Subtitle(Grey_Half_size,"Grey_Half_size") 38 | Grey_Same_size = Subtitle(Grey_Same_size,"Grey_Same_size") 39 | Combined = Subtitle(Combined,"Combined") 40 | 41 | # Put them on top of eachother 42 | 43 | Stackvertical(thisclip, Grey_Half_size, Grey_Same_size, Combined) 44 | -------------------------------------------------------------------------------- /distrib/Examples/Version.avs: -------------------------------------------------------------------------------- 1 | # Prints out version information 2 | 3 | Version() 4 | -------------------------------------------------------------------------------- /distrib/Languages/AVS_Czech.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Languages/AVS_Czech.nsh -------------------------------------------------------------------------------- /distrib/Languages/AVS_English.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Languages/AVS_English.nsh -------------------------------------------------------------------------------- /distrib/Languages/AVS_French.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Languages/AVS_French.nsh -------------------------------------------------------------------------------- /distrib/Languages/AVS_German.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Languages/AVS_German.nsh -------------------------------------------------------------------------------- /distrib/Languages/AVS_Greek.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Languages/AVS_Greek.nsh -------------------------------------------------------------------------------- /distrib/Languages/AVS_Italian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Languages/AVS_Italian.nsh -------------------------------------------------------------------------------- /distrib/Languages/AVS_Japanese.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Languages/AVS_Japanese.nsh -------------------------------------------------------------------------------- /distrib/Languages/AVS_Polish.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Languages/AVS_Polish.nsh -------------------------------------------------------------------------------- /distrib/Languages/AVS_Portuguese.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Languages/AVS_Portuguese.nsh -------------------------------------------------------------------------------- /distrib/Languages/AVS_PortugueseBR.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Languages/AVS_PortugueseBR.nsh -------------------------------------------------------------------------------- /distrib/Languages/AVS_Russian.nsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Languages/AVS_Russian.nsh -------------------------------------------------------------------------------- /distrib/Un_AviSynth.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/Un_AviSynth.ico -------------------------------------------------------------------------------- /distrib/bin/avisynth_c.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/bin/avisynth_c.dll -------------------------------------------------------------------------------- /distrib/bin/debug/devil-d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/bin/debug/devil-d.dll -------------------------------------------------------------------------------- /distrib/bin/devil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/bin/devil.dll -------------------------------------------------------------------------------- /distrib/bin/msvcp60.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/bin/msvcp60.dll -------------------------------------------------------------------------------- /distrib/docs/english.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/docs/english.chm -------------------------------------------------------------------------------- /distrib/docs/german.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/docs/german.chm -------------------------------------------------------------------------------- /distrib/docs/pictures.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/docs/pictures.chm -------------------------------------------------------------------------------- /distrib/ffvfwAVIS.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/ffvfwAVIS.exe -------------------------------------------------------------------------------- /distrib/gpl-cs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/gpl-cs.txt -------------------------------------------------------------------------------- /distrib/gpl-de.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/gpl-de.txt -------------------------------------------------------------------------------- /distrib/gpl-el.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/gpl-el.txt -------------------------------------------------------------------------------- /distrib/gpl-fr.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/gpl-fr.txt -------------------------------------------------------------------------------- /distrib/gpl-it.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/gpl-it.txt -------------------------------------------------------------------------------- /distrib/gpl-ja.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/gpl-ja.txt -------------------------------------------------------------------------------- /distrib/gpl-pl.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/gpl-pl.txt -------------------------------------------------------------------------------- /distrib/gpl-pt.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/gpl-pt.txt -------------------------------------------------------------------------------- /distrib/gpl-pt_br.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/gpl-pt_br.txt -------------------------------------------------------------------------------- /distrib/gpl-ru.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/gpl-ru.txt -------------------------------------------------------------------------------- /distrib/include/SoftWire/Error.cpp: -------------------------------------------------------------------------------- 1 | #include "Error.hpp" 2 | 3 | #include "String.hpp" 4 | 5 | namespace SoftWire 6 | { 7 | Error::Error(const char *format, ...) 8 | { 9 | string[0] = '\0'; 10 | 11 | va_list argList; 12 | va_start(argList, format); 13 | vsnprintf(string, 255, format, argList); 14 | va_end(argList); 15 | } 16 | 17 | const char *Error::getString() const 18 | { 19 | if(string[0] == '\0') 20 | { 21 | return ""; 22 | } 23 | else 24 | { 25 | return string; 26 | } 27 | } 28 | 29 | Error &Error::operator<<(const Error &error) 30 | { 31 | snprintf(string, 255, "%s\n%s", string, error.getString()); 32 | 33 | return *this; 34 | } 35 | 36 | Error &Error::operator>>(const Error &error) 37 | { 38 | snprintf(string, 255, "%s\n%s", error.getString(), string); 39 | 40 | return *this; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /distrib/include/SoftWire/Error.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SoftWire_Error_hpp 2 | #define SoftWire_Error_hpp 3 | 4 | namespace SoftWire 5 | { 6 | class Error 7 | { 8 | public: 9 | Error(const char *format, ...); 10 | 11 | const char *getString() const; 12 | 13 | Error &operator<<(const Error &error); 14 | Error &operator>>(const Error &error); 15 | 16 | private: 17 | char string[256]; 18 | }; 19 | 20 | #ifndef __FUNCSIG__ 21 | #define __FUNCSIG__ "" 22 | #endif 23 | 24 | #ifndef NDEBUG 25 | #define INTERNAL_ERROR Error("%s(%d):\n\tInternal error in '%s'", __FILE__, __LINE__, __FUNCSIG__) 26 | #define EXCEPTION Error("%s(%d):\n\t", __FILE__, __LINE__) << Error 27 | #else 28 | #define INTERNAL_ERROR Error("Internal error in '%s'", __FUNCSIG__) 29 | #define EXCEPTION Error 30 | #endif 31 | } 32 | 33 | #endif // SoftWire_Error_hpp 34 | -------------------------------------------------------------------------------- /distrib/include/SoftWire/InstructionSet.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SoftWire_InstructionSet_hpp 2 | #define SoftWire_InstructionSet_hpp 3 | 4 | #include "Instruction.hpp" 5 | 6 | namespace SoftWire 7 | { 8 | class TokenList; 9 | 10 | class InstructionSet 11 | { 12 | public: 13 | InstructionSet(); 14 | 15 | virtual ~InstructionSet(); 16 | 17 | const Instruction *instruction(int i); 18 | 19 | private: 20 | struct Entry 21 | { 22 | ~Entry() {delete instruction;}; 23 | 24 | const char *mnemonic; 25 | 26 | Instruction *instruction; 27 | }; 28 | 29 | Instruction *intrinsicMap; 30 | 31 | static const Instruction::Syntax instructionSet[]; 32 | static const int numInstructions; 33 | 34 | void generateIntrinsics(); 35 | 36 | static int strcmp(const char *string1, const char *string2); 37 | }; 38 | } 39 | 40 | #endif // SoftWire_InstructionSet_hpp 41 | -------------------------------------------------------------------------------- /distrib/include/SoftWire/Link.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SoftWire_Link_hpp 2 | #define SoftWire_Link_hpp 3 | 4 | namespace SoftWire 5 | { 6 | template 7 | class Link : public T 8 | { 9 | public: 10 | Link(); 11 | 12 | ~Link(); 13 | 14 | Link *append(const T &t); 15 | Link *next() const; 16 | Link *tail() const; 17 | 18 | private: 19 | Link *n; // Next 20 | Link *t; // Tail 21 | }; 22 | } 23 | 24 | namespace SoftWire 25 | { 26 | template 27 | Link::Link() 28 | { 29 | n = 0; 30 | t = 0; 31 | } 32 | 33 | template 34 | Link::~Link() 35 | { 36 | // Avoid call stack overflow 37 | while(n) 38 | { 39 | Link *nextNext = n->n; 40 | n->n = 0; 41 | delete n; 42 | n = nextNext; 43 | } 44 | 45 | t = 0; 46 | } 47 | 48 | template 49 | Link *Link::append(const T &e) 50 | { 51 | if(t == 0) // Empty chain 52 | { 53 | *(T*)this = e; 54 | t = this; 55 | } 56 | else if(t != this) 57 | { 58 | t = t->append(e); 59 | } 60 | else 61 | { 62 | t = n = new Link(); 63 | *(T*)t = e; 64 | t->t = t; 65 | } 66 | 67 | return t; 68 | } 69 | 70 | template 71 | Link *Link::next() const 72 | { 73 | return n; 74 | } 75 | 76 | template 77 | Link *Link::tail() const 78 | { 79 | return t; 80 | } 81 | } 82 | 83 | #endif // SoftWire_Link_hpp 84 | -------------------------------------------------------------------------------- /distrib/include/SoftWire/Linker.cpp: -------------------------------------------------------------------------------- 1 | #include "Linker.hpp" 2 | 3 | #include "String.hpp" 4 | 5 | namespace SoftWire 6 | { 7 | Linker::External *Linker::externals; 8 | 9 | Linker::Linker() 10 | { 11 | } 12 | 13 | Linker::~Linker() 14 | { 15 | clearExternals(); 16 | } 17 | 18 | void *Linker::resolveExternal(const char *name) 19 | { 20 | const External *external = externals; 21 | 22 | while(external) 23 | { 24 | if(external->name && strcmp(external->name, name) == 0) 25 | { 26 | return external->pointer; 27 | } 28 | 29 | external = external->next(); 30 | } 31 | 32 | return 0; 33 | } 34 | 35 | void Linker::defineExternal(void *pointer, const char *name) 36 | { 37 | if(!externals) 38 | { 39 | externals = new External(); 40 | } 41 | 42 | External *external = externals; 43 | 44 | do 45 | { 46 | if(external->name && strcmp(external->name, name) == 0) 47 | { 48 | external->pointer = pointer; 49 | return; 50 | } 51 | 52 | external = external->next(); 53 | } 54 | while(external); 55 | 56 | externals->append(Identifier(pointer, name)); 57 | } 58 | 59 | void Linker::clearExternals() 60 | { 61 | delete externals; 62 | externals = 0; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /distrib/include/SoftWire/Linker.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SoftWire_Linker_hpp 2 | #define SoftWire_Linker_hpp 3 | 4 | #include "Link.hpp" 5 | 6 | namespace SoftWire 7 | { 8 | class Linker 9 | { 10 | public: 11 | Linker(); 12 | 13 | virtual ~Linker(); 14 | 15 | static void *resolveExternal(const char *name); 16 | static void defineExternal(void *pointer, const char *name); 17 | static void clearExternals(); 18 | 19 | private: 20 | struct Identifier 21 | { 22 | Identifier(void *pointer = 0, const char *name = 0) : pointer(pointer), name(name) {}; 23 | 24 | void *pointer; 25 | const char *name; 26 | }; 27 | 28 | typedef Link External; 29 | static External *externals; 30 | }; 31 | } 32 | 33 | #endif // SoftWire_Linker_hpp 34 | -------------------------------------------------------------------------------- /distrib/include/SoftWire/Loader.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SoftWire_Loader_hpp 2 | #define SoftWire_Loader_hpp 3 | 4 | #include "Link.hpp" 5 | 6 | #pragma warning( push ) 7 | #pragma warning (disable: 4512) // assignment operator could not be generated 8 | 9 | namespace SoftWire 10 | { 11 | class Linker; 12 | class Encoding; 13 | 14 | class Loader 15 | { 16 | public: 17 | Loader(const Linker &linker, bool x64 = false); // Default to true on X64 platform 18 | 19 | virtual ~Loader(); 20 | 21 | void (*callable(const char *entryLabel = 0))(); 22 | void (*finalize(const char *entryLabel = 0))(); 23 | void *acquire(); 24 | 25 | Encoding *appendEncoding(const Encoding &encoding); 26 | 27 | const char *getListing(); 28 | void clearListing(); 29 | void reset(); 30 | int instructionCount(); 31 | 32 | private: 33 | const Linker &linker; 34 | 35 | typedef Link Instruction; 36 | Instruction *instructions; 37 | unsigned char *machineCode; 38 | char *listing; 39 | 40 | const bool x64; // Long mode 41 | bool possession; 42 | bool finalized; 43 | 44 | void loadCode(const char *entryLabel = 0); 45 | const unsigned char *resolveReference(const char *name, const Instruction *position) const; 46 | const unsigned char *resolveLocal(const char *name, const Instruction *position) const; 47 | const unsigned char *resolveExternal(const char *name) const; 48 | int codeLength() const; 49 | }; 50 | } 51 | 52 | #pragma warning( pop ) 53 | 54 | #endif // SoftWire_Loader_hpp 55 | -------------------------------------------------------------------------------- /distrib/include/SoftWire/Optimizer.cpp: -------------------------------------------------------------------------------- 1 | #include "Optimizer.hpp" 2 | 3 | namespace SoftWire 4 | { 5 | Optimizer::Optimizer(bool x64) : RegisterAllocator(x64) 6 | { 7 | } 8 | 9 | Optimizer::~Optimizer() 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /distrib/include/SoftWire/Optimizer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SoftWire_Optimizer_hpp 2 | #define SoftWire_Optimizer_hpp 3 | 4 | #include "RegisterAllocator.hpp" 5 | 6 | namespace SoftWire 7 | { 8 | class Optimizer : public RegisterAllocator 9 | { 10 | protected: 11 | Optimizer(bool x64); 12 | 13 | virtual ~Optimizer(); 14 | }; 15 | } 16 | 17 | #endif // SoftWire_Optimizer_hpp 18 | -------------------------------------------------------------------------------- /distrib/include/SoftWire/String.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SoftWire_String_hpp 2 | #define SoftWire_String_hpp 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #ifdef __GNUC__ 11 | #include 12 | #endif 13 | 14 | namespace SoftWire 15 | { 16 | #ifdef WIN32 17 | inline int vsnprintf(char *buffer, size_t count, const char *format, va_list argptr) 18 | { 19 | return _vsnprintf(buffer, count, format, argptr); 20 | } 21 | 22 | static int (*snprintf)(char *buffer, size_t count, const char *format, ...) = _snprintf; 23 | #endif 24 | 25 | #ifdef __GNUC__ 26 | typedef int64_t __int64; 27 | 28 | #ifndef _stricmp 29 | inline int _stricmp(const char *string1, const char *string2) 30 | { 31 | return strcasecmp(string1, string2); 32 | } 33 | #endif 34 | 35 | #ifndef _getch 36 | inline int _getch() 37 | { 38 | return getch(); 39 | } 40 | #endif 41 | #endif 42 | 43 | #ifndef _strlwr 44 | inline char *_strlwr(char *string) 45 | { 46 | int n = (int)strlen(string); 47 | 48 | for(int i = 0; i < n; i++) 49 | { 50 | string[i] = (char)tolower(string[i]); 51 | } 52 | 53 | return string; 54 | } 55 | #endif 56 | 57 | inline char *strdup(const char *string) 58 | { 59 | if(!string) return 0; 60 | char *duplicate = new char[strlen(string) + 1]; 61 | return strcpy(duplicate, string); 62 | } 63 | } 64 | 65 | #endif // SoftWire_String_hpp 66 | -------------------------------------------------------------------------------- /distrib/include/SoftWire/Synthesizer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef SoftWire_Synthesizer_hpp 2 | #define SoftWire_Synthesizer_hpp 3 | 4 | #include "Encoding.hpp" 5 | #include "Operand.hpp" 6 | 7 | namespace SoftWire 8 | { 9 | class Instruction; 10 | 11 | class Synthesizer 12 | { 13 | public: 14 | Synthesizer(bool x64 = false); // Default to true on X64 platform 15 | 16 | virtual ~Synthesizer(); 17 | 18 | void reset(); 19 | 20 | void defineLabel(const char *label); 21 | 22 | void encodeFirstOperand(const Operand &firstOperand); 23 | void encodeSecondOperand(const Operand &secondOperand); 24 | void encodeThirdOperand(const Operand &thirdOperand); 25 | 26 | void encodeImmediate(int i); 27 | void encodeLiteral(const char *string); 28 | 29 | const Encoding &encodeInstruction(const Instruction *instruction); 30 | 31 | private: 32 | const bool x64; 33 | 34 | Encoding encoding; 35 | 36 | Operand::Type firstType; 37 | Operand::Type secondType; 38 | 39 | int firstReg; 40 | int secondReg; 41 | int baseReg; 42 | int indexReg; 43 | 44 | int scale; 45 | 46 | void encodeBase(const Operand &base); 47 | void encodeIndex(const Operand &index); 48 | 49 | void setScale(int scale); 50 | void setDisplacement(int displacement); 51 | 52 | void referenceLabel(const char *label); 53 | 54 | void encodeRexByte(const Instruction *instruction); 55 | void encodeModField(); 56 | void encodeR_MField(const Instruction *instruction); 57 | void encodeRegField(const Instruction *instruction); 58 | void encodeSibByte(const Instruction *instruction); 59 | }; 60 | } 61 | 62 | #endif // SoftWire_Synthesizer_hpp 63 | -------------------------------------------------------------------------------- /distrib/include/SoundTouch/AAFilter.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo 4 | /// while maintaining the original pitch by using a time domain WSOLA-like method 5 | /// with several performance-increasing tweaks. 6 | /// 7 | /// Anti-alias filter is used to prevent folding of high frequencies when 8 | /// transposing the sample rate with interpolation. 9 | /// 10 | /// Author : Copyright (c) Olli Parviainen 11 | /// Author e-mail : oparviai 'at' iki.fi 12 | /// SoundTouch WWW: http://www.surina.net/soundtouch 13 | /// 14 | //////////////////////////////////////////////////////////////////////////////// 15 | // 16 | // Last changed : $Date: 2006/02/05 16:44:06 $ 17 | // File revision : $Revision: 1.10 $ 18 | // 19 | // $Id: AAFilter.h,v 1.10 2006/02/05 16:44:06 Olli Exp $ 20 | // 21 | //////////////////////////////////////////////////////////////////////////////// 22 | // 23 | // License : 24 | // 25 | // SoundTouch audio processing library 26 | // Copyright (c) Olli Parviainen 27 | // 28 | // This library is free software; you can redistribute it and/or 29 | // modify it under the terms of the GNU Lesser General Public 30 | // License as published by the Free Software Foundation; either 31 | // version 2.1 of the License, or (at your option) any later version. 32 | // 33 | // This library is distributed in the hope that it will be useful, 34 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 36 | // Lesser General Public License for more details. 37 | // 38 | // You should have received a copy of the GNU Lesser General Public 39 | // License along with this library; if not, write to the Free Software 40 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 41 | // 42 | //////////////////////////////////////////////////////////////////////////////// 43 | 44 | #ifndef AAFilter_H 45 | #define AAFilter_H 46 | 47 | #include "STTypes.h" 48 | 49 | namespace soundtouch 50 | { 51 | 52 | class AAFilter 53 | { 54 | protected: 55 | class FIRFilter *pFIR; 56 | 57 | /// Low-pass filter cut-off frequency, negative = invalid 58 | double cutoffFreq; 59 | 60 | /// num of filter taps 61 | uint length; 62 | 63 | /// Calculate the FIR coefficients realizing the given cutoff-frequency 64 | void calculateCoeffs(); 65 | public: 66 | AAFilter(uint length); 67 | 68 | ~AAFilter(); 69 | 70 | /// Sets new anti-alias filter cut-off edge frequency, scaled to sampling 71 | /// frequency (nyquist frequency = 0.5). The filter will cut off the 72 | /// frequencies than that. 73 | void setCutoffFreq(double newCutoffFreq); 74 | 75 | /// Sets number of FIR filter taps, i.e. ~filter complexity 76 | void setLength(uint newLength); 77 | 78 | uint getLength() const; 79 | 80 | /// Applies the filter to the given sequence of samples. 81 | /// Note : The amount of outputted samples is by value of 'filter length' 82 | /// smaller than the amount of input samples. 83 | uint evaluate(SAMPLETYPE *dest, 84 | const SAMPLETYPE *src, 85 | uint numSamples, 86 | uint numChannels) const; 87 | }; 88 | 89 | } 90 | 91 | #endif 92 | -------------------------------------------------------------------------------- /distrib/include/SoundTouch/cpu_detect.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | /// 3 | /// A header file for detecting the Intel MMX instructions set extension. 4 | /// 5 | /// Please see 'mmx_win.cpp', 'mmx_cpp.cpp' and 'mmx_non_x86.cpp' for the 6 | /// routine implementations for x86 Windows, x86 gnu version and non-x86 7 | /// platforms, respectively. 8 | /// 9 | /// Author : Copyright (c) Olli Parviainen 10 | /// Author e-mail : oparviai 'at' iki.fi 11 | /// SoundTouch WWW: http://www.surina.net/soundtouch 12 | /// 13 | //////////////////////////////////////////////////////////////////////////////// 14 | // 15 | // Last changed : $Date: 2006/02/05 16:44:06 $ 16 | // File revision : $Revision: 1.4 $ 17 | // 18 | // $Id: cpu_detect.h,v 1.4 2006/02/05 16:44:06 Olli Exp $ 19 | // 20 | //////////////////////////////////////////////////////////////////////////////// 21 | // 22 | // License : 23 | // 24 | // SoundTouch audio processing library 25 | // Copyright (c) Olli Parviainen 26 | // 27 | // This library is free software; you can redistribute it and/or 28 | // modify it under the terms of the GNU Lesser General Public 29 | // License as published by the Free Software Foundation; either 30 | // version 2.1 of the License, or (at your option) any later version. 31 | // 32 | // This library is distributed in the hope that it will be useful, 33 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 34 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 35 | // Lesser General Public License for more details. 36 | // 37 | // You should have received a copy of the GNU Lesser General Public 38 | // License along with this library; if not, write to the Free Software 39 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 40 | // 41 | //////////////////////////////////////////////////////////////////////////////// 42 | 43 | #ifndef _CPU_DETECT_H_ 44 | #define _CPU_DETECT_H_ 45 | 46 | #include "STTypes.h" 47 | 48 | #define SUPPORT_MMX 0x0001 49 | #define SUPPORT_3DNOW 0x0002 50 | #define SUPPORT_ALTIVEC 0x0004 51 | #define SUPPORT_SSE 0x0008 52 | #define SUPPORT_SSE2 0x0010 53 | 54 | /// Checks which instruction set extensions are supported by the CPU. 55 | /// 56 | /// \return A bitmask of supported extensions, see SUPPORT_... defines. 57 | uint detectCPUextensions(void); 58 | 59 | /// Disables given set of instruction extensions. See SUPPORT_... defines. 60 | void disableExtensions(uint wDisableMask); 61 | 62 | #endif // _CPU_DETECT_H_ 63 | -------------------------------------------------------------------------------- /distrib/include/SoundTouch/whence.txt: -------------------------------------------------------------------------------- 1 | The locations that the Soundouch sources were obtained from. 2 | 3 | http://www.surina.net/soundtouch/soundtouch-1.3.1.zip 4 | http://www.surina.net/soundtouch/soundtouch-1.4.0.zip 5 | http://soundtouch.svn.sourceforge.net/viewvc/soundtouch/trunk.tar.gz?view=tar 6 | 7 | 04 Jan 2010 IanB 8 | -------------------------------------------------------------------------------- /distrib/include/pfc/bit_array_impl.h: -------------------------------------------------------------------------------- 1 | #ifndef _PFC_BIT_ARRAY_IMPL_H_ 2 | #define _PFC_BIT_ARRAY_IMPL_H_ 3 | 4 | 5 | 6 | #endif //_PFC_BIT_ARRAY_IMPL_H_ -------------------------------------------------------------------------------- /distrib/include/pfc/byte_order_helper.cpp: -------------------------------------------------------------------------------- 1 | #include "pfc.h" 2 | 3 | #ifndef PFC_BYTE_ORDER_IS_BIG_ENDIAN 4 | 5 | bool byte_order_helper::machine_is_big_endian() 6 | { 7 | BYTE temp[4]; 8 | *(DWORD*)temp = 0xDEADBEEF; 9 | return temp[0]==0xDE; 10 | } 11 | 12 | #endif 13 | 14 | void byte_order_helper::swap_order(void * p_ptr,unsigned bytes) 15 | { 16 | BYTE * ptr = (BYTE*)p_ptr; 17 | BYTE t; 18 | unsigned n; 19 | for(n=0;n>1;n++) 20 | { 21 | t = ptr[n]; 22 | ptr[n] = ptr[bytes-n-1]; 23 | ptr[bytes-n-1] = t; 24 | } 25 | } 26 | 27 | #ifdef PFC_BYTE_ORDER_IS_BIG_ENDIAN 28 | 29 | void byte_order_helper::order_be_to_native(void * ptr,unsigned bytes) 30 | { 31 | #if !PFC_BYTE_ORDER_IS_BIG_ENDIAN 32 | swap_order(ptr,bytes); 33 | #endif 34 | } 35 | 36 | void byte_order_helper::order_le_to_native(void * ptr,unsigned bytes) 37 | { 38 | #if PFC_BYTE_ORDER_IS_BIG_ENDIAN 39 | swap_order(ptr,bytes); 40 | #endif 41 | } 42 | 43 | void byte_order_helper::order_native_to_be(void * ptr,unsigned bytes) 44 | { 45 | #if !PFC_BYTE_ORDER_IS_BIG_ENDIAN 46 | swap_order(ptr,bytes); 47 | #endif 48 | } 49 | 50 | void byte_order_helper::order_native_to_le(void * ptr,unsigned bytes) 51 | { 52 | #if PFC_BYTE_ORDER_IS_BIG_ENDIAN 53 | swap_order(ptr,bytes); 54 | #endif 55 | } 56 | 57 | #else 58 | 59 | void byte_order_helper::order_be_to_native(void * ptr,unsigned bytes) 60 | { 61 | if (!machine_is_big_endian()) swap_order(ptr,bytes); 62 | } 63 | 64 | void byte_order_helper::order_le_to_native(void * ptr,unsigned bytes) 65 | { 66 | if (machine_is_big_endian()) swap_order(ptr,bytes); 67 | } 68 | 69 | void byte_order_helper::order_native_to_be(void * ptr,unsigned bytes) 70 | { 71 | if (!machine_is_big_endian()) swap_order(ptr,bytes); 72 | } 73 | 74 | void byte_order_helper::order_native_to_le(void * ptr,unsigned bytes) 75 | { 76 | if (machine_is_big_endian()) swap_order(ptr,bytes); 77 | } 78 | 79 | #endif -------------------------------------------------------------------------------- /distrib/include/pfc/byte_order_helper.h: -------------------------------------------------------------------------------- 1 | #ifndef _PFC_BYTE_ORDER_HELPER_ 2 | #define _PFC_BYTE_ORDER_HELPER_ 3 | 4 | namespace byte_order_helper { 5 | 6 | #ifdef _M_IX86 7 | #define PFC_BYTE_ORDER_IS_BIG_ENDIAN 0 8 | #endif 9 | 10 | #ifdef PFC_BYTE_ORDER_IS_BIG_ENDIAN 11 | #define PFC_BYTE_ORDER_IS_LITTLE_ENDIAN (!(PFC_BYTE_ORDER_IS_BIG_ENDIAN)) 12 | #endif 13 | //if not defined, use machine_is_big_endian() to detect in runtime 14 | 15 | #ifndef PFC_BYTE_ORDER_IS_BIG_ENDIAN 16 | bool machine_is_big_endian(); 17 | #else 18 | inline bool machine_is_big_endian() {return PFC_BYTE_ORDER_IS_BIG_ENDIAN;} 19 | #endif 20 | 21 | inline bool machine_is_little_endian() {return !machine_is_big_endian();} 22 | 23 | void swap_order(void * ptr,unsigned bytes); 24 | void order_be_to_native(void * ptr,unsigned bytes); 25 | void order_le_to_native(void * ptr,unsigned bytes); 26 | void order_native_to_be(void * ptr,unsigned bytes); 27 | void order_native_to_le(void * ptr,unsigned bytes); 28 | 29 | inline DWORD swap_dword(DWORD param) {swap_order(¶m,sizeof(param));return param;} 30 | inline WORD swap_word(WORD param) {swap_order(¶m,sizeof(param));return param;} 31 | 32 | inline DWORD dword_be_to_native(DWORD param) {order_be_to_native(¶m,sizeof(param));return param;} 33 | inline DWORD dword_le_to_native(DWORD param) {order_le_to_native(¶m,sizeof(param));return param;} 34 | inline DWORD dword_native_to_be(DWORD param) {order_native_to_be(¶m,sizeof(param));return param;} 35 | inline DWORD dword_native_to_le(DWORD param) {order_native_to_le(¶m,sizeof(param));return param;} 36 | 37 | inline WORD word_be_to_native(WORD param) {order_be_to_native(¶m,sizeof(param));return param;} 38 | inline WORD word_le_to_native(WORD param) {order_le_to_native(¶m,sizeof(param));return param;} 39 | inline WORD word_native_to_be(WORD param) {order_native_to_be(¶m,sizeof(param));return param;} 40 | inline WORD word_native_to_le(WORD param) {order_native_to_le(¶m,sizeof(param));return param;} 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /distrib/include/pfc/cfg_memblock.h: -------------------------------------------------------------------------------- 1 | #ifndef _PFC_CFG_VAR_MEMBLOCK_H_ 2 | #define _PFC_CFG_VAR_MEMBLOCK_H_ 3 | 4 | template 5 | class cfg_memblock : public cfg_var, public mem_block_list 6 | { 7 | private: 8 | const T* init_val; 9 | int init_size; 10 | protected: 11 | virtual void reset() 12 | { 13 | remove_all(); 14 | if (init_val) 15 | { 16 | int n; 17 | for(n=0;nwrite(get_ptr(),get_count()*sizeof(T)); 27 | } 28 | 29 | virtual void set_raw_data(const void * data,int size) 30 | { 31 | remove_all(); 32 | T * ptr = (T*)data; 33 | int count = size/sizeof(T); 34 | int n; 35 | for(n=0;nnext) ptr->reset(); 10 | } 11 | 12 | 13 | 14 | void cfg_var::config_read_file(const void * _src,int size) 15 | { 16 | mem_block temp; 17 | const BYTE * src = (BYTE*)_src; 18 | int src_ptr; 19 | for(src_ptr=0;src_ptrnext) 39 | { 40 | if (!strcmp(ptr->var_name,name)) 41 | { 42 | ptr->set_raw_data(src + src_ptr,t_size); 43 | break; 44 | } 45 | } 46 | src_ptr+=t_size; 47 | } 48 | } 49 | 50 | void cfg_var::config_write_file(write_config_callback * out) 51 | { 52 | cfg_var * ptr; 53 | write_config_callback_i temp; 54 | for(ptr = list; ptr; ptr=ptr->next) 55 | { 56 | temp.data.set_size(0); 57 | long size = strlen(ptr->var_name); 58 | out->write(&size,4); 59 | out->write((const char*)ptr->var_name,size); 60 | ptr->get_raw_data(&temp); 61 | size = temp.data.get_size(); 62 | out->write(&size,4); 63 | if (size>0) out->write(temp.data.get_ptr(),size); 64 | } 65 | } 66 | 67 | void cfg_var::config_on_app_init() 68 | { 69 | cfg_var_notify::on_app_init(); 70 | } 71 | 72 | void cfg_var_notify::on_app_init() 73 | { 74 | cfg_var_notify * ptr = list; 75 | while(ptr) 76 | { 77 | if (ptr->my_var) 78 | ptr->my_var->add_notify(ptr); 79 | ptr=ptr->next; 80 | } 81 | } 82 | 83 | void cfg_var::on_change() 84 | { 85 | cfg_var_notify * ptr = notify_list; 86 | while(ptr) 87 | { 88 | ptr->on_var_change(var_get_name(),this); 89 | ptr = ptr->var_next; 90 | } 91 | 92 | } 93 | 94 | cfg_var_notify * cfg_var_notify::list=0; 95 | 96 | void cfg_var::add_notify(cfg_var_notify * ptr) 97 | { 98 | ptr->var_next = notify_list; 99 | notify_list = ptr; 100 | } 101 | -------------------------------------------------------------------------------- /distrib/include/pfc/critsec.h: -------------------------------------------------------------------------------- 1 | #ifndef _PFC_CRITSEC_H_ 2 | #define _PFC_CRITSEC_H_ 3 | 4 | #error MOVED TO UTF8API.H 5 | 6 | #endif -------------------------------------------------------------------------------- /distrib/include/pfc/foobar2000.h: -------------------------------------------------------------------------------- 1 | #include "../pfc/pfc.h" 2 | 3 | -------------------------------------------------------------------------------- /distrib/include/pfc/guid.cpp: -------------------------------------------------------------------------------- 1 | #include "pfc.h" 2 | 3 | 4 | /* 5 | 6B29FC40-CA47-1067-B31D-00DD010662DA 6 | . 7 | typedef struct _GUID { // size is 16 8 | DWORD Data1; 9 | WORD Data2; 10 | WORD Data3; 11 | BYTE Data4[8]; 12 | } GUID; 13 | 14 | // {B296CF59-4D51-466f-8E0B-E57D3F91D908} 15 | static const GUID <> = 16 | { 0xb296cf59, 0x4d51, 0x466f, { 0x8e, 0xb, 0xe5, 0x7d, 0x3f, 0x91, 0xd9, 0x8 } }; 17 | 18 | */ 19 | 20 | unsigned GUID_from_text::read_hex(char c) 21 | { 22 | if (c>='0' && c<='9') return (unsigned)c - '0'; 23 | else if (c>='a' && c<='f') return 0xa + (unsigned)c - 'a'; 24 | else if (c>='A' && c<='F') return 0xa + (unsigned)c - 'A'; 25 | else return 0; 26 | } 27 | 28 | unsigned GUID_from_text::read_byte(const char * ptr) 29 | { 30 | return (read_hex(ptr[0])<<4) | read_hex(ptr[1]); 31 | } 32 | unsigned GUID_from_text::read_word(const char * ptr) 33 | { 34 | return (read_byte(ptr)<<8) | read_byte(ptr+2); 35 | } 36 | 37 | unsigned GUID_from_text::read_dword(const char * ptr) 38 | { 39 | return (read_word(ptr)<<16) | read_word(ptr+4); 40 | } 41 | 42 | void GUID_from_text::read_bytes(BYTE * out,unsigned num,const char * ptr) 43 | { 44 | for(;num;num--) 45 | { 46 | *out = read_byte(ptr); 47 | out++;ptr+=2; 48 | } 49 | } 50 | 51 | 52 | GUID_from_text::GUID_from_text(const char * text) 53 | { 54 | if (*text=='{') text++; 55 | const char * max; 56 | 57 | { 58 | const char * t = strchr(text,'}'); 59 | if (t) max = t; 60 | else max = text + strlen(text); 61 | } 62 | 63 | (GUID)*this = mem_ops::make_null_item(); 64 | 65 | 66 | do { 67 | if (text+8>max) break; 68 | Data1 = read_dword(text); 69 | text += 8; 70 | while(*text=='-') text++; 71 | if (text+4>max) break; 72 | Data2 = read_word(text); 73 | text += 4; 74 | while(*text=='-') text++; 75 | if (text+4>max) break; 76 | Data3 = read_word(text); 77 | text += 4; 78 | while(*text=='-') text++; 79 | if (text+4>max) break; 80 | read_bytes(Data4,2,text); 81 | text += 4; 82 | while(*text=='-') text++; 83 | if (text+12>max) break; 84 | read_bytes(Data4+2,6,text); 85 | } while(false); 86 | } -------------------------------------------------------------------------------- /distrib/include/pfc/guid.h: -------------------------------------------------------------------------------- 1 | #ifndef _PFC_GUID_H_ 2 | #define _PFC_GUID_H_ 3 | 4 | 5 | class GUID_from_text : public GUID 6 | { 7 | unsigned read_hex(char c); 8 | unsigned read_byte(const char * ptr); 9 | unsigned read_word(const char * ptr); 10 | unsigned read_dword(const char * ptr); 11 | void read_bytes(unsigned char * out,unsigned num,const char * ptr); 12 | 13 | public: 14 | GUID_from_text(const char * text); 15 | }; 16 | 17 | #endif -------------------------------------------------------------------------------- /distrib/include/pfc/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2001-2003, Peter Pawlowski 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in 13 | the documentation and/or other materials provided with the 14 | distribution. 15 | 16 | Neither the name of the author nor the names of its contributors 17 | may be used to endorse or promote products derived from this 18 | software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 21 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 22 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 23 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE 25 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 26 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 28 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 30 | TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 31 | THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 | SUCH DAMAGE. 33 | -------------------------------------------------------------------------------- /distrib/include/pfc/mem_block.cpp: -------------------------------------------------------------------------------- 1 | #include "pfc.h" 2 | 3 | void * mem_block::set_size(UINT new_used) 4 | { 5 | if (new_used==0) 6 | { 7 | if (mem_logic != ALLOC_FAST_DONTGODOWN) 8 | { 9 | if (data!=0) {free(data);data=0;} 10 | size = 0; 11 | } 12 | } 13 | else 14 | { 15 | UINT new_size; 16 | if (mem_logic == ALLOC_FAST || mem_logic == ALLOC_FAST_DONTGODOWN) 17 | { 18 | new_size = size; 19 | if (new_size < 1) new_size = 1; 20 | while(new_size < new_used) new_size <<= 1; 21 | if (mem_logic!=ALLOC_FAST_DONTGODOWN) while(new_size>>1 > new_used) new_size >>= 1; 22 | } 23 | else 24 | { 25 | new_size = new_used; 26 | } 27 | 28 | if (new_size!=size) 29 | { 30 | if (data==0) 31 | { 32 | data = malloc(new_size); 33 | } 34 | else 35 | { 36 | void * new_data; 37 | #if defined(_DEBUG) && 0 38 | new_data = malloc(new_size); 39 | if (new_data) memcpy(new_data,data,new_size>size ? size : new_size); 40 | if (size >= 4) *(DWORD*)data = 0xDEADBEEF; 41 | free(data); 42 | data = new_data; 43 | #else 44 | new_data = realloc(data,new_size); 45 | if (new_data==0) free(data); 46 | data = new_data; 47 | #endif 48 | } 49 | size = new_size; 50 | } 51 | } 52 | used = new_used; 53 | return data; 54 | } 55 | 56 | void mem_block::prealloc(UINT num) 57 | { 58 | if (size done_block; 92 | unsigned char * done = done_size > PFC_ALLOCA_LIMIT ? done_block.set_size(done_size) : (unsigned char*)alloca(done_size); 93 | memset(done,0,done_size); 94 | unsigned n; 95 | for(n=0;nn); 105 | assert(n 8 | class mem_block_manager 9 | { 10 | struct entry 11 | { 12 | mem_block_t block; 13 | bool used; 14 | }; 15 | ptr_list_t list; 16 | public: 17 | T * copy(const T* ptr,int size) 18 | { 19 | int n; 20 | int found_size = -1,found_index = -1; 21 | for(n=0;nused) 24 | { 25 | int block_size = list[n]->block.get_size(); 26 | if (found_size<0) 27 | { 28 | found_index=n; found_size = block_size; 29 | } 30 | else if (found_sizefound_size) 33 | { 34 | found_index=n; found_size = block_size; 35 | } 36 | } 37 | else if (found_size>size) 38 | { 39 | if (block_size>=size && block_size=0) 49 | { 50 | list[found_index]->used = true; 51 | return list[found_index]->block.copy(ptr,size); 52 | } 53 | entry * new_entry = new entry; 54 | new_entry->used = true; 55 | list.add_item(new_entry); 56 | return new_entry->block.copy(ptr,size); 57 | } 58 | 59 | void mark_as_free() 60 | { 61 | int n; 62 | for(n=0;nused = false; 65 | } 66 | } 67 | 68 | ~mem_block_manager() {list.delete_all();} 69 | }; 70 | 71 | #endif -------------------------------------------------------------------------------- /distrib/include/pfc/other.h: -------------------------------------------------------------------------------- 1 | #ifndef _PFC_OTHER_H_ 2 | #define _PFC_OTHER_H_ 3 | 4 | template 5 | class vartoggle_t 6 | { 7 | T oldval; 8 | T & var; 9 | public: 10 | vartoggle_t(T & p_var,T val) : var(p_var) 11 | { 12 | oldval = var; 13 | var = val; 14 | } 15 | ~vartoggle_t() {var = oldval;} 16 | }; 17 | 18 | typedef vartoggle_t booltoggle; 19 | 20 | class order_helper 21 | { 22 | mem_block_t data; 23 | public: 24 | order_helper(unsigned size) : data(size) 25 | { 26 | unsigned n; 27 | for(n=0;n 9 | #endif 10 | 11 | #define PFC_ALLOCA_LIMIT (4096) 12 | 13 | #define INDEX_INVALID ((unsigned)(-1)) 14 | 15 | #include 16 | 17 | #include 18 | #include 19 | 20 | #include 21 | 22 | #include 23 | #include 24 | 25 | #ifdef _MSC_VER 26 | 27 | #define NOVTABLE _declspec(novtable) 28 | 29 | #ifdef _DEBUG 30 | #define ASSUME(X) assert(X) 31 | #else 32 | #define ASSUME(X) __assume(X) 33 | #endif 34 | 35 | #else 36 | 37 | #define NOVTABLE 38 | 39 | #define ASSUME(X) assert(X) 40 | 41 | #endif 42 | 43 | 44 | #define tabsize(x) (sizeof(x)/sizeof(*x)) 45 | 46 | #include "bit_array.h" 47 | //#include "critsec.h" 48 | #include "mem_block.h" 49 | #include "list.h" 50 | #include "ptr_list.h" 51 | #include "string.h" 52 | #include "profiler.h" 53 | #include "cfg_var.h" 54 | #include "cfg_memblock.h" 55 | #include "guid.h" 56 | #include "byte_order_helper.h" 57 | #include "other.h" 58 | #include "chainlist.h" 59 | #endif //___PFC_H___ -------------------------------------------------------------------------------- /distrib/include/pfc/profiler.cpp: -------------------------------------------------------------------------------- 1 | #include "pfc.h" 2 | 3 | 4 | __declspec(naked) __int64 profiler_local::get_timestamp() 5 | { 6 | __asm 7 | { 8 | rdtsc 9 | ret 10 | } 11 | } -------------------------------------------------------------------------------- /distrib/include/pfc/profiler.h: -------------------------------------------------------------------------------- 1 | #ifndef _PFC_PROFILER_H_ 2 | #define _PFC_PROFILER_H_ 3 | 4 | class profiler_static 5 | { 6 | private: 7 | const char * name; 8 | __int64 total_time,num_called; 9 | 10 | public: 11 | profiler_static(const char * p_name) 12 | { 13 | name = p_name; 14 | total_time = 0; 15 | num_called = 0; 16 | } 17 | ~profiler_static() 18 | { 19 | char blah[256]; 20 | char total_time_text[128]; 21 | char num_text[128]; 22 | _i64toa(total_time,total_time_text,10); 23 | _i64toa(num_called,num_text,10); 24 | sprintf(blah,"profiler: %s - %s cycles (executed %s times)\n",name,total_time_text,num_text); 25 | OutputDebugStringA(blah); 26 | } 27 | void add_time(__int64 delta) {total_time+=delta;num_called++;} 28 | }; 29 | 30 | class profiler_local 31 | { 32 | private: 33 | static __int64 get_timestamp(); 34 | __int64 start; 35 | profiler_static * owner; 36 | public: 37 | profiler_local(profiler_static * p_owner) 38 | { 39 | owner = p_owner; 40 | start = get_timestamp(); 41 | } 42 | ~profiler_local() 43 | { 44 | __int64 end = get_timestamp(); 45 | owner->add_time(end-start); 46 | } 47 | 48 | }; 49 | 50 | #define profiler(name) \ 51 | static profiler_static profiler_static_##name(#name); \ 52 | profiler_local profiler_local_##name(&profiler_static_##name); 53 | 54 | 55 | 56 | 57 | #endif -------------------------------------------------------------------------------- /distrib/include/pfc/ptr_list.cpp: -------------------------------------------------------------------------------- 1 | #include "pfc.h" 2 | 3 | #error verboten 4 | -------------------------------------------------------------------------------- /distrib/include/pfc/stdafx.cpp: -------------------------------------------------------------------------------- 1 | //cpp used to generate precompiled header 2 | #include "pfc.h" -------------------------------------------------------------------------------- /distrib/lib/DevIL.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/lib/DevIL.lib -------------------------------------------------------------------------------- /distrib/lib/debug/DevIL-d.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/lib/debug/DevIL-d.lib -------------------------------------------------------------------------------- /distrib/off.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/off.bmp -------------------------------------------------------------------------------- /distrib/on.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/on.bmp -------------------------------------------------------------------------------- /distrib/upx.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/distrib/upx.exe -------------------------------------------------------------------------------- /filtersdk/AMDOptimizationGuide.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AMDOptimizationGuide - AviSynth 5 | 6 |

7 | AMDOptimizationGuide 8 |

9 | 10 |

To many people this is considered the bible of Assembler optimizing.

11 | 12 | 13 | 14 | 15 | 16 |

The 'AMD64 Architecture Programmer’s Manual Volume 1-5' can be downloaded from the Developer Guides & Manuals section.


Back to AssemblerOptimizing

$Date: 2014/10/27 22:04:54 $ 17 |

18 | -------------------------------------------------------------------------------- /filtersdk/AssemblerOptimizing.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AssemblerOptimizing - AviSynth 5 | 6 | 7 |

8 | AssemblerOptimizing 9 |

10 | 11 | 12 |

This section contains information on various experiences and information on assembler writing. 13 | This will mostly cover information on MMX and IntegerSSE.

14 | 15 | 16 | 25 | 26 | 27 | 28 |
Back to FilterSDK 29 |

$Date: 2014/10/27 22:04:54 $
30 |

31 | -------------------------------------------------------------------------------- /filtersdk/AviSynthTwoFiveAudio.htm: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | AviSynthTwoFiveAudio - AviSynth 8 | 9 | 10 |

11 | AviSynthTwoFiveAudio 12 |

13 |

14 | 15 |

Most sample handling has been completely rewritten. And most notably, 16 | the way of fetching samples has changed slightly. The old way of fetching:

17 | 18 | 19 |

virtual void __stdcall GetAudio(void* buf, int start, int count, IScriptEnvironment* env);

20 | 21 | 22 |

has been replaced by:

23 | 24 | 25 |

virtual void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env);

26 | 27 | 28 |

This has been done to support longer samples. If you extend PClip instead of GenericVideoFilter, 29 | you will have to change this. If you extend GenericVideoFilter, and don't change it, 30 | samples will go through your filter untouched (as if it wasn't there).

31 | 32 | 33 |

An automatic audio type converter has been added, and is available to all filters. 34 | This enables you to recieve samples only in supported formats. Use like this:

35 | 36 | 37 |

PClip ok_clip = ConvertAudio::Create(_clip, SAMPLE_INT16|SAMPLE_FLOAT, SAMPLE_FLOAT);

38 | 39 | 40 |

It accepts two parameters besides the original clip - they are accepted formats and prefered format. 41 | If the samples are already in one of the accepted formats, they will be returned untouched. 42 | If they are not, all samples will be converted to the prefered format. 43 | This makes it possible for your filter to only support a subrange of sample-types 44 | without having to worry about conversion or error messages.

45 | 46 |

The currently supported sampletypes are:

47 | 48 | 49 |
  • SAMPLE_INT8 50 |
  • 51 |
  • SAMPLE_INT16 52 |
  • 53 |
  • SAMPLE_INT24 54 |
  • 55 |
  • SAMPLE_INT32 56 |
  • 57 |
  • SAMPLE_FLOAT 58 |
  • 59 |
60 |
61 |
62 | 63 |

vi.sample_type contains one of the types above. The sample type should be read by calling vi.SampleType(). 64 | You should only directly refer to sample_type, when writing to it (which should only be necessary on sources, 65 | since all convertion is can be done by AviSynth internally).

66 | 67 |

You can no longer refer to vi.stereo or vi.sixteen_bit. 68 | The number of channels can be retrieved by using vi.AudioChannels(), 69 | and it can now contain any number. The channels are still interleaved, 70 | so if vi.AudioChannels()is 4 the samples will be delivered like this:

71 | 72 | 73 |

[ch1-s1][ch2-s1][ch3-s1][ch4-s1][ch1-s2][ch2-s2][ch3-s2][ch4-s2][ch1-s3][ch2-s3][ch3-s3][ch4-s3]

74 | 75 | 76 |

ch is channel and s sample.

77 | 78 | 79 |

For more info, refer to the new audio.cpp and avisynth.h

80 | 81 | 82 |

Back to AviSynthTwoFiveSDK

83 |

$Date: 2006/11/24 18:21:25 $
84 | Original version of this document at http://www.avisynth.org/AviSynthTwoFiveAudio 85 |

86 | 87 | 88 | -------------------------------------------------------------------------------- /filtersdk/AviSynthTwoFivePixelType.htm: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | AviSynthTwoFivePixelType - AviSynth 8 | 9 | 10 | 11 |

12 | AviSynthTwoFivePixelType 13 |

14 |

15 | 16 |

The internals of VideoInfo.pixel_type has been completely changed. 17 | The type has been changed from byte to int, and now contains different information than before. 18 | This is important when building a Source filter, when you have to set the pixel_type. 19 | You have to change your constants to reflect this change.

20 | 21 | 22 |

In general filters should not care about these values at all - only if they set or modify them. 23 | For checking what colorspace the video material is in, use one of the following functions in VideoInfo.

24 | 25 | 26 |
  • bool IsRGB() 27 |
  • 28 |
  • bool IsRGB24() 29 |
  • 30 |
  • bool IsRGB32() 31 |
  • 32 |
  • bool IsYUV() 33 |
  • 34 |
  • bool IsYUY2() 35 |
  • 36 |
  • bool IsYV12() 37 |
  • 38 |
  • bool IsPlanar() 39 |
  • 40 |
41 |
42 |
43 | 44 |

If you need to set the pixel type, use a syntax like:

45 | 46 | 47 |

vi.pixel_type = VideoInfo::CS_YUY2; // Version 2.5 syntax

48 | 49 | 50 |

instead of:

51 | 52 | 53 |

vi.pixel_type = VideoInfo::YUY2; // Version 2.0 syntax

54 | 55 | 56 |

Other possibilities are:

57 | 58 | 59 |
  • CS_BGR24, 60 |
  • 61 |
  • CS_BGR32, 62 |
  • 63 |
  • CS_YUY2, 64 |
  • 65 |
  • CS_YV12, // y-v-u, planar 66 |
  • 67 |
  • CS_I420, // y-u-v, planar 68 |
  • 69 |
  • CS_IYUV // same as above 70 |
  • 71 |
72 |
73 |
74 | 75 |

The last two are automatically converted to YV12, so filter writers should not worry about these.

76 | 77 | 78 |

See also WorkingWithImages.

79 | 80 | 81 |

Back to AviSynthTwoFiveSDK

82 |

$Date: 2006/11/24 18:21:25 $
83 | Original version of this document at http://www.avisynth.org/AviSynthTwoFivePixelType 84 |

85 | 86 | 87 | -------------------------------------------------------------------------------- /filtersdk/AviSynthTwoFiveSDK.htm: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | AviSynthTwoFiveSDK - AviSynth 8 | 9 | 10 | 11 |

12 | AviSynthTwoFiveSDK 13 |

14 |

15 | 16 |

This will list the main changes between 1.x, 2.0x and 2.5. 17 | Not all changes are listed here, but the new methods can be found in the new avisynth.h.

18 | 19 | 20 | 26 | 27 | 28 |

Back to FilterSDK

29 |

$Date: 2006/11/24 18:21:25 $
30 | Original version of this document at http://www.avisynth.org/AviSynthTwoFiveSDK 31 |

32 | 33 | 34 | -------------------------------------------------------------------------------- /filtersdk/C_api.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | C API - AviSynth 5 | 6 | 7 | 8 |

C API

9 | The header, avisynth_c.h, declares 10 | all the classes, structures and miscellaneous constants that you might 11 | need when writing a plugin. All external plugins should #include it: 12 |
#include "avisynth_c.h"
13 |

source: http://forum.doom9.org/showthread.php?p=1464911#post1464911 14 |

15 |

compiling plugins: http://forum.doom9.org/showthread.php?p=1092380#post1092380 16 |

17 |

example: http://forum.doom9.org/showthread.php?p=1001260#post1001260 18 |

19 |

20 | For now the api is described here: 21 | http://www.kevina.org/avisynth_c/api.html. 22 | An example is given here: 23 | http://www.kevina.org/avisynth_c/example.html. 24 |

25 |

26 | In v2.60 (AVISYNTH_INTERFACE_VERSION = 6) the following functions are added to the C interface: 27 |

28 |
 avs_is_yv24
29 |  avs_is_yv16
30 |  avs_is_yv12
31 |  avs_is_yv411
32 |  avs_is_y8
33 |  avs_is_color_space
34 |  avs_get_plane_width_subsampling
35 |  avs_get_plane_height_subsampling
36 |  avs_bits_per_pixel
37 |  avs_bytes_from_pixels
38 |  avs_row_size
39 |  avs_bmp_size
40 |  avs_get_row_size_p
41 |  avs_get_height_p
42 | 

43 |

44 |
Back to FilterSDK 45 |

$Date: 2015/01/13 00:24:50 $ 46 |

47 | 48 | -------------------------------------------------------------------------------- /filtersdk/ChangeFrameSize.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ChangeFrameSize - AviSynth 5 |
6 | 7 |

8 | ChangeFrameSize 9 |

10 | 11 |

The following example code shows how to double the width of the destination frame

12 | 13 |
public:
ShowPixelValues(PClip _child, IScriptEnvironment* env) :
GenericVideoFilter(_child)
{
// constructor code

vi.width = vi.width*2; // width is doubled here
vi.height = vi.height * 2; // height is also multiplied by 2
}
PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
};

PVideoFrame __stdcall ShowPixelValues::GetFrame(int n, IScriptEnvironment* env) {

PVideoFrame src = child->GetFrame(n, env);
PVideoFrame dst = env->NewVideoFrame(vi); // new frame is double the size of src
...
14 | 15 |

A Similar approach has to be used for changing colorspace, framerate etc. 16 | There is a bit more information at WorkingWithImages. 17 | 18 |


Back to FilterSDK 19 | 20 |
21 |

$Date: 2014/10/27 22:04:54 $
22 |

23 | -------------------------------------------------------------------------------- /filtersdk/ColorspaceProperties.htm: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | Colorspace properties - AviSynth 9 | 10 | 11 | 12 |

Colorspace properties

13 | 14 |

In AviSynth v2.60, the colorspace properties are:

15 |
 // Colorspace properties.
16 |  enum {
17 |    CS_BGR               = 1<<28,
18 |    CS_YUV               = 1<<29,
19 |    CS_INTERLEAVED       = 1<<30,
20 |    CS_PLANAR            = 1<<31,
21 |    
22 |    CS_VPlaneFirst       = 1<<3
23 |    CS_UPlaneFirst       = 1<<4
24 | 
25 |    CS_Shift_Sub_Width   =  0
26 |    CS_Shift_Sub_Height  =  8
27 |    CS_Shift_Sample_Bits = 16
28 | 
29 |    CS_Sub_Width_1       = 3 << CS_Shift_Sub_Width,  // YV24
30 |    CS_Sub_Width_2       = 0 << CS_Shift_Sub_Width,  // YV12, I420, YV16
31 |    CS_Sub_Width_4       = 1 << CS_Shift_Sub_Width,  // YUV9, YV411
32 |    
33 |    CS_Sub_Height_1      = 3 << CS_Shift_Sub_Height, // YV16, YV24, YV411
34 |    CS_Sub_Height_2      = 0 << CS_Shift_Sub_Height, // YV12, I420
35 |    CS_Sub_Height_4      = 1 << CS_Shift_Sub_Height, // YUV9
36 |    
37 |    CS_Sample_Bits_8     = 0 << CS_Shift_Sample_Bits,
38 |    CS_Sample_Bits_16    = 1 << CS_Shift_Sample_Bits,
39 |    CS_Sample_Bits_32    = 2 << CS_Shift_Sample_Bits,
40 |  };
41 |  
42 |  // Specific colorformats
43 |  enum {
44 |    CS_UNKNOWN = 0,
45 |    CS_BGR24 = 1<<0 | CS_BGR | CS_INTERLEAVED,
46 |    CS_BGR32 = 1<<1 | CS_BGR | CS_INTERLEAVED,
47 |    CS_YUY2  = 1<<2 | CS_YUV | CS_INTERLEAVED,
48 |    CS_RAW32 = 1<<5 | CS_INTERLEAVED,
49 |    CS_YV24  = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_1,  // YUV 4:4:4 planar
50 |    CS_YV16  = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_2,  // YUV 4:2:2 planar
51 |    CS_YV12  = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Height_2 | CS_Sub_Width_2,  // y-v-u, 4:2:0 planar
52 |    CS_I420  = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_UPlaneFirst | CS_Sub_Height_2 | CS_Sub_Width_2,  // y-u-v, 4:2:0 planar
53 |    CS_IYUV  = CS_I420,
54 |    CS_YUV9  = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Height_4 | CS_Sub_Width_4,  // YUV 4:1:0 planar
55 |    CS_YV411 = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_4,  // YUV 4:1:1 planar
56 |    CS_Y8    = CS_PLANAR | CS_INTERLEAVED | CS_YUV | CS_Sample_Bits_8,                                     // Y   4:0:0 planar
57 |  };
58 |

Thus CS_YV12 gives for example:

59 |
 CS_YV12  = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Height_2 | CS_Sub_Width_2
60 |           = 1<<31 | 1<<29 | 0<<16 | 1<<3 | 0<<8 | 0<<0
61 |           = 1010.0000.0000.0000.0000.1000
62 | Back to FilterSDK | VideoInfo 63 |

$Date: 2015/01/13 00:24:50 $
64 |

65 | 66 | 67 | -------------------------------------------------------------------------------- /filtersdk/EnvSaveString.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | EnvSaveString - AviSynth 5 | 6 | 7 | 8 |
9 | 10 |

11 | EnvSaveString 12 |

13 | 14 |

env->SaveString is given to allow users to pass strings to AVSValue, 15 | and ensure that they are being deallocated on unload.

16 | 17 | 18 |

An Example:

19 | 20 |
      fnpluginnew = new char[string_len];

strcpy(fnpluginnew, fnplugin.AsString());
strcat(fnpluginnew, " ");
strcat(fnpluginnew, name);

env->SetGlobalVar("$PluginFunctions$", AVSValue(env->SaveString(fnpluginnew, string_len)));

// Since fnpluginnew has now been saved it can safely be deleted.

delete[] fnpluginnew;
21 | 22 |

But you must still remember that these strings are not deallocated until the filter is unloaded.

23 | 24 |

So in general if you don't want your filter to be allocating more memory on each load, 25 | try avoiding using non-const strings. 26 | 27 |


Back to FilterSDK

Date: 2006/11/24 18:21:26 $
28 |

29 | -------------------------------------------------------------------------------- /filtersdk/GeneralPurposeToMMXRegisters.htm: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | GeneralPurposeToMMXRegisters - AviSynth 8 | 9 | 10 | 11 |
12 | 13 |

14 | GeneralPurposeToMMXRegisters 15 |

16 |

17 | 18 |

It might be necessary to move data back and forth between a general purpose register 19 | (EAX for instance) to an MMX register. This can be done by:

20 | 21 | 22 |

movd eax,mm0

23 | 24 |

movd mm0,eax

25 | 26 |

pinsrw mm0,eax,0

27 | 28 |

pextrw eax,mm0,0

29 | 30 |

movmskb eax,mm0

31 | 32 | 33 |

These instructions should however be avoided as much as possible 34 | since they are executing very slow. It seems like there are severe penalties 35 | when moving data between the MMX registers and the general purpose registers. 36 | Most of these instructions take more than 16 cycles to execute, 37 | which is more than 8 times the cyclecount of normal MMX instructions.

38 | 39 | 40 |

In many cases it is actually faster to write the data to a temporary memory location, 41 | using movd, and move the data back into the registry. For much data 42 | it is actually often faster to process the data one line at the time, 43 | and store all data in a temporary space, and process the data in a separate loop.

44 | 45 | 46 |
47 |

phaeron writes:

48 | 49 | 50 |

Note that the Microsoft Visual C++ compiler will give you trouble here if you are using MMX intrinsics, 51 | as it is unable to directly generate movd mmreg,mem and movd mem,mmreg 52 | instructions for the _m_to_int() and _m_from_int() intrinsics. 53 | Instead, the values trampoline off of the general purpose registers, triggering 54 | the undesirable performance behavior described above. 55 | This is true even with the Visual Studio .NET 2003 compiler (VC7.1), 56 | which fixed most of the MMX code generation embarrassments from the VC6PP and VC7 compilers, 57 | most notably MOVQ hell. As such, you're still better off sticking with inline 58 | or explicit assembly than using MMX intrinsics with MSVC.

59 | 60 | 61 |

Back to AssemblerOptimizing

62 |

$Date: 2006/11/08 20:40:17 $
63 | Original version of this document http://www.avisynth.org/GeneralPurposeToMMXRegisters 64 |

65 | 66 | 67 | -------------------------------------------------------------------------------- /filtersdk/IntegerSSE.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | IntegerSSE - AviSynth 5 | 6 | 7 |
8 | 9 |

10 | IntegerSSE 11 |

12 | 13 | 14 |

Integer SSE is a set of instructions found in most modern processors. 15 | IntegerSSE is an extension of MMX.

16 | 17 | 18 |

SSE: New commands present in P3, P4, newer Celerons, Athlon XP, MP.

19 | 20 | 21 |

Integer SSE: A subset of the SSE command set, mostly used for video processing. 22 | These instructions are also present in AMD Athlon (all versions), AMD Duron (all versions).

23 | 24 | 25 |

Integer SSE instructions:

26 | 27 | 28 |

MASKMOVQ mmreg1, mmreg2

29 | 30 |

MOVNTQ mem64, mmreg

31 | 32 |

PAVGB mmreg1, mmreg2

33 | 34 |

PAVGB mmreg, mem64

35 | 36 |

PAVGW mmreg1, mmreg2

37 | 38 |

PAVGW mmreg, mem64

39 | 40 |

PEXTRW reg32, mmreg, imm8

41 | 42 |

PINSRW mmreg, reg32, imm8

43 | 44 |

PINSRW mmreg, mem16, imm8

45 | 46 |

PMAXSW mmreg1, mmreg2

47 | 48 |

PMAXSW mmreg, mem64

49 | 50 |

PMAXUB mmreg1, mmreg2

51 | 52 |

PMAXUB mmreg, mem64

53 | 54 |

PMINSW mmreg1, mmreg2

55 | 56 |

PMINSW mmreg, mem64

57 | 58 |

PMINUB mmreg1, mmreg2

59 | 60 |

PMINUB mmreg, mem64

61 | 62 |

PMOVMSKB reg32, mmreg

63 | 64 |

PMULHUW mmreg1, mmreg2

65 | 66 |

PMULHUW mmreg, mem64

67 | 68 |

PSADBW mmreg1, mmreg2

69 | 70 |

PSADBW mmreg, mem64

71 | 72 |

PSHUFW mmreg1, mmreg2, imm8

73 | 74 |

PSHUFW mmreg, mem64, imm8

75 | 76 |

PREFETCHNTA mem8

77 | 78 |

PREFETCHT0 mem8

79 | 80 |

PREFETCHT1 mem8

81 | 82 |

PREFETCHT2 mem8

83 | 84 |

SFENCE

85 | 86 | 87 |
Back to AssemblerOptimizing
88 |

$Date: 2014/10/27 22:04:54 $ 89 |

90 | -------------------------------------------------------------------------------- /filtersdk/IntelOptimizationGuide.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | IntelOptimizationGuide - AviSynth 5 | 6 | 7 |
8 | 9 |

10 | IntelOptimizationGuide 11 |

12 | 13 |

Intels optimization guide can be downloaded from:

14 | 15 | 16 |

http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html


Back to AssemblerOptimizing
17 |

$Date: 2014/10/27 22:04:54 $
18 |

19 | -------------------------------------------------------------------------------- /filtersdk/InterleavedImageFormat.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | InterleavedImageFormat - AviSynth 5 | 6 | 7 | 8 |
9 | 10 |

11 | InterleavedImageFormat

When talking about interleaved and PlanarImageFormat the main difference is how they are store in memory. 12 | 13 | 14 | 15 | 16 |

Interleaved images have all color components needed to represent a pixel placed at the same place in memory.

17 | 18 | 19 |

Supported interleaved formats in AviSynth 2.5/2.6: RGB24, RGB32, YUY2.

20 |

21 | Related links: 22 |

23 | 36 |
37 |

38 | Back to FilterSDK 39 |

40 | 41 |
42 |

$Date: 2015/01/13 00:24:50 $ 43 |

44 | 45 | -------------------------------------------------------------------------------- /filtersdk/InternalFunctions.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | InternalFunctions - AviSynth 5 | 6 | 7 |
8 | 9 |

10 | InternalFunctions 11 |

12 | 13 | 14 |

Read about VideoInfo

15 | 16 |

Read about using internal filters, using env->Invoke in EnvInvoke.

17 | 18 |

Use EnvSaveString to avoid strings leaking. 19 | 20 |


Back to FilterSDK

$Date: 2014/10/27 22:04:54 $
21 |

22 | -------------------------------------------------------------------------------- /filtersdk/MMX.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MMX - AviSynth 5 | 6 | 7 |
8 | 9 |

10 | MMX 11 |

12 | 13 | 14 |

MMX is short for MultiMedia Extensions and was developed by Intel for Pentium MMX.

15 | 16 | 17 |

It contains a set of instructions that allows the programmers to operate on 8 bytes (64 bits) in 8 registers. 18 | AviSynth uses this technology to speed up many of the internal filters.

19 | 20 | 21 |

Furthermore see IntegerSSE.


Back to AssemblerOptimizing 22 | 23 |
24 |

$Date: 2014/10/27 22:04:54 $
25 |

26 | -------------------------------------------------------------------------------- /filtersdk/Pictures/Compiling_plugins_msvc2010_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Compiling_plugins_msvc2010_001.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Compiling_plugins_msvc2010_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Compiling_plugins_msvc2010_002.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Compiling_plugins_msvc2010_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Compiling_plugins_msvc2010_003.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Compiling_plugins_msvc2010_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Compiling_plugins_msvc2010_004.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Compiling_plugins_msvc2010_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Compiling_plugins_msvc2010_005.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Compiling_plugins_msvc2010_006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Compiling_plugins_msvc2010_006.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Compiling_plugins_msvc2010_007.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Compiling_plugins_msvc2010_007.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Compiling_plugins_msvc2010_008.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Compiling_plugins_msvc2010_008.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Compiling_plugins_msvc2010_009.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Compiling_plugins_msvc2010_009.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Debugging_con_applications_msvc2010_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Debugging_con_applications_msvc2010_001.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Debugging_con_applications_msvc2010_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Debugging_con_applications_msvc2010_002.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Debugging_exported_functions_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Debugging_exported_functions_001.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Debugging_plugins_msvc2010_001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Debugging_plugins_msvc2010_001.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Debugging_plugins_msvc2010_002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Debugging_plugins_msvc2010_002.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Debugging_plugins_msvc2010_003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Debugging_plugins_msvc2010_003.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Debugging_plugins_msvc2010_004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Debugging_plugins_msvc2010_004.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/Debugging_plugins_msvc2010_005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/Debugging_plugins_msvc2010_005.jpg -------------------------------------------------------------------------------- /filtersdk/Pictures/compiling_plugins.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/compiling_plugins.png -------------------------------------------------------------------------------- /filtersdk/Pictures/compiling_plugins2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/compiling_plugins2.png -------------------------------------------------------------------------------- /filtersdk/Pictures/compiling_plugins3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/compiling_plugins3.png -------------------------------------------------------------------------------- /filtersdk/Pictures/compiling_plugins4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/compiling_plugins4.png -------------------------------------------------------------------------------- /filtersdk/Pictures/compiling_plugins5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/compiling_plugins5.png -------------------------------------------------------------------------------- /filtersdk/Pictures/debugging_plugins1a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/debugging_plugins1a.png -------------------------------------------------------------------------------- /filtersdk/Pictures/debugging_plugins1b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/debugging_plugins1b.png -------------------------------------------------------------------------------- /filtersdk/Pictures/debugging_plugins2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/debugging_plugins2.png -------------------------------------------------------------------------------- /filtersdk/Pictures/debugging_plugins3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/debugging_plugins3.png -------------------------------------------------------------------------------- /filtersdk/Pictures/debugging_plugins4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/debugging_plugins4.png -------------------------------------------------------------------------------- /filtersdk/Pictures/debugging_plugins5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/debugging_plugins5.png -------------------------------------------------------------------------------- /filtersdk/Pictures/debugging_plugins6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/debugging_plugins6.png -------------------------------------------------------------------------------- /filtersdk/Pictures/debugging_plugins7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/Pictures/debugging_plugins7.png -------------------------------------------------------------------------------- /filtersdk/PlanarImageFormat.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PlanarImageFormat - AviSynth 5 | 6 | 7 | 8 |
9 | 10 |

11 | PlanarImageFormat 12 |
13 |

When talking about planar and an InterleavedImageFormat 14 | the main difference is how they are store in memory. 15 | 16 | 17 | 18 | 19 |

Planar images are stored with each color component separate.

20 | 21 | 22 |

Some examples of planar formats are I420, YV12.

23 | 24 | 25 |

For more information these URL's:

26 | 27 | 28 |

http://www.fourcc.org/fccyuv.htm#Planar%20YUV%20Formats

29 | 30 |

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/YUVFormats.asp

31 | 32 |

http://search.microsoft.com/gomsuri.asp?n=1&c=rp_Results&siteid=us/dev&target=http://msdn.microsoft.com/library/en-us/graphics/hh/graphics/dxvapxlfmt_7xgn.asp 33 | 34 |


Back to FilterSDK 35 | 36 | 37 |
38 |

$Date: 2014/10/27 22:04:54 $
39 |

40 | -------------------------------------------------------------------------------- /filtersdk/SDKHistory.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | SDK History 4 | 5 | 6 | 7 |

SDK History

8 |

"Writing Avisynth plugins" article was written by Ben 9 | Rudiak-Gould (Avisynth creator).
10 | It is taken from AviSynth 1.0 documentation as was (2000) at
11 | http://math.berkeley.edu/~benrg/avisynth-extensions.html.
12 | The current (November 2006) mirror is at :
13 | http://www.neuron2.net/www.math.berkeley.edu/benrg/avisynth-extensions.html
14 |

15 |

Preliminary version of AviSynth 2.0-2.5 FilterSDK 16 | documentation has been created at 2003 17 | as a section of AviSynth online (wiki) documentation at the official 18 | AviSynth site www.avisynth.org (maintained by Richard Berg).
19 | Developers:
20 | Klaus Post 'sh0dan' (AviSynthTwoFiveAudio, AviSynthTwoFivePixelType, 21 | AviSynthTwoFiveSDK, ChangeFrameSize, ColorSpaces, DataAlignment, 22 | DataStorageInAviSynth, EnvInvoke, EnvSaveString, SimpleMmxOptimization, 23 | TwoFiveInvert, TwoFiveFastInvert and some other wiki pages)
24 | Wilbert Dijkhof 'Wilbert' ("CompilingAvisynth" and some other wiki 25 | pages).
26 | Contributors:
27 | Simon Walters 'SiWalters' (SimpleSample 1.0 to 1.7 wiki pages)
28 | 'trevlac' ("SimpleSampleClass" wiki page)
29 | Avery Lee 'phaeron' (some texts in "AssemblerOptimizing" wiki pages, 30 | "as freely available for any use")
31 | Thanks to other Avisynth community people for wiki pages 32 | improving/correction! 33 |

34 |

The package of off-line AviSynth external FilterSDK 35 | documentation version 2.5.7 was created at 2006 at sourceforge.net CVS 36 | for distribution with AviSynth v2.5.7 installation.

37 | Most documents were converted from wiki pages (some modifyed/updated). 38 | Some new documents are added too.
39 | Developers:
40 | Alexander Balakhnin 'Fizick' (SDKNecessaries, SDKLicense, SDKHistory, 41 | wiki pages converting/editing)
42 | Ian Brabham 'IanB' (he promised to write something under GPL :)
43 | Wilbert Dijkhof 'Wilbert' (at least he promised to edit 44 | "CompilingPlugins" sometimes :)
45 | ... 46 |

Back to FilterSDK 47 |

$Date: 2014/10/27 22:04:54 $

48 | -------------------------------------------------------------------------------- /filtersdk/WorkingWithImages.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WorkingWithImages - AviSynth 5 | 6 | 7 |
8 | 9 |

10 | WorkingWithImages 11 |

12 | 13 | 14 |

All images are given a pitch. The pitch is basically what can be described as "length of a line". 15 | What's funny is that the pitch does not have to be equal to the width of the image.

16 | 17 | 18 |

For instance, if you crop something off your image, 19 | the only thing that changes is the width of your image; 20 | the pitch and the actual byte-count of a line remains the same.

21 | 22 | 23 |

The image is then laid out like this:

24 | 25 | 26 |

rrrrrrrrrrrrrrrrpppp

27 | 28 |

rrrrrrrrrrrrrrrrpppp

29 | 30 |

rrrrrrrrrrrrrrrrpppp

31 | 32 | 33 |

Where 'r' are the pixels inside the image used, and 'p' is the padding inserted after each line.

34 | 35 | 36 |

Fast Information

Width = width in pixels.

37 | 38 |

Rowsize = number of bytes in one line.

39 | 40 |

Pitch = distance from start of one line to the next in bytes.

41 | 42 | 43 |

vi->BytesFromPixels(n) = size of n pixels in bytes - 44 | does NOT take pitch into consideration, so can only be used within a line.

45 | 46 | 47 |

For the PlanarImageFormat:

48 | 49 |

Aligned rowsize = width in bytes, always divisible with 8.

50 | 51 | 52 |

VideoInfo vs. PVideoFrame

VideoInfo is considered the "constant" video info. 53 | This cannot change in any way. The information such as width, height and colorspace cannot change. 54 | So the information you get from this can be trusted to be the same from all frames you recieve. 55 | If you change the VideoInfo you have received it will not change the frames you receive, 56 | but a modified 'VideoInfo vi' can be sent to env->NewVideoFrame(vi) 57 | and a new frame with the changed parameters will be created. 58 | Only your own filter can modify the VideoInfo given to your filter. 59 | 60 |

PVideoFrame contains information about a particular frame you requested. 61 | Height and Rowsize should not change (this can be considered a bug). 62 | Pitch can change, so you cannot rely on pitch being the same for all frames you recieve.

63 | 64 | 65 |

More Information

See more about DataStorageInAviSynth.

66 | 67 |

See more about ColorSpaces. 68 | 69 |


Back to FilterSDK 70 | 71 | 72 |
73 |

$Date: 2014/10/27 22:04:54 $
74 |

75 | -------------------------------------------------------------------------------- /filtersdk/filtersdk.css: -------------------------------------------------------------------------------- 1 | body { font-family: verdana, arial, helvetica, sans-serif; color: #000000; 2 | font-size: 12px; background-color: #C8D4D8; text-align: Left; 3 | line-height: 150%; 4 | padding: 0px; 5 | margin: 6px;} 6 | 7 | h1 { font-family: verdana, arial, helvetica, sans-serif; font-size: 26px; 8 | line-height: 150%; color: #000000; 9 | padding: 0px 0px 0px 8px 10 | margin-left: 0px; margin-right: 0px; margin-top: 12px; margin-bottom: 12px;} 11 | 12 | h2 { font-family: verdana, arial, helvetica, sans-serif; font-size: 22px; 13 | line-height: 150%; color: #000000; 14 | background-color: #90A0C0; 15 | padding: 0px 0px 0px 8px; 16 | margin-left: 0px; margin-right: 0px; margin-top: 12px; margin-bottom: 12px; 17 | border: #8080D0; border-style: solid; 18 | border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px} 19 | 20 | h3 { font-family: verdana, arial, helvetica, sans-serif; font-size: 18px; 21 | line-height: 150%; color: #000000; 22 | padding: 0px 0px 0px 8px; 23 | margin-left: 0px; margin-right: 0px; margin-top: 12px; margin-bottom: 12px; 24 | border: #8080D0; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px} 25 | 26 | h4 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; 27 | font-style: normal; font-weight: bold; text-decoration: underline} 28 | 29 | a { color: #005090; text-decoration: none; font-family: verdana, arial, helvetica, sans-serif } 30 | a:link { color: #005090} 31 | a:visited { color: #005090} 32 | a:hover { background-color: #FF6060; color: #005090} 33 | 34 | table { font-size: 12px; margin-left: 0px; margin-top: 12px; margin-bottom: 12px; 35 | line-height: 150% } 36 | 37 | pre { font-size: 12px; font-family: Courier, mono; 38 | margin-top: 10px; margin-bottom: 10px; 39 | background-color: #D0D0C0; 40 | padding-left: 12px; padding-top: 12px; padding-right: 12px; padding-bottom: 12px; 41 | border: #908030; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px} 42 | 43 | code { font-family: Courier, mono; font-size: 12px; letter-spacing: 1px; color: #660033} 44 | var { font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; font-size: 12px; 45 | font-style: italic; letter-spacing: 1px; color: #660033} 46 | tt { font-family: Courier, mono; font-size: 12px} 47 | em { font-family: Courier, mono; font-weight: normal; color: #FFFFFF; font-style: normal} 48 | strong { font-family: Courier, mono; font-weight: bold; color: #FFFF66; font-style: normal} 49 | cite { border: 1px #3030A0 dotted; padding-left: 2px; padding-right: 2px; padding-top: 1px; padding-bottom: 1px} 50 | kbd { color: #808000; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; font-size: 10px; font-style: normal} -------------------------------------------------------------------------------- /filtersdk/sig.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/filtersdk/sig.gif -------------------------------------------------------------------------------- /src/audio/avs-soundtouch.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | // AviSynth -> SoundTouch interface (c) 2004, Klaus Post. 36 | 37 | 38 | #ifndef _SUPEREQ_H_ 39 | #define _SUPEREQ_H_ 40 | 41 | #include "../internal.h" 42 | #include "../../distrib/include/pfc/pfc.h" 43 | #include 44 | #include "../../distrib/include/SoundTouch/SoundTouch.h" 45 | 46 | 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/audio/paramlist.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | class paramlistelm { 6 | public: 7 | class paramlistelm *next; 8 | 9 | char left,right; 10 | float lower,upper,gain,gain2; 11 | int sortindex; 12 | 13 | paramlistelm(void) { 14 | left = right = 1; 15 | lower = upper = gain = 0; 16 | next = NULL; 17 | }; 18 | 19 | ~paramlistelm() { 20 | delete next; 21 | next = NULL; 22 | }; 23 | 24 | char *getString(void) { 25 | static char str[64]; 26 | sprintf(str,"%gHz to %gHz, %gdB %c%c", 27 | (double)lower,(double)upper,(double)gain,left?'L':' ',right?'R':' '); 28 | return str; 29 | } 30 | }; 31 | 32 | class paramlist { 33 | public: 34 | class paramlistelm *elm; 35 | 36 | paramlist(void) { 37 | elm = NULL; 38 | } 39 | 40 | ~paramlist() { 41 | delete elm; 42 | elm = NULL; 43 | } 44 | 45 | void copy(paramlist &src) 46 | { 47 | delete elm; 48 | elm = NULL; 49 | 50 | paramlistelm **p,*q; 51 | for(p=&elm,q=src.elm;q != NULL;q = q->next,p = &(*p)->next) 52 | { 53 | *p = new paramlistelm; 54 | (*p)->left = q->left; 55 | (*p)->right = q->right; 56 | (*p)->lower = q->lower; 57 | (*p)->upper = q->upper; 58 | (*p)->gain = q->gain; 59 | } 60 | } 61 | 62 | paramlistelm *newelm(void) 63 | { 64 | paramlistelm **e; 65 | for(e = &elm;*e != NULL;e = &(*e)->next) ; 66 | *e = new paramlistelm; 67 | 68 | return *e; 69 | } 70 | 71 | int getnelm(void) 72 | { 73 | int i; 74 | paramlistelm *e; 75 | 76 | for(e = elm,i = 0;e != NULL;e = e->next,i++) ; 77 | 78 | return i; 79 | } 80 | 81 | void delelm(paramlistelm *p) 82 | { 83 | paramlistelm **e; 84 | for(e = &elm;*e != NULL && p != *e;e = &(*e)->next) ; 85 | if (*e == NULL) return; 86 | *e = (*e)->next; 87 | p->next = NULL; 88 | delete p; 89 | } 90 | 91 | void sortelm(void) 92 | { 93 | int i=0; 94 | 95 | if (elm == NULL) return; 96 | 97 | for(paramlistelm *r = elm;r != NULL;r = r->next) r->sortindex = i++; 98 | 99 | paramlistelm **p,**q; 100 | 101 | for(p=&elm->next;*p != NULL;) 102 | { 103 | for(q=&elm;*q != *p;q = &(*q)->next) 104 | if ((*p)->lower < (*q)->lower || 105 | ((*p)->lower == (*q)->lower && (*p)->sortindex < (*q)->sortindex)) break; 106 | 107 | if (p == q) {p = &(*p)->next; continue;} 108 | 109 | paramlistelm **pn = p; 110 | paramlistelm *pp = *p; 111 | *p = (*p)->next; 112 | pp->next = *q; 113 | *q = pp; 114 | 115 | p = pn; 116 | } 117 | } 118 | }; 119 | -------------------------------------------------------------------------------- /src/audio/ssrc-convert.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | #ifndef __SSRC_Audio_H__ 36 | #define __SSRC_Audio_H__ 37 | 38 | typedef float REAL; 39 | 40 | #include "../internal.h" 41 | #include "convertaudio.h" 42 | #include "ssrc.h" 43 | 44 | 45 | 46 | class SSRC : public GenericVideoFilter 47 | /** 48 | * Class to resample the audio stream 49 | **/ 50 | { 51 | public: 52 | SSRC(PClip _child, int _target_rate, bool _fast, IScriptEnvironment* env); 53 | ~SSRC() { 54 | if (srcbuffer) delete[] srcbuffer; 55 | } 56 | void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env); 57 | static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env); 58 | 59 | private: 60 | const int target_rate; 61 | int source_rate; 62 | int srcbuffer_size; 63 | bool skip_conversion; 64 | double factor; 65 | int input_samples; 66 | bool fast; 67 | 68 | SFLOAT* srcbuffer; 69 | __int64 next_sample; 70 | __int64 inputReadOffset; 71 | 72 | Resampler_base * res; 73 | 74 | }; 75 | 76 | 77 | #endif // __SSRC_Audio_H__ 78 | 79 | -------------------------------------------------------------------------------- /src/audio/ssrc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/audio/ssrc.cpp -------------------------------------------------------------------------------- /src/audio/ssrc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/audio/ssrc.h -------------------------------------------------------------------------------- /src/audio/supereq.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/audio/supereq.cpp -------------------------------------------------------------------------------- /src/audio/supereq.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/audio/supereq.h -------------------------------------------------------------------------------- /src/avisynth.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "DirectShowSource"=.\plugins\DirectShowSource\DirectShowSource.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "SoftWire"=..\distrib\include\SoftWire\SoftWire.dsp - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Project: "SoundTouch"=..\distrib\include\SoundTouch\SoundTouch.dsp - Package Owner=<4> 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<4> 37 | {{{ 38 | }}} 39 | 40 | ############################################################################### 41 | 42 | Project: "TCPDeliver"=.\plugins\TCPDeliver\TCPDeliver.dsp - Package Owner=<4> 43 | 44 | Package=<5> 45 | {{{ 46 | }}} 47 | 48 | Package=<4> 49 | {{{ 50 | }}} 51 | 52 | ############################################################################### 53 | 54 | Project: "avisynth"=.\avisynth.dsp - Package Owner=<4> 55 | 56 | Package=<5> 57 | {{{ 58 | }}} 59 | 60 | Package=<4> 61 | {{{ 62 | Begin Project Dependency 63 | Project_Dep_Name SoftWire 64 | End Project Dependency 65 | Begin Project Dependency 66 | Project_Dep_Name pfc 67 | End Project Dependency 68 | Begin Project Dependency 69 | Project_Dep_Name SoundTouch 70 | End Project Dependency 71 | }}} 72 | 73 | ############################################################################### 74 | 75 | Project: "pfc"=..\distrib\include\pfc\pfc.dsp - Package Owner=<4> 76 | 77 | Package=<5> 78 | {{{ 79 | }}} 80 | 81 | Package=<4> 82 | {{{ 83 | }}} 84 | 85 | ############################################################################### 86 | 87 | Global: 88 | 89 | Package=<5> 90 | {{{ 91 | }}} 92 | 93 | Package=<3> 94 | {{{ 95 | }}} 96 | 97 | ############################################################################### 98 | 99 | -------------------------------------------------------------------------------- /src/convert/convert_matrix.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | // ConvertPlanar (c) 2005 by Klaus Post 36 | 37 | #ifndef __Convert_MATRIX_H__ 38 | #define __Convert_MATRIX_H__ 39 | 40 | #include "../internal.h" 41 | #include "../core/softwire_helpers.h" 42 | 43 | 44 | class MatrixGenerator3x3 : public CodeGenerator 45 | { 46 | public: 47 | MatrixGenerator3x3(); 48 | ~MatrixGenerator3x3(); 49 | protected: 50 | void GenerateAssembly(int width, int faction_bits, bool upper32_ones, 51 | const __int64 *pre_add, const __int64 *post_add, 52 | const int src_pixel_step, const int dest_pixel_step, 53 | const signed short* matrix, IScriptEnvironment* env); 54 | void GeneratePacker(int width, IScriptEnvironment* env); 55 | void GenerateUnPacker(int width, IScriptEnvironment* env); 56 | DynamicAssembledCode assembly; 57 | DynamicAssembledCode unpacker; 58 | DynamicAssembledCode packer; 59 | }; 60 | 61 | 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /src/convert/convert_rgb.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | #ifndef __Convert_RGB_H__ 36 | #define __Convert_RGB_H__ 37 | 38 | #include "../internal.h" 39 | 40 | 41 | class RGB24to32 : public GenericVideoFilter 42 | /** 43 | * RGB -> RGBA, setting alpha channel to 255 44 | */ 45 | { 46 | public: 47 | RGB24to32(PClip src); 48 | PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env); 49 | }; 50 | 51 | 52 | class RGB32to24 : public GenericVideoFilter 53 | /** 54 | * Class to strip alpha channel 55 | */ 56 | { 57 | public: 58 | RGB32to24(PClip src); 59 | PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env); 60 | }; 61 | 62 | 63 | #endif // __Convert_RGB_H__ 64 | -------------------------------------------------------------------------------- /src/convert/convert_rgbtoy8.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | // ConvertRGBtoY8 (c) 2011 by Ian Brabham 36 | 37 | #ifndef __Convert_RGBtoY8_H__ 38 | #define __Convert_RGBtoY8_H__ 39 | 40 | #include "../internal.h" 41 | #include "../core/softwire_helpers.h" 42 | 43 | 44 | class RGBtoY8Generator : public CodeGenerator 45 | { 46 | public: 47 | RGBtoY8Generator(); 48 | ~RGBtoY8Generator(); 49 | protected: 50 | void genRGB32toY8(int width, int height, int offset_y, signed short* matrix, IScriptEnvironment* env); 51 | void genRGB24toY8(int width, int height, int offset_y, signed short* matrix, IScriptEnvironment* env); 52 | 53 | DynamicAssembledCode assembly; 54 | }; 55 | 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/convert/convert_yuy2torgb.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | // 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | // Convert_YUY2toRGB (c) 2015 by Ian Brabham 36 | 37 | 38 | #ifndef __Convert_YUY2toRGB_H__ 39 | #define __Convert_YUY2toRGB_H__ 40 | 41 | #include "../core/softwire_helpers.h" 42 | 43 | 44 | class YUY2toRGBGenerator : public CodeGenerator 45 | { 46 | public: 47 | YUY2toRGBGenerator(); 48 | ~YUY2toRGBGenerator(); 49 | 50 | protected: 51 | void Generate(bool isRGB32, int theMatrix, IScriptEnvironment* env); 52 | 53 | DynamicAssembledCode assembly; 54 | 55 | private: 56 | void Get_Y(Assembler &x86, MMREG mm_A, int uyvy); 57 | void Get_UV(Assembler &x86, MMREG mm_A, int uyvy); 58 | void InnerLoop(Assembler &x86, int uyvy, int rgb32, int no_next_pixel, bool Y_16); 59 | void YUV2RGB_PROC(Assembler &x86, int uyvy, int rgb32, int theMatrix); 60 | }; 61 | 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /src/core/Error.h: -------------------------------------------------------------------------------- 1 | // Avisynth v1.0 beta. Copyright 2000 Ben Rudiak-Gould. 2 | // http://www.math.berkeley.edu/~benrg/avisynth.html 3 | 4 | #ifndef f_ERROR_H 5 | #define f_ERROR_H 6 | 7 | #include "../internal.h" 8 | 9 | static inline AvisynthError MyMemoryError() { 10 | return AvisynthError("Out of memory"); 11 | } 12 | 13 | // the code for these is in AVIReadHandler.cpp 14 | 15 | AvisynthError MyError(const char* fmt, ...); 16 | AvisynthError MyWin32Error(const char *format, DWORD err, ...); 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/core/alignplanar.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2009 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | #ifndef __Align_Planar_H__ 36 | #define __Align_Planar_H__ 37 | 38 | 39 | class AlignPlanar : public GenericVideoFilter 40 | { 41 | public: 42 | AlignPlanar(PClip _clip); 43 | static PClip Create(PClip clip); 44 | PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env); 45 | }; 46 | 47 | 48 | #endif //__Align_Planar_H__ 49 | -------------------------------------------------------------------------------- /src/core/avisynth.def: -------------------------------------------------------------------------------- 1 | LIBRARY 2 | EXPORTS 3 | DllGetClassObject PRIVATE 4 | DllCanUnloadNow PRIVATE 5 | CreateScriptEnvironment 6 | avs_add_function 7 | avs_at_exit 8 | avs_bit_blt 9 | avs_check_version 10 | avs_clip_get_error 11 | avs_copy_clip 12 | avs_copy_value 13 | avs_copy_video_frame 14 | avs_create_script_environment 15 | avs_function_exists 16 | avs_get_audio 17 | avs_get_cpu_flags 18 | avs_get_frame 19 | avs_get_parity 20 | avs_get_var 21 | avs_get_version 22 | avs_get_video_info 23 | avs_invoke 24 | avs_make_writable 25 | avs_new_c_filter 26 | avs_new_video_frame_a 27 | avs_release_clip 28 | avs_release_value 29 | avs_release_video_frame 30 | avs_save_string 31 | avs_set_cache_hints 32 | avs_set_global_var 33 | avs_set_memory_max 34 | avs_set_to_clip 35 | avs_set_var 36 | avs_set_working_dir 37 | avs_subframe 38 | avs_take_clip 39 | avs_vsprintf 40 | avs_sprintf 41 | avs_delete_script_environment 42 | avs_subframe_planar 43 | avs_get_error 44 | avs_is_yv24 45 | avs_is_yv16 46 | avs_is_yv12 47 | avs_is_yv411 48 | avs_is_y8 49 | avs_is_color_space 50 | avs_get_plane_width_subsampling 51 | avs_get_plane_height_subsampling 52 | avs_bits_per_pixel 53 | avs_bytes_from_pixels 54 | avs_row_size 55 | avs_bmp_size 56 | avs_get_pitch_p 57 | avs_get_row_size_p 58 | avs_get_height_p 59 | avs_get_read_ptr_p 60 | avs_is_writable 61 | avs_get_write_ptr_p 62 | -------------------------------------------------------------------------------- /src/core/avisynth.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/core/avisynth.rc -------------------------------------------------------------------------------- /src/core/clip_info.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | #ifndef __CLIP_INFO_H__ 36 | #define __CLIP_INFO_H__ 37 | 38 | 39 | extern "C" const GUID CLSID_CAVIFileSynth; // {E6D6B700-124D-11D4-86F3-DB80AFD98778} 40 | 41 | extern "C" const GUID IID_IAvisynthClipInfo; // {E6D6B708-124D-11D4-86F3-DB80AFD98778} 42 | 43 | struct IAvisynthClipInfo : IUnknown { 44 | virtual int __stdcall GetError(const char** ppszMessage) = 0; 45 | virtual bool __stdcall GetParity(int n) = 0; 46 | virtual bool __stdcall IsFieldBased() = 0; 47 | }; 48 | 49 | 50 | #endif -------------------------------------------------------------------------------- /src/core/memcpy_amd.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | 3 | Copyright (c) 2001 Advanced Micro Devices, Inc. 4 | 5 | LIMITATION OF LIABILITY: THE MATERIALS ARE PROVIDED *AS IS* WITHOUT ANY 6 | EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING WARRANTIES OF MERCHANTABILITY, 7 | NONINFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY, OR FITNESS FOR ANY 8 | PARTICULAR PURPOSE. IN NO EVENT SHALL AMD OR ITS SUPPLIERS BE LIABLE FOR ANY 9 | DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, 10 | BUSINESS INTERRUPTION, LOSS OF INFORMATION) ARISING OUT OF THE USE OF OR 11 | INABILITY TO USE THE MATERIALS, EVEN IF AMD HAS BEEN ADVISED OF THE POSSIBILITY 12 | OF SUCH DAMAGES. BECAUSE SOME JURISDICTIONS PROHIBIT THE EXCLUSION OR LIMITATION 13 | OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY 14 | NOT APPLY TO YOU. 15 | 16 | AMD does not assume any responsibility for any errors which may appear in the 17 | Materials nor any responsibility to support or update the Materials. AMD retains 18 | the right to make changes to its test specifications at any time, without notice. 19 | 20 | NO SUPPORT OBLIGATION: AMD is not obligated to furnish, support, or make any 21 | further information, software, technical information, know-how, or show-how 22 | available to you. 23 | 24 | So that all may benefit from your experience, please report any problems 25 | or suggestions about this software to 3dsdk.support@amd.com 26 | 27 | AMD Developer Technologies, M/S 585 28 | Advanced Micro Devices, Inc. 29 | 5900 E. Ben White Blvd. 30 | Austin, TX 78741 31 | 3dsdk.support@amd.com 32 | ******************************************************************************/ 33 | 34 | /***************************************************************************** 35 | MEMCPY_AMD.CPP 36 | ******************************************************************************/ 37 | 38 | // Very optimized memcpy() routine for all AMD Athlon and Duron family. 39 | // This code uses any of FOUR different basic copy methods, depending 40 | // on the transfer size. 41 | // NOTE: Since this code uses MOVNTQ (also known as "Non-Temporal MOV" or 42 | // "Streaming Store"), and also uses the software prefetchnta instructions, 43 | // be sure you're running on Athlon/Duron or other recent CPU before calling! 44 | 45 | void memcpy_amd(void *dest, const void *src, size_t n); 46 | -------------------------------------------------------------------------------- /src/core/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by avisynth.rc 4 | // 5 | #define IDI_ICON 103 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 104 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1000 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /src/core/softwire_helpers.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | #ifndef __Softwire_Helpers_H__ 36 | #define __Softwire_Helpers_H__ 37 | 38 | #include "../internal.h" 39 | #include "../../distrib/include/softwire/CodeGenerator.hpp" 40 | 41 | using namespace SoftWire; 42 | 43 | class DynamicAssembledCode { 44 | 45 | BYTE* ret; //automatic deletion with ownership transfer (I assume new has been used to memory allocation) 46 | void (__cdecl *entry)(void); 47 | 48 | public: 49 | DynamicAssembledCode() {ret = 0;}; 50 | DynamicAssembledCode(Assembler &x86, IScriptEnvironment* env, const char * err_msg = ""); 51 | 52 | // No Args 53 | void Call() const; 54 | 55 | // With Args, optionally returning an int 56 | int __cdecl Call(const void*, ...) const; 57 | 58 | void Free(); 59 | 60 | bool operator!() const { return !ret; } 61 | }; 62 | 63 | #endif //__Softwire_Helpers_H__ 64 | -------------------------------------------------------------------------------- /src/filters/conditional/conditional_reader.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/filters/conditional/conditional_reader.h -------------------------------------------------------------------------------- /src/filters/debug.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | 36 | 37 | 38 | 39 | #ifndef __Null_H__ 40 | #define __Null_H__ 41 | 42 | #include "../internal.h" 43 | 44 | 45 | class Null : public GenericVideoFilter 46 | /** 47 | * Class for debugging Avisynth internals. 48 | **/ 49 | { 50 | public: 51 | Null( PClip _child, const char * _copy, IScriptEnvironment* env ); 52 | virtual ~Null(void); 53 | 54 | PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env); 55 | static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env); 56 | 57 | private: 58 | const char* copy; 59 | }; 60 | 61 | 62 | class MemDebug 63 | { 64 | public: 65 | MemDebug(void); 66 | virtual ~MemDebug(void); 67 | 68 | void randomFill(BYTE* const buf, const int pitch, const int row_size, const int height); 69 | int randomCheck(BYTE* const buf, const int pitch, const int row_size, const int height); 70 | 71 | void reset(); 72 | 73 | private: 74 | char nextNum(); 75 | 76 | int randNum; 77 | int whichByte; 78 | const int mask; 79 | }; 80 | 81 | 82 | #endif // __Null_H__ -------------------------------------------------------------------------------- /src/filters/greyscale.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | #ifndef __Greyscale_H__ 36 | #define __Greyscale_H__ 37 | 38 | #include "../internal.h" 39 | 40 | 41 | 42 | class Greyscale : public GenericVideoFilter 43 | /** 44 | * Class to convert video to greyscale 45 | **/ 46 | { 47 | public: 48 | Greyscale(PClip _child, const char* matrix, IScriptEnvironment* env); 49 | PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env); 50 | 51 | static AVSValue __cdecl Create(AVSValue args, void*, IScriptEnvironment* env); 52 | 53 | private: 54 | int theMatrix; 55 | enum {Rec601 = 0, Rec709, Average }; 56 | 57 | }; 58 | 59 | 60 | 61 | 62 | #endif // __Greyscale_H__ 63 | -------------------------------------------------------------------------------- /src/filters/limiter.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | #ifndef __Limiter_H__ 36 | #define __Limiter_H__ 37 | 38 | #include "../internal.h" 39 | #include "../core/softwire_helpers.h" 40 | 41 | 42 | /******************************************************************** 43 | ********************************************************************/ 44 | 45 | 46 | using namespace SoftWire; 47 | 48 | class Limiter : public GenericVideoFilter, public CodeGenerator 49 | { 50 | public: 51 | Limiter(PClip _child, int _min_luma, int _max_luma, int _min_chroma, int _max_chroma, int _show, IScriptEnvironment* env); 52 | PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env); 53 | static AVSValue __cdecl Create(AVSValue args, void* user_data, IScriptEnvironment* env); 54 | DynamicAssembledCode create_emulator(int row_size, int height, IScriptEnvironment* env); 55 | ~Limiter(); 56 | private: 57 | bool luma_emulator; 58 | bool chroma_emulator; 59 | int max_luma; 60 | int min_luma; 61 | int max_chroma; 62 | int min_chroma; 63 | const enum SHOW {show_none, show_luma, show_luma_grey, show_chroma, show_chroma_grey} show; 64 | 65 | DynamicAssembledCode assemblerY; 66 | DynamicAssembledCode assemblerUV; 67 | 68 | //Variables needed by the emulator: 69 | BYTE* c_plane; 70 | int emu_cmin; 71 | int emu_cmax; 72 | int modulo; 73 | }; 74 | 75 | 76 | #endif // __Limiter_H__ 77 | 78 | -------------------------------------------------------------------------------- /src/filters/overlay/blend_asm.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | // Overlay (c) 2003, 2004 by Klaus Post 36 | 37 | #ifndef __blend_asm_h 38 | #define __blend_asm_h 39 | 40 | 41 | /******************* 42 | * Blends two planes. 43 | * A weight between the two planes are given. 44 | * Has rather ok pairing, 45 | * and has very little memory usage. 46 | * Processes four pixels per loop, so rowsize must be mod 4. 47 | * Thanks to ARDA for squeezing out a bit more performance. 48 | * 49 | * Weights must be multipled by 32767 50 | * Returns the blended plane in p1; 51 | * (c) 2002 by sh0dan. 52 | ********/ 53 | 54 | 55 | void mmx_weigh_planar(BYTE *p1, const BYTE *p2, int p1_pitch, int p2_pitch,int rowsize, int height, int weight, int invweight); 56 | 57 | void MMerge_MMX(unsigned char *dstp, const unsigned char *srcp, 58 | const unsigned char *maskp, const int dst_pitch, const int src_pitch, 59 | const int mask_pitch, const int row_size, const int height); 60 | 61 | void mmx_darken_planar(BYTE *p1, BYTE *p1U, BYTE *p1V, const BYTE *p2, const BYTE *p2U, const BYTE *p2V, int p1_pitch, int p2_pitch,int rowsize, int height); 62 | 63 | void mmx_lighten_planar(BYTE *p1, BYTE *p1U, BYTE *p1V, const BYTE *p2, const BYTE *p2U, const BYTE *p2V, int p1_pitch, int p2_pitch,int rowsize, int height); 64 | 65 | #endif // __blend_asm_h -------------------------------------------------------------------------------- /src/filters/turn.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/filters/turn.cpp -------------------------------------------------------------------------------- /src/filters/turn.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/filters/turn.h -------------------------------------------------------------------------------- /src/filters/turnfunc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/filters/turnfunc.cpp -------------------------------------------------------------------------------- /src/filters/turnfunc.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/filters/turnfunc.h -------------------------------------------------------------------------------- /src/initguid.cpp: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2007 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | 36 | #define INITGUID 37 | 38 | #define WIN32_LEAN_AND_MEAN 39 | 40 | #include 41 | 42 | #pragma warning( push ) 43 | #pragma warning (disable: 4201) // nonstandard extension used : nameless struct/union 44 | 45 | #include 46 | 47 | #pragma warning( pop ) 48 | 49 | // Just init the guid tables 50 | -------------------------------------------------------------------------------- /src/plugins/DirectShowSource/DirectShowSource.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "DirectShowSource"=.\DirectShowSource.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /src/plugins/DirectShowSource/directshow_source.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/plugins/DirectShowSource/directshow_source.rc -------------------------------------------------------------------------------- /src/plugins/DirectShowSource/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by directshow_source.rc 4 | // 5 | 6 | // Next default values for new objects 7 | // 8 | #ifdef APSTUDIO_INVOKED 9 | #ifndef APSTUDIO_READONLY_SYMBOLS 10 | #define _APS_NEXT_RESOURCE_VALUE 101 11 | #define _APS_NEXT_COMMAND_VALUE 40001 12 | #define _APS_NEXT_CONTROL_VALUE 1000 13 | #define _APS_NEXT_SYMED_VALUE 101 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/ClientGUI.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/plugins/TCPDeliver/ClientGUI.rc -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/ServerGUICode.h: -------------------------------------------------------------------------------- 1 | 2 | BOOL CALLBACK DialogProc( 3 | HWND hwndDlg, // handle to dialog box 4 | UINT uMsg, // message 5 | WPARAM wParam, // first message parameter 6 | LPARAM lParam // second message parameter 7 | ) 8 | { 9 | char buf[MAX_PATH]; 10 | switch (uMsg) 11 | { 12 | case WM_COMMAND: 13 | switch(wParam) { 14 | case IDCANCEL: 15 | ShowWindow(hwndDlg,SW_MINIMIZE); 16 | break; 17 | /* case IDC_CHECK_EnableRGB: 18 | break; 19 | case IDC_CHECK_R: 20 | break; 21 | case IDC_CHECK_G: 22 | break; 23 | case IDC_CHECK_B: 24 | break;*/ 25 | } 26 | break; 27 | 28 | case WM_INITDIALOG: 29 | wsprintf(buf,"%d",0); 30 | return true; 31 | } 32 | return false; 33 | } 34 | 35 | LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { 36 | switch (message) { 37 | case WM_COMMAND: 38 | break; 39 | case WM_DESTROY: 40 | PostQuitMessage(0); 41 | break; 42 | default: 43 | return DefWindowProc(hWnd, message, wParam, lParam); 44 | } 45 | return 0; 46 | } 47 | 48 | void startWindow() { 49 | MSG msg; 50 | WNDCLASSEX wcex; 51 | wcex.cbSize = sizeof(WNDCLASSEX); 52 | wcex.style = CS_HREDRAW | CS_VREDRAW; 53 | wcex.lpfnWndProc = (WNDPROC)WndProc; 54 | wcex.cbClsExtra = 0; 55 | wcex.cbWndExtra = 0; 56 | wcex.hInstance = hInstance; 57 | wcex.hIcon = LoadIcon(NULL, MAKEINTRESOURCE(IDI_APPLICATION)); 58 | wcex.hCursor = LoadCursor(NULL, IDC_ARROW); 59 | wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); 60 | wcex.lpszMenuName = NULL; 61 | wcex.lpszClassName = "TCPServer GUI"; 62 | wcex.hIconSm = LoadIcon(NULL, MAKEINTRESOURCE(IDI_APPLICATION)); 63 | RegisterClassEx(&wcex); 64 | hDlg=CreateDialog(hInstance,MAKEINTRESOURCE(IDD_SERVERGUI),NULL,DialogProc); 65 | 66 | while (GetMessage(&msg, NULL, 0, 0)) 67 | if (NULL == hDlg || !IsDialogMessage(hDlg, &msg)) { 68 | TranslateMessage(&msg); 69 | DispatchMessage(&msg); 70 | } 71 | } 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // mcThread.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | 7 | #if !defined(AFX_STDAFX_H__B5A5F047_8359_11D4_B22F_0060B0EE7607__INCLUDED_) 8 | #define AFX_STDAFX_H__B5A5F047_8359_11D4_B22F_0060B0EE7607__INCLUDED_ 9 | 10 | #if _MSC_VER > 1000 11 | #pragma once 12 | #endif // _MSC_VER > 1000 13 | 14 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 15 | 16 | #include // MFC core and standard components 17 | #include // MFC extensions 18 | #include // MFC Automation classes 19 | #include // MFC support for Internet Explorer 4 Common Controls 20 | #ifndef _AFX_NO_AFXCMN_SUPPORT 21 | #include // MFC support for Windows Common Controls 22 | #endif // _AFX_NO_AFXCMN_SUPPORT 23 | 24 | 25 | //{{AFX_INSERT_LOCATION}} 26 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 27 | 28 | #endif // !defined(AFX_STDAFX_H__B5A5F047_8359_11D4_B22F_0060B0EE7607__INCLUDED_) 29 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/TCPCommon.cpp: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | // TCPDeliver (c) 2004 by Klaus Post 36 | 37 | #include "TCPCommon.h" 38 | #include "avisynth.h" 39 | 40 | 41 | #define TCPD_DO1(buf,i) {s1 += buf[i]; s2 += s1;} 42 | #define TCPD_DO2(buf,i) TCPD_DO1(buf,i); TCPD_DO1(buf,i+1); 43 | #define TCPD_DO4(buf,i) TCPD_DO2(buf,i); TCPD_DO2(buf,i+2); 44 | #define TCPD_DO8(buf,i) TCPD_DO4(buf,i); TCPD_DO4(buf,i+4); 45 | #define TCPD_DO16(buf,i) TCPD_DO8(buf,i); TCPD_DO8(buf,i+8); 46 | 47 | unsigned int adler32(unsigned int adler, const char* buf, unsigned int len) 48 | { 49 | unsigned int s1 = adler & 0xffff; 50 | unsigned int s2 = (adler >> 16) & 0xffff; 51 | int k; 52 | 53 | if (buf == NULL) 54 | return 1; 55 | 56 | while (len > 0) 57 | { 58 | k = len < TCPD_NMAX ? (int) len : TCPD_NMAX; 59 | len -= k; 60 | if (k >= 16) do 61 | { 62 | TCPD_DO16(buf,0); 63 | buf += 16; 64 | k -= 16; 65 | } while (k >= 16); 66 | if (k != 0) do 67 | { 68 | s1 += *buf++; 69 | s2 += s1; 70 | } while (--k > 0); 71 | s1 %= TCPD_BASE; 72 | s2 %= TCPD_BASE; 73 | } 74 | return (s2 << 16) | s1; 75 | } 76 | 77 | /* 78 | BOOL APIENTRY DllMain(HANDLE hModule, ULONG ulReason, LPVOID lpReserved) { 79 | switch(ulReason) { 80 | case DLL_PROCESS_ATTACH: 81 | hInstance=(HINSTANCE)hModule; 82 | _RPT0(0,"Process attach\n"); 83 | break; 84 | 85 | case DLL_PROCESS_DETACH: 86 | _RPT0(0,"Process detach\n"); 87 | break; 88 | } 89 | return TRUE; 90 | } 91 | */ -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/TCPDeliver.cpp: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | // TCPDeliver (c) 2004 by Klaus Post 36 | 37 | #include "TCPClient.h" 38 | #include "TCPServer.h" 39 | 40 | const AVS_Linkage *AVS_linkage = 0; 41 | 42 | extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit3(IScriptEnvironment* env, const AVS_Linkage* const vectors) 43 | { 44 | AVS_linkage = vectors; 45 | env->AddFunction("TCPServer", "c[port]i", Create_TCPServer, 0); 46 | env->AddFunction("TCPSource", "s[port]i[compression]s", Create_TCPClient, 0); 47 | return "TCPDeliver for AviSynth"; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/TCPDeliver.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "TCPDeliver"=.\TCPDeliver.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/huffman.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * Name: huffman.h 3 | * Author: Marcus Geelnard 4 | * Description: Huffman coder/decoder interface. 5 | * Reentrant: Yes 6 | * $Id: huffman.h,v 1.1 2004/07/23 13:04:28 sh0dan Exp $ 7 | *------------------------------------------------------------------------- 8 | * Copyright (c) 2003-2004 Marcus Geelnard 9 | * 10 | * This software is provided 'as-is', without any express or implied 11 | * warranty. In no event will the authors be held liable for any damages 12 | * arising from the use of this software. 13 | * 14 | * Permission is granted to anyone to use this software for any purpose, 15 | * including commercial applications, and to alter it and redistribute it 16 | * freely, subject to the following restrictions: 17 | * 18 | * 1. The origin of this software must not be misrepresented; you must not 19 | * claim that you wrote the original software. If you use this software 20 | * in a product, an acknowledgment in the product documentation would 21 | * be appreciated but is not required. 22 | * 23 | * 2. Altered source versions must be plainly marked as such, and must not 24 | * be misrepresented as being the original software. 25 | * 26 | * 3. This notice may not be removed or altered from any source 27 | * distribution. 28 | * 29 | * Marcus Geelnard 30 | * marcus.geelnard at home.se 31 | *************************************************************************/ 32 | 33 | #ifndef _huffman_h_ 34 | #define _huffman_h_ 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | 41 | /************************************************************************* 42 | * Function prototypes 43 | *************************************************************************/ 44 | 45 | int Huffman_Compress( unsigned char *in, unsigned char *out, 46 | unsigned int insize ); 47 | void Huffman_Uncompress( unsigned char *in, unsigned char *out, 48 | unsigned int insize, unsigned int outsize ); 49 | 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif /* _huffman_h_ */ 56 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/lzo/Debug/LZO.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/plugins/TCPDeliver/lzo/Debug/LZO.lib -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/lzo/Release/LZO.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/plugins/TCPDeliver/lzo/Release/LZO.lib -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/lzo/include/lzo1.h: -------------------------------------------------------------------------------- 1 | /* lzo1.h -- public interface of the LZO1 compression algorithm 2 | 3 | This file is part of the LZO real-time data compression library. 4 | 5 | Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer 6 | Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer 7 | Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer 8 | Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer 9 | Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer 10 | Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer 11 | Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer 12 | All Rights Reserved. 13 | 14 | The LZO library is free software; you can redistribute it and/or 15 | modify it under the terms of the GNU General Public License as 16 | published by the Free Software Foundation; either version 2 of 17 | the License, or (at your option) any later version. 18 | 19 | The LZO library is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with the LZO library; see the file COPYING. 26 | If not, write to the Free Software Foundation, Inc., 27 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 28 | 29 | Markus F.X.J. Oberhumer 30 | 31 | http://www.oberhumer.com/opensource/lzo/ 32 | */ 33 | 34 | 35 | #ifndef __LZO1_H 36 | #define __LZO1_H 37 | 38 | #ifndef __LZOCONF_H 39 | #include 40 | #endif 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | 47 | /*********************************************************************** 48 | // 49 | ************************************************************************/ 50 | 51 | /* Memory required for the wrkmem parameter. 52 | * When the required size is 0, you can also pass a NULL pointer. 53 | */ 54 | 55 | #define LZO1_MEM_COMPRESS ((lzo_uint32) (8192L * lzo_sizeof_dict_t)) 56 | #define LZO1_MEM_DECOMPRESS (0) 57 | 58 | 59 | LZO_EXTERN(int) 60 | lzo1_compress ( const lzo_byte *src, lzo_uint src_len, 61 | lzo_byte *dst, lzo_uintp dst_len, 62 | lzo_voidp wrkmem ); 63 | 64 | LZO_EXTERN(int) 65 | lzo1_decompress ( const lzo_byte *src, lzo_uint src_len, 66 | lzo_byte *dst, lzo_uintp dst_len, 67 | lzo_voidp wrkmem /* NOT USED */ ); 68 | 69 | 70 | /*********************************************************************** 71 | // better compression ratio at the cost of more memory and time 72 | ************************************************************************/ 73 | 74 | #define LZO1_99_MEM_COMPRESS ((lzo_uint32) (65536L * lzo_sizeof_dict_t)) 75 | 76 | #if !defined(LZO_99_UNSUPPORTED) 77 | LZO_EXTERN(int) 78 | lzo1_99_compress ( const lzo_byte *src, lzo_uint src_len, 79 | lzo_byte *dst, lzo_uintp dst_len, 80 | lzo_voidp wrkmem ); 81 | #endif 82 | 83 | 84 | 85 | #ifdef __cplusplus 86 | } /* extern "C" */ 87 | #endif 88 | 89 | #endif /* already included */ 90 | 91 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/lzo/include/lzo16bit.h: -------------------------------------------------------------------------------- 1 | /* lzo16bit.h -- configuration for the strict 16-bit memory model 2 | 3 | This file is part of the LZO real-time data compression library. 4 | 5 | Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer 6 | Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer 7 | Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer 8 | Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer 9 | Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer 10 | Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer 11 | Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer 12 | All Rights Reserved. 13 | 14 | The LZO library is free software; you can redistribute it and/or 15 | modify it under the terms of the GNU General Public License as 16 | published by the Free Software Foundation; either version 2 of 17 | the License, or (at your option) any later version. 18 | 19 | The LZO library is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with the LZO library; see the file COPYING. 26 | If not, write to the Free Software Foundation, Inc., 27 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 28 | 29 | Markus F.X.J. Oberhumer 30 | 31 | http://www.oberhumer.com/opensource/lzo/ 32 | */ 33 | 34 | 35 | /* 36 | * NOTE: 37 | * the strict 16-bit memory model is *not* officially supported. 38 | * This file is only included for the sake of completeness. 39 | */ 40 | 41 | 42 | #ifndef __LZOCONF_H 43 | # include 44 | #endif 45 | 46 | #ifndef __LZO16BIT_H 47 | #define __LZO16BIT_H 48 | 49 | #if defined(__LZO_STRICT_16BIT) 50 | #if (UINT_MAX < LZO_0xffffffffL) 51 | 52 | #ifdef __cplusplus 53 | extern "C" { 54 | #endif 55 | 56 | 57 | /*********************************************************************** 58 | // 59 | ************************************************************************/ 60 | 61 | #ifndef LZO_99_UNSUPPORTED 62 | #define LZO_99_UNSUPPORTED 63 | #endif 64 | #ifndef LZO_999_UNSUPPORTED 65 | #define LZO_999_UNSUPPORTED 66 | #endif 67 | 68 | typedef unsigned int lzo_uint; 69 | typedef int lzo_int; 70 | #define LZO_UINT_MAX UINT_MAX 71 | #define LZO_INT_MAX INT_MAX 72 | 73 | #define lzo_sizeof_dict_t sizeof(lzo_uint) 74 | 75 | 76 | /*********************************************************************** 77 | // 78 | ************************************************************************/ 79 | 80 | #if defined(__LZO_DOS16) || defined(__LZO_WIN16) 81 | 82 | #if 0 83 | #define __LZO_MMODEL __far 84 | #else 85 | #define __LZO_MMODEL 86 | #endif 87 | 88 | #endif /* defined(__LZO_DOS16) || defined(__LZO_WIN16) */ 89 | 90 | 91 | #ifdef __cplusplus 92 | } /* extern "C" */ 93 | #endif 94 | 95 | #endif /* (UINT_MAX < LZO_0xffffffffL) */ 96 | #endif /* defined(__LZO_STRICT_16BIT) */ 97 | 98 | #endif /* already included */ 99 | 100 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/lzo/include/lzo1a.h: -------------------------------------------------------------------------------- 1 | /* lzo1a.h -- public interface of the LZO1A compression algorithm 2 | 3 | This file is part of the LZO real-time data compression library. 4 | 5 | Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer 6 | Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer 7 | Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer 8 | Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer 9 | Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer 10 | Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer 11 | Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer 12 | All Rights Reserved. 13 | 14 | The LZO library is free software; you can redistribute it and/or 15 | modify it under the terms of the GNU General Public License as 16 | published by the Free Software Foundation; either version 2 of 17 | the License, or (at your option) any later version. 18 | 19 | The LZO library is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with the LZO library; see the file COPYING. 26 | If not, write to the Free Software Foundation, Inc., 27 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 28 | 29 | Markus F.X.J. Oberhumer 30 | 31 | http://www.oberhumer.com/opensource/lzo/ 32 | */ 33 | 34 | 35 | #ifndef __LZO1A_H 36 | #define __LZO1A_H 37 | 38 | #ifndef __LZOCONF_H 39 | #include 40 | #endif 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | 47 | /*********************************************************************** 48 | // 49 | ************************************************************************/ 50 | 51 | /* Memory required for the wrkmem parameter. 52 | * When the required size is 0, you can also pass a NULL pointer. 53 | */ 54 | 55 | #define LZO1A_MEM_COMPRESS ((lzo_uint32) (8192L * lzo_sizeof_dict_t)) 56 | #define LZO1A_MEM_DECOMPRESS (0) 57 | 58 | 59 | LZO_EXTERN(int) 60 | lzo1a_compress ( const lzo_byte *src, lzo_uint src_len, 61 | lzo_byte *dst, lzo_uintp dst_len, 62 | lzo_voidp wrkmem ); 63 | 64 | LZO_EXTERN(int) 65 | lzo1a_decompress ( const lzo_byte *src, lzo_uint src_len, 66 | lzo_byte *dst, lzo_uintp dst_len, 67 | lzo_voidp wrkmem /* NOT USED */ ); 68 | 69 | 70 | /*********************************************************************** 71 | // better compression ratio at the cost of more memory and time 72 | ************************************************************************/ 73 | 74 | #define LZO1A_99_MEM_COMPRESS ((lzo_uint32) (65536L * lzo_sizeof_dict_t)) 75 | 76 | #if !defined(LZO_99_UNSUPPORTED) 77 | LZO_EXTERN(int) 78 | lzo1a_99_compress ( const lzo_byte *src, lzo_uint src_len, 79 | lzo_byte *dst, lzo_uintp dst_len, 80 | lzo_voidp wrkmem ); 81 | #endif 82 | 83 | 84 | 85 | #ifdef __cplusplus 86 | } /* extern "C" */ 87 | #endif 88 | 89 | #endif /* already included */ 90 | 91 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/lzo/include/lzo2a.h: -------------------------------------------------------------------------------- 1 | /* lzo2a.h -- public interface of the LZO2A compression algorithm 2 | 3 | This file is part of the LZO real-time data compression library. 4 | 5 | Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer 6 | Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer 7 | Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer 8 | Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer 9 | Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer 10 | Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer 11 | Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer 12 | All Rights Reserved. 13 | 14 | The LZO library is free software; you can redistribute it and/or 15 | modify it under the terms of the GNU General Public License as 16 | published by the Free Software Foundation; either version 2 of 17 | the License, or (at your option) any later version. 18 | 19 | The LZO library is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with the LZO library; see the file COPYING. 26 | If not, write to the Free Software Foundation, Inc., 27 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 28 | 29 | Markus F.X.J. Oberhumer 30 | 31 | http://www.oberhumer.com/opensource/lzo/ 32 | */ 33 | 34 | 35 | #ifndef __LZO2A_H 36 | #define __LZO2A_H 37 | 38 | #ifndef __LZOCONF_H 39 | #include 40 | #endif 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | 47 | /*********************************************************************** 48 | // 49 | ************************************************************************/ 50 | 51 | #define LZO2A_MEM_DECOMPRESS (0) 52 | 53 | /* decompression */ 54 | LZO_EXTERN(int) 55 | lzo2a_decompress ( const lzo_byte *src, lzo_uint src_len, 56 | lzo_byte *dst, lzo_uintp dst_len, 57 | lzo_voidp wrkmem /* NOT USED */ ); 58 | 59 | /* safe decompression with overrun testing */ 60 | LZO_EXTERN(int) 61 | lzo2a_decompress_safe ( const lzo_byte *src, lzo_uint src_len, 62 | lzo_byte *dst, lzo_uintp dst_len, 63 | lzo_voidp wrkmem /* NOT USED */ ); 64 | 65 | 66 | /*********************************************************************** 67 | // better compression ratio at the cost of more memory and time 68 | ************************************************************************/ 69 | 70 | #define LZO2A_999_MEM_COMPRESS ((lzo_uint32) (8 * 16384L * sizeof(short))) 71 | 72 | #if !defined(LZO_999_UNSUPPORTED) 73 | LZO_EXTERN(int) 74 | lzo2a_999_compress ( const lzo_byte *src, lzo_uint src_len, 75 | lzo_byte *dst, lzo_uintp dst_len, 76 | lzo_voidp wrkmem ); 77 | #endif 78 | 79 | 80 | 81 | #ifdef __cplusplus 82 | } /* extern "C" */ 83 | #endif 84 | 85 | #endif /* already included */ 86 | 87 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/lzo/include/lzoutil.h: -------------------------------------------------------------------------------- 1 | /* lzoutil.h -- utilitiy functions for use by applications 2 | 3 | This file is part of the LZO real-time data compression library. 4 | 5 | Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer 6 | Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer 7 | Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer 8 | Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer 9 | Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer 10 | Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer 11 | Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer 12 | All Rights Reserved. 13 | 14 | The LZO library is free software; you can redistribute it and/or 15 | modify it under the terms of the GNU General Public License as 16 | published by the Free Software Foundation; either version 2 of 17 | the License, or (at your option) any later version. 18 | 19 | The LZO library is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with the LZO library; see the file COPYING. 26 | If not, write to the Free Software Foundation, Inc., 27 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 28 | 29 | Markus F.X.J. Oberhumer 30 | 31 | http://www.oberhumer.com/opensource/lzo/ 32 | */ 33 | 34 | 35 | #ifndef __LZOUTIL_H 36 | #define __LZOUTIL_H 37 | 38 | #ifndef __LZOCONF_H 39 | #include 40 | #endif 41 | 42 | #ifdef __cplusplus 43 | extern "C" { 44 | #endif 45 | 46 | 47 | /*********************************************************************** 48 | // portable memory allocation 49 | // 50 | // The LZO library does not allocate any memory (you always pass a 51 | // pre-allocated pointer via the `wrkmem' parameter), but these 52 | // functions are handy for application programs. 53 | ************************************************************************/ 54 | 55 | LZO_EXTERN(lzo_voidp) lzo_alloc(lzo_uint _nelems, lzo_uint _size); 56 | LZO_EXTERN(lzo_voidp) lzo_malloc(lzo_uint _size); 57 | LZO_EXTERN(void) lzo_free(lzo_voidp _ptr); 58 | 59 | typedef lzo_voidp (__LZO_ENTRY *lzo_alloc_hook_t) (lzo_uint, lzo_uint); 60 | typedef void (__LZO_ENTRY *lzo_free_hook_t) (lzo_voidp); 61 | 62 | LZO_EXTERN_VAR(lzo_alloc_hook_t) lzo_alloc_hook; 63 | LZO_EXTERN_VAR(lzo_free_hook_t) lzo_free_hook; 64 | 65 | 66 | /*********************************************************************** 67 | // portable file io 68 | ************************************************************************/ 69 | 70 | #if !defined(LZO_FILEP) 71 | # define LZO_FILEP void * 72 | #endif 73 | 74 | LZO_EXTERN(lzo_uint) 75 | lzo_fread(LZO_FILEP f, lzo_voidp buf, lzo_uint size); 76 | LZO_EXTERN(lzo_uint) 77 | lzo_fwrite(LZO_FILEP f, const lzo_voidp buf, lzo_uint size); 78 | 79 | 80 | #if (LZO_UINT_MAX <= UINT_MAX) 81 | # define lzo_fread(f,b,s) (fread(b,1,s,f)) 82 | # define lzo_fwrite(f,b,s) (fwrite(b,1,s,f)) 83 | #endif 84 | 85 | 86 | #ifdef __cplusplus 87 | } /* extern "C" */ 88 | #endif 89 | 90 | #endif /* already included */ 91 | 92 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by ClientGUI.rc 4 | // 5 | #define IDD_SERVERGUI 101 6 | #define IDI_ICON 103 7 | #define IDD_CLIENTGUI 106 8 | #define IDC_IP 1000 9 | #define IDC_EDIT2 1001 10 | #define IDC_PORT_TEXT 1002 11 | #define IDC_RECONNECT_BUTTON 1003 12 | #define IDC_STATUS 1004 13 | #define IDC_FRAME_INFORMATION 1005 14 | #define IDC_TIMESTATS 1007 15 | #define IDC_SERVERSTATUS 1008 16 | #define IDC_STATUS_GROUP 1009 17 | 18 | // Next default values for new objects 19 | // 20 | #ifdef APSTUDIO_INVOKED 21 | #ifndef APSTUDIO_READONLY_SYMBOLS 22 | #define _APS_NEXT_RESOURCE_VALUE 102 23 | #define _APS_NEXT_COMMAND_VALUE 40001 24 | #define _APS_NEXT_CONTROL_VALUE 1010 25 | #define _APS_NEXT_SYMED_VALUE 101 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /src/plugins/TCPDeliver/zlib/lib/zlibstat.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/plugins/TCPDeliver/zlib/lib/zlibstat.lib -------------------------------------------------------------------------------- /src/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by avisynth.rc 4 | // 5 | #define IDI_ICON 103 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 104 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1000 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /src/sources/avi/AVIIndex.h: -------------------------------------------------------------------------------- 1 | // Packaged with Avisynth v1.0 beta. 2 | // http://www.math.berkeley.edu/~benrg/avisynth.html 3 | 4 | // VirtualDub - Video processing and capture application 5 | // Copyright (C) 1998-2000 Avery Lee 6 | // 7 | // This program is free software; you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation; either version 2 of the License, or 10 | // (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | 21 | #ifndef f_AVIINDEX_H 22 | #define f_AVIINDEX_H 23 | 24 | class AVIIndexChainNode; 25 | 26 | class AVIIndexEntry2 { 27 | public: 28 | __int64 pos; 29 | union { 30 | FOURCC ckid; 31 | int fileno; 32 | }; 33 | LONG size; 34 | }; 35 | 36 | class AVIIndexEntry3 { 37 | public: 38 | DWORD dwOffset; 39 | DWORD dwSizeKeyframe; 40 | }; 41 | 42 | class AVIIndexChain { 43 | protected: 44 | AVIIndexChainNode *head, *tail; 45 | 46 | void delete_chain(); 47 | public: 48 | int total_ents; 49 | 50 | AVIIndexChain(); 51 | virtual ~AVIIndexChain(); 52 | 53 | bool add(AVIINDEXENTRY *avie); 54 | bool add(AVIIndexEntry2 *avie2); 55 | bool add(FOURCC ckid, __int64 pos, long len, bool is_keyframe); 56 | void put(AVIINDEXENTRY *avietbl); 57 | void put(AVIIndexEntry2 *avie2tbl); 58 | void put(AVIIndexEntry3 *avie3tbl, __int64 offset); 59 | }; 60 | 61 | class AVIIndex : public AVIIndexChain { 62 | protected: 63 | AVIINDEXENTRY *index; 64 | AVIIndexEntry2 *index2; 65 | AVIIndexEntry3 *index3; 66 | int index_len; 67 | 68 | AVIINDEXENTRY *allocateIndex(int total_entries) { 69 | return index = new AVIINDEXENTRY[index_len = total_entries]; 70 | } 71 | 72 | AVIIndexEntry2 *allocateIndex2(int total_entries) { 73 | return index2 = new AVIIndexEntry2[index_len = total_entries]; 74 | } 75 | 76 | AVIIndexEntry3 *allocateIndex3(int total_entries) { 77 | return index3 = new AVIIndexEntry3[index_len = total_entries]; 78 | } 79 | 80 | public: 81 | AVIIndex(); 82 | virtual ~AVIIndex(); 83 | 84 | bool makeIndex(); 85 | bool makeIndex2(); 86 | bool makeIndex3(__int64 offset); 87 | void clear(); 88 | 89 | AVIINDEXENTRY *indexPtr() { 90 | return index; 91 | } 92 | 93 | AVIIndexEntry2 *index2Ptr() { 94 | return index2; 95 | } 96 | 97 | AVIIndexEntry3 *index3Ptr() { 98 | return index3; 99 | } 100 | 101 | AVIIndexEntry2 *takeIndex2() { 102 | AVIIndexEntry2 *idx = index2; 103 | 104 | index2 = NULL; 105 | return idx; 106 | } 107 | 108 | int size() { return total_ents; } 109 | 110 | int indexLen() { 111 | return index_len; 112 | } 113 | }; 114 | 115 | #endif -------------------------------------------------------------------------------- /src/sources/avi/AVIReadHandler.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/sources/avi/AVIReadHandler.cpp -------------------------------------------------------------------------------- /src/sources/avi/AVIReadHandler.h: -------------------------------------------------------------------------------- 1 | // VirtualDub - Video processing and capture application 2 | // Copyright (C) 1998-2001 Avery Lee 3 | // 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | 18 | #ifndef f_AVIREADHANDLER_H 19 | #define f_AVIREADHANDLER_H 20 | 21 | // These are meant as AVIFile replacements. They're not quite to AVIFile 22 | // specs, but they'll do for now. 23 | 24 | class IAVIReadStream { 25 | public: 26 | virtual ~IAVIReadStream(); 27 | 28 | virtual HRESULT BeginStreaming(long lStart, long lEnd, long lRate)=0; 29 | virtual HRESULT EndStreaming()=0; 30 | virtual HRESULT Info(AVISTREAMINFO *pasi, long lSize)=0; 31 | virtual bool IsKeyFrame(long lFrame)=0; 32 | virtual HRESULT Read(long lStart, long lSamples, void *lpBuffer, long cbBuffer, long *plBytes, long *plSamples)=0; 33 | virtual long Start()=0; 34 | virtual long End()=0; 35 | virtual long PrevKeyFrame(long lFrame)=0; 36 | virtual long NextKeyFrame(long lFrame)=0; 37 | virtual long NearestKeyFrame(long lFrame)=0; 38 | virtual HRESULT FormatSize(long lFrame, long *plSize)=0; 39 | virtual HRESULT ReadFormat(long lFrame, void *pFormat, long *plSize)=0; 40 | virtual bool isStreaming()=0; 41 | virtual bool isKeyframeOnly()=0; 42 | 43 | virtual bool getVBRInfo(double& bitrate_mean, double& bitrate_stddev, double& maxdev)=0; 44 | }; 45 | 46 | class IAVIReadHandler { 47 | public: 48 | virtual void AddRef()=0; 49 | virtual void Release()=0; 50 | virtual IAVIReadStream *GetStream(DWORD fccType, LONG lParam)=0; 51 | virtual void EnableFastIO(bool)=0; 52 | virtual bool isOptimizedForRealtime()=0; 53 | virtual bool isStreaming()=0; 54 | virtual bool isIndexFabricated()=0; 55 | virtual bool AppendFile(const char *pszFile)=0; 56 | virtual bool getSegmentHint(const char **ppszPath)=0; 57 | }; 58 | 59 | IAVIReadHandler *CreateAVIReadHandler(PAVIFILE paf); 60 | IAVIReadHandler *CreateAVIReadHandler(const char *pszFile); 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /src/sources/avi/AudioSource.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeeb/avisynth/07b92b2ee5a3f2c8ee3d6fe236eb808b866ca094/src/sources/avi/AudioSource.cpp -------------------------------------------------------------------------------- /src/sources/avi/AudioSource.h: -------------------------------------------------------------------------------- 1 | // VirtualDub - Video processing and capture application 2 | // Copyright (C) 1998-2001 Avery Lee 3 | // 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | 18 | #ifndef f_AUDIOSOURCE_H 19 | #define f_AUDIOSOURCE_H 20 | 21 | #include "DubSource.h" 22 | 23 | class IAVIReadHandler; 24 | class IAVIReadStream; 25 | 26 | class AudioSource : public DubSource { 27 | public: 28 | WAVEFORMATEX *getWaveFormat() { 29 | return (WAVEFORMATEX *)getFormat(); 30 | } 31 | }; 32 | 33 | class AudioSourceWAV : public AudioSource { 34 | private: 35 | HMMIO hmmioFile; 36 | MMCKINFO chunkRIFF; 37 | MMCKINFO chunkDATA; 38 | LONG lCurrentSample; 39 | LONG bytesPerSample; 40 | 41 | public: 42 | AudioSourceWAV(char *fn, LONG inputBufferSize); 43 | ~AudioSourceWAV(); 44 | 45 | BOOL init(); 46 | virtual int _read(LONG lStart, LONG lCount, LPVOID lpBuffer, LONG cbBuffer, LONG *lSamplesRead, LONG *lBytesRead); 47 | }; 48 | 49 | class AudioSourceAVI : public AudioSource { 50 | private: 51 | IAVIReadHandler *pAVIFile; 52 | IAVIReadStream *pAVIStream; 53 | bool bQuiet; 54 | int audiotrack; 55 | 56 | BOOL _isKey(LONG lSample); 57 | 58 | public: 59 | AudioSourceAVI(IAVIReadHandler *pAVIFile, bool bAutomated, int atrack); 60 | ~AudioSourceAVI(); 61 | 62 | void Reinit(); 63 | bool isStreaming(); 64 | 65 | void streamBegin(bool fRealTime); 66 | void streamEnd(); 67 | 68 | BOOL init(); 69 | int _read(LONG lStart, LONG lCount, LPVOID lpBuffer, LONG cbBuffer, LONG *lSamplesRead, LONG *lBytesRead); 70 | }; 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /src/sources/avi/DubSource.cpp: -------------------------------------------------------------------------------- 1 | // VirtualDub - Video processing and capture application 2 | // Copyright (C) 1998-2001 Avery Lee 3 | // 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | 18 | #include "stdafx.h" 19 | 20 | #include "DubSource.h" 21 | 22 | DubSource::DubSource() { 23 | format = NULL; 24 | } 25 | 26 | DubSource::~DubSource() { 27 | if (format) delete format; 28 | } 29 | 30 | BOOL DubSource::init() { 31 | return TRUE; 32 | } 33 | 34 | void *DubSource::allocFormat(int format_len) { 35 | if (format) delete format; 36 | 37 | return format = (void *)new char[this->format_len = format_len]; 38 | } 39 | 40 | bool DubSource::isStreaming() { 41 | return false; 42 | } 43 | 44 | int DubSource::read(LONG lStart, LONG lCount, LPVOID lpBuffer, LONG cbBuffer, LONG *lBytesRead, LONG *lSamplesRead) { 45 | if (lStart < lSampleFirst) return AVIERR_BADPARAM; 46 | if (lStart >= lSampleLast) { 47 | if (lSamplesRead) 48 | *lSamplesRead = 0; 49 | if (lBytesRead) 50 | *lBytesRead = 0; 51 | return 0; 52 | } 53 | 54 | if (lCount>0 && lCount > lSampleLast - lStart) lCount = lSampleLast - lStart; 55 | 56 | return _read(lStart, lCount, lpBuffer, cbBuffer, lBytesRead, lSamplesRead); 57 | } 58 | 59 | BOOL DubSource::isKey(LONG lSample) { 60 | if (lSample=lSampleLast) return TRUE; 61 | 62 | return _isKey(lSample); 63 | } 64 | 65 | BOOL DubSource::_isKey(LONG lSample) { 66 | return TRUE; 67 | } 68 | 69 | LONG DubSource::nearestKey(LONG lSample) { 70 | return lSample; 71 | } 72 | 73 | LONG DubSource::prevKey(LONG lSample) { 74 | return lSample <= lSampleFirst ? -1 : lSample-1; 75 | } 76 | 77 | LONG DubSource::nextKey(LONG lSample) { 78 | return lSample+1 >= lSampleFirst ? -1 : lSample+1; 79 | } 80 | 81 | void DubSource::streamBegin(bool fRealTime) { 82 | } 83 | 84 | void DubSource::streamEnd() { 85 | } 86 | 87 | -------------------------------------------------------------------------------- /src/sources/avi/DubSource.h: -------------------------------------------------------------------------------- 1 | // VirtualDub - Video processing and capture application 2 | // Copyright (C) 1998-2001 Avery Lee 3 | // 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | 18 | #ifndef f_DUBSOURCE_H 19 | #define f_DUBSOURCE_H 20 | 21 | class InputFile; 22 | 23 | class DubSource { 24 | private: 25 | void * format; 26 | int format_len; 27 | 28 | protected: 29 | void *allocFormat(int format_len); 30 | virtual BOOL _isKey(LONG lSample); 31 | 32 | public: 33 | LONG lSampleFirst, lSampleLast; 34 | AVISTREAMINFO streamInfo; 35 | 36 | DubSource(); 37 | virtual ~DubSource(); 38 | 39 | virtual BOOL init(); 40 | int read(LONG lStart, LONG lCount, LPVOID lpBuffer, LONG cbBuffer, LONG *lBytesRead, LONG *lSamplesRead); 41 | virtual int _read(LONG lStart, LONG lCount, LPVOID lpBuffer, LONG cbBuffer, LONG *lBytesRead, LONG *lSamplesRead) = 0; 42 | 43 | void *getFormat() const { return format; } 44 | int getFormatLen() const { return format_len; } 45 | 46 | virtual bool isStreaming(); 47 | 48 | BOOL isKey(LONG lSample); 49 | virtual LONG nearestKey(LONG lSample); 50 | virtual LONG prevKey(LONG lSample); 51 | virtual LONG nextKey(LONG lSample); 52 | 53 | virtual void streamBegin( bool fRealTime); 54 | virtual void streamEnd(); 55 | 56 | LONG msToSamples(LONG lMs) const { 57 | return (LONG)(((__int64)lMs * streamInfo.dwRate + (__int64)500 * streamInfo.dwScale) / ((__int64)1000 * streamInfo.dwScale)); 58 | } 59 | LONG samplesToMs(LONG lSamples) const { 60 | return (LONG)( 61 | (((__int64)lSamples * streamInfo.dwScale) * 1000 + streamInfo.dwRate/2) / streamInfo.dwRate 62 | ); 63 | } 64 | 65 | // This is more accurate than AVIStreamSampleToSample(), which does a conversion to 66 | // milliseconds and back. 67 | 68 | static LONG samplesToSamples(const AVISTREAMINFO *dest, const AVISTREAMINFO *source, LONG lSamples) { 69 | __int64 divisor = (__int64)source->dwRate * dest->dwScale; 70 | 71 | return (LONG)((((__int64)lSamples * source->dwScale) * dest->dwRate + divisor/2) 72 | / divisor); 73 | } 74 | 75 | LONG samplesToSamples(const DubSource *source, LONG lSamples) const { 76 | return samplesToSamples(&streamInfo, &source->streamInfo, lSamples); 77 | } 78 | }; 79 | 80 | #endif -------------------------------------------------------------------------------- /src/sources/avi/FastReadStream.h: -------------------------------------------------------------------------------- 1 | // Packaged with Avisynth v1.0 beta. 2 | // http://www.math.berkeley.edu/~benrg/avisynth.html 3 | 4 | // VirtualDub - Video processing and capture application 5 | // Copyright (C) 1998-2000 Avery Lee 6 | // 7 | // This program is free software; you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation; either version 2 of the License, or 10 | // (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | 21 | #ifndef f_VIRTUALDUB_FASTREADSTREAM_H 22 | #define f_VIRTUALDUB_FASTREADSTREAM_H 23 | 24 | class FastReadStreamHeader; 25 | 26 | class FastReadStream { 27 | public: 28 | FastReadStream(HANDLE hFile, long lBlockCount, long lBlockSize); 29 | FastReadStream(int iFile, long lBlockCount, long lBlockSize); 30 | virtual ~FastReadStream(); 31 | 32 | bool Ready(); 33 | long Read(int stream, __int64 i64Pos, void *pBuffer, long lBytes); 34 | void Flush(); 35 | 36 | private: 37 | HANDLE hFile; 38 | int iFile; 39 | long lBlockCount; 40 | long lBlockSize; 41 | long lHistory; 42 | 43 | FastReadStreamHeader *pHeaders; 44 | void *pBuffer; 45 | 46 | void _Init(long lBlockCount, long lBlockSize); 47 | int _PickVictim(int stream); 48 | int _Commit(int stream, __int64 i64BlockNo); 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/sources/avi/File64.h: -------------------------------------------------------------------------------- 1 | // Packaged with Avisynth v1.0 beta. 2 | // http://www.math.berkeley.edu/~benrg/avisynth.html 3 | 4 | // VirtualDub - Video processing and capture application 5 | // Copyright (C) 1998-2000 Avery Lee 6 | // 7 | // This program is free software; you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation; either version 2 of the License, or 10 | // (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | 21 | #ifndef f_FILE64_H 22 | #define f_FILE64_H 23 | 24 | class File64 { 25 | public: 26 | HANDLE hFile, hFileUnbuffered; 27 | __int64 i64FilePosition; 28 | 29 | File64(); 30 | File64(HANDLE _hFile, HANDLE _hFileUnbuffered); 31 | long _readFile(void *data, long len); 32 | void _readFile2(void *data, long len); 33 | bool _readChunkHeader(FOURCC& pfcc, DWORD& pdwLen); 34 | void _seekFile(__int64 i64NewPos); 35 | bool _seekFile2(__int64 i64NewPos); 36 | void _skipFile(__int64 bytes); 37 | bool _skipFile2(__int64 bytes); 38 | long _readFileUnbuffered(void *data, long len); 39 | void _seekFileUnbuffered(__int64 i64NewPos); 40 | __int64 _posFile(); 41 | __int64 _sizeFile(); 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/sources/avi/Fixes.h: -------------------------------------------------------------------------------- 1 | // Packaged with Avisynth v1.0 beta. 2 | // http://www.math.berkeley.edu/~benrg/avisynth.html 3 | 4 | // VirtualDub - Video processing and capture application 5 | // Copyright (C) 1998-2000 Avery Lee 6 | // 7 | // This program is free software; you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation; either version 2 of the License, or 10 | // (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | 21 | #ifndef f_FIXES_H 22 | #define f_FIXES_H 23 | 24 | // Those stupid idiots at Microsoft forgot to change this structure 25 | // when making the VfW headers for Win32. The result is that the 26 | // AVIStreamHeader is correct in 16-bit Windows, but the 32-bit 27 | // headers define RECT as LONGs instead of SHORTs. This creates 28 | // invalid AVI files!!!! 29 | 30 | typedef struct { 31 | SHORT left; 32 | SHORT top; 33 | SHORT right; 34 | SHORT bottom; 35 | } RECT16; 36 | 37 | typedef struct { 38 | FOURCC fccType; 39 | FOURCC fccHandler; 40 | DWORD dwFlags; 41 | WORD wPriority; 42 | WORD wLanguage; 43 | DWORD dwInitialFrames; 44 | DWORD dwScale; 45 | DWORD dwRate; 46 | DWORD dwStart; 47 | DWORD dwLength; 48 | DWORD dwSuggestedBufferSize; 49 | DWORD dwQuality; 50 | DWORD dwSampleSize; 51 | RECT16 rcFrame; 52 | } AVIStreamHeader_fixed; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/sources/avi/VD_misc.cpp: -------------------------------------------------------------------------------- 1 | // VirtualDub - Video processing and capture application 2 | // Copyright (C) 1998-2001 Avery Lee 3 | // 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | 18 | #include "stdafx.h" 19 | 20 | extern long CPUCheckForExtensions(); // in cpuaccel.cpp 21 | 22 | long __declspec(naked) MulDivTrunc(long a, long b, long c) { 23 | __asm { 24 | mov eax,[esp+4] 25 | imul dword ptr [esp+8] 26 | idiv dword ptr [esp+12] 27 | ret 28 | } 29 | } 30 | 31 | unsigned __declspec(naked) __stdcall MulDivUnsigned(unsigned a, unsigned b, unsigned c) { 32 | __asm { 33 | mov eax,[esp+4] 34 | mov ecx,[esp+12] 35 | mul dword ptr [esp+8] 36 | shr ecx,1 37 | add eax,ecx 38 | adc edx,0 39 | div dword ptr [esp+12] 40 | ret 12 41 | } 42 | } 43 | 44 | int NearestLongValue(long v, const long *array, int array_size) { 45 | int i; 46 | 47 | for(i=1; i>=8; 62 | fccB>>=8; 63 | } 64 | 65 | return true; 66 | } 67 | 68 | bool isValidFOURCC(FOURCC fcc) { 69 | return isprint((unsigned char)(fcc>>24)) 70 | && isprint((unsigned char)(fcc>>16)) 71 | && isprint((unsigned char)(fcc>> 8)) 72 | && isprint((unsigned char)(fcc )); 73 | } 74 | 75 | FOURCC toupperFOURCC(FOURCC fcc) { 76 | return(toupper((unsigned char)(fcc>>24)) << 24) 77 | | (toupper((unsigned char)(fcc>>16)) << 16) 78 | | (toupper((unsigned char)(fcc>> 8)) << 8) 79 | | (toupper((unsigned char)(fcc )) ); 80 | } 81 | 82 | #if defined(WIN32) && defined(_M_IX86) 83 | 84 | bool IsMMXState() { 85 | char buf[28]; 86 | unsigned short tagword; 87 | 88 | __asm fnstenv buf 89 | 90 | tagword = *(unsigned short *)(buf + 8); 91 | 92 | return (tagword != 0xffff); 93 | } 94 | 95 | void ClearMMXState() { 96 | if (CPUCheckForExtensions() & 0x04) // MMX supported 97 | __asm emms 98 | else { 99 | __asm { 100 | ffree st(0) 101 | ffree st(1) 102 | ffree st(2) 103 | ffree st(3) 104 | ffree st(4) 105 | ffree st(5) 106 | ffree st(6) 107 | ffree st(7) 108 | } 109 | } 110 | } 111 | 112 | #else 113 | 114 | bool IsMMXState() { 115 | return false; 116 | } 117 | 118 | void ClearMMXState() { 119 | } 120 | 121 | #endif 122 | -------------------------------------------------------------------------------- /src/sources/avi/VD_misc.h: -------------------------------------------------------------------------------- 1 | // VirtualDub - Video processing and capture application 2 | // Copyright (C) 1998-2001 Avery Lee 3 | // 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 | 18 | #ifndef f_VIRTUALDUB_MISC_H 19 | #define f_VIRTUALDUB_MISC_H 20 | 21 | long MulDivTrunc(long a, long b, long c); 22 | int NearestLongValue(long v, const long *array, int array_size); 23 | unsigned __stdcall MulDivUnsigned(unsigned a, unsigned b, unsigned c); 24 | 25 | // only works properly when d1,d2>0!! 26 | 27 | long inline int64divto32(__int64 d1, __int64 d2) { 28 | return d2?(long)((d1+d2/2)/d2):0; 29 | } 30 | 31 | __int64 inline int64divround(__int64 d1, __int64 d2) { 32 | return d2?((d1+d2/2)/d2):0; 33 | } 34 | 35 | __int64 inline int64divroundup(__int64 d1, __int64 d2) { 36 | return d2?((d1+d2-1)/d2):0; 37 | } 38 | 39 | bool isEqualFOURCC(FOURCC fccA, FOURCC fccB); 40 | bool isValidFOURCC(FOURCC fcc); 41 | FOURCC toupperFOURCC(FOURCC fcc); 42 | 43 | bool IsMMXState(); 44 | void ClearMMXState(); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/sources/avi/clip_info.h: -------------------------------------------------------------------------------- 1 | // Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al. 2 | // http://www.avisynth.org 3 | 4 | // This program is free software; you can redistribute it and/or modify 5 | // it under the terms of the GNU General Public License as published by 6 | // the Free Software Foundation; either version 2 of the License, or 7 | // (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU General Public License 15 | // along with this program; if not, write to the Free Software 16 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit 17 | // http://www.gnu.org/copyleft/gpl.html . 18 | // 19 | // Linking Avisynth statically or dynamically with other modules is making a 20 | // combined work based on Avisynth. Thus, the terms and conditions of the GNU 21 | // General Public License cover the whole combination. 22 | // 23 | // As a special exception, the copyright holders of Avisynth give you 24 | // permission to link Avisynth with independent modules that communicate with 25 | // Avisynth solely through the interfaces defined in avisynth.h, regardless of the license 26 | // terms of these independent modules, and to copy and distribute the 27 | // resulting combined work under terms of your choice, provided that 28 | // every copy of the combined work is accompanied by a complete copy of 29 | // the source code of Avisynth (the version of Avisynth used to produce the 30 | // combined work), being distributed under the terms of the GNU General 31 | // Public License plus this exception. An independent module is a module 32 | // which is not derived from or based on Avisynth, such as 3rd-party filters, 33 | // import and export plugins, or graphical user interfaces. 34 | 35 | #ifndef __CLIP_INFO_H__ 36 | #define __CLIP_INFO_H__ 37 | 38 | 39 | extern "C" const GUID CLSID_CAVIFileSynth; // {E6D6B700-124D-11D4-86F3-DB80AFD98778} 40 | 41 | extern "C" const GUID IID_IAvisynthClipInfo; // {E6D6B708-124D-11D4-86F3-DB80AFD98778} 42 | 43 | struct IAvisynthClipInfo : IUnknown { 44 | virtual int __stdcall GetError(const char** ppszMessage) = 0; 45 | virtual bool __stdcall GetParity(int n) = 0; 46 | virtual bool __stdcall IsFieldBased() = 0; 47 | }; 48 | 49 | 50 | #endif -------------------------------------------------------------------------------- /src/sources/avi/list.cpp: -------------------------------------------------------------------------------- 1 | // Packaged with Avisynth v1.0 beta. 2 | // http://www.math.berkeley.edu/~benrg/avisynth.html 3 | 4 | // VirtualDub - Video processing and capture application 5 | // Copyright (C) 1998-2000 Avery Lee 6 | // 7 | // This program is free software; you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation; either version 2 of the License, or 10 | // (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | 21 | /////////////////////////////////////////////////////////////////////////// 22 | // 23 | // For those of you who say this looks familiar... it should. This is 24 | // the same linked-list style that the Amiga Exec uses, with dummy head 25 | // and tail nodes. It's really a very convienent way to implement 26 | // doubly-linked lists. 27 | // 28 | 29 | #include "stdafx.h" 30 | 31 | #include "list.h" 32 | 33 | List::List() { 34 | Init(); 35 | } 36 | 37 | void List::Init() { 38 | head.next = tail.prev = 0; 39 | head.prev = &tail; 40 | tail.next = &head; 41 | } 42 | 43 | ListNode *List::RemoveHead() { 44 | if (head.prev->prev) { 45 | ListNode *t = head.prev; 46 | 47 | head.prev->Remove(); 48 | return t; 49 | } 50 | 51 | return 0; 52 | } 53 | 54 | ListNode *List::RemoveTail() { 55 | if (tail.next->next) { 56 | ListNode *t = tail.next; 57 | 58 | tail.next->Remove(); 59 | return t; 60 | } 61 | 62 | return 0; 63 | } 64 | -------------------------------------------------------------------------------- /src/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | -------------------------------------------------------------------------------- /src/stdafx.h: -------------------------------------------------------------------------------- 1 | #define _WIN32_WINNT 0x0403 //very hacky don't know where it should go else 2 | #ifndef __Stdafx_H__ 3 | #define __Stdafx_H__ 4 | 5 | #pragma warning (disable: 4100) // unreferenced formal parameter 6 | #pragma warning (disable: 4512) // assignment operator could not be generated 7 | 8 | //C 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | //windows 19 | #define WIN32_LEAN_AND_MEAN 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | //STL 27 | #include 28 | #include 29 | 30 | #endif // __Stdafx_H__ 31 | --------------------------------------------------------------------------------