На главную
Видео добавленное пользователем “8thDay”
Aegisub script that aids in manual reproduction of perspective distortion
Script and some additional files can be downloaded from here: http://www.mediafire.com/?mpdur906sd5xe Please, note that in Aegisub manual it is said that in order to position subs in 3D, rotation origin (i.e. \org) should be positioned on the vanishing point. 'Calculate \org' works differently (probably wrong): as an X coordinate for \org it uses half of the script width, which may be the cause why this method works not in all cases. Still, in those cases that this method works it makes the process easier and produces acceptable results.
Просмотров: 1118 8thDay
Analysis of heap of VPY script with VMMap for possible memory leak
Enable captions before watching video. See this video on how to configure visual appearance of CC: https://youtu.be/yUx_HI8D-4w There are lots of similar tools, but this one is extremely small and has a nice GUI/UX. If you haven't used it before, you can use this video to familiarize yourself with it (there's also links to Mark Russinovich's talks on "Mysteries of Memory Management Revealed" with some use-case examples): https://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-7-VMMap Here's a list of things you must do to analyze memory allocations: 1. install Python with debug symbols. If like me you do not see an option to install debug symbols in the installer, you can install Python with these keys (https://docs.python.org/3/using/windows.html#installing-without-ui): `python-3.6.6-amd64.exe /passive Include_symbols=1 PrependPath=1 InstallAllUsers=1`; 2. download VMMap from https://docs.microsoft.com/en-us/sysinternals/downloads/vmmap; 3. set up VMMap: 1. go to `Main menu / Options / Configure symbols...`; 2. set `DbgHelp.dll (x64) path` to something like `c:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbghelp.dll`. "Debugging tools for Windows" themselves can be found here: https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/index 3. set `Symbol paths` to `c:\ffms2\x64\;c:\Program Files (x86)\VapourSynth\core64\;c:\Program Files\Python36\;c:\Program Files\Python36\DLLs\;srv*c:\cache-for-ms-debug-symbols*https://msdl.microsoft.com/download/symbols`. More info on caches can be found here: https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/using-umdh-to-find-a-user-mode-memory-leak You may want to remove `srv` notation when all needed MS DLLs will be fetched -- this will make lookups almost instant; 4. set `Source code paths` to root of dir with VapourSynth source code. You can provide path to FFMS2 source code as well. This way you'll be able to inspect source code directly in VMMap. Make sure to use same source code that was used to build VS, rather than latest GitHub version (clone VS repo and hard reset it to needed commit). Also make sure line endings are Windows styled (replace all `\n` to `\r\n` and then `\r\r\n` to `\r\n` to protect mixed files). 4. launch analysis/collection of snapshots: 1. press `Ctrl+P`; 2. select tab `Launch and trace a new process`; 3. set `Application` to `C:\Program Files\Python36\python.exe`; 4. set `Arguments` to `script.py`; 5. set `Start directory` to `p:\ath\to\script_py\`. 5. inspect memory after script finished its job: 1. press button `Timeline...` to navigate between snapshots. To diff two snapshots select range with LMB; 2. analyze stack trace of heap allocations (you can also analyze blocks within pages, but this'll do): 1. select one of the snapshots in Timeline (diffing affects data, hence its better to do per-snapshot analysis); 2. press button `Trace...`; 3. sort table by `Bytes` and inspect "call sites" with biggest allocations; 4. expand "call site"; 5. press button `Stack...` on one of the blocks to see stack trace; 6. press button `Source...` to inspect source code.
Просмотров: 41 8thDay