├── .gitignore ├── mask.bmp ├── mask88.bmp ├── midifile-master ├── LICENSE.txt:Zone.Identifier:$DATA ├── Makefile:Zone.Identifier:$DATA ├── README.md:Zone.Identifier:$DATA ├── Makefile.library:Zone.Identifier:$DATA ├── include │ ├── Binasc.h:Zone.Identifier:$DATA │ ├── MidiEvent.h:Zone.Identifier:$DATA │ ├── MidiFile.h:Zone.Identifier:$DATA │ ├── MidiMessage.h:Zone.Identifier:$DATA │ ├── Options.h:Zone.Identifier:$DATA │ ├── MidiEventList.h:Zone.Identifier:$DATA │ ├── MidiEventList.h │ └── MidiEvent.h ├── Makefile.programs:Zone.Identifier:$DATA ├── src-programs │ ├── vlv.cpp:Zone.Identifier:$DATA │ ├── 80off.cpp:Zone.Identifier:$DATA │ ├── asciimidi.cpp:Zone.Identifier:$DATA │ ├── binasc.cpp:Zone.Identifier:$DATA │ ├── drumtab.cpp:Zone.Identifier:$DATA │ ├── durations.cpp:Zone.Identifier:$DATA │ ├── mid2hum.cpp:Zone.Identifier:$DATA │ ├── mid2mat.cpp:Zone.Identifier:$DATA │ ├── mid2mtb.cpp:Zone.Identifier:$DATA │ ├── mid2svg.cpp:Zone.Identifier:$DATA │ ├── midi2beep.cpp:Zone.Identifier:$DATA │ ├── midi2text.cpp:Zone.Identifier:$DATA │ ├── midicat.cpp:Zone.Identifier:$DATA │ ├── midimixup.cpp:Zone.Identifier:$DATA │ ├── miditime.cpp:Zone.Identifier:$DATA │ ├── peep2midi.cpp:Zone.Identifier:$DATA │ ├── perfid.cpp:Zone.Identifier:$DATA │ ├── retick.cpp:Zone.Identifier:$DATA │ ├── shutak.cpp:Zone.Identifier:$DATA │ ├── smfdur.cpp:Zone.Identifier:$DATA │ ├── stretch.cpp:Zone.Identifier:$DATA │ ├── sysextest.cpp:Zone.Identifier:$DATA │ ├── text2midi.cpp:Zone.Identifier:$DATA │ ├── textmidi.cpp:Zone.Identifier:$DATA │ ├── toascii.cpp:Zone.Identifier:$DATA │ ├── tobin.cpp:Zone.Identifier:$DATA │ ├── tobinary.cpp:Zone.Identifier:$DATA │ ├── todec.cpp:Zone.Identifier:$DATA │ ├── tohex.cpp:Zone.Identifier:$DATA │ ├── type0.cpp:Zone.Identifier:$DATA │ ├── createmidifile.cpp:Zone.Identifier:$DATA │ ├── midi2binasc.cpp:Zone.Identifier:$DATA │ ├── midi2melody.cpp:Zone.Identifier:$DATA │ ├── midi2notes.cpp:Zone.Identifier:$DATA │ ├── midi2skini.cpp:Zone.Identifier:$DATA │ ├── midiexcerpt.cpp:Zone.Identifier:$DATA │ ├── createmidifile2.cpp:Zone.Identifier:$DATA │ ├── tohex.cpp │ ├── tobin.cpp │ ├── retick.cpp │ ├── asciimidi.cpp │ ├── todec.cpp │ ├── createmidifile2.cpp │ ├── midi2beep.cpp │ ├── smfdur.cpp │ ├── toascii.cpp │ ├── stretch.cpp │ ├── 80off.cpp │ ├── drumtab.cpp │ ├── type0.cpp │ ├── tobinary.cpp │ └── miditime.cpp ├── src-library │ ├── Binasc.cpp:Zone.Identifier:$DATA │ ├── MidiEvent.cpp:Zone.Identifier:$DATA │ ├── MidiFile.cpp:Zone.Identifier:$DATA │ ├── Options.cpp:Zone.Identifier:$DATA │ ├── MidiEventList.cpp:Zone.Identifier:$DATA │ └── MidiMessage.cpp:Zone.Identifier:$DATA ├── visual-studio │ ├── README.md:Zone.Identifier:$DATA │ ├── midifile.sln:Zone.Identifier:$DATA │ ├── binasc.vcxproj:Zone.Identifier:$DATA │ ├── midifile.vcxproj:Zone.Identifier:$DATA │ ├── stretch.vcxproj:Zone.Identifier:$DATA │ ├── createmidifile.vcxproj:Zone.Identifier:$DATA │ ├── README.md │ ├── midifile.sln │ ├── binasc.vcxproj │ ├── stretch.vcxproj │ └── createmidifile.vcxproj ├── .gitignore ├── LICENSE.txt └── Makefile ├── ffmpeg └── ffmpeg-dev │ ├── licenses │ ├── libmodplug.txt │ ├── freetype.txt │ ├── libass.txt │ ├── libtheora.txt │ ├── nut.txt │ ├── celt.txt │ ├── libvorbis.txt │ ├── libgsm.txt │ ├── zlib.txt │ ├── libvpx.txt │ ├── openjpeg.txt │ ├── speex.txt │ └── bzip2.txt │ ├── lib │ ├── avcodec.lib │ ├── avutil.lib │ ├── swscale.lib │ ├── avdevice.lib │ ├── avfilter.lib │ ├── avformat.lib │ ├── postproc.lib │ ├── swresample.lib │ ├── libavcodec.dll.a │ ├── libavutil.dll.a │ ├── libswscale.dll.a │ ├── libavdevice.dll.a │ ├── libavfilter.dll.a │ ├── libavformat.dll.a │ ├── libpostproc.dll.a │ ├── libswresample.dll.a │ └── pkgconfig │ │ ├── libavutil.pc │ │ ├── libpostproc.pc │ │ ├── libswscale.pc │ │ ├── libswresample.pc │ │ ├── libavcodec.pc │ │ ├── libavformat.pc │ │ ├── libavdevice.pc │ │ └── libavfilter.pc │ ├── include │ ├── libavutil │ │ ├── avconfig.h │ │ ├── time.h │ │ ├── md5.h │ │ ├── random_seed.h │ │ ├── adler32.h │ │ ├── crc.h │ │ ├── intfloat_readwrite.h │ │ ├── aes.h │ │ ├── intfloat.h │ │ ├── xtea.h │ │ ├── sha.h │ │ ├── base64.h │ │ ├── lfg.h │ │ ├── avassert.h │ │ ├── file.h │ │ ├── blowfish.h │ │ ├── timestamp.h │ │ ├── lzo.h │ │ ├── version.h │ │ ├── bswap.h │ │ ├── mathematics.h │ │ ├── cpu.h │ │ └── attributes.h │ ├── libavdevice │ │ ├── version.h │ │ └── avdevice.h │ ├── libswscale │ │ └── version.h │ ├── libavcodec │ │ ├── dxva2.h │ │ ├── vdpau.h │ │ ├── avfft.h │ │ └── version.h │ ├── libavfilter │ │ ├── version.h │ │ ├── buffersrc.h │ │ └── asrc_abuffer.h │ ├── libavformat │ │ └── version.h │ └── libpostproc │ │ └── postprocess.h │ └── README.txt ├── .github └── FUNDING.yml ├── syn2midi.txt ├── report.h ├── LICENSE ├── midi.cpp └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | bin/report.html 2 | */**/*.midi 3 | bin/* 4 | -------------------------------------------------------------------------------- /mask.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/mask.bmp -------------------------------------------------------------------------------- /mask88.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/mask88.bmp -------------------------------------------------------------------------------- /midifile-master/LICENSE.txt:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/Makefile:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/README.md:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/Makefile.library:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/include/Binasc.h:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/Makefile.programs:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/include/MidiEvent.h:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/include/MidiFile.h:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/include/MidiMessage.h:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/include/Options.h:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/vlv.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/libmodplug.txt: -------------------------------------------------------------------------------- 1 | ModPlug-XMMS and libmodplug are now in the public domain. -------------------------------------------------------------------------------- /midifile-master/include/MidiEventList.h:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-library/Binasc.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-library/MidiEvent.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-library/MidiFile.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-library/Options.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/80off.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/asciimidi.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/binasc.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/drumtab.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/durations.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/mid2hum.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/mid2mat.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/mid2mtb.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/mid2svg.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/midi2beep.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/midi2text.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/midicat.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/midimixup.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/miditime.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/peep2midi.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/perfid.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/retick.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/shutak.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/smfdur.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/stretch.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/sysextest.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/text2midi.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/textmidi.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/toascii.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/tobin.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/tobinary.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/todec.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/tohex.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/type0.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/visual-studio/README.md:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/visual-studio/midifile.sln:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-library/MidiEventList.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-library/MidiMessage.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/createmidifile.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/midi2binasc.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/midi2melody.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/midi2notes.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/midi2skini.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/midiexcerpt.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/visual-studio/binasc.vcxproj:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/visual-studio/midifile.vcxproj:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/visual-studio/stretch.vcxproj:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/src-programs/createmidifile2.cpp:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /midifile-master/visual-studio/createmidifile.vcxproj:Zone.Identifier:$DATA: -------------------------------------------------------------------------------- 1 | [ZoneTransfer] 2 | ZoneId=3 3 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/avcodec.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/avcodec.lib -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/avutil.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/avutil.lib -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/swscale.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/swscale.lib -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/avdevice.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/avdevice.lib -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/avfilter.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/avfilter.lib -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/avformat.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/avformat.lib -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/postproc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/postproc.lib -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/swresample.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/swresample.lib -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/libavcodec.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/libavcodec.dll.a -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/libavutil.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/libavutil.dll.a -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/libswscale.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/libswscale.dll.a -------------------------------------------------------------------------------- /midifile-master/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .* 3 | !.gitignore 4 | 5 | _site 6 | temp 7 | 8 | bin 9 | obj 10 | lib 11 | err 12 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/libavdevice.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/libavdevice.dll.a -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/libavfilter.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/libavfilter.dll.a -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/libavformat.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/libavformat.dll.a -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/libpostproc.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/libpostproc.dll.a -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/libswresample.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/lib/libswresample.dll.a -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/freetype.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minyor/syn2midi/HEAD/ffmpeg/ffmpeg-dev/licenses/freetype.txt -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | custom: www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=79P2FPXSDF64G 4 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/avconfig.h: -------------------------------------------------------------------------------- 1 | /* Generated by ffconf */ 2 | #ifndef AVUTIL_AVCONFIG_H 3 | #define AVUTIL_AVCONFIG_H 4 | #define AV_HAVE_BIGENDIAN 0 5 | #define AV_HAVE_FAST_UNALIGNED 1 6 | #define AV_HAVE_INCOMPATIBLE_FORK_ABI 0 7 | #endif /* AVUTIL_AVCONFIG_H */ 8 | -------------------------------------------------------------------------------- /syn2midi.txt: -------------------------------------------------------------------------------- 1 | ./Release/report.cpp.o ./Release/main.cpp.o ./Release/midi.cpp.o ./Release/midifile-master_src-library_Binasc.cpp.o ./Release/midifile-master_src-library_MidiEvent.cpp.o ./Release/midifile-master_src-library_MidiEventList.cpp.o ./Release/midifile-master_src-library_MidiFile.cpp.o ./Release/midifile-master_src-library_MidiMessage.cpp.o ./Release/midifile-master_src-library_Options.cpp.o 2 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/pkgconfig/libavutil.pc: -------------------------------------------------------------------------------- 1 | prefix=/home/kyle/software/ffmpeg/builds/win32/shared/ffmpeg-20120924-git-bbe9fe4-win32-shared 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libavutil 7 | Description: FFmpeg utility library 8 | Version: 51.73.101 9 | Requires: 10 | Requires.private: 11 | Conflicts: 12 | Libs: -L${libdir} -lavutil 13 | Libs.private: -lm 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/pkgconfig/libpostproc.pc: -------------------------------------------------------------------------------- 1 | prefix=/home/kyle/software/ffmpeg/builds/win32/shared/ffmpeg-20120924-git-bbe9fe4-win32-shared 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libpostproc 7 | Description: FFmpeg postprocessing library 8 | Version: 52.0.100 9 | Requires: 10 | Requires.private: libavutil = 51.73.101 11 | Conflicts: 12 | Libs: -L${libdir} -lpostproc 13 | Libs.private: 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/pkgconfig/libswscale.pc: -------------------------------------------------------------------------------- 1 | prefix=/home/kyle/software/ffmpeg/builds/win32/shared/ffmpeg-20120924-git-bbe9fe4-win32-shared 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libswscale 7 | Description: FFmpeg image rescaling library 8 | Version: 2.1.101 9 | Requires: 10 | Requires.private: libavutil = 51.73.101 11 | Conflicts: 12 | Libs: -L${libdir} -lswscale 13 | Libs.private: -lm 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/pkgconfig/libswresample.pc: -------------------------------------------------------------------------------- 1 | prefix=/home/kyle/software/ffmpeg/builds/win32/shared/ffmpeg-20120924-git-bbe9fe4-win32-shared 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libswresample 7 | Description: FFmpeg audio rescaling library 8 | Version: 0.15.100 9 | Requires: 10 | Requires.private: libavutil = 51.73.101 11 | Conflicts: 12 | Libs: -L${libdir} -lswresample 13 | Libs.private: -lm 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /midifile-master/visual-studio/README.md: -------------------------------------------------------------------------------- 1 | Compiling for Visual Studio 2 | ============================ 3 | 4 | The solution file (midifile.sln) contains the project for the static 5 | library in /src-library (midifile.vcxproj) as well as projects for 6 | individual projects for client programs in /src-programs. 7 | 8 | The projects are configured for the v140 (Visual Studio 2015) toolset 9 | by default, but this can be changed. 10 | 11 | As new programs are added to /src-programs, corresponding project 12 | files should be created for them in this directory, and then added 13 | to midifile.sln. The easiest was of creating a new project file 14 | is to copy an existing project file and then rename all occurrences 15 | of the old name with the new one. 16 | 17 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/libass.txt: -------------------------------------------------------------------------------- 1 | Permission to use, copy, modify, and/or distribute this software for any 2 | purpose with or without fee is hereby granted, provided that the above 3 | copyright notice and this permission notice appear in all copies. 4 | 5 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 6 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 7 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 8 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 9 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 10 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 11 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 12 | -------------------------------------------------------------------------------- /midifile-master/visual-studio/midifile.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25123.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "midifile", "midifile.vcxproj", "{70028D4B-8E0D-4FF2-BD05-D7AB19B66F30}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stretch", "stretch.vcxproj", "{1CD9D03A-63D6-46BA-80E2-93AAECD2754B}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "binasc", "binasc.vcxproj", "{5230AA11-C456-48E6-B19F-23703EC38D80}" 11 | EndProject 12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createmidifile", "createmidifile.vcxproj", "{52724792-CD79-4152-984C-DFD7DA570855}" 13 | EndProject 14 | -------------------------------------------------------------------------------- /report.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | class BaseReport { 6 | public: 7 | virtual void print(BufferRGBA colors[], int colorSize) = 0; 8 | virtual void recordUnfitColor(BufferRGBA &color) = 0; 9 | virtual void recordMatchedColor(BufferRGBA &fittestColor, BufferRGBA &color) = 0; 10 | }; 11 | 12 | class DummyReport : public BaseReport { 13 | public: 14 | DummyReport() {} 15 | void print(BufferRGBA colors[], int colorSize) {} 16 | void recordUnfitColor(BufferRGBA &color) {} 17 | void recordMatchedColor(BufferRGBA &fittestColor, BufferRGBA &color) {} 18 | }; 19 | 20 | class Report : public BaseReport { 21 | private: 22 | map unfitColorMap; 23 | map> fittestColorMap; 24 | public: 25 | Report(); 26 | void print(BufferRGBA colors[], int colorSize); 27 | void recordUnfitColor(BufferRGBA &color); 28 | void recordMatchedColor(BufferRGBA &fittestColor, BufferRGBA &color); 29 | 30 | }; 31 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/libtheora.txt: -------------------------------------------------------------------------------- 1 | Please see the file COPYING for the copyright license for this software. 2 | 3 | In addition to and irrespective of the copyright license associated 4 | with this software, On2 Technologies, Inc. makes the following statement 5 | regarding technology used in this software: 6 | 7 | On2 represents and warrants that it shall not assert any rights 8 | relating to infringement of On2's registered patents, nor initiate 9 | any litigation asserting such rights, against any person who, or 10 | entity which utilizes the On2 VP3 Codec Software, including any 11 | use, distribution, and sale of said Software; which make changes, 12 | modifications, and improvements in said Software; and to use, 13 | distribute, and sell said changes as well as applications for other 14 | fields of use. 15 | 16 | This reference implementation is originally derived from the On2 VP3 17 | Codec Software, and the Theora video format is essentially compatible 18 | with the VP3 video format, consisting of a backward-compatible superset. 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Eugene Minov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/nut.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2005-2008 Oded Shimon 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and associated documentation files (the "Software"), 5 | to deal in the Software without restriction, including without limitation 6 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the 8 | Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | DEALINGS IN THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /midi.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Author 2018 Eugene Minov 3 | */ 4 | 5 | #include "MidiFile.h" 6 | #include 7 | 8 | using namespace std; 9 | 10 | /////////////////////////////////////////////////////////////////////////// 11 | 12 | MidiFile midifile; 13 | int track = 0; 14 | 15 | void midiKeyBegin(int channel, int time, int key) { 16 | int velocity = 64; 17 | midifile.addNoteOn(track, time, channel, key, velocity); 18 | } 19 | void midiKeyEnd(int channel, int time, int key) { 20 | int velocity = 64; 21 | midifile.addNoteOff(track, time, channel, key, velocity); 22 | } 23 | void midiAddChannel(int channel, int instrument) { 24 | midifile.addPatchChange(track, 0, channel, instrument); // 0=piano 25 | } 26 | void midiBegin(int ticks) { 27 | midifile = MidiFile(); 28 | midifile.setTicksPerQuarterNote(ticks); // ticks per quarter note 29 | midifile.addTrackName(track, 0, "Melody"); 30 | } 31 | bool midiEnd(const std::string &filename) { 32 | midifile.sortTracks(); // ensure tick times are in correct order 33 | midifile.write(filename.c_str()); // write Standard MIDI File twinkle.mid 34 | return true; 35 | } 36 | -------------------------------------------------------------------------------- /midifile-master/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 1999-2015, Craig Stuart Sapp 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 are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | and the following disclaimer in the documentation and/or other materials 11 | provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 14 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 17 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | 24 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/celt.txt: -------------------------------------------------------------------------------- 1 | Copyright 2001-2009 Jean-Marc Valin, Timothy B. Terriberry, 2 | CSIRO, and other contributors 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 the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 19 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 22 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 23 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 24 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/time.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000-2003 Fabrice Bellard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_TIME_H 22 | #define AVUTIL_TIME_H 23 | 24 | #include 25 | 26 | /** 27 | * Get the current time in microseconds. 28 | */ 29 | int64_t av_gettime(void); 30 | 31 | /** 32 | * Sleep for a period of time. Although the duration is expressed in 33 | * microseconds, the actual delay may be rounded to the precision of the 34 | * system timer. 35 | * 36 | * @param usec Number of microseconds to sleep. 37 | * @return zero on success or (negative) error code. 38 | */ 39 | int av_usleep(unsigned usec); 40 | 41 | #endif /* AVUTIL_TIME_H */ 42 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2006 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_MD5_H 22 | #define AVUTIL_MD5_H 23 | 24 | #include 25 | 26 | /** 27 | * @defgroup lavu_md5 MD5 28 | * @ingroup lavu_crypto 29 | * @{ 30 | */ 31 | 32 | extern const int av_md5_size; 33 | 34 | struct AVMD5; 35 | 36 | void av_md5_init(struct AVMD5 *ctx); 37 | void av_md5_update(struct AVMD5 *ctx, const uint8_t *src, const int len); 38 | void av_md5_final(struct AVMD5 *ctx, uint8_t *dst); 39 | void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len); 40 | 41 | /** 42 | * @} 43 | */ 44 | 45 | #endif /* AVUTIL_MD5_H */ 46 | -------------------------------------------------------------------------------- /midifile-master/src-programs/tohex.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Tue Dec 9 20:36:13 PST 1997 4 | // Last Modified: Tue Jan 27 21:23:56 GMT-0800 1998 5 | // Filename: ...sig/doc/examples/improv/improv/tohex/tohex.cpp 6 | // Syntax: C++; improv 7 | // $Smake: cc -o %b %f -lg++ && strip %b 8 | // $Smake-linux: g++ -o %b %f && strip %b 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | using namespace std; 19 | 20 | int atohd (const char* aNumber); 21 | void exitUsage (const char* command); 22 | 23 | 24 | int main(int argc, char* argv[]) { 25 | if (argc != 2) exitUsage(argv[0]); 26 | 27 | int aValue; 28 | aValue = atohd(argv[1]); 29 | cout << "0x" << hex << aValue << endl; 30 | 31 | return 0; 32 | } 33 | 34 | 35 | 36 | int atohd(const char* aNumber) { 37 | if (strchr(aNumber, 'x') != NULL) { 38 | return (int)strtol(aNumber, (char**)NULL, 16); 39 | } else { 40 | return atoi(aNumber); 41 | } 42 | } 43 | 44 | 45 | 46 | void exitUsage(const char* command) { 47 | cout << endl; 48 | cout << "Converts an integer into hexadecimal form.\n"; 49 | cout << endl; 50 | cout << "Usage: " << command << " integer" << endl; 51 | cout << endl; 52 | cout << " integer = [-2147483648..2147483647] \n"; 53 | cout << " [-0x80000000..0x7fffffff] \n"; 54 | cout << endl; 55 | exit(1); 56 | } 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/random_seed.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009 Baptiste Coudurier 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_RANDOM_SEED_H 22 | #define AVUTIL_RANDOM_SEED_H 23 | 24 | #include 25 | /** 26 | * @addtogroup lavu_crypto 27 | * @{ 28 | */ 29 | 30 | /** 31 | * Get a seed to use in conjunction with random functions. 32 | * This function tries to provide a good seed at a best effort bases. 33 | * Its possible to call this function multiple times if more bits are needed. 34 | * It can be quite slow, which is why it should only be used as seed for a faster 35 | * PRNG. The quality of the seed depends on the platform. 36 | */ 37 | uint32_t av_get_random_seed(void); 38 | 39 | /** 40 | * @} 41 | */ 42 | 43 | #endif /* AVUTIL_RANDOM_SEED_H */ 44 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/libvorbis.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2008 Xiph.org Foundation 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | - Neither the name of the Xiph.org Foundation nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 22 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/libgsm.txt: -------------------------------------------------------------------------------- 1 | Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, 2 | Technische Universitaet Berlin 3 | 4 | Any use of this software is permitted provided that this notice is not 5 | removed and that neither the authors nor the Technische Universitaet Berlin 6 | are deemed to have made any representations as to the suitability of this 7 | software for any purpose nor are held responsible for any defects of 8 | this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. 9 | 10 | As a matter of courtesy, the authors request to be informed about uses 11 | this software has found, about bugs in this software, and about any 12 | improvements that may be of general interest. 13 | 14 | Berlin, 28.11.1994 15 | Jutta Degener 16 | Carsten Bormann 17 | 18 | oOo 19 | 20 | Since the original terms of 15 years ago maybe do not make our 21 | intentions completely clear given today's refined usage of the legal 22 | terms, we append this additional permission: 23 | 24 | Permission to use, copy, modify, and distribute this software 25 | for any purpose with or without fee is hereby granted, 26 | provided that this notice is not removed and that neither 27 | the authors nor the Technische Universitaet Berlin are 28 | deemed to have made any representations as to the suitability 29 | of this software for any purpose nor are held responsible 30 | for any defects of this software. THERE IS ABSOLUTELY NO 31 | WARRANTY FOR THIS SOFTWARE. 32 | 33 | Berkeley/Bremen, 05.04.2009 34 | Jutta Degener 35 | Carsten Bormann 36 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/adler32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2006 Mans Rullgard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_ADLER32_H 22 | #define AVUTIL_ADLER32_H 23 | 24 | #include 25 | #include "attributes.h" 26 | 27 | /** 28 | * @ingroup lavu_crypto 29 | * Calculate the Adler32 checksum of a buffer. 30 | * 31 | * Passing the return value to a subsequent av_adler32_update() call 32 | * allows the checksum of multiple buffers to be calculated as though 33 | * they were concatenated. 34 | * 35 | * @param adler initial checksum value 36 | * @param buf pointer to input buffer 37 | * @param len size of input buffer 38 | * @return updated checksum 39 | */ 40 | unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf, 41 | unsigned int len) av_pure; 42 | 43 | #endif /* AVUTIL_ADLER32_H */ 44 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/crc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2006 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_CRC_H 22 | #define AVUTIL_CRC_H 23 | 24 | #include 25 | #include 26 | #include "attributes.h" 27 | 28 | typedef uint32_t AVCRC; 29 | 30 | typedef enum { 31 | AV_CRC_8_ATM, 32 | AV_CRC_16_ANSI, 33 | AV_CRC_16_CCITT, 34 | AV_CRC_32_IEEE, 35 | AV_CRC_32_IEEE_LE, /*< reversed bitorder version of AV_CRC_32_IEEE */ 36 | AV_CRC_MAX, /*< Not part of public API! Do not use outside libavutil. */ 37 | }AVCRCId; 38 | 39 | int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size); 40 | const AVCRC *av_crc_get_table(AVCRCId crc_id); 41 | uint32_t av_crc(const AVCRC *ctx, uint32_t start_crc, const uint8_t *buffer, size_t length) av_pure; 42 | 43 | #endif /* AVUTIL_CRC_H */ 44 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/intfloat_readwrite.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2005 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_INTFLOAT_READWRITE_H 22 | #define AVUTIL_INTFLOAT_READWRITE_H 23 | 24 | #include 25 | #include "attributes.h" 26 | 27 | /* IEEE 80 bits extended float */ 28 | typedef struct AVExtFloat { 29 | uint8_t exponent[2]; 30 | uint8_t mantissa[8]; 31 | } AVExtFloat; 32 | 33 | attribute_deprecated double av_int2dbl(int64_t v) av_const; 34 | attribute_deprecated float av_int2flt(int32_t v) av_const; 35 | attribute_deprecated double av_ext2dbl(const AVExtFloat ext) av_const; 36 | attribute_deprecated int64_t av_dbl2int(double d) av_const; 37 | attribute_deprecated int32_t av_flt2int(float d) av_const; 38 | attribute_deprecated AVExtFloat av_dbl2ext(double d) av_const; 39 | 40 | #endif /* AVUTIL_INTFLOAT_READWRITE_H */ 41 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/zlib.txt: -------------------------------------------------------------------------------- 1 | Copyright notice: 2 | 3 | (C) 1995-2012 Jean-loup Gailly and Mark Adler 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | Jean-loup Gailly Mark Adler 22 | jloup@gzip.org madler@alumni.caltech.edu 23 | 24 | If you use the zlib library in a product, we would appreciate *not* receiving 25 | lengthy legal documents to sign. The sources are provided for free but without 26 | warranty of any kind. The library has been entirely written by Jean-loup 27 | Gailly and Mark Adler; it does not include third-party code. 28 | 29 | If you redistribute modified sources, we would appreciate that you include in 30 | the file ChangeLog history information documenting your changes. Please read 31 | the FAQ for more information on the distribution of modified source versions. 32 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/libvpx.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010, The WebM Project authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | 15 | * Neither the name of Google, nor the WebM Project, nor the names 16 | of its contributors may be used to endorse or promote products 17 | derived from this software without specific prior written 18 | permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/pkgconfig/libavcodec.pc: -------------------------------------------------------------------------------- 1 | prefix=/home/kyle/software/ffmpeg/builds/win32/shared/ffmpeg-20120924-git-bbe9fe4-win32-shared 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libavcodec 7 | Description: FFmpeg codec library 8 | Version: 54.58.100 9 | Requires: 10 | Requires.private: libavutil = 51.73.101 11 | Conflicts: 12 | Libs: -L${libdir} -lavcodec 13 | Libs.private: -lavicap32 -lpsapi -lole32 -lstrmiids -luuid -lws2_32 -L/home/kyle/software/ffmpeg/packages/sdl/sdl-1.2.15-win32/lib -lmingw32 -lSDLmain -lSDL -lm -luser32 -lgdi32 -lwinmm -ldxguid -lxvidcore -lxavs -lx264 -lvpx -lvpx -lvorbisenc -lvorbis -logg -lvo-amrwbenc -lvo-aacenc -lutvideo -lstdc++ -ltheoraenc -ltheoradec -logg -lspeex -L/home/kyle/software/ffmpeg/packages/orc/orc-0.4.16-win32/lib -L/home/kyle/software/ffmpeg/packages/schroedinger/schroedinger-1.0.11-win32/lib -lschroedinger-1.0 -lorc-0.4 -lm -L/home/kyle/software/ffmpeg/packages/openssl/openssl-1.0.0g-win32/lib -L/home/kyle/software/ffmpeg/packages/rtmpdump/rtmpdump-20120308-git-7340f6d-win32/lib -lrtmp -lz -lwinmm -lssl -lcrypto -lws2_32 -lgdi32 -lcrypt32 -lopenjpeg -lopencore-amrwb -lopencore-amrnb -lnut -lmp3lame -lgsm -L/home/kyle/software/ffmpeg/packages/freetype/freetype-2.4.8-win32/lib -lfreetype -lcelt0 -lcelt0 -L/home/kyle/software/ffmpeg/packages/freetype/freetype-2.4.8-win32/lib -L/home/kyle/software/ffmpeg/packages/fribidi/fribidi-0.19.2-win32/lib -L/home/kyle/software/ffmpeg/packages/libass/libass-0.10.0-win32/lib -L/home/kyle/software/ffmpeg/packages/fontconfig/fontconfig-2.10.1-win32/lib -L/home/kyle/software/ffmpeg/packages/expat/expat-2.1.0-win32/lib -lass -lm -lfontconfig -lexpat -lfribidi -lfreetype -lavifil32 -lm -lbz2 -lz -lpsapi -lshell32 -lpthread 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /midifile-master/src-programs/tobin.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Wed Jan 28 00:22:15 GMT-0800 1998 4 | // Last Modified: Wed Jan 28 00:22:20 GMT-0800 1998 5 | // Filename: ...sig/doc/examples/improv/improv/tobin/tobin.cpp 6 | // Syntax: C++; improv 7 | // $Smake: cc -o %b %f -lg++ && strip %b 8 | // $Smake-linux: g++ -o %b %f && strip %b 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | using namespace std; 19 | 20 | int atohd (const char* aNumber); 21 | void exitUsage (const char* command); 22 | 23 | 24 | int main(int argc, char* argv[]) { 25 | if (argc != 2) exitUsage(argv[0]); 26 | 27 | int aValue; 28 | aValue = atohd(argv[1]); 29 | 30 | for (int i=0; i<32; i++) { 31 | if ((aValue >> (31-i)) & 0x01) { 32 | cout << "1"; 33 | } else { 34 | cout << "0"; 35 | } 36 | if (i%4 == 3) cout << " "; 37 | } 38 | cout << endl; 39 | 40 | return 0; 41 | } 42 | 43 | 44 | 45 | int atohd(const char* aNumber) { 46 | if (strchr(aNumber, 'x') != NULL) { 47 | return (int)strtol(aNumber, (char**)NULL, 16); 48 | } else { 49 | return atoi(aNumber); 50 | } 51 | } 52 | 53 | 54 | 55 | void exitUsage(const char* command) { 56 | cout << endl; 57 | cout << "Converts an integer into binary form.\n"; 58 | cout << endl; 59 | cout << "Usage: " << command << " integer" << endl; 60 | cout << endl; 61 | cout << " integer = [-2147483648..2147483647] \n"; 62 | cout << " [-0x80000000..0x7fffffff] \n"; 63 | cout << endl; 64 | exit(1); 65 | } 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/pkgconfig/libavformat.pc: -------------------------------------------------------------------------------- 1 | prefix=/home/kyle/software/ffmpeg/builds/win32/shared/ffmpeg-20120924-git-bbe9fe4-win32-shared 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libavformat 7 | Description: FFmpeg container format library 8 | Version: 54.28.101 9 | Requires: 10 | Requires.private: libavcodec = 54.58.100 11 | Conflicts: 12 | Libs: -L${libdir} -lavformat 13 | Libs.private: -lavicap32 -lpsapi -lole32 -lstrmiids -luuid -lws2_32 -L/home/kyle/software/ffmpeg/packages/sdl/sdl-1.2.15-win32/lib -lmingw32 -lSDLmain -lSDL -lm -luser32 -lgdi32 -lwinmm -ldxguid -lxvidcore -lxavs -lx264 -lvpx -lvpx -lvorbisenc -lvorbis -logg -lvo-amrwbenc -lvo-aacenc -lutvideo -lstdc++ -ltheoraenc -ltheoradec -logg -lspeex -L/home/kyle/software/ffmpeg/packages/orc/orc-0.4.16-win32/lib -L/home/kyle/software/ffmpeg/packages/schroedinger/schroedinger-1.0.11-win32/lib -lschroedinger-1.0 -lorc-0.4 -lm -L/home/kyle/software/ffmpeg/packages/openssl/openssl-1.0.0g-win32/lib -L/home/kyle/software/ffmpeg/packages/rtmpdump/rtmpdump-20120308-git-7340f6d-win32/lib -lrtmp -lz -lwinmm -lssl -lcrypto -lws2_32 -lgdi32 -lcrypt32 -lopenjpeg -lopencore-amrwb -lopencore-amrnb -lnut -lmp3lame -lgsm -L/home/kyle/software/ffmpeg/packages/freetype/freetype-2.4.8-win32/lib -lfreetype -lcelt0 -lcelt0 -L/home/kyle/software/ffmpeg/packages/freetype/freetype-2.4.8-win32/lib -L/home/kyle/software/ffmpeg/packages/fribidi/fribidi-0.19.2-win32/lib -L/home/kyle/software/ffmpeg/packages/libass/libass-0.10.0-win32/lib -L/home/kyle/software/ffmpeg/packages/fontconfig/fontconfig-2.10.1-win32/lib -L/home/kyle/software/ffmpeg/packages/expat/expat-2.1.0-win32/lib -lass -lm -lfontconfig -lexpat -lfribidi -lfreetype -lavifil32 -lm -lbz2 -lz -lpsapi -lshell32 -lpthread 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/pkgconfig/libavdevice.pc: -------------------------------------------------------------------------------- 1 | prefix=/home/kyle/software/ffmpeg/builds/win32/shared/ffmpeg-20120924-git-bbe9fe4-win32-shared 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libavdevice 7 | Description: FFmpeg device handling library 8 | Version: 54.2.101 9 | Requires: 10 | Requires.private: libavfilter = 3.17.100, libavformat = 54.28.101 11 | Conflicts: 12 | Libs: -L${libdir} -lavdevice 13 | Libs.private: -lavicap32 -lpsapi -lole32 -lstrmiids -luuid -lws2_32 -L/home/kyle/software/ffmpeg/packages/sdl/sdl-1.2.15-win32/lib -lmingw32 -lSDLmain -lSDL -lm -luser32 -lgdi32 -lwinmm -ldxguid -lxvidcore -lxavs -lx264 -lvpx -lvpx -lvorbisenc -lvorbis -logg -lvo-amrwbenc -lvo-aacenc -lutvideo -lstdc++ -ltheoraenc -ltheoradec -logg -lspeex -L/home/kyle/software/ffmpeg/packages/orc/orc-0.4.16-win32/lib -L/home/kyle/software/ffmpeg/packages/schroedinger/schroedinger-1.0.11-win32/lib -lschroedinger-1.0 -lorc-0.4 -lm -L/home/kyle/software/ffmpeg/packages/openssl/openssl-1.0.0g-win32/lib -L/home/kyle/software/ffmpeg/packages/rtmpdump/rtmpdump-20120308-git-7340f6d-win32/lib -lrtmp -lz -lwinmm -lssl -lcrypto -lws2_32 -lgdi32 -lcrypt32 -lopenjpeg -lopencore-amrwb -lopencore-amrnb -lnut -lmp3lame -lgsm -L/home/kyle/software/ffmpeg/packages/freetype/freetype-2.4.8-win32/lib -lfreetype -lcelt0 -lcelt0 -L/home/kyle/software/ffmpeg/packages/freetype/freetype-2.4.8-win32/lib -L/home/kyle/software/ffmpeg/packages/fribidi/fribidi-0.19.2-win32/lib -L/home/kyle/software/ffmpeg/packages/libass/libass-0.10.0-win32/lib -L/home/kyle/software/ffmpeg/packages/fontconfig/fontconfig-2.10.1-win32/lib -L/home/kyle/software/ffmpeg/packages/expat/expat-2.1.0-win32/lib -lass -lm -lfontconfig -lexpat -lfribidi -lfreetype -lavifil32 -lm -lbz2 -lz -lpsapi -lshell32 -lpthread 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/lib/pkgconfig/libavfilter.pc: -------------------------------------------------------------------------------- 1 | prefix=/home/kyle/software/ffmpeg/builds/win32/shared/ffmpeg-20120924-git-bbe9fe4-win32-shared 2 | exec_prefix=${prefix} 3 | libdir=${prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: libavfilter 7 | Description: FFmpeg video filtering library 8 | Version: 3.17.100 9 | Requires: 10 | Requires.private: libpostproc = 52.0.100, libswresample = 0.15.100, libswscale = 2.1.101, libavformat = 54.28.101, libavcodec = 54.58.100 11 | Conflicts: 12 | Libs: -L${libdir} -lavfilter 13 | Libs.private: -lavicap32 -lpsapi -lole32 -lstrmiids -luuid -lws2_32 -L/home/kyle/software/ffmpeg/packages/sdl/sdl-1.2.15-win32/lib -lmingw32 -lSDLmain -lSDL -lm -luser32 -lgdi32 -lwinmm -ldxguid -lxvidcore -lxavs -lx264 -lvpx -lvpx -lvorbisenc -lvorbis -logg -lvo-amrwbenc -lvo-aacenc -lutvideo -lstdc++ -ltheoraenc -ltheoradec -logg -lspeex -L/home/kyle/software/ffmpeg/packages/orc/orc-0.4.16-win32/lib -L/home/kyle/software/ffmpeg/packages/schroedinger/schroedinger-1.0.11-win32/lib -lschroedinger-1.0 -lorc-0.4 -lm -L/home/kyle/software/ffmpeg/packages/openssl/openssl-1.0.0g-win32/lib -L/home/kyle/software/ffmpeg/packages/rtmpdump/rtmpdump-20120308-git-7340f6d-win32/lib -lrtmp -lz -lwinmm -lssl -lcrypto -lws2_32 -lgdi32 -lcrypt32 -lopenjpeg -lopencore-amrwb -lopencore-amrnb -lnut -lmp3lame -lgsm -L/home/kyle/software/ffmpeg/packages/freetype/freetype-2.4.8-win32/lib -lfreetype -lcelt0 -lcelt0 -L/home/kyle/software/ffmpeg/packages/freetype/freetype-2.4.8-win32/lib -L/home/kyle/software/ffmpeg/packages/fribidi/fribidi-0.19.2-win32/lib -L/home/kyle/software/ffmpeg/packages/libass/libass-0.10.0-win32/lib -L/home/kyle/software/ffmpeg/packages/fontconfig/fontconfig-2.10.1-win32/lib -L/home/kyle/software/ffmpeg/packages/expat/expat-2.1.0-win32/lib -lass -lm -lfontconfig -lexpat -lfribidi -lfreetype -lavifil32 -lm -lbz2 -lz -lpsapi -lshell32 -lpthread 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /midifile-master/src-programs/retick.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Mon Jan 8 23:44:16 PST 2018 4 | // Last Modified: Mon Jan 8 23:44:22 PST 2018 5 | // Filename: retick.cpp 6 | // Web Address: https://github.com/craigsapp/midifile/blob/master/src-programs/retick.cpp 7 | // Syntax: C++; museinfo 8 | // vim: ts=3 9 | // 10 | // Description: Change TPQ to a new value and update timestamps for new TPQ to keep 11 | // time values the same as before. 12 | // 13 | 14 | #include "MidiFile.h" 15 | #include "Options.h" 16 | #include 17 | 18 | using namespace std; 19 | 20 | // user interface variables 21 | 22 | ////////////////////////////////////////////////////////////////////////// 23 | 24 | int main(int argc, char* argv[]) { 25 | Options options; 26 | options.define("t|tpq=i:120", "Set TPQ to this value and adjust timestamps"); 27 | options.process(argc, argv); 28 | 29 | int status; 30 | MidiFile midifile; 31 | if (options.getArgCount()) { 32 | status = midifile.read(options.getArg(1)); 33 | } else { 34 | status = midifile.read(cin); 35 | } 36 | if (status == 0) { 37 | cerr << "Error: could not read MIDI file" << endl; 38 | exit(1); 39 | } 40 | 41 | int tpq = midifile.getTicksPerQuarterNote(); 42 | int newtpq = options.getInteger("tpq"); 43 | double factor = (double)newtpq / (double)tpq; 44 | 45 | for (int track=0; track 1) { 55 | midifile.write(options.getArg(2)); 56 | } else { 57 | cout << midifile; 58 | } 59 | 60 | return 0; 61 | } 62 | 63 | 64 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/openjpeg.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2002-2012, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium 3 | * Copyright (c) 2002-2012, Professor Benoit Macq 4 | * Copyright (c) 2003-2012, Antonin Descampe 5 | * Copyright (c) 2003-2009, Francois-Olivier Devaux 6 | * Copyright (c) 2005, Herve Drolon, FreeImage Team 7 | * Copyright (c) 2002-2003, Yannick Verschueren 8 | * Copyright (c) 2001-2003, David Janssens 9 | * All rights reserved. 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions 13 | * are met: 14 | * 1. Redistributions of source code must retain the above copyright 15 | * notice, this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in the 18 | * documentation and/or other materials provided with the distribution. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | * POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/speex.txt: -------------------------------------------------------------------------------- 1 | Copyright 2002-2008 Xiph.org Foundation 2 | Copyright 2002-2008 Jean-Marc Valin 3 | Copyright 2005-2007 Analog Devices Inc. 4 | Copyright 2005-2008 Commonwealth Scientific and Industrial Research 5 | Organisation (CSIRO) 6 | Copyright 1993, 2002, 2006 David Rowe 7 | Copyright 2003 EpicGames 8 | Copyright 1992-1994 Jutta Degener, Carsten Bormann 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions 12 | are met: 13 | 14 | - Redistributions of source code must retain the above copyright 15 | notice, this list of conditions and the following disclaimer. 16 | 17 | - Redistributions in binary form must reproduce the above copyright 18 | notice, this list of conditions and the following disclaimer in the 19 | documentation and/or other materials provided with the distribution. 20 | 21 | - Neither the name of the Xiph.org Foundation nor the names of its 22 | contributors may be used to endorse or promote products derived from 23 | this software without specific prior written permission. 24 | 25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 28 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 29 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 30 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 31 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 32 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 33 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/aes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2007 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_AES_H 22 | #define AVUTIL_AES_H 23 | 24 | #include 25 | 26 | /** 27 | * @defgroup lavu_aes AES 28 | * @ingroup lavu_crypto 29 | * @{ 30 | */ 31 | 32 | extern const int av_aes_size; 33 | 34 | struct AVAES; 35 | 36 | /** 37 | * Initialize an AVAES context. 38 | * @param key_bits 128, 192 or 256 39 | * @param decrypt 0 for encryption, 1 for decryption 40 | */ 41 | int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt); 42 | 43 | /** 44 | * Encrypt or decrypt a buffer using a previously initialized context. 45 | * @param count number of 16 byte blocks 46 | * @param dst destination array, can be equal to src 47 | * @param src source array, can be equal to dst 48 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used 49 | * @param decrypt 0 for encryption, 1 for decryption 50 | */ 51 | void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt); 52 | 53 | /** 54 | * @} 55 | */ 56 | 57 | #endif /* AVUTIL_AES_H */ 58 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavdevice/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg 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 GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVDEVICE_VERSION_H 20 | #define AVDEVICE_VERSION_H 21 | 22 | /** 23 | * @file 24 | * @ingroup lavd 25 | * Libavdevice version macros 26 | */ 27 | 28 | #include "libavutil/avutil.h" 29 | 30 | #define LIBAVDEVICE_VERSION_MAJOR 54 31 | #define LIBAVDEVICE_VERSION_MINOR 2 32 | #define LIBAVDEVICE_VERSION_MICRO 101 33 | 34 | #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ 35 | LIBAVDEVICE_VERSION_MINOR, \ 36 | LIBAVDEVICE_VERSION_MICRO) 37 | #define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \ 38 | LIBAVDEVICE_VERSION_MINOR, \ 39 | LIBAVDEVICE_VERSION_MICRO) 40 | #define LIBAVDEVICE_BUILD LIBAVDEVICE_VERSION_INT 41 | 42 | /** 43 | * FF_API_* defines may be placed below to indicate public API that will be 44 | * dropped at a future version bump. The defines themselves are not part of 45 | * the public API and may change, break or disappear at any time. 46 | */ 47 | 48 | #endif /* AVDEVICE_VERSION_H */ 49 | -------------------------------------------------------------------------------- /midifile-master/src-programs/asciimidi.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Sat May 28 09:56:21 PDT 2016 4 | // Last Modified: Sat May 28 10:34:30 PDT 2016 5 | // Filename: midifile/src-programs/asciimidi.cpp 6 | // Syntax: C++11 7 | // 8 | // Description: Print MIDI file in binasc format, allowing for 9 | // reconversion into a binary Standard MIDI File. 10 | // 11 | 12 | #include "MidiFile.h" 13 | #include "Options.h" 14 | #include 15 | 16 | using namespace std; 17 | 18 | void checkOptions (Options& opts, int argc, char* argv[]); 19 | void printAscii (MidiFile& file, Options& options); 20 | 21 | 22 | int main(int argc, char** argv) { 23 | MidiFile midifile; 24 | Options options; 25 | checkOptions(options, argc, argv); 26 | int filecount = options.getArgCount(); 27 | if (filecount == 0) { 28 | midifile.read(cin); 29 | printAscii(midifile, options); 30 | } else { 31 | for (int i=1; i<=filecount; i++) { 32 | midifile.read(options.getArg(i)); 33 | printAscii(midifile, options); 34 | if (i < filecount) { 35 | cout << "\n\n\n"; 36 | } 37 | } 38 | } 39 | 40 | return 0; 41 | } 42 | 43 | 44 | 45 | ////////////////////////////// 46 | // 47 | // printAscii -- Print a MIDI file in ASCII format (annotated 48 | // hex bytes). 49 | // 50 | 51 | void printAscii(MidiFile& file, Options& options) { 52 | if (options.getBoolean("hex")) { 53 | file.writeHex(cout); 54 | } else if (options.getBoolean("no-comments")) { 55 | file.writeBinasc(cout); 56 | } else { 57 | cout << file; 58 | } 59 | } 60 | 61 | 62 | 63 | ////////////////////////////// 64 | // 65 | // checkOptions -- 66 | // 67 | 68 | void checkOptions(Options& opts, int argc, char* argv[]) { 69 | opts.define("x|hex=b", "Print as ASCII hex bytes"); 70 | opts.define("C|no-comments=b", "Print in binasc format with no comments"); 71 | opts.process(argc, argv); 72 | } 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/intfloat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Mans Rullgard 3 | * 4 | * This file is part of Libav. 5 | * 6 | * Libav is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * Libav is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with Libav; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_INTFLOAT_H 22 | #define AVUTIL_INTFLOAT_H 23 | 24 | #include 25 | #include "attributes.h" 26 | 27 | union av_intfloat32 { 28 | uint32_t i; 29 | float f; 30 | }; 31 | 32 | union av_intfloat64 { 33 | uint64_t i; 34 | double f; 35 | }; 36 | 37 | /** 38 | * Reinterpret a 32-bit integer as a float. 39 | */ 40 | static av_always_inline float av_int2float(uint32_t i) 41 | { 42 | union av_intfloat32 v; 43 | v.i = i; 44 | return v.f; 45 | } 46 | 47 | /** 48 | * Reinterpret a float as a 32-bit integer. 49 | */ 50 | static av_always_inline uint32_t av_float2int(float f) 51 | { 52 | union av_intfloat32 v; 53 | v.f = f; 54 | return v.i; 55 | } 56 | 57 | /** 58 | * Reinterpret a 64-bit integer as a double. 59 | */ 60 | static av_always_inline double av_int2double(uint64_t i) 61 | { 62 | union av_intfloat64 v; 63 | v.i = i; 64 | return v.f; 65 | } 66 | 67 | /** 68 | * Reinterpret a double as a 64-bit integer. 69 | */ 70 | static av_always_inline uint64_t av_double2int(double f) 71 | { 72 | union av_intfloat64 v; 73 | v.f = f; 74 | return v.i; 75 | } 76 | 77 | #endif /* AVUTIL_INTFLOAT_H */ 78 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/xtea.h: -------------------------------------------------------------------------------- 1 | /* 2 | * A 32-bit implementation of the XTEA algorithm 3 | * Copyright (c) 2012 Samuel Pitoiset 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg 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 GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_XTEA_H 23 | #define AVUTIL_XTEA_H 24 | 25 | #include 26 | 27 | /** 28 | * @defgroup lavu_xtea XTEA 29 | * @ingroup lavu_crypto 30 | * @{ 31 | */ 32 | 33 | typedef struct AVXTEA { 34 | uint32_t key[16]; 35 | } AVXTEA; 36 | 37 | /** 38 | * Initialize an AVXTEA context. 39 | * 40 | * @param ctx an AVXTEA context 41 | * @param key a key of 16 bytes used for encryption/decryption 42 | */ 43 | void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]); 44 | 45 | /** 46 | * Encrypt or decrypt a buffer using a previously initialized context. 47 | * 48 | * @param ctx an AVXTEA context 49 | * @param dst destination array, can be equal to src 50 | * @param src source array, can be equal to dst 51 | * @param count number of 8 byte blocks 52 | * @param iv initialization vector for CBC mode, if NULL then ECB will be used 53 | * @param decrypt 0 for encryption, 1 for decryption 54 | */ 55 | void av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src, 56 | int count, uint8_t *iv, int decrypt); 57 | 58 | /** 59 | * @} 60 | */ 61 | 62 | #endif /* AVUTIL_XTEA_H */ 63 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/licenses/bzip2.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------- 3 | 4 | This program, "bzip2", the associated library "libbzip2", and all 5 | documentation, are copyright (C) 1996-2010 Julian R Seward. All 6 | rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 12 | 1. Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | 15 | 2. The origin of this software must not be misrepresented; you must 16 | not claim that you wrote the original software. If you use this 17 | software in a product, an acknowledgment in the product 18 | documentation would be appreciated but is not required. 19 | 20 | 3. Altered source versions must be plainly marked as such, and must 21 | not be misrepresented as being the original software. 22 | 23 | 4. The name of the author may not be used to endorse or promote 24 | products derived from this software without specific prior written 25 | permission. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 28 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 29 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 30 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 31 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 32 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 33 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 35 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 36 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 37 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | 39 | Julian Seward, jseward@bzip.org 40 | bzip2/libbzip2 version 1.0.6 of 6 September 2010 41 | 42 | -------------------------------------------------------------------------- 43 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/sha.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_SHA_H 22 | #define AVUTIL_SHA_H 23 | 24 | #include 25 | 26 | /** 27 | * @defgroup lavu_sha SHA 28 | * @ingroup lavu_crypto 29 | * @{ 30 | */ 31 | 32 | extern const int av_sha_size; 33 | 34 | struct AVSHA; 35 | 36 | /** 37 | * Initialize SHA-1 or SHA-2 hashing. 38 | * 39 | * @param context pointer to the function context (of size av_sha_size) 40 | * @param bits number of bits in digest (SHA-1 - 160 bits, SHA-2 224 or 256 bits) 41 | * @return zero if initialization succeeded, -1 otherwise 42 | */ 43 | int av_sha_init(struct AVSHA* context, int bits); 44 | 45 | /** 46 | * Update hash value. 47 | * 48 | * @param context hash function context 49 | * @param data input data to update hash with 50 | * @param len input data length 51 | */ 52 | void av_sha_update(struct AVSHA* context, const uint8_t* data, unsigned int len); 53 | 54 | /** 55 | * Finish hashing and output digest value. 56 | * 57 | * @param context hash function context 58 | * @param digest buffer where output digest value is stored 59 | */ 60 | void av_sha_final(struct AVSHA* context, uint8_t *digest); 61 | 62 | /** 63 | * @} 64 | */ 65 | 66 | #endif /* AVUTIL_SHA_H */ 67 | -------------------------------------------------------------------------------- /midifile-master/include/MidiEventList.h: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Sat Feb 14 21:55:38 PST 2015 4 | // Last Modified: Sat Feb 14 21:55:40 PST 2015 5 | // Filename: midifile/include/MidiEventList.h 6 | // Website: http://midifile.sapp.org 7 | // Syntax: C++11 8 | // vim: ts=3 expandtab 9 | // 10 | // Description: A class which stores a MidiEvents for a MidiFile track. 11 | // 12 | 13 | #ifndef _MIDIEVENTLIST_H_INCLUDED 14 | #define _MIDIEVENTLIST_H_INCLUDED 15 | 16 | #include "MidiEvent.h" 17 | #include 18 | 19 | using namespace std; 20 | 21 | class MidiEventList { 22 | public: 23 | MidiEventList (void); 24 | 25 | ~MidiEventList (); 26 | 27 | MidiEventList (const MidiEventList& other); 28 | MidiEventList (MidiEventList&& other); 29 | 30 | MidiEvent& operator[] (int index); 31 | const MidiEvent& operator[] (int index) const; 32 | MidiEvent& back (void); 33 | MidiEvent& last (void); 34 | MidiEvent& getEvent (int index); 35 | void clear (void); 36 | void reserve (int rsize); 37 | int getSize (void) const; 38 | int size (void) const; 39 | int linkNotePairs (void); 40 | int linkEventPairs (void); 41 | void clearLinks (void); 42 | MidiEvent** data (void); 43 | 44 | int push (MidiEvent& event); 45 | int push_back (MidiEvent& event); 46 | int append (MidiEvent& event); 47 | 48 | // careful when using these, intended for internal use in MidiFile class: 49 | void detach (void); 50 | int push_back_no_copy (MidiEvent* event); 51 | 52 | MidiEventList& operator=(MidiEventList other); 53 | 54 | private: 55 | vector list; 56 | 57 | }; 58 | 59 | 60 | #endif /* _MIDIEVENTLIST_H_INCLUDED */ 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /midifile-master/src-programs/todec.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Tue Dec 9 21:10:17 PST 1997 4 | // Last Modified: Tue Jan 27 21:23:19 GMT-0800 1998 5 | // Last Modified: Wed Jun 7 20:55:18 PDT 2000 (added signed/unsigned option) 6 | // Filename: ...sig/doc/examples/all/todec/todec.cpp 7 | // Syntax: C++ 8 | // $Smake: g++ -o %b %f && strip %b 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | using namespace std; 18 | 19 | unsigned long atohd (const char* aNumber); 20 | void exitUsage (const char* command); 21 | 22 | 23 | int main(int argc, char* argv[]) { 24 | char* numberstring = NULL; 25 | int sign = 0; 26 | 27 | if (argc < 2) { 28 | exitUsage(argv[0]); 29 | } else if (argc == 3) { 30 | if (strcmp(argv[1], "-s") == 0) { 31 | sign = 1; 32 | } else { 33 | exitUsage(argv[0]); 34 | } 35 | numberstring = argv[2]; 36 | } else if (argc == 2) { 37 | numberstring = argv[1]; 38 | } else { 39 | exitUsage(argv[0]); 40 | } 41 | 42 | if (numberstring[0] == 'o' || numberstring[0] == 'O') { 43 | numberstring[0] = '0'; 44 | } 45 | 46 | unsigned long aValue; 47 | aValue = atohd(numberstring); 48 | if (sign) { 49 | cout << (long)aValue << endl; 50 | } else { 51 | cout << aValue << endl; 52 | } 53 | 54 | return 0; 55 | } 56 | 57 | 58 | unsigned long atohd(const char* aNumber) { 59 | return (int)strtoul(aNumber, (char**)NULL, 16); 60 | } 61 | 62 | 63 | 64 | void exitUsage(const char* command) { 65 | cout << "\n" 66 | "Converts an integer into decimal form.\n" 67 | "\n" 68 | "Usage: " << command << " [-s] integer\n" 69 | "\n" 70 | "Options:\n" 71 | " -s = interpret hex values as signed values\n" 72 | "\n" 73 | " signed integer = [-0x80000000..0x7fffffff] \n" 74 | " [-2147483648..2147483647] \n" 75 | " unsigned integer = [0x00000000..0xffffffff] \n" 76 | " [0..4294967295] \n" 77 | << endl; 78 | exit(1); 79 | } 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/base64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006 Ryan Martell. (rdm4@martellventures.com) 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_BASE64_H 22 | #define AVUTIL_BASE64_H 23 | 24 | #include 25 | 26 | /** 27 | * @defgroup lavu_base64 Base64 28 | * @ingroup lavu_crypto 29 | * @{ 30 | */ 31 | 32 | 33 | /** 34 | * Decode a base64-encoded string. 35 | * 36 | * @param out buffer for decoded data 37 | * @param in null-terminated input string 38 | * @param out_size size in bytes of the out buffer, must be at 39 | * least 3/4 of the length of in 40 | * @return number of bytes written, or a negative value in case of 41 | * invalid input 42 | */ 43 | int av_base64_decode(uint8_t *out, const char *in, int out_size); 44 | 45 | /** 46 | * Encode data to base64 and null-terminate. 47 | * 48 | * @param out buffer for encoded data 49 | * @param out_size size in bytes of the output buffer, must be at 50 | * least AV_BASE64_SIZE(in_size) 51 | * @param in_size size in bytes of the 'in' buffer 52 | * @return 'out' or NULL in case of error 53 | */ 54 | char *av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size); 55 | 56 | /** 57 | * Calculate the output size needed to base64-encode x bytes. 58 | */ 59 | #define AV_BASE64_SIZE(x) (((x)+2) / 3 * 4 + 1) 60 | 61 | /** 62 | * @} 63 | */ 64 | 65 | #endif /* AVUTIL_BASE64_H */ 66 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/lfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Lagged Fibonacci PRNG 3 | * Copyright (c) 2008 Michael Niedermayer 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg 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 GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_LFG_H 23 | #define AVUTIL_LFG_H 24 | 25 | typedef struct { 26 | unsigned int state[64]; 27 | int index; 28 | } AVLFG; 29 | 30 | void av_lfg_init(AVLFG *c, unsigned int seed); 31 | 32 | /** 33 | * Get the next random unsigned 32-bit number using an ALFG. 34 | * 35 | * Please also consider a simple LCG like state= state*1664525+1013904223, 36 | * it may be good enough and faster for your specific use case. 37 | */ 38 | static inline unsigned int av_lfg_get(AVLFG *c){ 39 | c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63]; 40 | return c->state[c->index++ & 63]; 41 | } 42 | 43 | /** 44 | * Get the next random unsigned 32-bit number using a MLFG. 45 | * 46 | * Please also consider av_lfg_get() above, it is faster. 47 | */ 48 | static inline unsigned int av_mlfg_get(AVLFG *c){ 49 | unsigned int a= c->state[(c->index-55) & 63]; 50 | unsigned int b= c->state[(c->index-24) & 63]; 51 | return c->state[c->index++ & 63] = 2*a*b+a+b; 52 | } 53 | 54 | /** 55 | * Get the next two numbers generated by a Box-Muller Gaussian 56 | * generator using the random numbers issued by lfg. 57 | * 58 | * @param out array where the two generated numbers are placed 59 | */ 60 | void av_bmg_get(AVLFG *lfg, double out[2]); 61 | 62 | #endif /* AVUTIL_LFG_H */ 63 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libswscale/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg 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 GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef SWSCALE_VERSION_H 20 | #define SWSCALE_VERSION_H 21 | 22 | /** 23 | * @file 24 | * swscale version macros 25 | */ 26 | 27 | #include "libavutil/avutil.h" 28 | 29 | #define LIBSWSCALE_VERSION_MAJOR 2 30 | #define LIBSWSCALE_VERSION_MINOR 1 31 | #define LIBSWSCALE_VERSION_MICRO 101 32 | 33 | #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ 34 | LIBSWSCALE_VERSION_MINOR, \ 35 | LIBSWSCALE_VERSION_MICRO) 36 | #define LIBSWSCALE_VERSION AV_VERSION(LIBSWSCALE_VERSION_MAJOR, \ 37 | LIBSWSCALE_VERSION_MINOR, \ 38 | LIBSWSCALE_VERSION_MICRO) 39 | #define LIBSWSCALE_BUILD LIBSWSCALE_VERSION_INT 40 | 41 | #define LIBSWSCALE_IDENT "SwS" AV_STRINGIFY(LIBSWSCALE_VERSION) 42 | 43 | /** 44 | * FF_API_* defines may be placed below to indicate public API that will be 45 | * dropped at a future version bump. The defines themselves are not part of 46 | * the public API and may change, break or disappear at any time. 47 | */ 48 | 49 | #ifndef FF_API_SWS_GETCONTEXT 50 | #define FF_API_SWS_GETCONTEXT (LIBSWSCALE_VERSION_MAJOR < 3) 51 | #endif 52 | #ifndef FF_API_SWS_CPU_CAPS 53 | #define FF_API_SWS_CPU_CAPS (LIBSWSCALE_VERSION_MAJOR < 3) 54 | #endif 55 | #ifndef FF_API_SWS_FORMAT_NAME 56 | #define FF_API_SWS_FORMAT_NAME (LIBSWSCALE_VERSION_MAJOR < 3) 57 | #endif 58 | 59 | #endif /* SWSCALE_VERSION_H */ 60 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/avassert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2010 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /** 22 | * @file 23 | * simple assert() macros that are a bit more flexible than ISO C assert(). 24 | * @author Michael Niedermayer 25 | */ 26 | 27 | #ifndef AVUTIL_AVASSERT_H 28 | #define AVUTIL_AVASSERT_H 29 | 30 | #include 31 | #include "avutil.h" 32 | #include "log.h" 33 | 34 | /** 35 | * assert() equivalent, that is always enabled. 36 | */ 37 | #define av_assert0(cond) do { \ 38 | if (!(cond)) { \ 39 | av_log(NULL, AV_LOG_FATAL, "Assertion %s failed at %s:%d\n", \ 40 | AV_STRINGIFY(cond), __FILE__, __LINE__); \ 41 | abort(); \ 42 | } \ 43 | } while (0) 44 | 45 | 46 | /** 47 | * assert() equivalent, that does not lie in speed critical code. 48 | * These asserts() thus can be enabled without fearing speedloss. 49 | */ 50 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0 51 | #define av_assert1(cond) av_assert0(cond) 52 | #else 53 | #define av_assert1(cond) ((void)0) 54 | #endif 55 | 56 | 57 | /** 58 | * assert() equivalent, that does lie in speed critical code. 59 | */ 60 | #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 1 61 | #define av_assert2(cond) av_assert0(cond) 62 | #else 63 | #define av_assert2(cond) ((void)0) 64 | #endif 65 | 66 | #endif /* AVUTIL_AVASSERT_H */ 67 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavdevice/avdevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg 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 GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVDEVICE_AVDEVICE_H 20 | #define AVDEVICE_AVDEVICE_H 21 | 22 | #include "version.h" 23 | 24 | /** 25 | * @file 26 | * @ingroup lavd 27 | * Main libavdevice API header 28 | */ 29 | 30 | /** 31 | * @defgroup lavd Special devices muxing/demuxing library 32 | * @{ 33 | * Libavdevice is a complementary library to @ref libavf "libavformat". It 34 | * provides various "special" platform-specific muxers and demuxers, e.g. for 35 | * grabbing devices, audio capture and playback etc. As a consequence, the 36 | * (de)muxers in libavdevice are of the AVFMT_NOFILE type (they use their own 37 | * I/O functions). The filename passed to avformat_open_input() often does not 38 | * refer to an actually existing file, but has some special device-specific 39 | * meaning - e.g. for x11grab it is the display name. 40 | * 41 | * To use libavdevice, simply call avdevice_register_all() to register all 42 | * compiled muxers and demuxers. They all use standard libavformat API. 43 | * @} 44 | */ 45 | 46 | #include "libavformat/avformat.h" 47 | 48 | /** 49 | * Return the LIBAVDEVICE_VERSION_INT constant. 50 | */ 51 | unsigned avdevice_version(void); 52 | 53 | /** 54 | * Return the libavdevice build-time configuration. 55 | */ 56 | const char *avdevice_configuration(void); 57 | 58 | /** 59 | * Return the libavdevice license. 60 | */ 61 | const char *avdevice_license(void); 62 | 63 | /** 64 | * Initialize libavdevice and register all the input and output devices. 65 | * @warning This function is not thread safe. 66 | */ 67 | void avdevice_register_all(void); 68 | 69 | #endif /* AVDEVICE_AVDEVICE_H */ 70 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg 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 GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVUTIL_FILE_H 20 | #define AVUTIL_FILE_H 21 | 22 | #include 23 | 24 | #include "avutil.h" 25 | 26 | /** 27 | * @file 28 | * Misc file utilities. 29 | */ 30 | 31 | /** 32 | * Read the file with name filename, and put its content in a newly 33 | * allocated buffer or map it with mmap() when available. 34 | * In case of success set *bufptr to the read or mmapped buffer, and 35 | * *size to the size in bytes of the buffer in *bufptr. 36 | * The returned buffer must be released with av_file_unmap(). 37 | * 38 | * @param log_offset loglevel offset used for logging 39 | * @param log_ctx context used for logging 40 | * @return a non negative number in case of success, a negative value 41 | * corresponding to an AVERROR error code in case of failure 42 | */ 43 | int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, 44 | int log_offset, void *log_ctx); 45 | 46 | /** 47 | * Unmap or free the buffer bufptr created by av_file_map(). 48 | * 49 | * @param size size in bytes of bufptr, must be the same as returned 50 | * by av_file_map() 51 | */ 52 | void av_file_unmap(uint8_t *bufptr, size_t size); 53 | 54 | /** 55 | * Wrapper to work around the lack of mkstemp() on mingw. 56 | * Also, tries to create file in /tmp first, if possible. 57 | * *prefix can be a character constant; *filename will be allocated internally. 58 | * @return file descriptor of opened file (or -1 on error) 59 | * and opened file name in **filename. 60 | */ 61 | int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx); 62 | 63 | #endif /* AVUTIL_FILE_H */ 64 | -------------------------------------------------------------------------------- /midifile-master/include/MidiEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Sat Feb 14 21:47:39 PST 2015 4 | // Last Modified: Sat Feb 14 21:54:52 PST 2015 5 | // Filename: midifile/include/MidiEvent.h 6 | // Website: http://midifile.sapp.org 7 | // Syntax: C++11 8 | // vim: ts=3 expandtab 9 | // 10 | // Description: A class which stores a MidiMessage and a timestamp 11 | // for the MidiFile class. 12 | // 13 | 14 | #ifndef _MIDIEVENT_H_INCLUDED 15 | #define _MIDIEVENT_H_INCLUDED 16 | 17 | #include "MidiMessage.h" 18 | #include 19 | 20 | using namespace std; 21 | 22 | typedef unsigned char uchar; 23 | typedef unsigned short ushort; 24 | typedef unsigned long ulong; 25 | 26 | class MidiEvent : public MidiMessage { 27 | public: 28 | MidiEvent (void); 29 | MidiEvent (int command); 30 | MidiEvent (int command, int param1); 31 | MidiEvent (int command, int param1, int param2); 32 | MidiEvent (int aTime, int aTrack, vector& message); 33 | MidiEvent (const MidiMessage& message); 34 | MidiEvent (const MidiEvent& mfevent); 35 | 36 | ~MidiEvent (); 37 | 38 | MidiEvent& operator= (const MidiEvent& mfevent); 39 | MidiEvent& operator= (const MidiMessage& message); 40 | MidiEvent& operator= (const vector& bytes); 41 | MidiEvent& operator= (const vector& bytes); 42 | MidiEvent& operator= (const vector& bytes); 43 | void clearVariables(void); 44 | 45 | // functions related to event linking (note-ons to note-offs). 46 | void unlinkEvent (void); 47 | void unlinkEvents (void); 48 | void linkEvent (MidiEvent* mev); 49 | void linkEvents (MidiEvent* mev); 50 | void linkEvent (MidiEvent& mev); 51 | void linkEvents (MidiEvent& mev); 52 | int isLinked (void); 53 | MidiEvent* getLinkedEvent(void); 54 | int getTickDuration(void); 55 | double getDurationInSeconds(void); 56 | 57 | int tick; 58 | int track; 59 | double seconds; 60 | int seq; 61 | 62 | private: 63 | MidiEvent* eventlink; // used to match note-ons and note-offs 64 | 65 | }; 66 | 67 | 68 | #endif /* _MIDIEVENT_H_INCLUDED */ 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavcodec/dxva2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DXVA2 HW acceleration 3 | * 4 | * copyright (c) 2009 Laurent Aimar 5 | * 6 | * This file is part of FFmpeg. 7 | * 8 | * FFmpeg is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU Lesser General Public 10 | * License as published by the Free Software Foundation; either 11 | * version 2.1 of the License, or (at your option) any later version. 12 | * 13 | * FFmpeg is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * Lesser General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Lesser General Public 19 | * License along with FFmpeg; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | */ 22 | 23 | #ifndef AVCODEC_DXVA_H 24 | #define AVCODEC_DXVA_H 25 | 26 | /** 27 | * @file 28 | * @ingroup lavc_codec_hwaccel_dxva2 29 | * Public libavcodec DXVA2 header. 30 | */ 31 | 32 | #include 33 | 34 | #include 35 | #include 36 | 37 | /** 38 | * @defgroup lavc_codec_hwaccel_dxva2 DXVA2 39 | * @ingroup lavc_codec_hwaccel 40 | * 41 | * @{ 42 | */ 43 | 44 | #define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards 45 | 46 | /** 47 | * This structure is used to provides the necessary configurations and data 48 | * to the DXVA2 FFmpeg HWAccel implementation. 49 | * 50 | * The application must make it available as AVCodecContext.hwaccel_context. 51 | */ 52 | struct dxva_context { 53 | /** 54 | * DXVA2 decoder object 55 | */ 56 | IDirectXVideoDecoder *decoder; 57 | 58 | /** 59 | * DXVA2 configuration used to create the decoder 60 | */ 61 | const DXVA2_ConfigPictureDecode *cfg; 62 | 63 | /** 64 | * The number of surface in the surface array 65 | */ 66 | unsigned surface_count; 67 | 68 | /** 69 | * The array of Direct3D surfaces used to create the decoder 70 | */ 71 | LPDIRECT3DSURFACE9 *surface; 72 | 73 | /** 74 | * A bit field configuring the workarounds needed for using the decoder 75 | */ 76 | uint64_t workaround; 77 | 78 | /** 79 | * Private to the FFmpeg AVHWAccel implementation 80 | */ 81 | unsigned report_id; 82 | }; 83 | 84 | /** 85 | * @} 86 | */ 87 | 88 | #endif /* AVCODEC_DXVA_H */ 89 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavfilter/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVFILTER_VERSION_H 22 | #define AVFILTER_VERSION_H 23 | 24 | /** 25 | * @file 26 | * Libavfilter version macros 27 | */ 28 | 29 | #include "libavutil/avutil.h" 30 | 31 | #define LIBAVFILTER_VERSION_MAJOR 3 32 | #define LIBAVFILTER_VERSION_MINOR 17 33 | #define LIBAVFILTER_VERSION_MICRO 100 34 | 35 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ 36 | LIBAVFILTER_VERSION_MINOR, \ 37 | LIBAVFILTER_VERSION_MICRO) 38 | #define LIBAVFILTER_VERSION AV_VERSION(LIBAVFILTER_VERSION_MAJOR, \ 39 | LIBAVFILTER_VERSION_MINOR, \ 40 | LIBAVFILTER_VERSION_MICRO) 41 | #define LIBAVFILTER_BUILD LIBAVFILTER_VERSION_INT 42 | 43 | /** 44 | * FF_API_* defines may be placed below to indicate public API that will be 45 | * dropped at a future version bump. The defines themselves are not part of 46 | * the public API and may change, break or disappear at any time. 47 | */ 48 | 49 | #ifndef FF_API_OLD_ALL_FORMATS_API 50 | #define FF_API_OLD_ALL_FORMATS_API (LIBAVFILTER_VERSION_MAJOR < 3) 51 | #endif 52 | #ifndef FF_API_AVFILTERPAD_PUBLIC 53 | #define FF_API_AVFILTERPAD_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 4) 54 | #endif 55 | #ifndef FF_API_FOO_COUNT 56 | #define FF_API_FOO_COUNT (LIBAVFILTER_VERSION_MAJOR < 4) 57 | #endif 58 | #ifndef FF_API_FILL_FRAME 59 | #define FF_API_FILL_FRAME (LIBAVFILTER_VERSION_MAJOR < 4) 60 | #endif 61 | #ifndef FF_API_BUFFERSRC_BUFFER 62 | #define FF_API_BUFFERSRC_BUFFER (LIBAVFILTER_VERSION_MAJOR < 4) 63 | #endif 64 | 65 | #endif /* AVFILTER_VERSION_H */ 66 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/blowfish.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Blowfish algorithm 3 | * Copyright (c) 2012 Samuel Pitoiset 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg 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 GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_BLOWFISH_H 23 | #define AVUTIL_BLOWFISH_H 24 | 25 | #include 26 | 27 | /** 28 | * @defgroup lavu_blowfish Blowfish 29 | * @ingroup lavu_crypto 30 | * @{ 31 | */ 32 | 33 | #define AV_BF_ROUNDS 16 34 | 35 | typedef struct AVBlowfish { 36 | uint32_t p[AV_BF_ROUNDS + 2]; 37 | uint32_t s[4][256]; 38 | } AVBlowfish; 39 | 40 | /** 41 | * Initialize an AVBlowfish context. 42 | * 43 | * @param ctx an AVBlowfish context 44 | * @param key a key 45 | * @param key_len length of the key 46 | */ 47 | void av_blowfish_init(struct AVBlowfish *ctx, const uint8_t *key, int key_len); 48 | 49 | /** 50 | * Encrypt or decrypt a buffer using a previously initialized context. 51 | * 52 | * @param ctx an AVBlowfish context 53 | * @param xl left four bytes halves of input to be encrypted 54 | * @param xr right four bytes halves of input to be encrypted 55 | * @param decrypt 0 for encryption, 1 for decryption 56 | */ 57 | void av_blowfish_crypt_ecb(struct AVBlowfish *ctx, uint32_t *xl, uint32_t *xr, 58 | int decrypt); 59 | 60 | /** 61 | * Encrypt or decrypt a buffer using a previously initialized context. 62 | * 63 | * @param ctx an AVBlowfish context 64 | * @param dst destination array, can be equal to src 65 | * @param src source array, can be equal to dst 66 | * @param count number of 8 byte blocks 67 | * @param iv initialization vector for CBC mode, if NULL ECB will be used 68 | * @param decrypt 0 for encryption, 1 for decryption 69 | */ 70 | void av_blowfish_crypt(struct AVBlowfish *ctx, uint8_t *dst, const uint8_t *src, 71 | int count, uint8_t *iv, int decrypt); 72 | 73 | /** 74 | * @} 75 | */ 76 | 77 | #endif /* AVUTIL_BLOWFISH_H */ 78 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/timestamp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg 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 GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | /** 20 | * @file 21 | * timestamp utils, mostly useful for debugging/logging purposes 22 | */ 23 | 24 | #ifndef AVUTIL_TIMESTAMP_H 25 | #define AVUTIL_TIMESTAMP_H 26 | 27 | #include "common.h" 28 | 29 | #define AV_TS_MAX_STRING_SIZE 32 30 | 31 | /** 32 | * Fill the provided buffer with a string containing a timestamp 33 | * representation. 34 | * 35 | * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE 36 | * @param ts the timestamp to represent 37 | * @return the buffer in input 38 | */ 39 | static inline char *av_ts_make_string(char *buf, int64_t ts) 40 | { 41 | if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS"); 42 | else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%"PRId64"", ts); 43 | return buf; 44 | } 45 | 46 | /** 47 | * Convenience macro, the return value should be used only directly in 48 | * function arguments but never stand-alone. 49 | */ 50 | #define av_ts2str(ts) av_ts_make_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts) 51 | 52 | /** 53 | * Fill the provided buffer with a string containing a timestamp time 54 | * representation. 55 | * 56 | * @param buf a buffer with size in bytes of at least AV_TS_MAX_STRING_SIZE 57 | * @param ts the timestamp to represent 58 | * @param tb the timebase of the timestamp 59 | * @return the buffer in input 60 | */ 61 | static inline char *av_ts_make_time_string(char *buf, int64_t ts, AVRational *tb) 62 | { 63 | if (ts == AV_NOPTS_VALUE) snprintf(buf, AV_TS_MAX_STRING_SIZE, "NOPTS"); 64 | else snprintf(buf, AV_TS_MAX_STRING_SIZE, "%.6g", av_q2d(*tb) * ts); 65 | return buf; 66 | } 67 | 68 | /** 69 | * Convenience macro, the return value should be used only directly in 70 | * function arguments but never stand-alone. 71 | */ 72 | #define av_ts2timestr(ts, tb) av_ts_make_time_string((char[AV_TS_MAX_STRING_SIZE]){0}, ts, tb) 73 | 74 | #endif /* AVUTIL_TIMESTAMP_H */ 75 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/lzo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LZO 1x decompression 3 | * copyright (c) 2006 Reimar Doeffinger 4 | * 5 | * This file is part of FFmpeg. 6 | * 7 | * FFmpeg is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Lesser General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2.1 of the License, or (at your option) any later version. 11 | * 12 | * FFmpeg 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 GNU 15 | * Lesser General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public 18 | * License along with FFmpeg; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 | */ 21 | 22 | #ifndef AVUTIL_LZO_H 23 | #define AVUTIL_LZO_H 24 | 25 | /** 26 | * @defgroup lavu_lzo LZO 27 | * @ingroup lavu_crypto 28 | * 29 | * @{ 30 | */ 31 | 32 | #include 33 | 34 | /** @name Error flags returned by av_lzo1x_decode 35 | * @{ */ 36 | /// end of the input buffer reached before decoding finished 37 | #define AV_LZO_INPUT_DEPLETED 1 38 | /// decoded data did not fit into output buffer 39 | #define AV_LZO_OUTPUT_FULL 2 40 | /// a reference to previously decoded data was wrong 41 | #define AV_LZO_INVALID_BACKPTR 4 42 | /// a non-specific error in the compressed bitstream 43 | #define AV_LZO_ERROR 8 44 | /** @} */ 45 | 46 | #define AV_LZO_INPUT_PADDING 8 47 | #define AV_LZO_OUTPUT_PADDING 12 48 | 49 | /** 50 | * @brief Decodes LZO 1x compressed data. 51 | * @param out output buffer 52 | * @param outlen size of output buffer, number of bytes left are returned here 53 | * @param in input buffer 54 | * @param inlen size of input buffer, number of bytes left are returned here 55 | * @return 0 on success, otherwise a combination of the error flags above 56 | * 57 | * Make sure all buffers are appropriately padded, in must provide 58 | * AV_LZO_INPUT_PADDING, out must provide AV_LZO_OUTPUT_PADDING additional bytes. 59 | */ 60 | int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen); 61 | 62 | /** 63 | * @brief deliberately overlapping memcpy implementation 64 | * @param dst destination buffer; must be padded with 12 additional bytes 65 | * @param back how many bytes back we start (the initial size of the overlapping window), must be > 0 66 | * @param cnt number of bytes to copy, must be >= 0 67 | * 68 | * cnt > back is valid, this will copy the bytes we just copied, 69 | * thus creating a repeating pattern with a period length of back. 70 | */ 71 | void av_memcpy_backptr(uint8_t *dst, int back, int cnt); 72 | 73 | /** 74 | * @} 75 | */ 76 | 77 | #endif /* AVUTIL_LZO_H */ 78 | -------------------------------------------------------------------------------- /midifile-master/Makefile: -------------------------------------------------------------------------------- 1 | ## 2 | ## Main GNU makefile for Midifile library. 3 | ## 4 | ## Programmer: Craig Stuart Sapp 5 | ## Creation Date: Sun Apr 3 00:44:44 PST 2005 6 | ## Last Modified: Mon Feb 9 12:59:54 PST 2015 7 | ## Filename: midifile/Makefile 8 | ## Website: http://midifile.sapp.org 9 | ## Syntax: GNU Makefile 10 | ## Description: This Makefile can create the Midifile library and/or 11 | ## example programs which use the Midifile library. 12 | ## 13 | ## To run this makefile, type: 14 | ## make library 15 | ## then: 16 | ## make programs 17 | ## Or type: 18 | ## make 19 | ## to compile both the library and the programs at the same time. 20 | ## 21 | 22 | 23 | 24 | ############################## 25 | ## 26 | ## Targets: 27 | ## 28 | 29 | # targets which don't actually refer to files 30 | .PHONY : all info library examples programs bin options clean lib 31 | 32 | 33 | all: info library programs lib 34 | 35 | 36 | info: 37 | @echo "" 38 | @echo This makefile will compile the Midifile library and/or 39 | @echo the Midifile programs. You may have to make the library 40 | @echo first if compiling the programs. Type one of the following: 41 | @echo " make library" 42 | @echo or 43 | @echo " make programs" 44 | @echo "" 45 | @echo To compile a specific program called xxx, type: 46 | @echo " make xxx" 47 | @echo "" 48 | @echo Typing \"make\" alone will compile both the library and all programs. 49 | @echo "" 50 | 51 | 52 | lib: library 53 | library: 54 | $(MAKE) -f Makefile.library 55 | 56 | 57 | clean: 58 | $(MAKE) -f Makefile.library clean 59 | -rm -rf bin 60 | -rm -rf lib 61 | 62 | 63 | bin: programs 64 | examples: programs 65 | programs: 66 | $(MAKE) -f Makefile.programs 67 | 68 | 69 | options: 70 | # The Options class is borrowed from optionlib: 71 | # https://github.com/craigsapp/optionlib 72 | # This code downloads the most recent version of the Option class, and the 73 | # Option class should not be modified within this library. The Option 74 | # class is only needed by some of the example programs. It is not 75 | # necessary if you only want to use the compiled MidiFile library. 76 | ifneq ($(shell which wget),) 77 | wget https://raw.githubusercontent.com/craigsapp/optionlib/master/src/Options.cpp -O src/Options.cpp 78 | wget https://raw.githubusercontent.com/craigsapp/optionlib/master/include/Options.h -O include/Options.h 79 | else ifneq ($(shell which curl),) 80 | curl https://raw.githubusercontent.com/craigsapp/optionlib/master/src/Options.cpp -o src/Options.cpp 81 | curl https://raw.githubusercontent.com/craigsapp/optionlib/master/include/Options.h -O include/Options.h 82 | endif 83 | 84 | 85 | 86 | ############################## 87 | ## 88 | ## Default target: compile a particular program: 89 | ## 90 | 91 | %: 92 | @-mkdir -p bin 93 | @echo compiling file $@ 94 | $(MAKE) -f Makefile.programs $@ 95 | 96 | 97 | -------------------------------------------------------------------------------- /midifile-master/src-programs/createmidifile2.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Tue Feb 16 20:00:41 PST 2016 4 | // Last Modified: Tue Feb 16 20:16:17 PST 2016 5 | // Filename: midifile/src-programs/createmidifile2.cpp 6 | // Syntax: C++11 7 | // 8 | // Description: Demonstration of how to create a Multi-track MIDI file 9 | // with convenience functions. 10 | // 11 | 12 | #include "MidiFile.h" 13 | #include 14 | 15 | using namespace std; 16 | 17 | /////////////////////////////////////////////////////////////////////////// 18 | 19 | int main(int argc, char** argv) { 20 | MidiFile midifile; 21 | midifile.addTracks(2); // Add another two tracks to the MIDI file 22 | int tpq = 120; // ticks per quarter note 23 | midifile.setTicksPerQuarterNote(tpq); 24 | 25 | // melody to write to MIDI track 1: (60 = middle C) 26 | // C5 C G G A A G- F F E E D D C- 27 | int melody[50] = {72,72,79,79,81,81,79,77,77,76,76,74,74,72,-1}; 28 | int mrhythm[50] = { 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2,-1}; 29 | 30 | // C3 C4 E C F C E C D B3 C4 A3 F G C- 31 | int bass[50] = {48,60,64,60,65,60,64,60,62,59,60,57,53,55,48,-1}; 32 | int brhythm[50]= { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,-1}; 33 | 34 | int actiontick = 0; 35 | int track = 0; 36 | 37 | // Add some expression track (track 0) messages: 38 | midifile.addTrackName(track, actiontick, "Twinkle, Twinkle Little Star"); 39 | midifile.addTempo(track, actiontick, 104.0); 40 | 41 | // Store melody line in track 1 42 | int i = 0; 43 | int velocity = 64; 44 | int channel = 0; 45 | track = 1; 46 | 47 | midifile.addTrackName(track, actiontick, "Melody"); 48 | midifile.addPatchChange(track, actiontick, channel, 40); // 40=violin 49 | 50 | while (melody[i] >= 0) { 51 | midifile.addNoteOn(track, actiontick, channel, melody[i], velocity); 52 | actiontick += tpq * mrhythm[i]; 53 | midifile.addNoteOff(track, actiontick, channel, melody[i], velocity); 54 | i++; 55 | } 56 | 57 | // Store a base line in track 2 on channel 1 (indexed from 0): 58 | i = 0; 59 | actiontick = 0; 60 | velocity = 90; 61 | channel = 1; 62 | track = 2; 63 | 64 | midifile.addTrackName(track, actiontick, "Bass line"); 65 | midifile.addPatchChange(track, actiontick, channel, 58); // 58=tuba 66 | 67 | while (bass[i] >= 0) { 68 | midifile.addNoteOn(track, actiontick, channel, bass[i], velocity); 69 | actiontick += tpq * brhythm[i]; 70 | midifile.addNoteOff(track, actiontick, channel, bass[i], velocity); 71 | i++; 72 | } 73 | 74 | midifile.sortTracks(); // ensure tick times are in correct order 75 | midifile.write("twinkle.mid"); // write Standard MIDI File twinkle.mid 76 | return 0; 77 | } 78 | 79 | 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # syn2midi 2 | Create pianobooster midi from youtube piano video lessons (Synthesia). 3 | 4 | I can't read sheet music very well and prefer to use pianobooster to learn. 5 | It was always upset me, the lack of midi files to learn new music in the internet. 6 | There's plenty of Synthesia piano video lessons on youtube though.. 7 | So here you have it. A youtube video lesson to MIDI converter. 8 | 9 | ## If you like it, please support: 10 | Support! 11 | 12 | ## Installation: 13 | - For Windows, download and unpack lattest binary archive from here: 14 | https://github.com/minyor/syn2midi/releases 15 | - For other OS'ses you have to compile it using CodeLite IDE or similar tools 16 | 17 | ## Usage: 18 | - Download video lesson using one of online youtube downloaders like this one: 19 | http://en.savefrom.net/1-how-to-download-youtube-video/ 20 | So, this video, for example (make sure to select mp4 conversion format): 21 | https://www.youtube.com/watch?v=JHdbjCLDg2A 22 | - Choose which mask image best suits your video (82 or 88 notes). Or generate your own (see instructions below) 23 | - Generate MIDI file using: 24 | syn2midi -m mask.bmp -i Every27Years.mp4 -o Every27Years.midi 25 | 26 | ## Custom key colors: 27 | Optionally you can specify up to 8 key colors to use in notes parsing, 4 colors for left hand and 4 for right hand. 28 | For example, here are the default colors (make sure there's no spaces in color paremeters): 29 | 30 | syn2midi -m mask.bmp -i Every27Years.mp4 -o Every27Years.midi -l (40,96,167)(112,167,211)(252,182,92)(246,126,16) -r (237,120,122)(232,79,78)(140,242,44)(92,170,11) 31 | 32 | ## Other options: 33 | Optional: [-t transpose notes shift, can be negative -t-1. 0 is default] 34 | 35 | Optional: [-s start time in seconds] [-e end time in seconds] 36 | 37 | Optional: [-R boolean, include to generate report] (thanks to https://github.com/DanLatimer) 38 | 39 | ## Custom Mask creation: 40 | Not all synthesia videos you find will work with included mask images. You might need to create your own mask. 41 | These are the recommended steps to create matching mask image for your video: 42 | - Play a video, pause it when no piano key is pressed! 43 | - Now make a fullscreen screenshot (best if you can use video player's screenshot functionality if it has one) 44 | - Make sure that aspect ratio of a screenshot image matches aspect ratio of a video (This is important, otherway result may be wrong) 45 | - Open screenshot in 2D image editor, for example GIMP, set pen color as RGB(0,0,255) i.e Blue. 46 | - Place blue dot of a diameter about 25 - 75% of key width at each white and black key (try to avoid places with markings and other artifacts) 47 | - Export your screenshot as BMP 24bit file format (Click at 'Do not write color space information') 48 | 49 | Thats it, your mask should be ready 50 | 51 | Keep in mind that you can reuse your generated masks. 52 | If visually key layout in the video is the same, then there are good chances that mask will work. 53 | 54 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2003 Fabrice Bellard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_VERSION_H 22 | #define AVUTIL_VERSION_H 23 | 24 | #include "avutil.h" 25 | 26 | /** 27 | * @file 28 | * @ingroup lavu 29 | * Libavutil version macros 30 | */ 31 | 32 | /** 33 | * @defgroup lavu_ver Version and Build diagnostics 34 | * 35 | * Macros and function useful to check at compiletime and at runtime 36 | * which version of libavutil is in use. 37 | * 38 | * @{ 39 | */ 40 | 41 | #define LIBAVUTIL_VERSION_MAJOR 51 42 | #define LIBAVUTIL_VERSION_MINOR 73 43 | #define LIBAVUTIL_VERSION_MICRO 101 44 | 45 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ 46 | LIBAVUTIL_VERSION_MINOR, \ 47 | LIBAVUTIL_VERSION_MICRO) 48 | #define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR, \ 49 | LIBAVUTIL_VERSION_MINOR, \ 50 | LIBAVUTIL_VERSION_MICRO) 51 | #define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT 52 | 53 | #define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION) 54 | 55 | /** 56 | * @} 57 | * 58 | * @defgroup depr_guards Deprecation guards 59 | * FF_API_* defines may be placed below to indicate public API that will be 60 | * dropped at a future version bump. The defines themselves are not part of 61 | * the public API and may change, break or disappear at any time. 62 | * 63 | * @{ 64 | */ 65 | 66 | #ifndef FF_API_OLD_EVAL_NAMES 67 | #define FF_API_OLD_EVAL_NAMES (LIBAVUTIL_VERSION_MAJOR < 52) 68 | #endif 69 | #ifndef FF_API_GET_BITS_PER_SAMPLE_FMT 70 | #define FF_API_GET_BITS_PER_SAMPLE_FMT (LIBAVUTIL_VERSION_MAJOR < 52) 71 | #endif 72 | #ifndef FF_API_FIND_OPT 73 | #define FF_API_FIND_OPT (LIBAVUTIL_VERSION_MAJOR < 52) 74 | #endif 75 | #ifndef FF_API_AV_FIFO_PEEK 76 | #define FF_API_AV_FIFO_PEEK (LIBAVUTIL_VERSION_MAJOR < 52) 77 | #endif 78 | #ifndef FF_API_OLD_AVOPTIONS 79 | #define FF_API_OLD_AVOPTIONS (LIBAVUTIL_VERSION_MAJOR < 52) 80 | #endif 81 | #ifndef FF_API_OLD_TC_ADJUST_FRAMENUM 82 | #define FF_API_OLD_TC_ADJUST_FRAMENUM (LIBAVUTIL_VERSION_MAJOR < 52) 83 | #endif 84 | 85 | /** 86 | * @} 87 | */ 88 | 89 | #endif /* AVUTIL_VERSION_H */ 90 | 91 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavfilter/buffersrc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of Libav. 4 | * 5 | * Libav is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * Libav is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with Libav; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef AVFILTER_BUFFERSRC_H 21 | #define AVFILTER_BUFFERSRC_H 22 | 23 | /** 24 | * @file 25 | * Memory buffer source API. 26 | */ 27 | 28 | #include "libavcodec/avcodec.h" 29 | #include "avfilter.h" 30 | 31 | enum { 32 | 33 | /** 34 | * Do not check for format changes. 35 | */ 36 | AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1, 37 | 38 | /** 39 | * Do not copy buffer data. 40 | */ 41 | AV_BUFFERSRC_FLAG_NO_COPY = 2, 42 | 43 | /** 44 | * Immediately push the frame to the output. 45 | */ 46 | AV_BUFFERSRC_FLAG_PUSH = 4, 47 | 48 | }; 49 | 50 | /** 51 | * Add buffer data in picref to buffer_src. 52 | * 53 | * @param buffer_src pointer to a buffer source context 54 | * @param picref a buffer reference, or NULL to mark EOF 55 | * @param flags a combination of AV_BUFFERSRC_FLAG_* 56 | * @return >= 0 in case of success, a negative AVERROR code 57 | * in case of failure 58 | */ 59 | int av_buffersrc_add_ref(AVFilterContext *buffer_src, 60 | AVFilterBufferRef *picref, int flags); 61 | 62 | /** 63 | * Get the number of failed requests. 64 | * 65 | * A failed request is when the request_frame method is called while no 66 | * frame is present in the buffer. 67 | * The number is reset when a frame is added. 68 | */ 69 | unsigned av_buffersrc_get_nb_failed_requests(AVFilterContext *buffer_src); 70 | 71 | #ifdef FF_API_BUFFERSRC_BUFFER 72 | /** 73 | * Add a buffer to the filtergraph s. 74 | * 75 | * @param buf buffer containing frame data to be passed down the filtergraph. 76 | * This function will take ownership of buf, the user must not free it. 77 | * A NULL buf signals EOF -- i.e. no more frames will be sent to this filter. 78 | * @deprecated Use av_buffersrc_add_ref(s, picref, AV_BUFFERSRC_FLAG_NO_COPY) instead. 79 | */ 80 | attribute_deprecated 81 | int av_buffersrc_buffer(AVFilterContext *s, AVFilterBufferRef *buf); 82 | #endif 83 | 84 | /** 85 | * Add a frame to the buffer source. 86 | * 87 | * @param s an instance of the buffersrc filter. 88 | * @param frame frame to be added. 89 | * 90 | * @warning frame data will be memcpy()ed, which may be a big performance 91 | * hit. Use av_buffersrc_buffer() to avoid copying the data. 92 | */ 93 | int av_buffersrc_write_frame(AVFilterContext *s, const AVFrame *frame); 94 | 95 | #endif /* AVFILTER_BUFFERSRC_H */ 96 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavcodec/vdpau.h: -------------------------------------------------------------------------------- 1 | /* 2 | * The Video Decode and Presentation API for UNIX (VDPAU) is used for 3 | * hardware-accelerated decoding of MPEG-1/2, H.264 and VC-1. 4 | * 5 | * Copyright (C) 2008 NVIDIA 6 | * 7 | * This file is part of FFmpeg. 8 | * 9 | * FFmpeg is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU Lesser General Public 11 | * License as published by the Free Software Foundation; either 12 | * version 2.1 of the License, or (at your option) any later version. 13 | * 14 | * FFmpeg is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | * Lesser General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public 20 | * License along with FFmpeg; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 22 | */ 23 | 24 | #ifndef AVCODEC_VDPAU_H 25 | #define AVCODEC_VDPAU_H 26 | 27 | /** 28 | * @file 29 | * @ingroup lavc_codec_hwaccel_vdpau 30 | * Public libavcodec VDPAU header. 31 | */ 32 | 33 | 34 | /** 35 | * @defgroup lavc_codec_hwaccel_vdpau VDPAU Decoder and Renderer 36 | * @ingroup lavc_codec_hwaccel 37 | * 38 | * VDPAU hardware acceleration has two modules 39 | * - VDPAU decoding 40 | * - VDPAU presentation 41 | * 42 | * The VDPAU decoding module parses all headers using FFmpeg 43 | * parsing mechanisms and uses VDPAU for the actual decoding. 44 | * 45 | * As per the current implementation, the actual decoding 46 | * and rendering (API calls) are done as part of the VDPAU 47 | * presentation (vo_vdpau.c) module. 48 | * 49 | * @{ 50 | */ 51 | 52 | #include 53 | #include 54 | 55 | /** @brief The videoSurface is used for rendering. */ 56 | #define FF_VDPAU_STATE_USED_FOR_RENDER 1 57 | 58 | /** 59 | * @brief The videoSurface is needed for reference/prediction. 60 | * The codec manipulates this. 61 | */ 62 | #define FF_VDPAU_STATE_USED_FOR_REFERENCE 2 63 | 64 | /** 65 | * @brief This structure is used as a callback between the FFmpeg 66 | * decoder (vd_) and presentation (vo_) module. 67 | * This is used for defining a video frame containing surface, 68 | * picture parameter, bitstream information etc which are passed 69 | * between the FFmpeg decoder and its clients. 70 | */ 71 | struct vdpau_render_state { 72 | VdpVideoSurface surface; ///< Used as rendered surface, never changed. 73 | 74 | int state; ///< Holds FF_VDPAU_STATE_* values. 75 | 76 | /** Describe size/location of the compressed video data. 77 | Set to 0 when freeing bitstream_buffers. */ 78 | int bitstream_buffers_allocated; 79 | int bitstream_buffers_used; 80 | /** The user is responsible for freeing this buffer using av_freep(). */ 81 | VdpBitstreamBuffer *bitstream_buffers; 82 | 83 | /** picture parameter information for all supported codecs */ 84 | union VdpPictureInfo { 85 | VdpPictureInfoH264 h264; 86 | VdpPictureInfoMPEG1Or2 mpeg; 87 | VdpPictureInfoVC1 vc1; 88 | VdpPictureInfoMPEG4Part2 mpeg4; 89 | } info; 90 | }; 91 | 92 | /* @}*/ 93 | 94 | #endif /* AVCODEC_VDPAU_H */ 95 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/README.txt: -------------------------------------------------------------------------------- 1 | This is a FFmpeg Win32 Shared build by Kyle Schwarz. 2 | 3 | Zeranoe's FFmpeg Builds Home Page: 4 | 5 | This build was compiled on: Sep 24 2012 16:52:58 6 | 7 | FFmpeg version: 2012-09-24 git-bbe9fe4 8 | libavutil 51. 73.101 / 51. 73.101 9 | libavcodec 54. 58.100 / 54. 58.100 10 | libavformat 54. 28.101 / 54. 28.101 11 | libavdevice 54. 2.101 / 54. 2.101 12 | libavfilter 3. 17.100 / 3. 17.100 13 | libswscale 2. 1.101 / 2. 1.101 14 | libswresample 0. 15.100 / 0. 15.100 15 | libpostproc 52. 0.100 / 52. 0.100 16 | 17 | This FFmpeg was configured with: 18 | --disable-static 19 | --enable-shared 20 | --enable-gpl 21 | --enable-version3 22 | --disable-pthreads 23 | --enable-runtime-cpudetect 24 | --enable-avisynth 25 | --enable-bzlib 26 | --enable-frei0r 27 | --enable-libass 28 | --enable-libcelt 29 | --enable-libopencore-amrnb 30 | --enable-libopencore-amrwb 31 | --enable-libfreetype 32 | --enable-libgsm 33 | --enable-libmp3lame 34 | --enable-libnut 35 | --enable-libopenjpeg 36 | --enable-librtmp 37 | --enable-libschroedinger 38 | --enable-libspeex 39 | --enable-libtheora 40 | --enable-libutvideo 41 | --enable-libvo-aacenc 42 | --enable-libvo-amrwbenc 43 | --enable-libvorbis 44 | --enable-libvpx 45 | --enable-libx264 46 | --enable-libxavs 47 | --enable-libxvid 48 | --enable-zlib 49 | 50 | This build was compiled with these external libraries: 51 | bzip2 1.0.6: 52 | CELT 0.11.1: 53 | FreeType 2.4.8: 54 | Frei0r 20111008-git-16cfe66: 55 | LAME 3.99.5: 56 | libass 0.10.0: 57 | libgsm 1.0.13-3: 58 | Theora 1.1.1: 59 | Vorbis 1.3.2: 60 | libvpx 1.1.0: 61 | NUT 20110326-git-5e471c2: 62 | OpenCORE AMR 0.1.2: 63 | OpenJPEG 1.5.0: 64 | RTMPDump 20120308-git-7340f6d: 65 | Schroedinger 1.0.11: 66 | Speex 1.2rc1: 67 | Ut Video 10.2.4: 68 | VisualOn AAC 0.1.2: 69 | VisualOn AMR-WB 0.1.2: 70 | x264 git-198a7e-20120905: 71 | XAVS svn-55: 72 | Xvid 1.3.2: 73 | zlib 1.2.6: 74 | 75 | The source code for this FFmpeg build can be found at: 76 | 77 | This build was compiled on Debian (64-bit): 78 | 79 | This build was compiled with the MinGW-w64 toolchain: 80 | 81 | License files for each library can be found in the 'licenses' folder. 82 | -------------------------------------------------------------------------------- /midifile-master/src-programs/midi2beep.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Tom M. 3 | // Creation Date: Sat Nov 05 14:51:00 PST 2016 4 | // Last Modified: Sat Nov 05 14:51:00 PST 2016 5 | // Filename: midifile/src-programs/mid2beep.cpp 6 | // Web Address: https://github.com/craigsapp/midifile/blob/master/src-programs/mid2beep.cpp 7 | // Syntax: C++ 8 | // 9 | // Description: Linux-only: Play a monophonic midi file on the PC Speaker (i.e. the midi file contains only a single track 10 | // on a single channel playing a single note at a time) 11 | // 12 | 13 | 14 | #include 15 | #include 16 | #include // usleep() 17 | #include 18 | 19 | #include "MidiFile.h" 20 | #include "Options.h" 21 | 22 | #include 23 | 24 | using namespace std; 25 | 26 | void beepOff(int) 27 | { 28 | 29 | int r = inb(0x61); 30 | outb(r|3, 0x61); 31 | outb(r & 0xFC, 0x61); 32 | 33 | exit(0); 34 | } 35 | 36 | void beep(int fre, int usDuration) 37 | { 38 | int r, ff; 39 | 40 | if(fre > 0) { 41 | ff = 1193180/fre; 42 | outb( 0xB6, 0x43); 43 | outb( ff & 0xff, 0x42); 44 | outb((ff >> 8) & 0xff, 0x42); 45 | } 46 | 47 | r = inb(0x61); 48 | if(fre > 0) outb(r|3, 0x61); 49 | usleep(usDuration); 50 | outb(r & 0xFC, 0x61); 51 | } 52 | 53 | int main(int argc, char** argv) 54 | { 55 | signal(SIGINT, beepOff); 56 | 57 | Options options; 58 | options.process(argc, argv); 59 | MidiFile midifile; 60 | if (options.getArgCount() == 1) { 61 | midifile.read(options.getArg(1)); 62 | } 63 | else 64 | { 65 | cout << "usage: " << argv[0] << " file.mid" << endl; 66 | return -1; 67 | } 68 | 69 | int k= iopl(3); 70 | 71 | printf("\n Result iopl: %d \n", k); 72 | if (k<0) 73 | { 74 | cerr << " iopl() " << endl; 75 | return k; 76 | } 77 | 78 | midifile.linkNotePairs(); 79 | midifile.joinTracks(); 80 | midifile.doTimeAnalysis(); 81 | 82 | midifile.absoluteTicks(); 83 | 84 | double lastNoteFinished = 0.0; 85 | for (int track=0; track < midifile.getTrackCount(); track++) { 86 | for (int i=0; iisNoteOn() || mev->getLinkedEvent() == NULL) { 89 | continue; 90 | } 91 | 92 | // pause, silence 93 | int silence = static_cast((midifile.getTimeInSeconds(mev->tick) - lastNoteFinished) * 1000 * 1000); 94 | if(silence >0) 95 | { 96 | usleep(silence); 97 | } 98 | 99 | double duration = mev->getDurationInSeconds(); 100 | 101 | int halfTonesFromA4 = mev->getKeyNumber() - 69; // 69 == A4 == 440Hz 102 | int frq = 440 * pow(2, halfTonesFromA4/12.0); 103 | 104 | // play note 105 | beep(frq, static_cast(duration*1000*1000)); 106 | 107 | MidiEvent* off = mev->getLinkedEvent(); 108 | lastNoteFinished = midifile.getTimeInSeconds(off->tick); 109 | 110 | } 111 | } 112 | 113 | 114 | return 0; 115 | } 116 | 117 | 118 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/bswap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2006 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /** 22 | * @file 23 | * byte swapping routines 24 | */ 25 | 26 | #ifndef AVUTIL_BSWAP_H 27 | #define AVUTIL_BSWAP_H 28 | 29 | #include 30 | #include "libavutil/avconfig.h" 31 | #include "attributes.h" 32 | 33 | #ifdef HAVE_AV_CONFIG_H 34 | 35 | #include "config.h" 36 | 37 | #if ARCH_ARM 38 | # include "arm/bswap.h" 39 | #elif ARCH_AVR32 40 | # include "avr32/bswap.h" 41 | #elif ARCH_BFIN 42 | # include "bfin/bswap.h" 43 | #elif ARCH_SH4 44 | # include "sh4/bswap.h" 45 | #elif ARCH_X86 46 | # include "x86/bswap.h" 47 | #endif 48 | 49 | #endif /* HAVE_AV_CONFIG_H */ 50 | 51 | #define AV_BSWAP16C(x) (((x) << 8 & 0xff00) | ((x) >> 8 & 0x00ff)) 52 | #define AV_BSWAP32C(x) (AV_BSWAP16C(x) << 16 | AV_BSWAP16C((x) >> 16)) 53 | #define AV_BSWAP64C(x) (AV_BSWAP32C(x) << 32 | AV_BSWAP32C((x) >> 32)) 54 | 55 | #define AV_BSWAPC(s, x) AV_BSWAP##s##C(x) 56 | 57 | #ifndef av_bswap16 58 | static av_always_inline av_const uint16_t av_bswap16(uint16_t x) 59 | { 60 | x= (x>>8) | (x<<8); 61 | return x; 62 | } 63 | #endif 64 | 65 | #ifndef av_bswap32 66 | static av_always_inline av_const uint32_t av_bswap32(uint32_t x) 67 | { 68 | return AV_BSWAP32C(x); 69 | } 70 | #endif 71 | 72 | #ifndef av_bswap64 73 | static inline uint64_t av_const av_bswap64(uint64_t x) 74 | { 75 | return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32); 76 | } 77 | #endif 78 | 79 | // be2ne ... big-endian to native-endian 80 | // le2ne ... little-endian to native-endian 81 | 82 | #if AV_HAVE_BIGENDIAN 83 | #define av_be2ne16(x) (x) 84 | #define av_be2ne32(x) (x) 85 | #define av_be2ne64(x) (x) 86 | #define av_le2ne16(x) av_bswap16(x) 87 | #define av_le2ne32(x) av_bswap32(x) 88 | #define av_le2ne64(x) av_bswap64(x) 89 | #define AV_BE2NEC(s, x) (x) 90 | #define AV_LE2NEC(s, x) AV_BSWAPC(s, x) 91 | #else 92 | #define av_be2ne16(x) av_bswap16(x) 93 | #define av_be2ne32(x) av_bswap32(x) 94 | #define av_be2ne64(x) av_bswap64(x) 95 | #define av_le2ne16(x) (x) 96 | #define av_le2ne32(x) (x) 97 | #define av_le2ne64(x) (x) 98 | #define AV_BE2NEC(s, x) AV_BSWAPC(s, x) 99 | #define AV_LE2NEC(s, x) (x) 100 | #endif 101 | 102 | #define AV_BE2NE16C(x) AV_BE2NEC(16, x) 103 | #define AV_BE2NE32C(x) AV_BE2NEC(32, x) 104 | #define AV_BE2NE64C(x) AV_BE2NEC(64, x) 105 | #define AV_LE2NE16C(x) AV_LE2NEC(16, x) 106 | #define AV_LE2NE32C(x) AV_LE2NEC(32, x) 107 | #define AV_LE2NE64C(x) AV_LE2NEC(64, x) 108 | 109 | #endif /* AVUTIL_BSWAP_H */ 110 | -------------------------------------------------------------------------------- /midifile-master/src-programs/smfdur.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Tue Feb 23 05:34:17 PST 2016 4 | // Last Modified: Tue Feb 23 05:34:20 PST 2016 5 | // Filename: midifile/src-programs/smfdur.cpp 6 | // Web Address: https://github.com/craigsapp/midifile/blob/master/src-programs/smfdur.cpp 7 | // Syntax: C++11 8 | // 9 | // Description: Calcualte the total duration of a MIDI file. 10 | // 11 | 12 | #include "MidiFile.h" 13 | #include "Options.h" 14 | #include 15 | 16 | using namespace std; 17 | 18 | // User interface variables: 19 | Options options; 20 | 21 | // Function declarations: 22 | void checkOptions (Options& opts, int argc, char* argv[]); 23 | void usage (const char* command); 24 | void example (void); 25 | double getTotalDuration (MidiFile& midifile); 26 | 27 | 28 | ////////////////////////////////////////////////////////////////////////// 29 | 30 | int main(int argc, char* argv[]) { 31 | checkOptions(options, argc, argv); 32 | 33 | 34 | MidiFile midifile; 35 | 36 | int numinputs = options.getArgCount(); 37 | for (int i=0; i < numinputs || i==0; i++) { 38 | midifile.clear(); 39 | if (options.getArgCount() < 1) { 40 | midifile.read(cin); 41 | } else { 42 | midifile.read(options.getArg(i+1)); 43 | } 44 | if (options.getArgCount() > 1) { 45 | cout << options.getArg(i+1) << "\t"; 46 | } 47 | cout << getTotalDuration(midifile); 48 | cout << endl; 49 | } 50 | } 51 | 52 | 53 | ////////////////////////////////////////////////////////////////////////// 54 | 55 | 56 | ////////////////////////////// 57 | // 58 | // getTotalDuration -- 59 | // 60 | 61 | double getTotalDuration(MidiFile& midifile) { 62 | midifile.doTimeAnalysis(); 63 | midifile.joinTracks(); 64 | return midifile[0].last().seconds; 65 | } 66 | 67 | 68 | 69 | ////////////////////////////// 70 | // 71 | // checkOptions -- 72 | // 73 | 74 | void checkOptions(Options& opts, int argc, char* argv[]) { 75 | 76 | opts.define("author=b", "author of program"); 77 | opts.define("version=b", "compilation info"); 78 | opts.define("example=b", "example usages"); 79 | opts.define("h|help=b", "short description"); 80 | opts.process(argc, argv); 81 | 82 | // handle basic options: 83 | if (opts.getBoolean("author")) { 84 | cout << "Written by Craig Stuart Sapp, " 85 | << "craig@ccrma.stanford.edu, 23 February 2016" << endl; 86 | exit(0); 87 | } else if (opts.getBoolean("version")) { 88 | cout << argv[0] << ", version: 23 February 2016" << endl; 89 | cout << "compiled: " << __DATE__ << endl; 90 | exit(0); 91 | } else if (opts.getBoolean("help")) { 92 | usage(opts.getCommand().data()); 93 | exit(0); 94 | } else if (opts.getBoolean("example")) { 95 | example(); 96 | exit(0); 97 | } 98 | 99 | } 100 | 101 | 102 | 103 | ////////////////////////////// 104 | // 105 | // example -- 106 | // 107 | 108 | void example(void) { 109 | 110 | } 111 | 112 | 113 | 114 | ////////////////////////////// 115 | // 116 | // usage -- 117 | // 118 | 119 | void usage(const char* command) { 120 | cout << "Usage: " << command << " input(s)" << endl; 121 | } 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /midifile-master/src-programs/toascii.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Wed Feb 18 20:42:18 PST 2015 4 | // Last Modified: Wed Feb 18 22:25:17 PST 2015 5 | // Filename: midifile/src-programs/toascii.cpp 6 | // Website: http://midifile.sapp.org 7 | // Syntax: C++11 8 | // 9 | // Description: Convert a Standard MIDI file into binasc format 10 | // (ASCII version of the MIDI file which can be converted 11 | // back into the binary format without information loss). 12 | // 13 | 14 | #include "Options.h" 15 | #include "MidiFile.h" 16 | #include 17 | 18 | using namespace std; 19 | 20 | // Global variables for command-line options. 21 | Options options; 22 | 23 | // function declarations: 24 | void checkOptions (Options& opts); 25 | void example (void); 26 | void usage (const string& command); 27 | 28 | /////////////////////////////////////////////////////////////////////////// 29 | 30 | int main(int argc, char** argv) { 31 | options.setOptions(argc, argv); 32 | checkOptions(options); 33 | 34 | int status; 35 | MidiFile midifile; 36 | if (options.getArgCount()) { 37 | status = midifile.read(options.getArg(1)); 38 | } else { 39 | status = midifile.read(cin); 40 | } 41 | if (status == 0) { 42 | cerr << "Error: could not read MIDI file" << endl; 43 | exit(1); 44 | } 45 | status = midifile.writeBinasc(cout); 46 | if (status == 0) { 47 | cerr << "Error: could not write MIDI file" << endl; 48 | exit(1); 49 | } 50 | 51 | return 0; 52 | } 53 | 54 | /////////////////////////////////////////////////////////////////////////// 55 | 56 | 57 | ////////////////////////////// 58 | // 59 | // checkOptions -- 60 | // 61 | 62 | void checkOptions(Options& opts) { 63 | opts.define("author=b", "Author of the program"); 64 | opts.define("version=b", "Version of the program"); 65 | opts.define("example=b", "Example useage of the program"); 66 | opts.define("h|help=b", "List of options for the program"); 67 | opts.process(); 68 | 69 | if (opts.getBoolean("author")) { 70 | cout << "Written by Craig Stuart Sapp, " 71 | "craig@ccrma.stanford.edu, February 2015" << endl; 72 | exit(0); 73 | } else if (opts.getBoolean("version")) { 74 | cout << "toascii, version 1.0 (18 Feb 2015)\n" 75 | "compiled: " << __DATE__ << endl; 76 | exit(0); 77 | } else if (opts.getBoolean("help")) { 78 | usage(opts.getCommand()); 79 | exit(0); 80 | } else if (opts.getBoolean("example")) { 81 | example(); 82 | exit(0); 83 | } 84 | 85 | if (opts.getArgCount() > 1) { 86 | cerr << "Error: One input file or standard input is required." << endl; 87 | exit(1); 88 | } 89 | 90 | } 91 | 92 | 93 | 94 | ////////////////////////////// 95 | // 96 | // example -- shows various command-line option calls to program. 97 | // 98 | 99 | void example(void) { 100 | cout << 101 | "\n" 102 | << endl; 103 | } 104 | 105 | 106 | 107 | ////////////////////////////// 108 | // 109 | // usage -- how to run this program from the command-line. 110 | // 111 | 112 | void usage(const string& command) { 113 | cout << 114 | "\n" 115 | << endl; 116 | } 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavformat/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Version macros. 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVFORMAT_VERSION_H 22 | #define AVFORMAT_VERSION_H 23 | 24 | /** 25 | * @file 26 | * @ingroup libavf 27 | * Libavformat version macros 28 | */ 29 | 30 | #include "libavutil/avutil.h" 31 | 32 | #define LIBAVFORMAT_VERSION_MAJOR 54 33 | #define LIBAVFORMAT_VERSION_MINOR 28 34 | #define LIBAVFORMAT_VERSION_MICRO 101 35 | 36 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ 37 | LIBAVFORMAT_VERSION_MINOR, \ 38 | LIBAVFORMAT_VERSION_MICRO) 39 | #define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, \ 40 | LIBAVFORMAT_VERSION_MINOR, \ 41 | LIBAVFORMAT_VERSION_MICRO) 42 | #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT 43 | 44 | #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) 45 | 46 | /** 47 | * FF_API_* defines may be placed below to indicate public API that will be 48 | * dropped at a future version bump. The defines themselves are not part of 49 | * the public API and may change, break or disappear at any time. 50 | */ 51 | 52 | #ifndef FF_API_OLD_AVIO 53 | #define FF_API_OLD_AVIO (LIBAVFORMAT_VERSION_MAJOR < 55) 54 | #endif 55 | #ifndef FF_API_PKT_DUMP 56 | #define FF_API_PKT_DUMP (LIBAVFORMAT_VERSION_MAJOR < 54) 57 | #endif 58 | #ifndef FF_API_ALLOC_OUTPUT_CONTEXT 59 | #define FF_API_ALLOC_OUTPUT_CONTEXT (LIBAVFORMAT_VERSION_MAJOR < 55) 60 | #endif 61 | #ifndef FF_API_FORMAT_PARAMETERS 62 | #define FF_API_FORMAT_PARAMETERS (LIBAVFORMAT_VERSION_MAJOR < 55) 63 | #endif 64 | #ifndef FF_API_NEW_STREAM 65 | #define FF_API_NEW_STREAM (LIBAVFORMAT_VERSION_MAJOR < 55) 66 | #endif 67 | #ifndef FF_API_SET_PTS_INFO 68 | #define FF_API_SET_PTS_INFO (LIBAVFORMAT_VERSION_MAJOR < 55) 69 | #endif 70 | #ifndef FF_API_CLOSE_INPUT_FILE 71 | #define FF_API_CLOSE_INPUT_FILE (LIBAVFORMAT_VERSION_MAJOR < 55) 72 | #endif 73 | #ifndef FF_API_APPLEHTTP_PROTO 74 | #define FF_API_APPLEHTTP_PROTO (LIBAVFORMAT_VERSION_MAJOR < 55) 75 | #endif 76 | #ifndef FF_API_READ_PACKET 77 | #define FF_API_READ_PACKET (LIBAVFORMAT_VERSION_MAJOR < 55) 78 | #endif 79 | #ifndef FF_API_INTERLEAVE_PACKET 80 | #define FF_API_INTERLEAVE_PACKET (LIBAVFORMAT_VERSION_MAJOR < 55) 81 | #endif 82 | #ifndef FF_API_AV_GETTIME 83 | #define FF_API_AV_GETTIME (LIBAVFORMAT_VERSION_MAJOR < 55) 84 | #endif 85 | #ifndef FF_API_R_FRAME_RATE 86 | #define FF_API_R_FRAME_RATE (LIBAVFORMAT_VERSION_MAJOR < 55) 87 | #endif 88 | 89 | #endif /* AVFORMAT_VERSION_H */ 90 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavcodec/avfft.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg 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 GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVCODEC_AVFFT_H 20 | #define AVCODEC_AVFFT_H 21 | 22 | /** 23 | * @file 24 | * @ingroup lavc_fft 25 | * FFT functions 26 | */ 27 | 28 | /** 29 | * @defgroup lavc_fft FFT functions 30 | * @ingroup lavc_misc 31 | * 32 | * @{ 33 | */ 34 | 35 | typedef float FFTSample; 36 | 37 | typedef struct FFTComplex { 38 | FFTSample re, im; 39 | } FFTComplex; 40 | 41 | typedef struct FFTContext FFTContext; 42 | 43 | /** 44 | * Set up a complex FFT. 45 | * @param nbits log2 of the length of the input array 46 | * @param inverse if 0 perform the forward transform, if 1 perform the inverse 47 | */ 48 | FFTContext *av_fft_init(int nbits, int inverse); 49 | 50 | /** 51 | * Do the permutation needed BEFORE calling ff_fft_calc(). 52 | */ 53 | void av_fft_permute(FFTContext *s, FFTComplex *z); 54 | 55 | /** 56 | * Do a complex FFT with the parameters defined in av_fft_init(). The 57 | * input data must be permuted before. No 1.0/sqrt(n) normalization is done. 58 | */ 59 | void av_fft_calc(FFTContext *s, FFTComplex *z); 60 | 61 | void av_fft_end(FFTContext *s); 62 | 63 | FFTContext *av_mdct_init(int nbits, int inverse, double scale); 64 | void av_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input); 65 | void av_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input); 66 | void av_mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input); 67 | void av_mdct_end(FFTContext *s); 68 | 69 | /* Real Discrete Fourier Transform */ 70 | 71 | enum RDFTransformType { 72 | DFT_R2C, 73 | IDFT_C2R, 74 | IDFT_R2C, 75 | DFT_C2R, 76 | }; 77 | 78 | typedef struct RDFTContext RDFTContext; 79 | 80 | /** 81 | * Set up a real FFT. 82 | * @param nbits log2 of the length of the input array 83 | * @param trans the type of transform 84 | */ 85 | RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans); 86 | void av_rdft_calc(RDFTContext *s, FFTSample *data); 87 | void av_rdft_end(RDFTContext *s); 88 | 89 | /* Discrete Cosine Transform */ 90 | 91 | typedef struct DCTContext DCTContext; 92 | 93 | enum DCTTransformType { 94 | DCT_II = 0, 95 | DCT_III, 96 | DCT_I, 97 | DST_I, 98 | }; 99 | 100 | /** 101 | * Set up DCT. 102 | * @param nbits size of the input array: 103 | * (1 << nbits) for DCT-II, DCT-III and DST-I 104 | * (1 << nbits) + 1 for DCT-I 105 | * 106 | * @note the first element of the input of DST-I is ignored 107 | */ 108 | DCTContext *av_dct_init(int nbits, enum DCTTransformType type); 109 | void av_dct_calc(DCTContext *s, FFTSample *data); 110 | void av_dct_end (DCTContext *s); 111 | 112 | /** 113 | * @} 114 | */ 115 | 116 | #endif /* AVCODEC_AVFFT_H */ 117 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavfilter/asrc_abuffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of FFmpeg. 3 | * 4 | * FFmpeg is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * FFmpeg 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 GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with FFmpeg; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef AVFILTER_ASRC_ABUFFER_H 20 | #define AVFILTER_ASRC_ABUFFER_H 21 | 22 | #include "avfilter.h" 23 | 24 | /** 25 | * @file 26 | * memory buffer source for audio 27 | * 28 | * @deprecated use buffersrc.h instead. 29 | */ 30 | 31 | /** 32 | * Queue an audio buffer to the audio buffer source. 33 | * 34 | * @param abuffersrc audio source buffer context 35 | * @param data pointers to the samples planes 36 | * @param linesize linesizes of each audio buffer plane 37 | * @param nb_samples number of samples per channel 38 | * @param sample_fmt sample format of the audio data 39 | * @param ch_layout channel layout of the audio data 40 | * @param planar flag to indicate if audio data is planar or packed 41 | * @param pts presentation timestamp of the audio buffer 42 | * @param flags unused 43 | * 44 | * @deprecated use av_buffersrc_add_ref() instead. 45 | */ 46 | attribute_deprecated 47 | int av_asrc_buffer_add_samples(AVFilterContext *abuffersrc, 48 | uint8_t *data[8], int linesize[8], 49 | int nb_samples, int sample_rate, 50 | int sample_fmt, int64_t ch_layout, int planar, 51 | int64_t pts, int av_unused flags); 52 | 53 | /** 54 | * Queue an audio buffer to the audio buffer source. 55 | * 56 | * This is similar to av_asrc_buffer_add_samples(), but the samples 57 | * are stored in a buffer with known size. 58 | * 59 | * @param abuffersrc audio source buffer context 60 | * @param buf pointer to the samples data, packed is assumed 61 | * @param size the size in bytes of the buffer, it must contain an 62 | * integer number of samples 63 | * @param sample_fmt sample format of the audio data 64 | * @param ch_layout channel layout of the audio data 65 | * @param pts presentation timestamp of the audio buffer 66 | * @param flags unused 67 | * 68 | * @deprecated use av_buffersrc_add_ref() instead. 69 | */ 70 | attribute_deprecated 71 | int av_asrc_buffer_add_buffer(AVFilterContext *abuffersrc, 72 | uint8_t *buf, int buf_size, 73 | int sample_rate, 74 | int sample_fmt, int64_t ch_layout, int planar, 75 | int64_t pts, int av_unused flags); 76 | 77 | /** 78 | * Queue an audio buffer to the audio buffer source. 79 | * 80 | * @param abuffersrc audio source buffer context 81 | * @param samplesref buffer ref to queue 82 | * @param flags unused 83 | * 84 | * @deprecated use av_buffersrc_add_ref() instead. 85 | */ 86 | attribute_deprecated 87 | int av_asrc_buffer_add_audio_buffer_ref(AVFilterContext *abuffersrc, 88 | AVFilterBufferRef *samplesref, 89 | int av_unused flags); 90 | 91 | #endif /* AVFILTER_ASRC_ABUFFER_H */ 92 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavcodec/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * This file is part of FFmpeg. 4 | * 5 | * FFmpeg is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * FFmpeg is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with FFmpeg; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef AVCODEC_VERSION_H 21 | #define AVCODEC_VERSION_H 22 | 23 | /** 24 | * @file 25 | * @ingroup libavc 26 | * Libavcodec version macros. 27 | */ 28 | 29 | #define LIBAVCODEC_VERSION_MAJOR 54 30 | #define LIBAVCODEC_VERSION_MINOR 58 31 | #define LIBAVCODEC_VERSION_MICRO 100 32 | 33 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ 34 | LIBAVCODEC_VERSION_MINOR, \ 35 | LIBAVCODEC_VERSION_MICRO) 36 | #define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \ 37 | LIBAVCODEC_VERSION_MINOR, \ 38 | LIBAVCODEC_VERSION_MICRO) 39 | #define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT 40 | 41 | #define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION) 42 | 43 | /** 44 | * FF_API_* defines may be placed below to indicate public API that will be 45 | * dropped at a future version bump. The defines themselves are not part of 46 | * the public API and may change, break or disappear at any time. 47 | */ 48 | 49 | #ifndef FF_API_REQUEST_CHANNELS 50 | #define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 55) 51 | #endif 52 | #ifndef FF_API_ALLOC_CONTEXT 53 | #define FF_API_ALLOC_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 55) 54 | #endif 55 | #ifndef FF_API_AVCODEC_OPEN 56 | #define FF_API_AVCODEC_OPEN (LIBAVCODEC_VERSION_MAJOR < 55) 57 | #endif 58 | #ifndef FF_API_OLD_DECODE_AUDIO 59 | #define FF_API_OLD_DECODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 55) 60 | #endif 61 | #ifndef FF_API_OLD_TIMECODE 62 | #define FF_API_OLD_TIMECODE (LIBAVCODEC_VERSION_MAJOR < 55) 63 | #endif 64 | 65 | #ifndef FF_API_OLD_ENCODE_AUDIO 66 | #define FF_API_OLD_ENCODE_AUDIO (LIBAVCODEC_VERSION_MAJOR < 55) 67 | #endif 68 | #ifndef FF_API_OLD_ENCODE_VIDEO 69 | #define FF_API_OLD_ENCODE_VIDEO (LIBAVCODEC_VERSION_MAJOR < 55) 70 | #endif 71 | #ifndef FF_API_MPV_GLOBAL_OPTS 72 | #define FF_API_MPV_GLOBAL_OPTS (LIBAVCODEC_VERSION_MAJOR < 55) 73 | #endif 74 | #ifndef FF_API_COLOR_TABLE_ID 75 | #define FF_API_COLOR_TABLE_ID (LIBAVCODEC_VERSION_MAJOR < 55) 76 | #endif 77 | #ifndef FF_API_INTER_THRESHOLD 78 | #define FF_API_INTER_THRESHOLD (LIBAVCODEC_VERSION_MAJOR < 55) 79 | #endif 80 | #ifndef FF_API_SUB_ID 81 | #define FF_API_SUB_ID (LIBAVCODEC_VERSION_MAJOR < 55) 82 | #endif 83 | #ifndef FF_API_DSP_MASK 84 | #define FF_API_DSP_MASK (LIBAVCODEC_VERSION_MAJOR < 55) 85 | #endif 86 | #ifndef FF_API_FIND_BEST_PIX_FMT 87 | #define FF_API_FIND_BEST_PIX_FMT (LIBAVCODEC_VERSION_MAJOR < 55) 88 | #endif 89 | #ifndef FF_API_CODEC_ID 90 | #define FF_API_CODEC_ID (LIBAVCODEC_VERSION_MAJOR < 55) 91 | #endif 92 | #ifndef FF_API_VDA_ASYNC 93 | #define FF_API_VDA_ASYNC (LIBAVCODEC_VERSION_MAJOR < 55) 94 | #endif 95 | 96 | #endif /* AVCODEC_VERSION_H */ 97 | -------------------------------------------------------------------------------- /midifile-master/src-programs/stretch.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Ziemowit Laski 3 | // Creation Date: Sun, Jun 12, 2016 11:09:34 AM 4 | // Last Modified: Sun, Jun 12, 2016 11:09:34 AM 5 | // Filename: stretch.cpp 6 | // Syntax: C++ 7 | // 8 | // Description: Stretches (or shrinks): 9 | // 1. The position of bars (measures) in tracks, 10 | // without affecting tempo, and/or 11 | // 2. The tempo (BPM) itself. 12 | // 13 | // This is useful when working with MIDI files 14 | // that were automatically generated from audio 15 | // (MP3, WAV) files. Conversion software often 16 | // has difficulty in correct placement of 17 | // bars, and also sometimes does not preserve 18 | // the tempo of the original. 19 | // 20 | #include "MidiFile.h" 21 | #include "Options.h" 22 | #include 23 | #include 24 | #include 25 | 26 | using namespace std; 27 | 28 | void doStretch (MidiFile& midifile, double bars, double duration); 29 | 30 | int main(int argc, char** argv) { 31 | Options options; 32 | options.define("b|bars|m|measures=d:1.0", 33 | "Stretch width of bars (measures) by factor specified (WITHOUT affecting tempo)"); 34 | options.define("d|duration|t|tempo=d:1.0", 35 | "Stretch duration of track(s) by factor specified"); 36 | options.process(argc, argv); 37 | if (options.getArgCount() != 2) { 38 | cerr << "two MIDI filenames are required.\n"; 39 | exit(1); 40 | } 41 | 42 | MidiFile midifile; 43 | midifile.read(options.getArg(1)); 44 | if (!midifile.status()) { 45 | cerr << "Error reading MIDI file " << options.getArg(1) << endl; 46 | exit(1); 47 | } 48 | 49 | if (options.getBoolean("bars") || options.getBoolean("duration")) { 50 | double bars = options.getDouble("bars"); 51 | double duration = options.getDouble("duration"); 52 | if (bars < 0.1 || bars > 10.0 || duration < 0.1 || duration > 10.0) { 53 | cerr << "stretch parameters must be between 0.1 and 10.\n"; 54 | exit(1); 55 | } 56 | doStretch(midifile, bars, duration); 57 | } 58 | 59 | midifile.write(options.getArg(2)); 60 | return 0; 61 | } 62 | 63 | 64 | ////////////////////////////// 65 | // 66 | // doStretch -- Stretch size of all bars (measures) in the file 67 | // by a specified 'bars' factor. (Values lower than 1.0 will result 68 | // in shrinking). Note that bars (measures) are not encoded in MIDI 69 | // directly as an event type. Instead, they are computed from the 70 | // Pulse Per Quarter Note (PPQN) value in the file header; PPQN 71 | // multiplied by the number of quarter notes in a measure (as 72 | // determined by the time signature contained in the FF 58 73 | // message) gives the number of ticks in each measure. The 74 | // 'duration' parameter specifies the factor by which the 75 | // duration of the track(s) should be stretched (or shrunk, 76 | // if less than 1.0). 77 | 78 | void doStretch(MidiFile& midifile, double bars, double duration) { 79 | int ppqn = midifile.getTicksPerQuarterNote(); 80 | int new_ppqn = max( 24576, ppqn ); 81 | midifile.setTicksPerQuarterNote( new_ppqn ); 82 | double tick_mult = (double)new_ppqn / (double)ppqn; 83 | tick_mult /= bars; 84 | 85 | for (int t = 0; t < midifile.size(); ++t) { 86 | MidiEventList &track = midifile[t]; 87 | for (int e = 0; e < track.size(); ++e) { 88 | MidiEvent &event = track[e]; 89 | event.tick *= tick_mult; 90 | if (event.getMetaType() == 0x51) { 91 | int tempo = event.getTempoMicroseconds(); 92 | tempo *= bars; 93 | tempo *= duration; 94 | event.setTempoMicroseconds( tempo ); 95 | } 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /midifile-master/src-programs/80off.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Mon Feb 9 16:51:58 PST 2015 4 | // Last Modified: Mon Feb 9 21:26:32 PST 2015 Updated for C++11. 5 | // Filename: midifile/src-programs/80off.cpp 6 | // Website: http://midifile.sapp.org 7 | // Syntax: C++11 8 | // 9 | // Description: Converts any note-off messages in the for "9? ?? 00" to 10 | // "8? ?? 00". 11 | // 12 | 13 | #include "Options.h" 14 | #include "MidiFile.h" 15 | #include 16 | 17 | using namespace std; 18 | 19 | // Global variables for command-line options. 20 | Options options; // for command-line processing 21 | 22 | 23 | // function declarations: 24 | void checkOptions (Options& opts); 25 | void convertFile (const string& inputfilename, 26 | const string& outputfilename); 27 | void example (void); 28 | void usage (const string& command); 29 | 30 | 31 | /////////////////////////////////////////////////////////////////////////// 32 | 33 | 34 | int main(int argc, char** argv) { 35 | options.setOptions(argc, argv); 36 | checkOptions(options); 37 | convertFile(options.getArg(1), options.getArg(2)); 38 | return 0; 39 | } 40 | 41 | /////////////////////////////////////////////////////////////////////////// 42 | 43 | 44 | 45 | ////////////////////////////// 46 | // 47 | // convertFile -- Convert "9? ?? 00" MIDI messages into "8? ?? 00" messages. 48 | // 49 | 50 | void convertFile(const string& inputfilename, const string& outputfilename) { 51 | MidiFile midifile(inputfilename); 52 | for (int i=0; i 2) { 94 | cerr << "Error: too many filenames, expecting only two" << endl; 95 | exit(1); 96 | } 97 | if (options.getArgCount() < 2) { 98 | cerr << "Error: too few filenames, expecting two:" << endl; 99 | cerr << "(1) input file to process, (2) name of output file." << endl; 100 | exit(1); 101 | } 102 | } 103 | 104 | 105 | 106 | ////////////////////////////// 107 | // 108 | // example -- shows various command-line option calls to program. 109 | // 110 | 111 | void example(void) { 112 | cout << 113 | "\n" 114 | << endl; 115 | } 116 | 117 | 118 | 119 | ////////////////////////////// 120 | // 121 | // usage -- how to run this program from the command-line. 122 | // 123 | 124 | void usage(const string& command) { 125 | cout << 126 | "\n" 127 | << endl; 128 | } 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /midifile-master/src-programs/drumtab.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Sat May 17 19:34:13 PDT 2003 4 | // Last Modified: Mon Feb 9 21:23:13 PST 2015 Updated for C++11. 5 | // Filename: ...sig/doc/examples/all/drumtab/drumtab.cpp 6 | // Syntax: C++ 7 | // 8 | // Description: Demonstration of how to convert a drum tab into 9 | // a Multi-track MIDI file with one track for each 10 | // drum part. 11 | // 12 | 13 | #include "MidiFile.h" 14 | #include 15 | 16 | using namespace std; 17 | 18 | #define HIGH_HAT 59 19 | #define SNARE 38 20 | #define BASS_DRUM 41 21 | 22 | #define QUARTER 120 /* ticks per quarter note */ 23 | #define SIXTEENTH 30 /* ticks per sixteenth note */ 24 | 25 | typedef unsigned char uchar; 26 | void AddDrumTrack(MidiFile& midifile, int* data, int instrument, int ticks); 27 | 28 | /////////////////////////////////////////////////////////////////////////// 29 | 30 | int main(int argc, char** argv) { 31 | MidiFile outputfile; // create an empty MIDI file with one track 32 | outputfile.absoluteTicks(); // time information stored as absolute time 33 | // (will be coverted to delta time when written) 34 | outputfile.setTicksPerQuarterNote(QUARTER); 35 | 36 | int hhdata[50] = {'x', '-', 'x', '-', 'x', '-', 'x', '-', -1}; 37 | int sndata[50] = {'-', '-', 'x', '-', '-', '-', 'x', '-', -1}; 38 | int bsdata[50] = {'x', '-', '-', '-', 'x', '-', '-', '-', -1}; 39 | 40 | AddDrumTrack(outputfile, hhdata, HIGH_HAT, SIXTEENTH); 41 | AddDrumTrack(outputfile, sndata, SNARE, SIXTEENTH); 42 | AddDrumTrack(outputfile, bsdata, BASS_DRUM, SIXTEENTH); 43 | 44 | outputfile.sortTracks(); // make sure data is in correct order 45 | outputfile.write("rhythm.mid"); // write Standard MIDI File twinkle.mid 46 | 47 | return 0; 48 | } 49 | 50 | 51 | 52 | ////////////////////////////// 53 | // 54 | // AddDrumTrack -- add a new track to the MIDI file which contains 55 | // a single percussion instrument. Tablature data is ended by a -1 56 | // 57 | 58 | void AddDrumTrack(MidiFile& midifile, int* data, int instrument, int ticks) { 59 | vector midievent; // temporary storage for MIDI events 60 | midievent.resize(3); // set the size of the array to 3 bytes 61 | midievent[2] = 64; // set the loudness to a constant value 62 | int notestate = 0; // 0 = off, 1 = on 63 | int i = 0; 64 | int actiontime; 65 | int track = midifile.addTrack(); // Add a track to the MIDI file 66 | 67 | while (data[i] >= 0) { 68 | switch (data[i]) { 69 | case 'x': case 'X': 70 | if (notestate) { 71 | // turn off previous note 72 | midievent[0] = 0x89; 73 | midievent[1] = instrument; 74 | actiontime = ticks * i - 1; 75 | midifile.addEvent(track, actiontime, midievent); 76 | } 77 | // turn on current note 78 | midievent[0] = 0x99; 79 | midievent[1] = instrument; 80 | actiontime = ticks * i; 81 | midifile.addEvent(track, actiontime, midievent); 82 | notestate = 1; 83 | break; 84 | case '0': case 'o': case 'O': 85 | // turn off previous note 86 | if (notestate) { 87 | midievent[0] = 0x89; 88 | midievent[1] = instrument; 89 | actiontime = ticks * i - 1; 90 | midifile.addEvent(track, actiontime, midievent); 91 | notestate = 0; 92 | } 93 | break; 94 | } 95 | i++; 96 | } 97 | 98 | if (notestate) { 99 | // turn off last note 100 | midievent[0] = 0x89; 101 | midievent[1] = instrument; 102 | actiontime = ticks * i; 103 | midifile.addEvent(track, actiontime, midievent); 104 | } 105 | 106 | } 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libpostproc/postprocess.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001-2003 Michael Niedermayer (michaelni@gmx.at) 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef POSTPROC_POSTPROCESS_H 22 | #define POSTPROC_POSTPROCESS_H 23 | 24 | /** 25 | * @file 26 | * @brief 27 | * external postprocessing API 28 | */ 29 | 30 | #include "libavutil/avutil.h" 31 | 32 | #ifndef LIBPOSTPROC_VERSION_MAJOR 33 | #define LIBPOSTPROC_VERSION_MAJOR 52 34 | #define LIBPOSTPROC_VERSION_MINOR 0 35 | #define LIBPOSTPROC_VERSION_MICRO 100 36 | #endif 37 | 38 | #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \ 39 | LIBPOSTPROC_VERSION_MINOR, \ 40 | LIBPOSTPROC_VERSION_MICRO) 41 | #define LIBPOSTPROC_VERSION AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, \ 42 | LIBPOSTPROC_VERSION_MINOR, \ 43 | LIBPOSTPROC_VERSION_MICRO) 44 | #define LIBPOSTPROC_BUILD LIBPOSTPROC_VERSION_INT 45 | 46 | #define LIBPOSTPROC_IDENT "postproc" AV_STRINGIFY(LIBPOSTPROC_VERSION) 47 | 48 | /** 49 | * Return the LIBPOSTPROC_VERSION_INT constant. 50 | */ 51 | unsigned postproc_version(void); 52 | 53 | /** 54 | * Return the libpostproc build-time configuration. 55 | */ 56 | const char *postproc_configuration(void); 57 | 58 | /** 59 | * Return the libpostproc license. 60 | */ 61 | const char *postproc_license(void); 62 | 63 | #define PP_QUALITY_MAX 6 64 | 65 | #define QP_STORE_T int8_t 66 | 67 | #include 68 | 69 | typedef void pp_context; 70 | typedef void pp_mode; 71 | 72 | #if LIBPOSTPROC_VERSION_INT < (52<<16) 73 | typedef pp_context pp_context_t; 74 | typedef pp_mode pp_mode_t; 75 | extern const char *const pp_help; ///< a simple help text 76 | #else 77 | extern const char pp_help[]; ///< a simple help text 78 | #endif 79 | 80 | void pp_postprocess(const uint8_t * src[3], const int srcStride[3], 81 | uint8_t * dst[3], const int dstStride[3], 82 | int horizontalSize, int verticalSize, 83 | const QP_STORE_T *QP_store, int QP_stride, 84 | pp_mode *mode, pp_context *ppContext, int pict_type); 85 | 86 | 87 | /** 88 | * Return a pp_mode or NULL if an error occurred. 89 | * 90 | * @param name the string after "-pp" on the command line 91 | * @param quality a number from 0 to PP_QUALITY_MAX 92 | */ 93 | pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality); 94 | void pp_free_mode(pp_mode *mode); 95 | 96 | pp_context *pp_get_context(int width, int height, int flags); 97 | void pp_free_context(pp_context *ppContext); 98 | 99 | #define PP_CPU_CAPS_MMX 0x80000000 100 | #define PP_CPU_CAPS_MMX2 0x20000000 101 | #define PP_CPU_CAPS_3DNOW 0x40000000 102 | #define PP_CPU_CAPS_ALTIVEC 0x10000000 103 | 104 | #define PP_FORMAT 0x00000008 105 | #define PP_FORMAT_420 (0x00000011|PP_FORMAT) 106 | #define PP_FORMAT_422 (0x00000001|PP_FORMAT) 107 | #define PP_FORMAT_411 (0x00000002|PP_FORMAT) 108 | #define PP_FORMAT_444 (0x00000000|PP_FORMAT) 109 | 110 | #define PP_PICT_TYPE_QP2 0x00000010 ///< MPEG2 style QScale 111 | 112 | #endif /* POSTPROC_POSTPROCESS_H */ 113 | -------------------------------------------------------------------------------- /midifile-master/src-programs/type0.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Wed Feb 18 23:35:23 PST 2015 4 | // Last Modified: Wed Feb 18 23:35:26 PST 2015 5 | // Filename: midifile/src-programs/type0.cpp 6 | // Website: http://midifile.sapp.org 7 | // Syntax: C++11 8 | // 9 | // Description: Convert a type-1 (multi-track) Standard MIDI file into 10 | // a type=0 (single track) Standard MIDI file. 11 | // 12 | 13 | #include "Options.h" 14 | #include "MidiFile.h" 15 | #include 16 | 17 | using namespace std; 18 | 19 | // Global variables for command-line options. 20 | Options options; 21 | 22 | // function declarations: 23 | void checkOptions (Options& opts); 24 | void example (void); 25 | void usage (const string& command); 26 | 27 | /////////////////////////////////////////////////////////////////////////// 28 | 29 | int main(int argc, char** argv) { 30 | options.setOptions(argc, argv); 31 | checkOptions(options); 32 | 33 | int status; 34 | MidiFile midifile; 35 | 36 | if (options.getArgCount() == 2) { 37 | // input from first filename 38 | status = midifile.read(options.getArg(1)); 39 | if (status == 0) { 40 | cerr << "Error: could not read MIDI file " << options.getArg(1) << endl; 41 | exit(1); 42 | } 43 | } else { 44 | // input from standard input 45 | status = midifile.read(cin); 46 | if (status == 0) { 47 | cerr << "Error: could not read MIDI file from standard input" << endl; 48 | exit(1); 49 | } 50 | } 51 | 52 | midifile.joinTracks(); 53 | 54 | if (options.getArgCount() == 2) { 55 | status = midifile.write(options.getArg(2)); 56 | if (status == 0) { 57 | cerr << "Error: could not write MIDI file " << options.getArg(2) << endl; 58 | exit(1); 59 | } 60 | } else if (options.getArgCount() == 1) { 61 | status = midifile.write(options.getArg(1)); 62 | if (status == 0) { 63 | cerr << "Error: could not write MIDI file " << options.getArg(1) << endl; 64 | exit(1); 65 | } 66 | } 67 | 68 | return 0; 69 | } 70 | 71 | /////////////////////////////////////////////////////////////////////////// 72 | 73 | 74 | ////////////////////////////// 75 | // 76 | // checkOptions -- 77 | // 78 | 79 | void checkOptions(Options& opts) { 80 | opts.define("author=b", "Author of the program"); 81 | opts.define("version=b", "Version of the program"); 82 | opts.define("example=b", "Example useage of the program"); 83 | opts.define("h|help=b", "List of options for the program"); 84 | opts.process(); 85 | 86 | if (opts.getBoolean("author")) { 87 | cout << "Written by Craig Stuart Sapp, " 88 | "craig@ccrma.stanford.edu, February 2015" << endl; 89 | exit(0); 90 | } else if (opts.getBoolean("version")) { 91 | cout << "tobinary, version 1.0 (18 Feb 2015)\n" 92 | "compiled: " << __DATE__ << endl; 93 | exit(0); 94 | } else if (opts.getBoolean("help")) { 95 | usage(opts.getCommand()); 96 | exit(0); 97 | } else if (opts.getBoolean("example")) { 98 | example(); 99 | exit(0); 100 | } 101 | 102 | if (opts.getArgCount() > 2) { 103 | cerr << "Error: Too many filenames given." << endl; 104 | exit(1); 105 | } 106 | if (opts.getArgCount() == 0) { 107 | cerr << "Error: Too few filenames given." << endl; 108 | exit(1); 109 | } 110 | 111 | } 112 | 113 | 114 | 115 | ////////////////////////////// 116 | // 117 | // example -- shows various command-line option calls to program. 118 | // 119 | 120 | void example(void) { 121 | cout << 122 | "\n" 123 | << endl; 124 | } 125 | 126 | 127 | 128 | ////////////////////////////// 129 | // 130 | // usage -- how to run this program from the command-line. 131 | // 132 | 133 | void usage(const string& command) { 134 | cout << 135 | "\n" 136 | << endl; 137 | } 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /midifile-master/src-programs/tobinary.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Wed Feb 18 20:48:48 PST 2015 4 | // Last Modified: Wed Feb 18 20:48:51 PST 2015 5 | // Filename: midifile/src-programs/tobinary.cpp 6 | // Website: http://midifile.sapp.org 7 | // Syntax: C++11 8 | // 9 | // Description: Convert a Standard MIDI file into binary format from 10 | // the binasc format (ASCII version of the MIDI file which 11 | // can be converted back into the binary format without 12 | // information loss). 13 | // 14 | 15 | #include "Options.h" 16 | #include "MidiFile.h" 17 | #include 18 | 19 | using namespace std; 20 | 21 | // Global variables for command-line options. 22 | Options options; 23 | 24 | // function declarations: 25 | void checkOptions (Options& opts); 26 | void example (void); 27 | void usage (const string& command); 28 | 29 | /////////////////////////////////////////////////////////////////////////// 30 | 31 | int main(int argc, char** argv) { 32 | options.setOptions(argc, argv); 33 | checkOptions(options); 34 | 35 | int status; 36 | MidiFile midifile; 37 | 38 | if (options.getArgCount() == 2) { 39 | // input from first filename 40 | status = midifile.read(options.getArg(1)); 41 | if (status == 0) { 42 | cerr << "Error: could not read MIDI file " << options.getArg(1) << endl; 43 | exit(1); 44 | } 45 | status = midifile.write(options.getArg(2)); 46 | if (status == 0) { 47 | cerr << "Error: could not write MIDI file " << options.getArg(2) << endl; 48 | exit(1); 49 | } 50 | } else if (options.getArgCount() == 1) { 51 | // input from standard input 52 | status = midifile.read(cin); 53 | if (status == 0) { 54 | cerr << "Error: could not read MIDI file from standard input" << endl; 55 | exit(1); 56 | } 57 | status = midifile.write(options.getArg(1)); 58 | if (status == 0) { 59 | cerr << "Error: could not write MIDI file " << options.getArg(1) << endl; 60 | exit(1); 61 | } 62 | } 63 | 64 | return 0; 65 | } 66 | 67 | /////////////////////////////////////////////////////////////////////////// 68 | 69 | 70 | ////////////////////////////// 71 | // 72 | // checkOptions -- 73 | // 74 | 75 | void checkOptions(Options& opts) { 76 | opts.define("author=b", "Author of the program"); 77 | opts.define("version=b", "Version of the program"); 78 | opts.define("example=b", "Example useage of the program"); 79 | opts.define("h|help=b", "List of options for the program"); 80 | opts.process(); 81 | 82 | if (opts.getBoolean("author")) { 83 | cout << "Written by Craig Stuart Sapp, " 84 | "craig@ccrma.stanford.edu, February 2015" << endl; 85 | exit(0); 86 | } else if (opts.getBoolean("version")) { 87 | cout << "tobinary, version 1.0 (18 Feb 2015)\n" 88 | "compiled: " << __DATE__ << endl; 89 | exit(0); 90 | } else if (opts.getBoolean("help")) { 91 | usage(opts.getCommand()); 92 | exit(0); 93 | } else if (opts.getBoolean("example")) { 94 | example(); 95 | exit(0); 96 | } 97 | 98 | if (opts.getArgCount() > 2) { 99 | cerr << "Error: Too many filenames given." << endl; 100 | exit(1); 101 | } 102 | if (opts.getArgCount() == 0) { 103 | cerr << "Error: Too few filenames given." << endl; 104 | exit(1); 105 | } 106 | 107 | } 108 | 109 | 110 | 111 | ////////////////////////////// 112 | // 113 | // example -- shows various command-line option calls to program. 114 | // 115 | 116 | void example(void) { 117 | cout << 118 | "\n" 119 | << endl; 120 | } 121 | 122 | 123 | 124 | ////////////////////////////// 125 | // 126 | // usage -- how to run this program from the command-line. 127 | // 128 | 129 | void usage(const string& command) { 130 | cout << 131 | "\n" 132 | << endl; 133 | } 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /midifile-master/visual-studio/binasc.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | 15 | {70028d4b-8e0d-4ff2-bd05-d7ab19b66f30} 16 | 17 | 18 | 19 | 20 | 21 | 22 | {5230AA11-C456-48E6-B19F-23703EC38D80} 23 | Win32Proj 24 | 25 | 26 | 27 | Application 28 | true 29 | v140 30 | 31 | 32 | Application 33 | false 34 | v140 35 | true 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | $(VC_IncludePath);$(WindowsSDK_IncludePath);../include 45 | $(Configuration)Exe\ 46 | $(SolutionDir)$(Configuration)Exe\ 47 | 48 | 49 | false 50 | $(VC_IncludePath);$(WindowsSDK_IncludePath);../include 51 | $(Configuration)Exe\ 52 | $(SolutionDir)$(Configuration)Exe\ 53 | 54 | 55 | 56 | 57 | 58 | Level3 59 | Disabled 60 | WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 61 | $(IntDir)$(TargetName).pdb 62 | 63 | 64 | Console 65 | true 66 | 67 | 68 | 69 | 70 | Level3 71 | 72 | 73 | MaxSpeed 74 | true 75 | true 76 | WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 77 | $(IntDir)$(TargetName).pdb 78 | 79 | 80 | Console 81 | true 82 | true 83 | true 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /midifile-master/visual-studio/stretch.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | 15 | {70028d4b-8e0d-4ff2-bd05-d7ab19b66f30} 16 | 17 | 18 | 19 | 20 | 21 | 22 | {1CD9D03A-63D6-46BA-80E2-93AAECD2754B} 23 | Win32Proj 24 | 25 | 26 | 27 | Application 28 | true 29 | v140 30 | 31 | 32 | Application 33 | false 34 | v140 35 | true 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | $(VC_IncludePath);$(WindowsSDK_IncludePath);../include 45 | $(Configuration)Exe\ 46 | $(SolutionDir)$(Configuration)Exe\ 47 | 48 | 49 | false 50 | $(VC_IncludePath);$(WindowsSDK_IncludePath);../include 51 | $(Configuration)Exe\ 52 | $(SolutionDir)$(Configuration)Exe\ 53 | 54 | 55 | 56 | 57 | 58 | Level3 59 | Disabled 60 | WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 61 | $(IntDir)$(TargetName).pdb 62 | 63 | 64 | Console 65 | true 66 | 67 | 68 | 69 | 70 | Level3 71 | 72 | 73 | MaxSpeed 74 | true 75 | true 76 | WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 77 | $(IntDir)$(TargetName).pdb 78 | 79 | 80 | Console 81 | true 82 | true 83 | true 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /midifile-master/visual-studio/createmidifile.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | 15 | {70028d4b-8e0d-4ff2-bd05-d7ab19b66f30} 16 | 17 | 18 | 19 | 20 | 21 | 22 | {52724792-CD79-4152-984C-DFD7DA570855} 23 | Win32Proj 24 | 25 | 26 | 27 | Application 28 | true 29 | v140 30 | 31 | 32 | Application 33 | false 34 | v140 35 | true 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | $(VC_IncludePath);$(WindowsSDK_IncludePath);../include 45 | $(Configuration)Exe\ 46 | $(SolutionDir)$(Configuration)Exe\ 47 | 48 | 49 | false 50 | $(VC_IncludePath);$(WindowsSDK_IncludePath);../include 51 | $(Configuration)Exe\ 52 | $(SolutionDir)$(Configuration)Exe\ 53 | 54 | 55 | 56 | 57 | 58 | Level3 59 | Disabled 60 | WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 61 | $(IntDir)$(TargetName).pdb 62 | 63 | 64 | Console 65 | true 66 | 67 | 68 | 69 | 70 | Level3 71 | 72 | 73 | MaxSpeed 74 | true 75 | true 76 | WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 77 | $(IntDir)$(TargetName).pdb 78 | 79 | 80 | Console 81 | true 82 | true 83 | true 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/mathematics.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2005 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_MATHEMATICS_H 22 | #define AVUTIL_MATHEMATICS_H 23 | 24 | #include 25 | #include 26 | #include "attributes.h" 27 | #include "rational.h" 28 | #include "intfloat.h" 29 | 30 | #ifndef M_E 31 | #define M_E 2.7182818284590452354 /* e */ 32 | #endif 33 | #ifndef M_LN2 34 | #define M_LN2 0.69314718055994530942 /* log_e 2 */ 35 | #endif 36 | #ifndef M_LN10 37 | #define M_LN10 2.30258509299404568402 /* log_e 10 */ 38 | #endif 39 | #ifndef M_LOG2_10 40 | #define M_LOG2_10 3.32192809488736234787 /* log_2 10 */ 41 | #endif 42 | #ifndef M_PHI 43 | #define M_PHI 1.61803398874989484820 /* phi / golden ratio */ 44 | #endif 45 | #ifndef M_PI 46 | #define M_PI 3.14159265358979323846 /* pi */ 47 | #endif 48 | #ifndef M_SQRT1_2 49 | #define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ 50 | #endif 51 | #ifndef M_SQRT2 52 | #define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ 53 | #endif 54 | #ifndef NAN 55 | #define NAN av_int2float(0x7fc00000) 56 | #endif 57 | #ifndef INFINITY 58 | #define INFINITY av_int2float(0x7f800000) 59 | #endif 60 | 61 | /** 62 | * @addtogroup lavu_math 63 | * @{ 64 | */ 65 | 66 | 67 | enum AVRounding { 68 | AV_ROUND_ZERO = 0, ///< Round toward zero. 69 | AV_ROUND_INF = 1, ///< Round away from zero. 70 | AV_ROUND_DOWN = 2, ///< Round toward -infinity. 71 | AV_ROUND_UP = 3, ///< Round toward +infinity. 72 | AV_ROUND_NEAR_INF = 5, ///< Round to nearest and halfway cases away from zero. 73 | }; 74 | 75 | /** 76 | * Return the greatest common divisor of a and b. 77 | * If both a and b are 0 or either or both are <0 then behavior is 78 | * undefined. 79 | */ 80 | int64_t av_const av_gcd(int64_t a, int64_t b); 81 | 82 | /** 83 | * Rescale a 64-bit integer with rounding to nearest. 84 | * A simple a*b/c isn't possible as it can overflow. 85 | */ 86 | int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const; 87 | 88 | /** 89 | * Rescale a 64-bit integer with specified rounding. 90 | * A simple a*b/c isn't possible as it can overflow. 91 | */ 92 | int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) av_const; 93 | 94 | /** 95 | * Rescale a 64-bit integer by 2 rational numbers. 96 | */ 97 | int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const; 98 | 99 | /** 100 | * Rescale a 64-bit integer by 2 rational numbers with specified rounding. 101 | */ 102 | int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq, 103 | enum AVRounding) av_const; 104 | 105 | /** 106 | * Compare 2 timestamps each in its own timebases. 107 | * The result of the function is undefined if one of the timestamps 108 | * is outside the int64_t range when represented in the others timebase. 109 | * @return -1 if ts_a is before ts_b, 1 if ts_a is after ts_b or 0 if they represent the same position 110 | */ 111 | int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b); 112 | 113 | /** 114 | * Compare 2 integers modulo mod. 115 | * That is we compare integers a and b for which only the least 116 | * significant log2(mod) bits are known. 117 | * 118 | * @param mod must be a power of 2 119 | * @return a negative value if a is smaller than b 120 | * a positive value if a is greater than b 121 | * 0 if a equals b 122 | */ 123 | int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod); 124 | 125 | /** 126 | * @} 127 | */ 128 | 129 | #endif /* AVUTIL_MATHEMATICS_H */ 130 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/cpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2000, 2001, 2002 Fabrice Bellard 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #ifndef AVUTIL_CPU_H 22 | #define AVUTIL_CPU_H 23 | 24 | #include "attributes.h" 25 | 26 | #define AV_CPU_FLAG_FORCE 0x80000000 /* force usage of selected flags (OR) */ 27 | 28 | /* lower 16 bits - CPU features */ 29 | #define AV_CPU_FLAG_MMX 0x0001 ///< standard MMX 30 | #define AV_CPU_FLAG_MMXEXT 0x0002 ///< SSE integer functions or AMD MMX ext 31 | #define AV_CPU_FLAG_MMX2 0x0002 ///< SSE integer functions or AMD MMX ext 32 | #define AV_CPU_FLAG_3DNOW 0x0004 ///< AMD 3DNOW 33 | #define AV_CPU_FLAG_SSE 0x0008 ///< SSE functions 34 | #define AV_CPU_FLAG_SSE2 0x0010 ///< PIV SSE2 functions 35 | #define AV_CPU_FLAG_SSE2SLOW 0x40000000 ///< SSE2 supported, but usually not faster 36 | #define AV_CPU_FLAG_3DNOWEXT 0x0020 ///< AMD 3DNowExt 37 | #define AV_CPU_FLAG_SSE3 0x0040 ///< Prescott SSE3 functions 38 | #define AV_CPU_FLAG_SSE3SLOW 0x20000000 ///< SSE3 supported, but usually not faster 39 | #define AV_CPU_FLAG_SSSE3 0x0080 ///< Conroe SSSE3 functions 40 | #define AV_CPU_FLAG_ATOM 0x10000000 ///< Atom processor, some SSSE3 instructions are slower 41 | #define AV_CPU_FLAG_SSE4 0x0100 ///< Penryn SSE4.1 functions 42 | #define AV_CPU_FLAG_SSE42 0x0200 ///< Nehalem SSE4.2 functions 43 | #define AV_CPU_FLAG_AVX 0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used 44 | #define AV_CPU_FLAG_XOP 0x0400 ///< Bulldozer XOP functions 45 | #define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions 46 | // #if LIBAVUTIL_VERSION_MAJOR <52 47 | #define AV_CPU_FLAG_CMOV 0x1001000 ///< supports cmov instruction 48 | // #else 49 | // #define AV_CPU_FLAG_CMOV 0x1000 ///< supports cmov instruction 50 | // #endif 51 | 52 | #define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard 53 | 54 | #define AV_CPU_FLAG_ARMV5TE (1 << 0) 55 | #define AV_CPU_FLAG_ARMV6 (1 << 1) 56 | #define AV_CPU_FLAG_ARMV6T2 (1 << 2) 57 | #define AV_CPU_FLAG_VFP (1 << 3) 58 | #define AV_CPU_FLAG_VFPV3 (1 << 4) 59 | #define AV_CPU_FLAG_NEON (1 << 5) 60 | 61 | /** 62 | * Return the flags which specify extensions supported by the CPU. 63 | */ 64 | int av_get_cpu_flags(void); 65 | 66 | /** 67 | * Disables cpu detection and forces the specified flags. 68 | * -1 is a special case that disables forcing of specific flags. 69 | */ 70 | void av_force_cpu_flags(int flags); 71 | 72 | /** 73 | * Set a mask on flags returned by av_get_cpu_flags(). 74 | * This function is mainly useful for testing. 75 | * Please use av_force_cpu_flags() and av_get_cpu_flags() instead which are more flexible 76 | * 77 | * @warning this function is not thread safe. 78 | */ 79 | attribute_deprecated void av_set_cpu_flags_mask(int mask); 80 | 81 | /** 82 | * Parse CPU flags from a string. 83 | * 84 | * The returned flags contain the specified flags as well as related unspecified flags. 85 | * 86 | * This function exists only for compatibility with libav. 87 | * Please use av_parse_cpu_caps() when possible. 88 | * @return a combination of AV_CPU_* flags, negative on error. 89 | */ 90 | attribute_deprecated 91 | int av_parse_cpu_flags(const char *s); 92 | 93 | /** 94 | * Parse CPU caps from a string and update the given AV_CPU_* flags based on that. 95 | * 96 | * @return negative on error. 97 | */ 98 | int av_parse_cpu_caps(unsigned *flags, const char *s); 99 | 100 | /* The following CPU-specific functions shall not be called directly. */ 101 | int ff_get_cpu_flags_arm(void); 102 | int ff_get_cpu_flags_ppc(void); 103 | int ff_get_cpu_flags_x86(void); 104 | 105 | #endif /* AVUTIL_CPU_H */ 106 | -------------------------------------------------------------------------------- /midifile-master/src-programs/miditime.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Programmer: Craig Stuart Sapp 3 | // Creation Date: Mon Jul 26 13:10:22 PDT 2010 4 | // Last Modified: Mon Feb 9 20:34:40 PST 2015 Updated for C++11. 5 | // Filename: ...sig/doc/examples/all/miditime/miditime.cpp 6 | // Syntax: C++ 7 | // 8 | // Description: Displays the absolute tick time and absolute time 9 | // in seconds for MIDI events in a MIDI file, along with 10 | // the track information. 11 | 12 | #include "Options.h" 13 | #include "MidiFile.h" 14 | #include 15 | #include 16 | 17 | using namespace std; 18 | 19 | // function declarations: 20 | void checkOptions (Options& opts); 21 | void example (void); 22 | void usage (const char* command); 23 | void processMidiFile (MidiFile& midifile); 24 | 25 | // user interface variables: 26 | double starttime = 0.0; // used with -s option 27 | double endtime = 0.0; // used with -e option 28 | int onsetQ = 0; // used with -o option 29 | 30 | /////////////////////////////////////////////////////////////////////////// 31 | 32 | int main(int argc, char** argv) { 33 | int status; 34 | MidiFile inputfile; 35 | Options options(argc, argv); 36 | 37 | checkOptions(options); 38 | 39 | status = inputfile.read(options.getArg(1)); 40 | if (status == 0) { 41 | cout << "Syntax error in file: " << options.getArg(1) << "\n"; 42 | } 43 | 44 | processMidiFile(inputfile); 45 | return 0; 46 | } 47 | 48 | /////////////////////////////////////////////////////////////////////////// 49 | 50 | 51 | ////////////////////////////// 52 | // 53 | // processMidiFile -- extract track and timing information from the MIDI file. 54 | // 55 | 56 | void processMidiFile(MidiFile& midifile) { 57 | midifile.absoluteTicks(); 58 | midifile.joinTracks(); 59 | int i, j; 60 | int eventcount = midifile.getEventCount(0); 61 | int track; 62 | int timeinticks; 63 | double timeinsecs; 64 | MidiEvent *ptr; 65 | int attack; 66 | for (i=0; itrack; 69 | timeinticks = ptr->tick; 70 | timeinsecs = midifile.getTimeInSeconds(0, i); 71 | attack = ((*ptr)[0] & 0xf0) == 0x90; 72 | if (onsetQ && !attack) { 73 | continue; 74 | } 75 | if (onsetQ && attack) { 76 | if ((*ptr)[2] == 0) { 77 | continue; 78 | } 79 | } 80 | 81 | cout << timeinticks << "\t"; 82 | cout << timeinsecs << "\t"; 83 | cout << track << "\t"; 84 | cout << i << "\t"; 85 | for (j=0; j<(int)ptr->size(); j++) { 86 | if (j == 0) { 87 | cout << "0x" << hex << (int)(*ptr)[j] << dec << " "; 88 | } else { 89 | cout << (int)(*ptr)[j] << " "; 90 | } 91 | } 92 | cout << endl; 93 | } 94 | } 95 | 96 | 97 | 98 | ////////////////////////////// 99 | // 100 | // checkOptions -- handle command-line options. 101 | // 102 | 103 | void checkOptions(Options& opts) { 104 | 105 | opts.define("author=b"); 106 | opts.define("version=b"); 107 | opts.define("example=b"); 108 | opts.define("help=b"); 109 | opts.define("o|on|onset=b"); 110 | opts.process(); 111 | 112 | if (opts.getBoolean("author")) { 113 | cout << "Written by Craig Stuart Sapp, " 114 | << "craig@ccrma.stanford.edu, July 2010" << endl; 115 | exit(0); 116 | } 117 | if (opts.getBoolean("version")) { 118 | cout << "midiextract version 1.0" << endl; 119 | cout << "compiled: " << __DATE__ << endl; 120 | } 121 | if (opts.getBoolean("help")) { 122 | usage(opts.getCommand().data()); 123 | exit(0); 124 | } 125 | if (opts.getBoolean("example")) { 126 | example(); 127 | exit(0); 128 | } 129 | 130 | onsetQ = opts.getBoolean("onset"); 131 | } 132 | 133 | 134 | 135 | ////////////////////////////// 136 | // 137 | // example -- gives example calls to the midiexcerpt program. 138 | // 139 | 140 | void example(void) { 141 | cout << 142 | "# \n" 143 | << endl; 144 | } 145 | 146 | 147 | 148 | ////////////////////////////// 149 | // 150 | // usage -- how to run the midiexcerpt program on the command line. 151 | // 152 | 153 | void usage(const char* command) { 154 | cout << 155 | " \n" 156 | << endl; 157 | } 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /ffmpeg/ffmpeg-dev/include/libavutil/attributes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * copyright (c) 2006 Michael Niedermayer 3 | * 4 | * This file is part of FFmpeg. 5 | * 6 | * FFmpeg is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Lesser General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2.1 of the License, or (at your option) any later version. 10 | * 11 | * FFmpeg is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Lesser General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with FFmpeg; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | /** 22 | * @file 23 | * Macro definitions for various function/variable attributes 24 | */ 25 | 26 | #ifndef AVUTIL_ATTRIBUTES_H 27 | #define AVUTIL_ATTRIBUTES_H 28 | 29 | #ifdef __GNUC__ 30 | # define AV_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y) 31 | #else 32 | # define AV_GCC_VERSION_AT_LEAST(x,y) 0 33 | #endif 34 | 35 | #ifndef av_always_inline 36 | #if AV_GCC_VERSION_AT_LEAST(3,1) 37 | # define av_always_inline __attribute__((always_inline)) inline 38 | #elif defined(_MSC_VER) 39 | # define av_always_inline __forceinline 40 | #else 41 | # define av_always_inline inline 42 | #endif 43 | #endif 44 | 45 | #ifndef av_extern_inline 46 | #if defined(__ICL) && __ICL >= 1210 || defined(__GNUC_STDC_INLINE__) 47 | # define av_extern_inline extern inline 48 | #else 49 | # define av_extern_inline inline 50 | #endif 51 | #endif 52 | 53 | #if AV_GCC_VERSION_AT_LEAST(3,1) 54 | # define av_noinline __attribute__((noinline)) 55 | #else 56 | # define av_noinline 57 | #endif 58 | 59 | #if AV_GCC_VERSION_AT_LEAST(3,1) 60 | # define av_pure __attribute__((pure)) 61 | #else 62 | # define av_pure 63 | #endif 64 | 65 | #ifndef av_restrict 66 | #define av_restrict restrict 67 | #endif 68 | 69 | #if AV_GCC_VERSION_AT_LEAST(2,6) 70 | # define av_const __attribute__((const)) 71 | #else 72 | # define av_const 73 | #endif 74 | 75 | #if AV_GCC_VERSION_AT_LEAST(4,3) 76 | # define av_cold __attribute__((cold)) 77 | #else 78 | # define av_cold 79 | #endif 80 | 81 | #if AV_GCC_VERSION_AT_LEAST(4,1) 82 | # define av_flatten __attribute__((flatten)) 83 | #else 84 | # define av_flatten 85 | #endif 86 | 87 | #if AV_GCC_VERSION_AT_LEAST(3,1) 88 | # define attribute_deprecated __attribute__((deprecated)) 89 | #else 90 | # define attribute_deprecated 91 | #endif 92 | 93 | /** 94 | * Disable warnings about deprecated features 95 | * This is useful for sections of code kept for backward compatibility and 96 | * scheduled for removal. 97 | */ 98 | #ifndef AV_NOWARN_DEPRECATED 99 | #if AV_GCC_VERSION_AT_LEAST(4,6) 100 | # define AV_NOWARN_DEPRECATED(code) \ 101 | _Pragma("GCC diagnostic push") \ 102 | _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ 103 | code \ 104 | _Pragma("GCC diagnostic pop") 105 | #else 106 | # define AV_NOWARN_DEPRECATED(code) code 107 | #endif 108 | #endif 109 | 110 | 111 | #if defined(__GNUC__) 112 | # define av_unused __attribute__((unused)) 113 | #else 114 | # define av_unused 115 | #endif 116 | 117 | /** 118 | * Mark a variable as used and prevent the compiler from optimizing it 119 | * away. This is useful for variables accessed only from inline 120 | * assembler without the compiler being aware. 121 | */ 122 | #if AV_GCC_VERSION_AT_LEAST(3,1) 123 | # define av_used __attribute__((used)) 124 | #else 125 | # define av_used 126 | #endif 127 | 128 | #if AV_GCC_VERSION_AT_LEAST(3,3) 129 | # define av_alias __attribute__((may_alias)) 130 | #else 131 | # define av_alias 132 | #endif 133 | 134 | #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__) 135 | # define av_uninit(x) x=x 136 | #else 137 | # define av_uninit(x) x 138 | #endif 139 | 140 | #ifdef __GNUC__ 141 | # define av_builtin_constant_p __builtin_constant_p 142 | # define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos))) 143 | #else 144 | # define av_builtin_constant_p(x) 0 145 | # define av_printf_format(fmtpos, attrpos) 146 | #endif 147 | 148 | #if AV_GCC_VERSION_AT_LEAST(2,5) 149 | # define av_noreturn __attribute__((noreturn)) 150 | #else 151 | # define av_noreturn 152 | #endif 153 | 154 | #endif /* AVUTIL_ATTRIBUTES_H */ 155 | --------------------------------------------------------------------------------