This project only uses C, the build system is a separate C file nob.c (check the structure section)
- A C11 compatible compiler, tested mainly with
gccon GNU + Linux,cl(a.k.a msvc) on Windows (make sure you are using a 64-bit version) curlon both platforms to download the modified libraries when neededunzipon GNU + Linux ortaron Windows to extract the library bundle
The modified FFmpeg and dav1d libraries are downloaded from the project's "releases" page on GitHub the first time you build if they are missing
There is a sample project.4coder file along with sample build scripts on this directory. For now it just binds "F1" to compile the inspector (for x11 on the .sh) and F2 to run for "1080_jellyfin.mp4". It's more of an example than something to actually be used
The first time you compile you will have to generate the build tool, simply run (uses gcc by default on GNU + Linux, cl on Windows):
gcc nob.c -o nob or cl nob.c
Now you can compile the project with:
./nob(.exe) -target TARGET -platform PLATFORM -mode MODE
The platform libraries are pulled if they are not found. You will be asked if you want to download them now; accept for the project to build
- TARGET: inspector | reconstructor | tests (see below) | pull (see below)
- PLATFORM (optional, autodetects if not provided): gnu_linux_x11 | gnu_linux_wayland | windows
- MODE (optional, defaults to debug): debug | release
For example, to build the inspector for GNU + Linux with X11 with release optimizations:
./nob -target inspector -platform gnu_linux_x11 -mode release
Both GNU + Linux back-ends speak their display protocols directly, so no X11 or Wayland development packages are required
Pulling libs without a specific platform (a.k.a just -target pull) will pull for the OS you are using, if you want to specify you can use pull-windows-libs or pull-gnu-linux-libs
The generated executable will be in the form TARGET_MODE_PLATFORM(.exe) in the build/ directory. Example: build/inspector_release_gnu_linux_x11 or build\inspector_debug_windows.exe.
You can run the inspector by passing a video path to the executable:
build/inspector_...(.exe) -inspect video_path or build/inspector_...(.exe) -eport video_path data_file.dat
Testing can be performed with either a whitelist or a blacklist:
./build/tests_...(.exe) -enable TESTS_TO_RUN or ./build/tests_...(.exe) -disable TESTS_TO_EXCLUDE
The flag.h version in this project is modified so list flags consume consecutive values until the next flag. For example, pass -enable arena math. Repeating a list flag is still supported
Not providing any option will run all of the tests.
List of tests (to be expanded):
- arena: alignment, bounds, and release behavior
- dyn_arr: dynamic array tests
- math: macro, numeric helper, and geometry tests
- input: input state tests
- utility: platform serialization and endian helper tests
- renderer: color, rasterization, geometry, and transparency tests
- threading: platform independent multithreading and frame/render pooling tests
This includes the following directories:
decode, the AV1 decoding pipelinedocs, information on file and data formats (will have papers and analysis latter)ds, the data structures used in the projectsexport, the-exportmode of the inspectorinput, input systeminspector, the inspector's main entry point and operationslib, third-party code used in the project; the modified Windows libraries are includedmath, the mathematical functions and objects used in the codeplatform, with the platform layers for GNU + Linux (X11 and Wayland) and Windowsrenderer, the source code for the software renderertest_files, files used to test the correctness of the programs. For now this is empty as I didn't write any tests that directly require video data, but I recommend checking the sources for where to get some testing data.tests, unit tests
The following are present in lib/ (the .h files are in there):
- nob, the build system (by TSoding)
- flag, for parsing the build system arguments (by TSoding)
- astf, for automated testing (by me)
- "OS_NAME", the modified libraries (FFmpeg and dav1d) pre-compiled for your OS
The inspector is a tool to visualize compression data of the videos, such as color channels, chroma channels and inter prediction. See more here
The reconstructor is a tool to reconstruct 3d models from video data using computer vision. See more on the ideas file here
In this project we use both perf and "Intel VTune Profiler" (check sources). Profiling data is not uploaded to GitHub as it's hardware dependent and can be extracted with ease.