Compiling PtokaX on Windows

Visual Studio 2010 Optional: Windows SDK 7.1a x86 (download, 500mb iso) Commentary: PPK’s official PtokaX builds are compiled with the 7.1 SDK. The Windows SDKs are intermittent updates to the headers, libraries and compilers shipped with Visual Studio - PtokaX doesn’t use any cutting-edge windows features, so unless you already have the SDK for other reasons, it is more convenient to swap out the Platform Toolset in the PtokaX project (Configuration Properties > General) and set it instead to v100 (the VS2010 compiler).
Read more

Functional programming in C

/* Functional programming in C --------------------------- This is an example of how to use executable memory to get partial function application (i.e. bind1st()) in C. (Well, this actually only compiles as C++ since i'm using a varargs typedef, but there's no classes or templates.) To proceed, we need to be comfortable with the cdecl and stdcall calling conventions on x86, and just a little assembly. In cdecl, function arguments are pushed onto the x86 stack from right to left, and then control passes to the callee.
Read more

Boilerplate for NASM

Brief introduction to x86 using the _cdecl calling convention and linking with a CRT: Every function builds and breaks down its own stack frame. Caller pushes arguments onto the stack, calls the function, and then removes the arguments from the stack. Function arguments are pushed right-to-left. The return value of a function goes in eax. The x86 stack grows downwards. Example global _main extern _printf section .text ; non-writable, executable ; function putstr( const char* ) putstr: push ebp ; set up a stack frame mov ebp,esp ; this function is small enough + we're not using any local variables, so we could probably omit the frame pointer ; our arguments are [ebp+8], [ebp+12], .
Read more

H264 decoder performance comparison (Part 2)

Test details Intel Core 2 Quad Q6600 @ 2.4GHz, Windows 7 x64 Tests performed 2012-03-03 ffdshow was built by xvidvideo Benchmarking software: TimeMeasure filter from GraphStudioNext 0.4.9.0 Results are fps averaged over three trials. Test results Soul’d Out AMV [Anime, 480p, 8-bit, Main@5.1, 2.4Mbps] arcsoft 2.27 (2009-09-10) x32: 500.7 fps ffdshow 4364 x32 msvc: 605.7 fps ffdshow 4364 x32 icl12: 606.2 fps ffdshow 4364 x64 msvc: 520.8 fps mpc r4114 x32: 655.
Read more

StartSSL certificates

Must use IE. Log in to control panel and validate domain name via validations wizard. Certificates wizard: Web Server SSL/TLS certificate Copy encrypted private key –> ssl.key Add one subdomain (www.) Copy certificate –> ssl.crt Download root and server CA’s from this page Go to Toolbox, and decrypt the private key –> myserver.key Using with nginx Create myserver.crt by appending the following files; ssl.crt, sub.whatever.cer, root.cer listen 443 ssl; ssl on; ssl_certificate /path/to/myserver.
Read more

Subtitle renderer performance comparison

Date: 2011-11-20 Platform: Intel Q6600 @ 2.4GHz (stock) running Windows 7 x64 Engine: 32-bit Avisynth 2.58 (stock) build 2008-12-22 Script: BlankClip(length=30602, fps=29.97).FILTERNAME("flcl-ed.realfx.ass") Test: $ time avs2yuv video.avs -o NUL Results - MT Run 1 Run 2 Run 3 Notes assrender 0.17 No 1m49.547s 0m47.508s 0m47.484s Ran fontconfig in first run assrender 0.24.1 No 1m26.377s 0m50.542s 0m50.951s Ran fontconfig in first run. Fastest overall vsfilter-threaded 2011-09-11 Yes 3m42.
Read more

PSP Homebrew

PSPSDK provides psp-gcc. There’s also LuaPlayer, which has some issues being run as a signed binary on OFW. In this situation it’s best to either sign a HEN, install CFW or just stick with MinPSPW’s psp-gcc (which is actually really easy to use, especially with oslib_mod) Development Tools PSPSDK (c.f. MinPSPW) provides psp-gcc. LuaPlayer and derivatives (built with PSPSDK) Loading Homebrew CFW Manual signing for EBOOTs using leaked private key allows running on OFW.
Read more

H264 decoder performance comparison

Test details Intel Core 2 Quad Q6600 @ 2.4GHz, Windows 7 x64, all codecs in 32-bit mode Tests performed 2011-10-27 ffdshow r3984 was built with vc10 by clsid ffdshow r3995 was built with icl12 by xvidvideo Benchmarking software: TimeMeasure filter from GraphStudio 0.3.2.0 Beta Results are fps averaged over three trials. Test Results Soul’d Out AMV [Anime, 480p, 8-bit, Main@5.1, 2.4Mbps] CoreAVC 3.01: 657.3 ffdshow 3984: 603.9 ffdshow 3995: 601.
Read more

Thumbnails on Windows 7

A few things are required to get media thumbnails (e.g. flv, mkv, ogm) working in Windows 7. 1. Shell Extension Register the thumbnailing shell extension for every filetype you want to generate thumbnails for, by making a new .reg file with the following contents: (This shell extension comes with Windows Media Player 12, so make sure that’s installed.) Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\.mkv\ShellEx\{BB2E617C-0920-11D1-9A0B-00C04FC2D6C1}] @="{c5a40261-cd64-4ccf-84cb-c394da41d590}" Run it. Then, rinse and repeat with .
Read more