# umezawatakeshi/utvideo architecture

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

- Interactive diagram: https://gitdiagram.com/umezawatakeshi/utvideo
- Repository: https://github.com/umezawatakeshi/utvideo

## Overview

Ut Video Codec Suite is a fast lossless video codec with Windows VCM and DMO interfaces. Its user-to-result workflow is video-frame input through a codec interface, codec-specific processing and data conversion, then encoded or decoded frame output. The tree also shows SIMD conversion and prediction code and bundled FSE/Huffman entropy components. README capabilities establish the product and interfaces; many implementation files were not excerpted, so links between those components are shown as unverified rather than asserted calls.

Main entry points: [`utv_core`](https://github.com/umezawatakeshi/utvideo/tree/master/utv_core) (Lossless codec variants), [`fse/compress/fse_compress.c`](https://github.com/umezawatakeshi/utvideo/blob/master/fse/compress/fse_compress.c) (FSE encoding), [`utv_core/Codec.cpp`](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/Codec.cpp) (Codec API), [`utv_core/Convert.cpp`](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/Convert.cpp) (Pixel conversion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Windows Interfaces"]
  node_vcm["VCM interface<br/>[VCMCodec.cpp]"]
  node_dmo["DMO interface<br/>[DMODecoder.cpp]"]
  node_directshow["DirectShow formats"]
end

subgraph group_codec["Video Codec Core"]
  node_codec_api["Codec API<br/>[Codec.cpp]"]
  node_codec_base["Codec base<br/>[CodecBase.cpp]"]
  node_band_codec["Band-parallel codec"]
  node_lossless_codecs["Lossless codec variants"]
  node_frame_buffer["Frame buffering<br/>[FrameBuffer.cpp]"]
end

subgraph group_processing["Frame Processing"]
  node_pixel_convert["Pixel conversion<br/>[Convert.cpp]"]
  node_yuv_rgb["YUV/RGB conversion"]
  node_predict["Prediction transforms<br/>[ConvertPredict.cpp]"]
  node_shuffle["Shuffle transforms"]
  node_sympack["Symbol packing"]
  node_simd_dispatch["CPU-tuned dispatch"]
end

subgraph group_entropy["Entropy Coding"]
  node_huffman["Huffman coding<br/>[HuffmanCode.cpp]"]
  node_fse_hist["FSE histogram<br/>[hist.c]"]
  node_fse_encode["FSE encoding<br/>[fse_compress.c]"]
  node_fse_decode["FSE decoding<br/>[fse_decompress.c]"]
  node_fse_api["FSE API<br/>[fse.h]"]
  node_huf_api["Huffman API<br/>[huf.h]"]
  node_bitstream["Bitstream utilities<br/>[bitstream.h]"]
  node_fse_errors["FSE error handling<br/>[error_private.c]"]
  node_error_codes["Error codes<br/>[zstd_errors.h]"]
end

node_app(("Video application"))

node_app -->|"uses interface"| node_vcm
node_app -->|"uses interface"| node_dmo
node_vcm -.->|"delegates to"| node_codec_api
node_dmo -.->|"delegates to"| node_codec_api
node_directshow -.->|"formats for"| node_vcm
node_codec_api -.->|"uses base"| node_codec_base
node_codec_api -.->|"selects codec"| node_lossless_codecs
node_lossless_codecs -.->|"uses codec"| node_band_codec
node_lossless_codecs -.->|"handles frames"| node_frame_buffer
node_lossless_codecs -.->|"converts pixels"| node_pixel_convert
node_pixel_convert -.->|"uses conversion"| node_yuv_rgb
node_lossless_codecs -.->|"transforms frames"| node_predict
node_lossless_codecs -.->|"transforms data"| node_shuffle
node_lossless_codecs -.->|"packs symbols"| node_sympack
node_pixel_convert -.->|"selects optimized code"| node_simd_dispatch
node_lossless_codecs -.->|"uses coding"| node_huffman
node_lossless_codecs -.->|"uses coding"| node_fse_encode
node_fse_encode -.->|"counts symbols"| node_fse_hist
node_fse_api -->|"declares encoding"| node_fse_encode
node_fse_api -->|"declares decoding"| node_fse_decode
node_huf_api -.->|"provides related API"| node_huffman
node_fse_encode -.->|"writes bits"| node_bitstream
node_fse_decode -.->|"reads bits"| node_bitstream
node_fse_encode -.->|"reports errors"| node_fse_errors
node_fse_decode -.->|"reports errors"| node_fse_errors
node_fse_errors -->|"uses codes"| node_error_codes

click node_vcm "https://github.com/umezawatakeshi/utvideo/blob/master/utv_vcm/VCMCodec.cpp"
click node_dmo "https://github.com/umezawatakeshi/utvideo/blob/master/utv_dmo/DMODecoder.cpp"
click node_directshow "https://github.com/umezawatakeshi/utvideo/blob/master/utv_wfmt/DirectShowFormat.cpp"
click node_codec_api "https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/Codec.cpp"
click node_codec_base "https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/CodecBase.cpp"
click node_band_codec "https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/BandParallelCodec.cpp"
click node_lossless_codecs "https://github.com/umezawatakeshi/utvideo/tree/master/utv_core"
click node_frame_buffer "https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/FrameBuffer.cpp"
click node_pixel_convert "https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/Convert.cpp"
click node_yuv_rgb "https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/ConvertYUVRGB_x86x64.cpp"
click node_predict "https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/ConvertPredict.cpp"
click node_shuffle "https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/ConvertShuffle_x86x64.cpp"
click node_sympack "https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/ConvertSymPack_x86x64_xmm.cpp"
click node_simd_dispatch "https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/TunedFunc_x86x64.cpp"
click node_huffman "https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/HuffmanCode.cpp"
click node_fse_hist "https://github.com/umezawatakeshi/utvideo/blob/master/fse/compress/hist.c"
click node_fse_encode "https://github.com/umezawatakeshi/utvideo/blob/master/fse/compress/fse_compress.c"
click node_fse_decode "https://github.com/umezawatakeshi/utvideo/blob/master/fse/common/fse_decompress.c"
click node_fse_api "https://github.com/umezawatakeshi/utvideo/blob/master/fse/common/fse.h"
click node_huf_api "https://github.com/umezawatakeshi/utvideo/blob/master/fse/common/huf.h"
click node_bitstream "https://github.com/umezawatakeshi/utvideo/blob/master/fse/common/bitstream.h"
click node_fse_errors "https://github.com/umezawatakeshi/utvideo/blob/master/fse/common/error_private.c"
click node_error_codes "https://github.com/umezawatakeshi/utvideo/blob/master/fse/zstd_errors.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_vcm,node_dmo,node_directshow toneBlue
class node_codec_api,node_codec_base,node_band_codec,node_lossless_codecs,node_frame_buffer toneAmber
class node_pixel_convert,node_yuv_rgb,node_predict,node_shuffle,node_sympack,node_simd_dispatch toneMint
class node_huffman,node_fse_hist,node_fse_encode,node_fse_decode,node_fse_api,node_huf_api,node_bitstream,node_fse_errors,node_error_codes toneRose
class node_app toneIndigo
```

## Components

### Windows Interfaces

- [VCM interface](https://github.com/umezawatakeshi/utvideo/blob/master/utv_vcm/VCMCodec.cpp): `utv_vcm/VCMCodec.cpp`
- [DMO interface](https://github.com/umezawatakeshi/utvideo/blob/master/utv_dmo/DMODecoder.cpp): `utv_dmo/DMODecoder.cpp`
- [DirectShow formats](https://github.com/umezawatakeshi/utvideo/blob/master/utv_wfmt/DirectShowFormat.cpp): `utv_wfmt/DirectShowFormat.cpp`

### Video Codec Core

- [Codec API](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/Codec.cpp): `utv_core/Codec.cpp`
- [Codec base](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/CodecBase.cpp): `utv_core/CodecBase.cpp`
- [Band-parallel codec](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/BandParallelCodec.cpp): `utv_core/BandParallelCodec.cpp`
- [Lossless codec variants](https://github.com/umezawatakeshi/utvideo/tree/master/utv_core): `utv_core`
- [Frame buffering](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/FrameBuffer.cpp): `utv_core/FrameBuffer.cpp`

### Frame Processing

- [Pixel conversion](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/Convert.cpp): `utv_core/Convert.cpp`
- [YUV/RGB conversion](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/ConvertYUVRGB_x86x64.cpp): `utv_core/ConvertYUVRGB_x86x64.cpp`
- [Prediction transforms](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/ConvertPredict.cpp): `utv_core/ConvertPredict.cpp`
- [Shuffle transforms](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/ConvertShuffle_x86x64.cpp): `utv_core/ConvertShuffle_x86x64.cpp`
- [Symbol packing](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/ConvertSymPack_x86x64_xmm.cpp): `utv_core/ConvertSymPack_x86x64_xmm.cpp`
- [CPU-tuned dispatch](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/TunedFunc_x86x64.cpp): `utv_core/TunedFunc_x86x64.cpp`

### Entropy Coding

- [Huffman coding](https://github.com/umezawatakeshi/utvideo/blob/master/utv_core/HuffmanCode.cpp): `utv_core/HuffmanCode.cpp`
- [FSE histogram](https://github.com/umezawatakeshi/utvideo/blob/master/fse/compress/hist.c): `fse/compress/hist.c`
- [FSE encoding](https://github.com/umezawatakeshi/utvideo/blob/master/fse/compress/fse_compress.c): `fse/compress/fse_compress.c`
- [FSE decoding](https://github.com/umezawatakeshi/utvideo/blob/master/fse/common/fse_decompress.c): `fse/common/fse_decompress.c`
- [FSE API](https://github.com/umezawatakeshi/utvideo/blob/master/fse/common/fse.h): `fse/common/fse.h`
- [Huffman API](https://github.com/umezawatakeshi/utvideo/blob/master/fse/common/huf.h): `fse/common/huf.h`
- [Bitstream utilities](https://github.com/umezawatakeshi/utvideo/blob/master/fse/common/bitstream.h): `fse/common/bitstream.h`
- [FSE error handling](https://github.com/umezawatakeshi/utvideo/blob/master/fse/common/error_private.c): `fse/common/error_private.c`
- [Error codes](https://github.com/umezawatakeshi/utvideo/blob/master/fse/zstd_errors.h): `fse/zstd_errors.h`

### Other components

- **Video application**

## Connections

- Video application → VCM interface: uses interface (evidence: `README.md`)
- Video application → DMO interface: uses interface (evidence: `README.md`)
- VCM interface → Codec API: delegates to
- DMO interface → Codec API: delegates to
- DirectShow formats → VCM interface: formats for
- Codec API → Codec base: uses base
- Codec API → Lossless codec variants: selects codec
- Lossless codec variants → Band-parallel codec: uses codec
- Lossless codec variants → Frame buffering: handles frames
- Lossless codec variants → Pixel conversion: converts pixels
- Pixel conversion → YUV/RGB conversion: uses conversion
- Lossless codec variants → Prediction transforms: transforms frames
- Lossless codec variants → Shuffle transforms: transforms data
- Lossless codec variants → Symbol packing: packs symbols
- Pixel conversion → CPU-tuned dispatch: selects optimized code
- Lossless codec variants → Huffman coding: uses coding
- Lossless codec variants → FSE encoding: uses coding
- FSE encoding → FSE histogram: counts symbols
- FSE API → FSE encoding: declares encoding (evidence: `fse/common/fse.h`)
- FSE API → FSE decoding: declares decoding (evidence: `fse/common/fse.h`)
- Huffman API → Huffman coding: provides related API
- FSE encoding → Bitstream utilities: writes bits (evidence: `fse/compress/fse_compress.c`)
- FSE decoding → Bitstream utilities: reads bits (evidence: `fse/common/fse_decompress.c`)
- FSE encoding → FSE error handling: reports errors
- FSE decoding → FSE error handling: reports errors
- FSE error handling → Error codes: uses codes
