Contributing to OpenAVX
Thanks for contributing to OpenAVX. Keep pull requests focused, small, and tested before submitting.
Build & Test
OpenAVX uses CMake (>= 3.16) as its supported build system:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
ctest --test-dir build --output-on-failure
- Parsers / Codecs / Wire Framing: Also test under Clang with sanitizers and libFuzzer enabled:
cmake -B build_fuzz -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_FUZZING=ON -DBUILD_TESTING=ON cmake --build build_fuzz -j - SIMD Changes: Any edits to
src/avx_simd.corsrc/avx_audio.cmust match scalar C99 results bit-for-bit (./build/bin/openavx_benchand./build/bin/openavx_simd_audit_test).
Project Rules
- C99 Portability: Code must compile cleanly under
-std=c99 -D_POSIX_C_SOURCE=200809Lwith-Wall -Wextraacross Linux (glibcandmusl), ARM64 (aarch64NEON), ARM32, x86_64, macOS, Windows, and BSD. - No New Compile-Time Dependencies:
libopenavxlinks only OS/runtime libraries (libc,pthread,libm,libdl/ws2_32). Optional external integrations (such as host codecs or desktop audio drivers) must load at runtime viadlopen/LoadLibraryAwithout#include-ing third-party headers. - Code Provenance: Never copy code or headers from copyleft or proprietary third-party SDKs. Keep SpeedHQ (
src/avx_speedhq.c) standalone with zero FFmpeg dependency (src/avx_video_avcodec.cis strictly for optional runtime H.264/HEVC/AV1 compressed stream decoding). - Public Symbols & Headers:
- Mark public library exports with
OPENAVX_APIand register them inopenavx.map. - Add the standard
SPDX-License-Identifier: AGPL-3.0-or-later WITH Classpath-exception-2.0+ copyright header acrossinclude/,src/,tools/,test/, andfuzz/(vendored code inthird-party/and SpeedHQ insrc/avx_speedhq.cretain their respective upstream licenses perTHIRD_PARTY_LICENSES.md).
- Mark public library exports with
- Code Formatting: Format C and C++ source files using
clang-format -i <file>with the root.clang-formatconfiguration before opening a pull request.
Pull Request & CLA Sign-Off
Every external contributor must accept the Contributor License Agreement by posting the following comment on their pull request (add Entity: <Company Name> if submitting on behalf of an employer):
I have read the CLA Document and I hereby sign the CLA
Name: <Full Legal Name>
Email: <[email protected]>