# marshiyar/myupscaler architecture

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

- Interactive diagram: https://gitdiagram.com/marshiyar/myupscaler
- Repository: https://github.com/marshiyar/myupscaler

## Overview

myUpscaler is a macOS SwiftUI video-upscaling app. Users select a video, configure scaling and restoration options, then run or cancel processing and inspect progress and output. The Swift runner dispatches work to either the CoreML image-processing engine or the bridged C/FFmpeg pipeline; the README documents interpolation and extensive filter stacks in that pipeline. The editor, presets, shortcuts, and settings support the workflow. Some C internals and UI wiring were not excerpted, so unverified links are omitted; documented product capabilities remain represented.

Main entry points: [`myUpscaler/ContentView/ContentViewPanels.swift`](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/ContentView/ContentViewPanels.swift) (Control panels), [`myUpscaler/UpscaleRunner.swift`](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/UpscaleRunner.swift) (Run coordinator), [`myUpscaler/UpscaleSettings.swift`](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/UpscaleSettings.swift) (Processing settings), [`myUpscaler/up60p_restore_beast_main.c`](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/up60p_restore_beast_main.c) (Video pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["App interface"]
  node_app["App entry"]
  node_mainview["Main workspace<br/>[ContentView.swift]"]
  node_panels["Control panels"]
  node_drop["Media import<br/>[DragDropView.swift]"]
end

subgraph group_configuration["Editing and settings"]
  node_editor["Preview editor<br/>[EditorState.swift]"]
  node_settings["Processing settings"]
  node_presets[("Preset store<br/>[PresetStore.swift]")]
  node_quality["Quality analysis"]
  node_shortcuts["Shortcut manager"]
end

subgraph group_processing["Processing engines"]
  node_runner["Run coordinator"]
  node_coreml["CoreML engine<br/>[CoreMLEngine.swift]"]
  node_shader["Shader processing"]
  node_modelreg["Model registry"]
  node_upengine["C engine bridge<br/>[Up60PEngine.swift]"]
end

subgraph group_native["Native pipeline"]
  node_bridge["C interface<br/>[Up60PBridging.m]"]
  node_options["Pipeline options<br/>[up60p.h]"]
  node_pipeline["Video pipeline"]
  node_process["Process control<br/>[up60p_process.c]"]
end

node_user(("User"))
node_ffmpeg["Bundled FFmpeg"]

node_user -->|"opens"| node_app
node_app -->|"shows"| node_mainview
node_mainview -->|"presents"| node_panels
node_panels -->|"embeds"| node_drop
node_mainview -->|"controls"| node_runner
node_panels -->|"edits"| node_settings
node_panels -->|"starts or cancels"| node_runner
node_runner -->|"snapshots"| node_settings
node_runner -->|"dispatches"| node_coreml
node_runner -->|"dispatches"| node_upengine
node_runner -.->|"updates preview state"| node_editor
node_panels -->|"manages"| node_presets
node_panels -->|"uses shortcuts"| node_shortcuts
node_settings -->|"lists models"| node_modelreg
node_coreml -->|"loads model specs"| node_modelreg
node_shader -->|"extends"| node_coreml
node_upengine -->|"calls"| node_bridge
node_bridge -.->|"invokes"| node_pipeline
node_pipeline -->|"uses options"| node_options
node_pipeline -->|"controls child process"| node_process
node_pipeline -.->|"runs video processing"| node_ffmpeg
node_settings -.->|"configures scaling, filters, EQ"| node_pipeline
node_settings -.->|"provides analysis inputs"| node_quality

click node_app "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/myUpscalerApp.swift"
click node_mainview "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/ContentView/ContentView.swift"
click node_panels "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/ContentView/ContentViewPanels.swift"
click node_drop "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/DragDropView.swift"
click node_runner "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/UpscaleRunner.swift"
click node_editor "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/EditorState.swift"
click node_settings "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/UpscaleSettings.swift"
click node_presets "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/PresetStore.swift"
click node_quality "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/QualityAnalyzer.swift"
click node_shortcuts "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/KeyboardShortcutsManager.swift"
click node_coreml "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/CoreMLEngine.swift"
click node_shader "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/CoreMLEngine%2BShaders.swift"
click node_modelreg "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/CoreMLModelRegistry.swift"
click node_upengine "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/Up60PEngine.swift"
click node_bridge "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/Up60PBridging.m"
click node_options "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/up60p.h"
click node_pipeline "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/up60p_restore_beast_main.c"
click node_process "https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/up60p_process.c"

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_app,node_mainview,node_panels,node_drop,node_user toneBlue
class node_editor,node_settings,node_presets,node_quality,node_shortcuts toneAmber
class node_runner,node_coreml,node_shader,node_modelreg,node_upengine toneMint
class node_bridge,node_options,node_pipeline,node_process toneRose
class node_ffmpeg toneIndigo
```

## Components

### App interface

- [App entry](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/myUpscalerApp.swift): `myUpscaler/myUpscalerApp.swift`
- [Main workspace](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/ContentView/ContentView.swift): `myUpscaler/ContentView/ContentView.swift`
- [Control panels](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/ContentView/ContentViewPanels.swift): `myUpscaler/ContentView/ContentViewPanels.swift`
- [Media import](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/DragDropView.swift): `myUpscaler/DragDropView.swift`

### Editing and settings

- [Preview editor](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/EditorState.swift): `myUpscaler/EditorState.swift`
- [Processing settings](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/UpscaleSettings.swift): `myUpscaler/UpscaleSettings.swift`
- [Preset store](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/PresetStore.swift): `myUpscaler/PresetStore.swift`
- [Quality analysis](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/QualityAnalyzer.swift): `myUpscaler/QualityAnalyzer.swift`
- [Shortcut manager](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/KeyboardShortcutsManager.swift): `myUpscaler/KeyboardShortcutsManager.swift`

### Processing engines

- [Run coordinator](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/UpscaleRunner.swift): `myUpscaler/UpscaleRunner.swift`
- [CoreML engine](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/CoreMLEngine.swift): `myUpscaler/upscaler/CoreMLEngine.swift`
- [Shader processing](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/CoreMLEngine%2BShaders.swift): `myUpscaler/upscaler/CoreMLEngine+Shaders.swift`
- [Model registry](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/CoreMLModelRegistry.swift): `myUpscaler/CoreMLModelRegistry.swift`
- [C engine bridge](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/Up60PEngine.swift): `myUpscaler/upscaler/Up60PEngine.swift`

### Native pipeline

- [C interface](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/Up60PBridging.m): `myUpscaler/upscaler/Up60PBridging.m`
- [Pipeline options](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/up60p.h): `myUpscaler/upscaler/up60p.h`
- [Video pipeline](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/up60p_restore_beast_main.c): `myUpscaler/up60p_restore_beast_main.c`
- [Process control](https://github.com/marshiyar/myupscaler/blob/main/myUpscaler/upscaler/up60p_process.c): `myUpscaler/upscaler/up60p_process.c`

### Other components

- **User**
- **Bundled FFmpeg**

## Connections

- User → App entry: opens (evidence: `README.md`)
- App entry → Main workspace: shows (evidence: `myUpscaler/myUpscalerApp.swift`)
- Main workspace → Control panels: presents (evidence: `myUpscaler/ContentView/ContentView.swift`)
- Control panels → Media import: embeds (evidence: `myUpscaler/ContentView/ContentViewPanels.swift`)
- Main workspace → Run coordinator: controls (evidence: `myUpscaler/ContentView/ContentView.swift`)
- Control panels → Processing settings: edits (evidence: `myUpscaler/ContentView/ContentViewPanels.swift`)
- Control panels → Run coordinator: starts or cancels (evidence: `myUpscaler/ContentView/ContentViewPanels.swift`)
- Run coordinator → Processing settings: snapshots (evidence: `myUpscaler/UpscaleRunner.swift`)
- Run coordinator → CoreML engine: dispatches (evidence: `myUpscaler/UpscaleRunner.swift`)
- Run coordinator → C engine bridge: dispatches (evidence: `myUpscaler/UpscaleRunner.swift`)
- Run coordinator → Preview editor: updates preview state
- Control panels → Preset store: manages (evidence: `myUpscaler/ContentView/ContentViewPanels.swift`)
- Control panels → Shortcut manager: uses shortcuts
- Processing settings → Model registry: lists models (evidence: `myUpscaler/UpscaleSettings.swift`)
- CoreML engine → Model registry: loads model specs (evidence: `myUpscaler/upscaler/CoreMLEngine.swift`)
- Shader processing → CoreML engine: extends (evidence: `myUpscaler/upscaler/CoreMLEngine+Shaders.swift`)
- C engine bridge → C interface: calls (evidence: `myUpscaler/upscaler/Up60PEngine.swift`)
- C interface → Video pipeline: invokes
- Video pipeline → Pipeline options: uses options (evidence: `myUpscaler/up60p_restore_beast_main.c`)
- Video pipeline → Process control: controls child process (evidence: `myUpscaler/up60p_restore_beast_main.c`)
- Video pipeline → Bundled FFmpeg: runs video processing (evidence: `README.md`)
- Processing settings → Video pipeline: configures scaling, filters, EQ (evidence: `README.md`)
- Processing settings → Quality analysis: provides analysis inputs (evidence: `myUpscaler/QualityAnalyzer.swift`)
