# f0e/blur architecture

> Architecture diagram of the GitHub repository f0e/blur, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/f0e/blur
- Repository: https://github.com/f0e/blur

## Overview

Blur is a native desktop and command-line video motion-blur renderer. Users configure blur, interpolation, deduplication, and output options, then submit video files; the application queues renders and reports progress. The processing script reads video, applies optional deduplication and interpolation, and outputs a frame stream for rendering. The README documents additional GPU, preview, weighting, and frameserver capabilities. Some native-to-script wiring was not shown, so that link is marked unverified rather than asserted.

Main entry points: [`src/vapoursynth/blur.py`](https://github.com/f0e/blur/blob/master/src/vapoursynth/blur.py) (Video processing entry), [`src/common/rendering.cpp`](https://github.com/f0e/blur/blob/master/src/common/rendering.cpp) (Render job), [`src/gui/tasks.cpp`](https://github.com/f0e/blur/blob/master/src/gui/tasks.cpp) (File task coordinator), [`src/gui/components/main.cpp`](https://github.com/f0e/blur/blob/master/src/gui/components/main.cpp) (Desktop interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry"]
  node_desktop_ui["Desktop interface<br/>[main.cpp]"]
  node_cli["CLI arguments<br/>[cli.cpp]"]
end

subgraph group_app["Application"]
  node_settings_ui["Settings and preview<br/>[preview.cpp]"]
  node_app_config["App configuration<br/>[config_app.h]"]
  node_task_coordinator["File task coordinator<br/>[tasks.cpp]"]
  node_gui_renderer["GUI render display<br/>[main.cpp]"]
  node_fonts["Bundled fonts<br/>[dejavu_sans.h]"]
end

subgraph group_engine["Render engine"]
  node_render_queue["Render queue<br/>[rendering.h]"]
  node_render_job["Render job<br/>[rendering.cpp]"]
  node_frame_preview["Preview render<br/>[rendering_frame.h]"]
  node_weighting["Frame weighting<br/>[weighting.cpp]"]
end

subgraph group_video["Video processing"]
  node_vapoursynth_script["Video processing entry<br/>[blur.py]"]
  node_deduplication["Duplicate-frame repair<br/>[deduplicate.py]"]
  node_interpolation["Frame interpolation<br/>[interpolate.py]"]
  node_blending["Frame blending<br/>[blending.py]"]
  node_video_utils["Video processing utilities<br/>[utils.py]"]
end

node_desktop_user(("Desktop user"))
node_cli_user(("CLI user"))
node_video_file["Input video"]
node_output_video["Rendered video"]

node_desktop_user -->|"uses"| node_desktop_ui
node_cli_user -->|"invokes"| node_cli
node_desktop_ui -->|"submits files"| node_task_coordinator
node_cli -->|"configures render"| node_render_job
node_settings_ui -->|"renders preview"| node_frame_preview
node_settings_ui -->|"uses weights"| node_weighting
node_task_coordinator -->|"reads settings"| node_app_config
node_task_coordinator -->|"queues jobs"| node_render_queue
node_task_coordinator -->|"reports completion"| node_gui_renderer
node_render_queue -->|"runs next"| node_render_job
node_render_job -->|"reads"| node_video_file
node_render_job -.->|"invokes processing"| node_vapoursynth_script
node_vapoursynth_script -->|"repairs duplicates"| node_deduplication
node_vapoursynth_script -->|"interpolates frames"| node_interpolation
node_vapoursynth_script -->|"blends frames"| node_blending
node_vapoursynth_script -->|"uses weights"| node_weighting
node_vapoursynth_script -->|"uses helpers"| node_video_utils
node_deduplication -->|"fills dropped frames"| node_interpolation
node_interpolation -->|"converts formats"| node_video_utils
node_deduplication -->|"converts formats"| node_video_utils
node_render_job -->|"writes"| node_output_video
node_gui_renderer -->|"shows progress"| node_desktop_ui
node_desktop_ui -->|"renders text"| node_fonts

click node_desktop_ui "https://github.com/f0e/blur/blob/master/src/gui/components/main.cpp"
click node_cli "https://github.com/f0e/blur/blob/master/src/cli/cli.cpp"
click node_settings_ui "https://github.com/f0e/blur/blob/master/src/gui/components/configs/preview.cpp"
click node_app_config "https://github.com/f0e/blur/blob/master/src/common/config_app.h"
click node_task_coordinator "https://github.com/f0e/blur/blob/master/src/gui/tasks.cpp"
click node_render_queue "https://github.com/f0e/blur/blob/master/src/common/rendering.h"
click node_render_job "https://github.com/f0e/blur/blob/master/src/common/rendering.cpp"
click node_frame_preview "https://github.com/f0e/blur/blob/master/src/common/rendering_frame.h"
click node_weighting "https://github.com/f0e/blur/blob/master/src/common/weighting.cpp"
click node_vapoursynth_script "https://github.com/f0e/blur/blob/master/src/vapoursynth/blur.py"
click node_deduplication "https://github.com/f0e/blur/blob/master/src/vapoursynth/blur/deduplicate.py"
click node_interpolation "https://github.com/f0e/blur/blob/master/src/vapoursynth/blur/interpolate.py"
click node_blending "https://github.com/f0e/blur/blob/master/src/vapoursynth/blur/blending.py"
click node_video_utils "https://github.com/f0e/blur/blob/master/src/vapoursynth/blur/utils.py"
click node_gui_renderer "https://github.com/f0e/blur/blob/master/src/gui/components/main.cpp"
click node_fonts "https://github.com/f0e/blur/blob/master/src/gui/fonts/dejavu_sans.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_desktop_ui,node_cli,node_desktop_user,node_cli_user toneBlue
class node_settings_ui,node_app_config,node_task_coordinator,node_gui_renderer,node_fonts toneAmber
class node_render_queue,node_render_job,node_frame_preview,node_weighting toneMint
class node_vapoursynth_script,node_deduplication,node_interpolation,node_blending,node_video_utils toneRose
class node_video_file,node_output_video toneIndigo
```

## Components

### User entry

- [Desktop interface](https://github.com/f0e/blur/blob/master/src/gui/components/main.cpp): `src/gui/components/main.cpp`
- [CLI arguments](https://github.com/f0e/blur/blob/master/src/cli/cli.cpp): `src/cli/cli.cpp`

### Application

- [Settings and preview](https://github.com/f0e/blur/blob/master/src/gui/components/configs/preview.cpp): `src/gui/components/configs/preview.cpp`
- [App configuration](https://github.com/f0e/blur/blob/master/src/common/config_app.h): `src/common/config_app.h`
- [File task coordinator](https://github.com/f0e/blur/blob/master/src/gui/tasks.cpp): `src/gui/tasks.cpp`
- [GUI render display](https://github.com/f0e/blur/blob/master/src/gui/components/main.cpp): `src/gui/components/main.cpp`
- [Bundled fonts](https://github.com/f0e/blur/blob/master/src/gui/fonts/dejavu_sans.h): `src/gui/fonts/dejavu_sans.h`

### Render engine

- [Render queue](https://github.com/f0e/blur/blob/master/src/common/rendering.h): `src/common/rendering.h`
- [Render job](https://github.com/f0e/blur/blob/master/src/common/rendering.cpp): `src/common/rendering.cpp`
- [Preview render](https://github.com/f0e/blur/blob/master/src/common/rendering_frame.h): `src/common/rendering_frame.h`
- [Frame weighting](https://github.com/f0e/blur/blob/master/src/common/weighting.cpp): `src/common/weighting.cpp`

### Video processing

- [Video processing entry](https://github.com/f0e/blur/blob/master/src/vapoursynth/blur.py): `src/vapoursynth/blur.py`
- [Duplicate-frame repair](https://github.com/f0e/blur/blob/master/src/vapoursynth/blur/deduplicate.py): `src/vapoursynth/blur/deduplicate.py`
- [Frame interpolation](https://github.com/f0e/blur/blob/master/src/vapoursynth/blur/interpolate.py): `src/vapoursynth/blur/interpolate.py`
- [Frame blending](https://github.com/f0e/blur/blob/master/src/vapoursynth/blur/blending.py): `src/vapoursynth/blur/blending.py`
- [Video processing utilities](https://github.com/f0e/blur/blob/master/src/vapoursynth/blur/utils.py): `src/vapoursynth/blur/utils.py`

### Other components

- **Desktop user**
- **CLI user**
- **Input video**
- **Rendered video**

## Connections

- Desktop user → Desktop interface: uses (evidence: `README.md`)
- CLI user → CLI arguments: invokes (evidence: `README.md`)
- Desktop interface → File task coordinator: submits files (evidence: `src/gui/tasks.cpp`)
- CLI arguments → Render job: configures render (evidence: `src/cli/cli.cpp`)
- Settings and preview → Preview render: renders preview (evidence: `src/gui/components/configs/preview.cpp`)
- Settings and preview → Frame weighting: uses weights (evidence: `src/gui/components/configs/preview.cpp`)
- File task coordinator → App configuration: reads settings (evidence: `src/gui/tasks.cpp`)
- File task coordinator → Render queue: queues jobs (evidence: `src/gui/tasks.cpp`)
- File task coordinator → GUI render display: reports completion (evidence: `src/gui/tasks.cpp`)
- Render queue → Render job: runs next (evidence: `src/common/rendering.h`)
- Render job → Input video: reads (evidence: `README.md`)
- Render job → Video processing entry: invokes processing
- Video processing entry → Duplicate-frame repair: repairs duplicates (evidence: `src/vapoursynth/blur.py`)
- Video processing entry → Frame interpolation: interpolates frames (evidence: `src/vapoursynth/blur.py`)
- Video processing entry → Frame blending: blends frames (evidence: `src/vapoursynth/blur.py`)
- Video processing entry → Frame weighting: uses weights (evidence: `src/vapoursynth/blur.py`)
- Video processing entry → Video processing utilities: uses helpers (evidence: `src/vapoursynth/blur.py`)
- Duplicate-frame repair → Frame interpolation: fills dropped frames (evidence: `src/vapoursynth/blur/deduplicate.py`)
- Frame interpolation → Video processing utilities: converts formats (evidence: `src/vapoursynth/blur/interpolate.py`)
- Duplicate-frame repair → Video processing utilities: converts formats (evidence: `src/vapoursynth/blur/deduplicate.py`)
- Render job → Rendered video: writes (evidence: `README.md`)
- GUI render display → Desktop interface: shows progress (evidence: `src/gui/components/main.cpp`)
- Desktop interface → Bundled fonts: renders text
