Skip to content

Commit 7d9c797

Browse files
committed
build: add support for meson to build the reference decoders
1 parent 6a7fef5 commit 7d9c797

30 files changed

+2559
-19
lines changed
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Fluster - testing framework for decoders conformance
2+
# Copyright (C) 2025, Fluendo, S.A.
3+
#
4+
# CI workflow to build all reference decoders on multiple platforms
5+
6+
name: Build Reference Decoders
7+
8+
on:
9+
push:
10+
branches:
11+
- master
12+
paths:
13+
- 'subprojects/**'
14+
- 'meson.build'
15+
- 'meson_options.txt'
16+
- 'build/**'
17+
- '.github/workflows/build-decoders.yml'
18+
pull_request:
19+
branches:
20+
- master
21+
paths:
22+
- 'subprojects/**'
23+
- 'meson.build'
24+
- 'meson_options.txt'
25+
- 'build/**'
26+
- '.github/workflows/build-decoders.yml'
27+
workflow_dispatch:
28+
29+
jobs:
30+
build:
31+
name: ${{ matrix.name }}
32+
runs-on: ${{ matrix.os }}
33+
defaults:
34+
run:
35+
shell: ${{ matrix.shell }}
36+
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
include:
41+
- name: Linux x86_64
42+
os: ubuntu-22.04
43+
arch: x86_64
44+
artifact: decoders-linux-x86_64
45+
shell: bash
46+
47+
- name: Linux ARM64
48+
os: ubuntu-22.04-arm
49+
arch: arm64
50+
artifact: decoders-linux-arm64
51+
shell: bash
52+
53+
- name: Windows x86_64
54+
os: windows-2022
55+
arch: x64
56+
artifact: decoders-windows-x86_64
57+
shell: msys2 {0}
58+
59+
- name: macOS ARM64
60+
os: macos-14
61+
arch: arm64
62+
artifact: decoders-macos-arm64
63+
shell: bash
64+
65+
steps:
66+
- name: Checkout repository
67+
uses: actions/checkout@v4
68+
with:
69+
submodules: recursive
70+
71+
- name: Set up Python
72+
uses: actions/setup-python@v5
73+
with:
74+
python-version: '3.10'
75+
76+
# Linux dependencies
77+
- name: Install dependencies (Linux)
78+
if: runner.os == 'Linux'
79+
run: |
80+
sudo apt-get update
81+
sudo apt-get install -y ninja-build cmake build-essential unzip curl
82+
pip install meson
83+
84+
# macOS dependencies
85+
- name: Install dependencies (macOS)
86+
if: runner.os == 'macOS'
87+
run: brew install ninja cmake meson
88+
89+
# Windows dependencies
90+
- name: Install dependencies (Windows)
91+
if: runner.os == 'Windows'
92+
uses: msys2/setup-msys2@v2
93+
with:
94+
msystem: UCRT64
95+
update: true
96+
install: >-
97+
mingw-w64-ucrt-x86_64-toolchain
98+
mingw-w64-ucrt-x86_64-cmake
99+
mingw-w64-ucrt-x86_64-ninja
100+
mingw-w64-ucrt-x86_64-meson
101+
mingw-w64-ucrt-x86_64-python
102+
mingw-w64-ucrt-x86_64-python-pip
103+
git
104+
unzip
105+
curl
106+
107+
- name: Download dependencies
108+
run: python3 build/download_deps.py
109+
110+
- name: Configure Meson
111+
run: meson setup builddir
112+
113+
- name: Build decoders
114+
run: meson compile -C builddir
115+
116+
- name: Upload decoders
117+
uses: actions/upload-artifact@v4
118+
with:
119+
name: ${{ matrix.artifact }}
120+
path: decoders/
121+
if-no-files-found: warn

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ results
88
contrib
99
decoders
1010
!*fluster/decoders
11+
subprojects/hm/
12+
subprojects/isobmff/
13+
subprojects/jm/
14+
subprojects/libtsp-v7r0
15+
subprojects/mpeg2aac
16+
subprojects/mpeg2video
17+
subprojects/vvcsoftware_vtm/
18+
subprojects/vvdec/
1119

1220
### Python ###
1321
# Byte-compiled / optimized / DLL files

README.md

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ but they could actually be decoders written in Python as far as Fluster is
5959
concerned. The [decoders](https://github.com/fluendo/fluster/tree/master/fluster/decoders) directory contains all supported
6060
decoders.
6161

62-
**Fluster includes a pixel comparison method for testing decoders that don't generate identical outputs.**
63-
This is essential for older video decoders with IDCT implementations where,
64-
according to the standard specifications, MD5 verification cannot be used unlike newer decoder implementations,
62+
**Fluster includes a pixel comparison method for testing decoders that don't generate identical outputs.**
63+
This is essential for older video decoders with IDCT implementations where,
64+
according to the standard specifications, MD5 verification cannot be used unlike newer decoder implementations,
6565
ensuring accurate conformance testing across different decoder generations.
6666

6767
In order to run the tests for the different test suites and decoders, a
@@ -101,10 +101,22 @@ For complete setup, usage examples, hardware acceleration configuration, and tro
101101
- `./fluster.py download` downloads all available test suites
102102

103103
2. (Optional) Build the reference decoders for AAC, H.264/AVC, H.265/HEVC,
104-
H.266/VVC running `make all_reference_decoders`. This is available and has been
105-
tested with x86_64 and Linux. It assumes you have CMake and a native compiler
106-
such as gcc or clang installed so that they can be built. The resulting binaries
107-
will be moved to a new `decoders` directory in the root.
104+
H.266/VVC. First, download the ISO reference software:
105+
106+
```bash
107+
python3 build/download_deps.py
108+
```
109+
110+
Then build using meson:
111+
112+
```bash
113+
meson setup builddir
114+
ninja -C builddir
115+
```
116+
117+
This requires meson, ninja, and a native compiler (gcc or clang). The resulting
118+
binaries will be placed in the `decoders` directory. This has been tested on
119+
Linux and macOS (both x86_64 and ARM64).
108120

109121
3. List the test suites and the decoders available `./fluster.py list`.
110122
Tip: You can list the decoders that can run in the current system with `./fluster.py list -c`.
@@ -181,7 +193,7 @@ MPEG2_AAC-ADIF
181193
Codec: AAC
182194
Description: ISO IEC 13818-4 MPEG2 AAC ADIF test suite
183195
Test vectors: 492
184-
196+
185197
MPEG2_AAC-ADTS
186198
Codec: AAC
187199
Description: ISO IEC 13818-4 MPEG2 AAC ADTS test suite
@@ -571,7 +583,7 @@ subcommands:
571583
```bash
572584
./fluster.py list --help
573585

574-
usage: fluster.py list [-h] [-ts TESTSUITES [TESTSUITES ...]] [-tv] [-c] [-v]
586+
usage: fluster.py list [-h] [-ts TESTSUITES [TESTSUITES ...]] [-tv] [-c] [-v]
575587
[-d {None,Dummy,H.264,H.265,H.266,VP8,VP9,AAC,AV1,MPEG2_VIDEO,MPEG4_VIDEO}]
576588

577589
optional arguments:
@@ -598,7 +610,7 @@ usage: fluster.py run [-h] [-j JOBS] [-t TIMEOUT] [-ff] [-q]
598610

599611
optional arguments:
600612
-h, --help show this help message and exit
601-
-j JOBS, --jobs JOBS number of parallel jobs to use (by default 1x logical cores,
613+
-j JOBS, --jobs JOBS number of parallel jobs to use (by default 1x logical cores,
602614
value 0 is interpreted as the same)
603615
-t TIMEOUT, --timeout TIMEOUT
604616
timeout in secs for each decoding. Defaults to 30 secs
@@ -640,7 +652,7 @@ positional arguments:
640652
641653
optional arguments:
642654
-h, --help show this help message and exit
643-
-j JOBS, --jobs JOBS number of parallel jobs to use (upper limit of 16, by default 2x logical cores).
655+
-j JOBS, --jobs JOBS number of parallel jobs to use (upper limit of 16, by default 2x logical cores).
644656
value 0 is interpreted as 1x logical cores
645657
-k, --keep keep original downloaded file after extracting. Only applicable to compressed files such as .zip, .tar.gz, etc
646658
-r RETRIES, --retries RETRIES
@@ -668,7 +680,7 @@ positional arguments:
668680
669681
optional arguments:
670682
-h, --help show this help message and exit
671-
-j JOBS, --jobs JOBS number of parallel jobs to use (by default 1x logical cores,
683+
-j JOBS, --jobs JOBS number of parallel jobs to use (by default 1x logical cores,
672684
value 0 is interpreted as the same)
673685
-t TIMEOUT, --timeout TIMEOUT
674686
timeout in secs for each decoding. Defaults to 30 secs
@@ -737,11 +749,11 @@ Check out the JSON format they follow in the [test_suites](https://github.com/fl
737749
directory. Add a new json file within, Fluster will automatically pick it
738750
up.
739751
740-
There is also a [generator script (MPEG2 video)](https://github.com/fluendo/fluster/blob/master/scripts/gen_mpeg2_video.py),
741-
[generator script (MPEG4 video)](https://github.com/fluendo/fluster/blob/master/scripts/gen_mpeg4_video.py),
742-
[generator script (H.264)](https://github.com/fluendo/fluster/blob/master/scripts/gen_jvt.py),
743-
[generator script (H.265)](https://github.com/fluendo/fluster/blob/master/scripts/gen_jct_vc.py), and a
744-
[generator script (H.266)](https://github.com/fluendo/fluster/blob/master/scripts/gen_jvet.py) for the
752+
There is also a [generator script (MPEG2 video)](https://github.com/fluendo/fluster/blob/master/scripts/gen_mpeg2_video.py),
753+
[generator script (MPEG4 video)](https://github.com/fluendo/fluster/blob/master/scripts/gen_mpeg4_video.py),
754+
[generator script (H.264)](https://github.com/fluendo/fluster/blob/master/scripts/gen_jvt.py),
755+
[generator script (H.265)](https://github.com/fluendo/fluster/blob/master/scripts/gen_jct_vc.py), and a
756+
[generator script (H.266)](https://github.com/fluendo/fluster/blob/master/scripts/gen_jvet.py) for the
745757
[conformance test suites](#test-suites) that you can use as a base to generate automatically new ones.
746758
747759
### How can I use it to test regressions?
@@ -814,8 +826,8 @@ results are obtained, we can do the following procedure:
814826
815827
### How can I report an issue?
816828
817-
In case you find any problem or want to report something, please search for similar
818-
[issues](https://github.com/fluendo/fluster/issues) first. If you find none, go ahead to create one.
829+
In case you find any problem or want to report something, please search for similar
830+
[issues](https://github.com/fluendo/fluster/issues) first. If you find none, go ahead to create one.
819831
Please try to provide as many details and context as possible to help us diagnose it.
820832
821833
## License

0 commit comments

Comments
 (0)