# DSV

Canonical URL: https://encode.wiki/codecs/video/dsv/
Content version: ca42e61ede0a24f789d7287a0001244ad22f4abf
Status: current
License: CC BY-SA 4.0
Checksum (SHA-256): 468eda2b476446b96675c53e49238de2df28335b83a0e2928d009bc586b13977

DSV (Digital Subband Video 1, or DSV1) is a hobby codec by EMMIR (Envel Graphics): a small, wavelet-based, software-only codec that the author compares to MPEG-1/MPEG-2 in efficiency. It exists to be read and tinkered with, not to play back in anything. The repository was archived on 4 October 2024 and its README points to [DSV2](/codecs/video/dsv2/), which the author says compresses far better. Use DSV2 for any new experiment.

## What it does

- Multiresolution subband (wavelet) transform instead of a DCT.
- Intra and forward-predicted inter frames, half-pixel motion compensation, no B-frames, variable-length closed GOPs.
- 8-bit 4:1:1, 4:2:0, 4:2:2 and 4:4:4; no interlacing; frame dimensions must be even.
- Interleaved exp-Golomb entropy coding, adaptive quantisation, and hierarchical motion estimation.
- Single-pass ABR or CRF rate control.
- The reference implementation is C89 with integer-only maths, no dependencies and a single thread.

## Using the reference tool

The author's reference code (also available as the single header `dsv1.h`) is the only implementation; there is no FFmpeg or player support. Build it with `cc -O3 -o dsv1 *.c` from a checkout and run:

```sh
./dsv1 e -inp_video.yuv -out_compressed.dsv -w352 -h288 -fps_num24 -fps_den1 -qp85 -gop15
./dsv1 d -inp_compressed.dsv -out_decompressed.yuv -out420p
```

Options are written as `-name` immediately followed by the value (`-w352`, `-qp85`), unlike DSV2's `-name=value`. Input is raw YUV, so give the dimensions and frame rate; it is read as 4:2:0 unless you set `-fmt`. `-kbps` switches to ABR. `-out420p` converts the decoded output to 4:2:0, which discards chroma from a 4:2:2 or 4:4:4 stream. The format is described in `DSV1_spec_r2.pdf` in the repository.
