xref: /aosp_15_r20/external/flac/CONTRIBUTING.md (revision 600f14f40d737144c998e2ec7a483122d3776fbc)
1*600f14f4SXin LiThanks for considering contributing to the FLAC project!
2*600f14f4SXin Li
3*600f14f4SXin LiContributing to FLAC is possible in many ways. Among them are
4*600f14f4SXin Li
5*600f14f4SXin Li- Reporting bugs or other issues at https://github.com/xiph/flac/issues
6*600f14f4SXin Li- Submitting patches at https://github.com/xiph/flac/pulls
7*600f14f4SXin Li- Testing FLAC playing devices and software at
8*600f14f4SXin Li  https://wiki.hydrogenaud.io/index.php?title=FLAC_decoder_testbench
9*600f14f4SXin Li
10*600f14f4SXin LiGeneral communication not specific to issues is generally done through
11*600f14f4SXin Lithe FLAC mailing lists:
12*600f14f4SXin Li
13*600f14f4SXin Li- For user questions and discussions:
14*600f14f4SXin Li  https://lists.xiph.org/mailman/listinfo/flac
15*600f14f4SXin Li- For developer questions and discussions:
16*600f14f4SXin Li  https://lists.xiph.org/mailman/listinfo/flac-dev
17*600f14f4SXin Li
18*600f14f4SXin Li## Goals
19*600f14f4SXin Li
20*600f14f4SXin LiSince FLAC is an open-source project, it's important to have a set of
21*600f14f4SXin Ligoals that everyone works to. They may change slightly from time to time
22*600f14f4SXin Libut they're a good guideline. Changes should be in line with the goals
23*600f14f4SXin Liand should not attempt to embrace any of the anti-goals.
24*600f14f4SXin Li
25*600f14f4SXin Li**Goals**
26*600f14f4SXin Li
27*600f14f4SXin Li- FLAC should be and stay an open format with an open-source reference
28*600f14f4SXin Li  implementation.
29*600f14f4SXin Li- FLAC should be lossless. This seems obvious but lossy compression
30*600f14f4SXin Li  seems to creep into every audio codec. This goal also means that flac
31*600f14f4SXin Li  should stay archival quality and be truly lossless for all input.
32*600f14f4SXin Li  Testing of releases should be thorough.
33*600f14f4SXin Li- FLAC should yield respectable compression, on par or better than other
34*600f14f4SXin Li  lossless codecs.
35*600f14f4SXin Li- FLAC should allow at least realtime decoding on even modest hardware.
36*600f14f4SXin Li- FLAC should support fast sample-accurate seeking.
37*600f14f4SXin Li- FLAC should allow gapless playback of consecutive streams. This follows from the lossless goal.
38*600f14f4SXin Li- The FLAC project owes a lot to the many people who have advanced the
39*600f14f4SXin Li  audio compression field so freely, and aims also to contribute through
40*600f14f4SXin Li  the open-source development of new ideas.
41*600f14f4SXin Li
42*600f14f4SXin Li**Anti-goals**
43*600f14f4SXin Li
44*600f14f4SXin Li- Lossy compression. There are already many suitable lossy formats (Ogg
45*600f14f4SXin Li  Vorbis, MP3, etc.).
46*600f14f4SXin Li- Copy prevention, DRM, etc. There is no intention to add any copy
47*600f14f4SXin Li  prevention methods. Of course, we can't stop someone from encrypting a
48*600f14f4SXin Li  FLAC stream in another container (e.g. the way Apple encrypts AAC in
49*600f14f4SXin Li  MP4 with FairPlay), that is the choice of the user.
50*600f14f4SXin Li
51*600f14f4SXin Li
52*600f14f4SXin Li## Contributing patches
53*600f14f4SXin Li
54*600f14f4SXin LiContributions to FLAC should be licensed with the same license as the
55*600f14f4SXin Lipart of the FLAC project the contribution belongs to. These are
56*600f14f4SXin Li
57*600f14f4SXin Li- libFLAC and libFLAC++ are licensed under Xiph.org's
58*600f14f4SXin Li  BSD-like license (see COPYING.Xiph), so contributions to these
59*600f14f4SXin Li  libraries should also be licensed under this license, otherwise they
60*600f14f4SXin Li  cannot be accepted
61*600f14f4SXin Li- the flac and metaflac command line programs are licensed under GPLv2,
62*600f14f4SXin Li  see COPYING.GPL
63*600f14f4SXin Li- the helper libraries for flac and metaflac (which are in src/share)
64*600f14f4SXin Li  are licensed under varying licenses, see the license preamble for each
65*600f14f4SXin Li  file to see how they are licensed
66*600f14f4SXin Li
67*600f14f4SXin LiPatches can be contributed through GitHub as a Pull Request.
68*600f14f4SXin LiAlternatively you can supply patches through the mailing list.
69*600f14f4SXin Li
70*600f14f4SXin Li## Code style
71*600f14f4SXin Li
72*600f14f4SXin LiFLAC does have its own peculiar coding style that does not seem to fit
73*600f14f4SXin Ligeneral categories. You can use `git clang-format` to have your patch
74*600f14f4SXin Liauto-formatted similar to the rest of the code.
75