1# License
2
3Most files in FFmpeg are under the GNU Lesser General Public License version 2.1
4or later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details. Some other
5files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to
6FFmpeg.
7
8Some optional parts of FFmpeg are licensed under the GNU General Public License
9version 2 or later (GPL v2+). See the file `COPYING.GPLv2` for details. None of
10these parts are used by default, you have to explicitly pass `--enable-gpl` to
11configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
12
13Specifically, the GPL parts of FFmpeg are:
14
15- libpostproc
16- optional x86 optimization in the files
17    - `libavcodec/x86/flac_dsp_gpl.asm`
18    - `libavcodec/x86/idct_mmx.c`
19    - `libavfilter/x86/vf_removegrain.asm`
20- the following building and testing tools
21    - `compat/solaris/make_sunver.pl`
22    - `doc/t2h.pm`
23    - `doc/texi2pod.pl`
24    - `libswresample/tests/swresample.c`
25    - `tests/checkasm/*`
26    - `tests/tiny_ssim.c`
27- the following filters in libavfilter:
28    - `signature_lookup.c`
29    - `vf_blackframe.c`
30    - `vf_boxblur.c`
31    - `vf_colormatrix.c`
32    - `vf_cover_rect.c`
33    - `vf_cropdetect.c`
34    - `vf_delogo.c`
35    - `vf_eq.c`
36    - `vf_find_rect.c`
37    - `vf_fspp.c`
38    - `vf_histeq.c`
39    - `vf_hqdn3d.c`
40    - `vf_kerndeint.c`
41    - `vf_lensfun.c` (GPL version 3 or later)
42    - `vf_mcdeint.c`
43    - `vf_mpdecimate.c`
44    - `vf_nnedi.c`
45    - `vf_owdenoise.c`
46    - `vf_perspective.c`
47    - `vf_phase.c`
48    - `vf_pp.c`
49    - `vf_pp7.c`
50    - `vf_pullup.c`
51    - `vf_repeatfields.c`
52    - `vf_sab.c`
53    - `vf_signature.c`
54    - `vf_smartblur.c`
55    - `vf_spp.c`
56    - `vf_stereo3d.c`
57    - `vf_super2xsai.c`
58    - `vf_tinterlace.c`
59    - `vf_uspp.c`
60    - `vf_vaguedenoiser.c`
61    - `vsrc_mptestsrc.c`
62
63Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then
64the configure parameter `--enable-version3` will activate this licensing option
65for you. Read the file `COPYING.LGPLv3` or, if you have enabled GPL parts,
66`COPYING.GPLv3` to learn the exact legal terms that apply in this case.
67
68There are a handful of files under other licensing terms, namely:
69
70* The files `libavcodec/jfdctfst.c`, `libavcodec/jfdctint_template.c` and
71  `libavcodec/jrevdct.c` are taken from libjpeg, see the top of the files for
72  licensing details. Specifically note that you must credit the IJG in the
73  documentation accompanying your program if you only distribute executables.
74  You must also indicate any changes including additions and deletions to
75  those three files in the documentation.
76* `tests/reference.pnm` is under the expat license.
77
78
79## External libraries
80
81FFmpeg can be combined with a number of external libraries, which sometimes
82affect the licensing of binaries resulting from the combination.
83
84### Compatible libraries
85
86The following libraries are under GPL version 2:
87- avisynth
88- frei0r
89- libcdio
90- libdavs2
91- librubberband
92- libvidstab
93- libx264
94- libx265
95- libxavs
96- libxavs2
97- libxvid
98
99When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by
100passing `--enable-gpl` to configure.
101
102The following libraries are under LGPL version 3:
103- gmp
104- libaribb24
105- liblensfun
106
107When combining them with FFmpeg, use the configure option `--enable-version3` to
108upgrade FFmpeg to the LGPL v3.
109
110The VMAF, mbedTLS, RK MPI, OpenCORE and VisualOn libraries are under the Apache License
1112.0. That license is incompatible with the LGPL v2.1 and the GPL v2, but not with
112version 3 of those licenses. So to combine these libraries with FFmpeg, the
113license version needs to be upgraded by passing `--enable-version3` to configure.
114
115The smbclient library is under the GPL v3, to combine it with FFmpeg,
116the options `--enable-gpl` and `--enable-version3` have to be passed to
117configure to upgrade FFmpeg to the GPL v3.
118
119### Incompatible libraries
120
121There are certain libraries you can combine with FFmpeg whose licenses are not
122compatible with the GPL and/or the LGPL. If you wish to enable these
123libraries, even in circumstances that their license may be incompatible, pass
124`--enable-nonfree` to configure. This will cause the resulting binary to be
125unredistributable.
126
127The Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are
128incompatible with the GPLv2 and v3. To the best of our knowledge, they are
129compatible with the LGPL.
130
131
132********************************************************************************
133
134libavcodec/arm/jrevdct_arm.S
135
136C-like prototype :
137        void j_rev_dct_arm(DCTBLOCK data)
138
139   With DCTBLOCK being a pointer to an array of 64 'signed shorts'
140
141   Copyright (c) 2001 Lionel Ulmer (lionel.ulmer@free.fr / bbrox@bbrox.org)
142
143   Permission is hereby granted, free of charge, to any person obtaining a copy
144   of this software and associated documentation files (the "Software"), to deal
145   in the Software without restriction, including without limitation the rights
146   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
147   copies of the Software, and to permit persons to whom the Software is
148   furnished to do so, subject to the following conditions:
149
150   The above copyright notice and this permission notice shall be included in
151   all copies or substantial portions of the Software.
152
153   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
154   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
155   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
156   COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
157   IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
158   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
159
160********************************************************************************
161
162libavcodec/arm/vp8dsp_armv6.S
163
164VP8 ARMv6 optimisations
165
166Copyright (c) 2010 Google Inc.
167Copyright (c) 2010 Rob Clark <rob@ti.com>
168Copyright (c) 2011 Mans Rullgard <mans@mansr.com>
169
170This file is part of FFmpeg.
171
172FFmpeg is free software; you can redistribute it and/or
173modify it under the terms of the GNU Lesser General Public
174License as published by the Free Software Foundation; either
175version 2.1 of the License, or (at your option) any later version.
176
177FFmpeg is distributed in the hope that it will be useful,
178but WITHOUT ANY WARRANTY; without even the implied warranty of
179MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
180Lesser General Public License for more details.
181
182You should have received a copy of the GNU Lesser General Public
183License along with FFmpeg; if not, write to the Free Software
184Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
185
186This code was partially ported from libvpx, which uses this license:
187
188Redistribution and use in source and binary forms, with or without
189modification, are permitted provided that the following conditions are
190met:
191
192* Redistributions of source code must retain the above copyright
193notice, this list of conditions and the following disclaimer.
194
195* Redistributions in binary form must reproduce the above copyright
196notice, this list of conditions and the following disclaimer in
197the documentation and/or other materials provided with the
198distribution.
199
200* Neither the name of Google nor the names of its contributors may
201be used to endorse or promote products derived from this software
202without specific prior written permission.
203
204THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
205"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
206LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
207A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
208HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
209SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
210LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
211DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
212THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
213(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
214OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
215
216********************************************************************************
217
218libavcodec/mips/acelp_filters_mips.c
219
220Copyright (c) 2012
221MIPS Technologies, Inc., California.
222
223Redistribution and use in source and binary forms, with or without
224modification, are permitted provided that the following conditions
225are met:
2261. Redistributions of source code must retain the above copyright
227notice, this list of conditions and the following disclaimer.
2282. Redistributions in binary form must reproduce the above copyright
229notice, this list of conditions and the following disclaimer in the
230documentation and/or other materials provided with the distribution.
2313. Neither the name of the MIPS Technologies, Inc., nor the names of its
232contributors may be used to endorse or promote products derived from
233this software without specific prior written permission.
234
235THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
236ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
237IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
238ARE DISCLAIMED.  IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
239FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
240DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
241OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
242HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
243LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
244OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
245SUCH DAMAGE.
246
247Author:  Nedeljko Babic (nbabic@mips.com)
248
249various filters for ACELP-based codecs optimized for MIPS
250
251This file is part of FFmpeg.
252
253FFmpeg is free software; you can redistribute it and/or
254modify it under the terms of the GNU Lesser General Public
255License as published by the Free Software Foundation; either
256version 2.1 of the License, or (at your option) any later version.
257
258FFmpeg is distributed in the hope that it will be useful,
259but WITHOUT ANY WARRANTY; without even the implied warranty of
260MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
261Lesser General Public License for more details.
262
263You should have received a copy of the GNU Lesser General Public
264License along with FFmpeg; if not, write to the Free Software
265Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
266
267********************************************************************************
268
269libavcodec/mips/acelp_vectors_mips.c
270
271Copyright (c) 2012
272MIPS Technologies, Inc., California.
273
274Redistribution and use in source and binary forms, with or without
275modification, are permitted provided that the following conditions
276are met:
2771. Redistributions of source code must retain the above copyright
278notice, this list of conditions and the following disclaimer.
2792. Redistributions in binary form must reproduce the above copyright
280notice, this list of conditions and the following disclaimer in the
281documentation and/or other materials provided with the distribution.
2823. Neither the name of the MIPS Technologies, Inc., nor the names of its
283contributors may be used to endorse or promote products derived from
284this software without specific prior written permission.
285
286THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
287ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
288IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
289ARE DISCLAIMED.  IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
290FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
291DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
292OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
293HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
294LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
295OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
296SUCH DAMAGE.
297
298Author:  Nedeljko Babic (nbabic@mips.com)
299
300adaptive and fixed codebook vector operations for ACELP-based codecs
301optimized for MIPS
302
303This file is part of FFmpeg.
304
305FFmpeg is free software; you can redistribute it and/or
306modify it under the terms of the GNU Lesser General Public
307License as published by the Free Software Foundation; either
308version 2.1 of the License, or (at your option) any later version.
309
310FFmpeg is distributed in the hope that it will be useful,
311but WITHOUT ANY WARRANTY; without even the implied warranty of
312MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
313Lesser General Public License for more details.
314
315You should have received a copy of the GNU Lesser General Public
316License along with FFmpeg; if not, write to the Free Software
317Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
318
319********************************************************************************
320
321libavcodec/mips/amrwbdec_mips.c
322
323Copyright (c) 2012
324MIPS Technologies, Inc., California.
325
326Redistribution and use in source and binary forms, with or without
327modification, are permitted provided that the following conditions
328are met:
3291. Redistributions of source code must retain the above copyright
330notice, this list of conditions and the following disclaimer.
3312. Redistributions in binary form must reproduce the above copyright
332notice, this list of conditions and the following disclaimer in the
333documentation and/or other materials provided with the distribution.
3343. Neither the name of the MIPS Technologies, Inc., nor the names of its
335contributors may be used to endorse or promote products derived from
336this software without specific prior written permission.
337
338THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
339ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
340IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
341ARE DISCLAIMED.  IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
342FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
343DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
344OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
345HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
346LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
347OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
348SUCH DAMAGE.
349
350Author:  Nedeljko Babic (nbabic@mips.com)
351
352This file is part of FFmpeg.
353
354FFmpeg is free software; you can redistribute it and/or
355modify it under the terms of the GNU Lesser General Public
356License as published by the Free Software Foundation; either
357version 2.1 of the License, or (at your option) any later version.
358
359FFmpeg is distributed in the hope that it will be useful,
360but WITHOUT ANY WARRANTY; without even the implied warranty of
361MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
362Lesser General Public License for more details.
363
364You should have received a copy of the GNU Lesser General Public
365License along with FFmpeg; if not, write to the Free Software
366Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
367
368********************************************************************************
369
370libavcodec/mips/celp_filters_mips.c
371
372Copyright (c) 2012
373MIPS Technologies, Inc., California.
374
375Redistribution and use in source and binary forms, with or without
376modification, are permitted provided that the following conditions
377are met:
3781. Redistributions of source code must retain the above copyright
379notice, this list of conditions and the following disclaimer.
3802. Redistributions in binary form must reproduce the above copyright
381notice, this list of conditions and the following disclaimer in the
382documentation and/or other materials provided with the distribution.
3833. Neither the name of the MIPS Technologies, Inc., nor the names of its
384contributors may be used to endorse or promote products derived from
385this software without specific prior written permission.
386
387THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
388ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
389IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
390ARE DISCLAIMED.  IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
391FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
392DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
393OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
394HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
395LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
396OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
397SUCH DAMAGE.
398
399Author:  Nedeljko Babic (nbabic@mips.com)
400
401various filters for CELP-based codecs optimized for MIPS
402
403This file is part of FFmpeg.
404
405FFmpeg is free software; you can redistribute it and/or
406modify it under the terms of the GNU Lesser General Public
407License as published by the Free Software Foundation; either
408version 2.1 of the License, or (at your option) any later version.
409
410FFmpeg is distributed in the hope that it will be useful,
411but WITHOUT ANY WARRANTY; without even the implied warranty of
412MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
413Lesser General Public License for more details.
414
415You should have received a copy of the GNU Lesser General Public
416License along with FFmpeg; if not, write to the Free Software
417Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
418
419********************************************************************************
420
421libavcodec/mips/celp_math_mips.c
422
423Copyright (c) 2012
424MIPS Technologies, Inc., California.
425
426Redistribution and use in source and binary forms, with or without
427modification, are permitted provided that the following conditions
428are met:
4291. Redistributions of source code must retain the above copyright
430notice, this list of conditions and the following disclaimer.
4312. Redistributions in binary form must reproduce the above copyright
432notice, this list of conditions and the following disclaimer in the
433documentation and/or other materials provided with the distribution.
4343. Neither the name of the MIPS Technologies, Inc., nor the names of its
435contributors may be used to endorse or promote products derived from
436this software without specific prior written permission.
437
438THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
439ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
440IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
441ARE DISCLAIMED.  IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
442FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
443DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
444OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
445HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
446LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
447OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
448SUCH DAMAGE.
449
450Author:  Nedeljko Babic (nbabic@mips.com)
451
452Math operations optimized for MIPS
453
454This file is part of FFmpeg.
455
456FFmpeg is free software; you can redistribute it and/or
457modify it under the terms of the GNU Lesser General Public
458License as published by the Free Software Foundation; either
459version 2.1 of the License, or (at your option) any later version.
460
461FFmpeg is distributed in the hope that it will be useful,
462but WITHOUT ANY WARRANTY; without even the implied warranty of
463MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
464Lesser General Public License for more details.
465
466You should have received a copy of the GNU Lesser General Public
467License along with FFmpeg; if not, write to the Free Software
468Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
469
470********************************************************************************
471
472libavcodec/mips/fft_mips.c
473
474Copyright (c) 2012
475MIPS Technologies, Inc., California.
476
477Redistribution and use in source and binary forms, with or without
478modification, are permitted provided that the following conditions
479are met:
4801. Redistributions of source code must retain the above copyright
481notice, this list of conditions and the following disclaimer.
4822. Redistributions in binary form must reproduce the above copyright
483notice, this list of conditions and the following disclaimer in the
484documentation and/or other materials provided with the distribution.
4853. Neither the name of the MIPS Technologies, Inc., nor the names of its
486contributors may be used to endorse or promote products derived from
487this software without specific prior written permission.
488
489THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
490ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
491IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
492ARE DISCLAIMED.  IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
493FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
494DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
495OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
496HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
497LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
498OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
499SUCH DAMAGE.
500
501Author:  Stanislav Ocovaj (socovaj@mips.com)
502Author:  Zoran Lukic (zoranl@mips.com)
503
504Optimized MDCT/IMDCT and FFT transforms
505
506This file is part of FFmpeg.
507
508FFmpeg is free software; you can redistribute it and/or
509modify it under the terms of the GNU Lesser General Public
510License as published by the Free Software Foundation; either
511version 2.1 of the License, or (at your option) any later version.
512
513FFmpeg is distributed in the hope that it will be useful,
514but WITHOUT ANY WARRANTY; without even the implied warranty of
515MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
516Lesser General Public License for more details.
517
518You should have received a copy of the GNU Lesser General Public
519License along with FFmpeg; if not, write to the Free Software
520Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
521
522********************************************************************************
523
524libavcodec/mips/mpegaudiodsp_mips_float.c
525
526Copyright (c) 2012
527MIPS Technologies, Inc., California.
528
529Redistribution and use in source and binary forms, with or without
530modification, are permitted provided that the following conditions
531are met:
5321. Redistributions of source code must retain the above copyright
533notice, this list of conditions and the following disclaimer.
5342. Redistributions in binary form must reproduce the above copyright
535notice, this list of conditions and the following disclaimer in the
536documentation and/or other materials provided with the distribution.
5373. Neither the name of the MIPS Technologies, Inc., nor the names of its
538contributors may be used to endorse or promote products derived from
539this software without specific prior written permission.
540
541THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
542ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
543IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
544ARE DISCLAIMED.  IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
545FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
546DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
547OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
548HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
549LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
550OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
551SUCH DAMAGE.
552
553Author:  Bojan Zivkovic (bojan@mips.com)
554
555MPEG Audio decoder optimized for MIPS floating-point architecture
556
557This file is part of FFmpeg.
558
559FFmpeg is free software; you can redistribute it and/or
560modify it under the terms of the GNU Lesser General Public
561License as published by the Free Software Foundation; either
562version 2.1 of the License, or (at your option) any later version.
563
564FFmpeg is distributed in the hope that it will be useful,
565but WITHOUT ANY WARRANTY; without even the implied warranty of
566MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
567Lesser General Public License for more details.
568
569You should have received a copy of the GNU Lesser General Public
570License along with FFmpeg; if not, write to the Free Software
571Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
572
573********************************************************************************
574
575libavcodec/x86/xvididct.asm
576
577XVID MPEG-4 VIDEO CODEC
578
579 Conversion from gcc syntax to x264asm syntax with modifications
580 by Christophe Gisquet <christophe.gisquet@gmail.com>
581
582 ===========     SSE2 inverse discrete cosine transform     ===========
583
584 Copyright(C) 2003 Pascal Massimino <skal@planet-d.net>
585
586 Conversion to gcc syntax with modifications
587 by Alexander Strange <astrange@ithinksw.com>
588
589 Originally from dct/x86_asm/fdct_sse2_skal.asm in Xvid.
590
591 Vertical pass is an implementation of the scheme:
592  Loeffler C., Ligtenberg A., and Moschytz C.S.:
593  Practical Fast 1D DCT Algorithm with Eleven Multiplications,
594  Proc. ICASSP 1989, 988-991.
595
596 Horizontal pass is a double 4x4 vector/matrix multiplication,
597 (see also Intel's Application Note 922:
598  http://developer.intel.com/vtune/cbts/strmsimd/922down.htm
599  Copyright (C) 1999 Intel Corporation)
600
601 More details at http://skal.planet-d.net/coding/dct.html
602
603 =======     MMX and XMM forward discrete cosine transform     =======
604
605 Copyright(C) 2001 Peter Ross <pross@xvid.org>
606
607 Originally provided by Intel at AP-922
608 http://developer.intel.com/vtune/cbts/strmsimd/922down.htm
609 (See more app notes at http://developer.intel.com/vtune/cbts/strmsimd/appnotes.htm)
610 but in a limited edition.
611 New macro implements a column part for precise iDCT
612 The routine precision now satisfies IEEE standard 1180-1990.
613
614 Copyright(C) 2000-2001 Peter Gubanov <peter@elecard.net.ru>
615 Rounding trick Copyright(C) 2000 Michel Lespinasse <walken@zoy.org>
616
617 http://www.elecard.com/peter/idct.html
618 http://www.linuxvideo.org/mpeg2dec/
619
620 These examples contain code fragments for first stage iDCT 8x8
621 (for rows) and first stage DCT 8x8 (for columns)
622
623 conversion to gcc syntax by Michael Niedermayer
624
625 ======================================================================
626
627 This file is part of FFmpeg.
628
629 FFmpeg is free software; you can redistribute it and/or
630 modify it under the terms of the GNU Lesser General Public
631 License as published by the Free Software Foundation; either
632 version 2.1 of the License, or (at your option) any later version.
633
634 FFmpeg is distributed in the hope that it will be useful,
635 but WITHOUT ANY WARRANTY; without even the implied warranty of
636 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
637 Lesser General Public License for more details.
638
639 You should have received a copy of the GNU Lesser General Public License
640 along with FFmpeg; if not, write to the Free Software Foundation,
641 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
642
643********************************************************************************
644
645libavformat/oggparsetheora.c
646
647Copyright (C) 2005  Matthieu CASTET, Alex Beregszaszi
648
649Permission is hereby granted, free of charge, to any person
650obtaining a copy of this software and associated documentation
651files (the "Software"), to deal in the Software without
652restriction, including without limitation the rights to use, copy,
653modify, merge, publish, distribute, sublicense, and/or sell copies
654of the Software, and to permit persons to whom the Software is
655furnished to do so, subject to the following conditions:
656
657The above copyright notice and this permission notice shall be
658included in all copies or substantial portions of the Software.
659
660THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
661EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
662MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
663NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
664HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
665WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
666OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
667DEALINGS IN THE SOFTWARE.
668
669********************************************************************************
670
671libavutil/avsscanf.c
672
673Copyright (c) 2005-2014 Rich Felker, et al.
674
675Permission is hereby granted, free of charge, to any person obtaining
676a copy of this software and associated documentation files (the
677"Software"), to deal in the Software without restriction, including
678without limitation the rights to use, copy, modify, merge, publish,
679distribute, sublicense, and/or sell copies of the Software, and to
680permit persons to whom the Software is furnished to do so, subject to
681the following conditions:
682
683The above copyright notice and this permission notice shall be
684included in all copies or substantial portions of the Software.
685
686THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
687EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
688MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
689IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
690CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
691TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
692SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
693
694********************************************************************************
695
696libswresample/swresample.h
697
698Copyright (C) 2011-2013 Michael Niedermayer (michaelni@gmx.at)
699
700This file is part of libswresample
701
702libswresample is free software; you can redistribute it and/or
703modify it under the terms of the GNU Lesser General Public
704License as published by the Free Software Foundation; either
705version 2.1 of the License, or (at your option) any later version.
706
707libswresample is distributed in the hope that it will be useful,
708but WITHOUT ANY WARRANTY; without even the implied warranty of
709MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
710Lesser General Public License for more details.
711
712You should have received a copy of the GNU Lesser General Public
713License along with libswresample; if not, write to the Free Software
714Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
715
716********************************************************************************
717
718libswresample/version.h
719
720Version macros.
721
722This file is part of libswresample
723
724libswresample is free software; you can redistribute it and/or
725modify it under the terms of the GNU Lesser General Public
726License as published by the Free Software Foundation; either
727version 2.1 of the License, or (at your option) any later version.
728
729libswresample is distributed in the hope that it will be useful,
730but WITHOUT ANY WARRANTY; without even the implied warranty of
731MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
732Lesser General Public License for more details.
733
734You should have received a copy of the GNU Lesser General Public
735License along with libswresample; if not, write to the Free Software
736Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
737
738********************************************************************************
739
740libavcodec/jfdctfst.c
741libavcodec/jfdctint_template.c
742libavcodec/jrevdct.c
743
744This file is part of the Independent JPEG Group's software.
745
746The authors make NO WARRANTY or representation, either express or implied,
747with respect to this software, its quality, accuracy, merchantability, or
748fitness for a particular purpose.  This software is provided "AS IS", and
749you, its user, assume the entire risk as to its quality and accuracy.
750
751This software is copyright (C) 1994-1996, Thomas G. Lane.
752All Rights Reserved except as specified below.
753
754Permission is hereby granted to use, copy, modify, and distribute this
755software (or portions thereof) for any purpose, without fee, subject to
756these conditions:
757(1) If any part of the source code for this software is distributed, then
758this README file must be included, with this copyright and no-warranty
759notice unaltered; and any additions, deletions, or changes to the original
760files must be clearly indicated in accompanying documentation.
761(2) If only executable code is distributed, then the accompanying
762documentation must state that "this software is based in part on the work
763of the Independent JPEG Group".
764(3) Permission for use of this software is granted only if the user accepts
765full responsibility for any undesirable consequences; the authors accept
766NO LIABILITY for damages of any kind.
767
768These conditions apply to any software derived from or based on the IJG
769code, not just to the unmodified library.  If you use our work, you ought
770to acknowledge us.
771
772Permission is NOT granted for the use of any IJG author's name or company
773name in advertising or publicity relating to this software or products
774derived from it.  This software may be referred to only as "the Independent
775JPEG Group's software".
776
777We specifically permit and encourage the use of this software as the basis
778of commercial products, provided that all warranty or liability claims are
779assumed by the product vendor.
780
781********************************************************************************
782
783libavcodec/fft_fixed_32.c
784libavcodec/fft_init_table.c
785libavcodec/fft_table.h
786libavcodec/mdct_fixed_32.c
787libavcodec/mips/aacdec_mips.c
788libavcodec/mips/aacdec_mips.h
789libavcodec/mips/aacpsdsp_mips.c
790libavcodec/mips/aacsbr_mips.c
791libavcodec/mips/aacsbr_mips.h
792libavcodec/mips/amrwbdec_mips.h
793libavcodec/mips/compute_antialias_fixed.h
794libavcodec/mips/compute_antialias_float.h
795libavcodec/mips/lsp_mips.h
796libavcodec/mips/sbrdsp_mips.c
797libavutil/fixed_dsp.c
798libavutil/fixed_dsp.h
799libavutil/mips/float_dsp_mips.c
800libavutil/mips/libm_mips.h
801libavutil/softfloat_tables.h
802
803Copyright (c) 2012
804MIPS Technologies, Inc., California.
805
806Redistribution and use in source and binary forms, with or without
807modification, are permitted provided that the following conditions
808are met:
8091. Redistributions of source code must retain the above copyright
810notice, this list of conditions and the following disclaimer.
8112. Redistributions in binary form must reproduce the above copyright
812notice, this list of conditions and the following disclaimer in the
813documentation and/or other materials provided with the distribution.
8143. Neither the name of the MIPS Technologies, Inc., nor the names of its
815contributors may be used to endorse or promote products derived from
816this software without specific prior written permission.
817
818THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
819ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
820IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
821ARE DISCLAIMED.  IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
822FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
823DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
824OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
825HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
826LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
827OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
828SUCH DAMAGE.
829
830Authors:
831Branimir Vasic   (bvasic@mips.com)
832Darko Laus       (darko@mips.com)
833Djordje Pesut    (djordje@mips.com)
834Goran Cordasic   (goran@mips.com)
835Nedeljko Babic   (nedeljko.babic imgtec com)
836Mirjana Vulin    (mvulin@mips.com)
837Stanislav Ocovaj (socovaj@mips.com)
838Zoran Lukic      (zoranl@mips.com)
839
840********************************************************************************
841
842libavformat/oggdec.c
843libavformat/oggdec.h
844libavformat/oggparseogm.c
845libavformat/oggparsevorbis.c
846
847Copyright (C) 2005  Michael Ahlberg, Måns Rullgård
848
849Permission is hereby granted, free of charge, to any person
850obtaining a copy of this software and associated documentation
851files (the "Software"), to deal in the Software without
852restriction, including without limitation the rights to use, copy,
853modify, merge, publish, distribute, sublicense, and/or sell copies
854of the Software, and to permit persons to whom the Software is
855furnished to do so, subject to the following conditions:
856
857The above copyright notice and this permission notice shall be
858included in all copies or substantial portions of the Software.
859
860THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
861EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
862MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
863NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
864HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
865WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
866OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
867DEALINGS IN THE SOFTWARE.
868
869********************************************************************************
870
871                  GNU LESSER GENERAL PUBLIC LICENSE
872                       Version 2.1, February 1999
873
874 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
875 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
876 Everyone is permitted to copy and distribute verbatim copies
877 of this license document, but changing it is not allowed.
878
879[This is the first released version of the Lesser GPL.  It also counts
880 as the successor of the GNU Library Public License, version 2, hence
881 the version number 2.1.]
882
883                            Preamble
884
885  The licenses for most software are designed to take away your
886freedom to share and change it.  By contrast, the GNU General Public
887Licenses are intended to guarantee your freedom to share and change
888free software--to make sure the software is free for all its users.
889
890  This license, the Lesser General Public License, applies to some
891specially designated software packages--typically libraries--of the
892Free Software Foundation and other authors who decide to use it.  You
893can use it too, but we suggest you first think carefully about whether
894this license or the ordinary General Public License is the better
895strategy to use in any particular case, based on the explanations below.
896
897  When we speak of free software, we are referring to freedom of use,
898not price.  Our General Public Licenses are designed to make sure that
899you have the freedom to distribute copies of free software (and charge
900for this service if you wish); that you receive source code or can get
901it if you want it; that you can change the software and use pieces of
902it in new free programs; and that you are informed that you can do
903these things.
904
905  To protect your rights, we need to make restrictions that forbid
906distributors to deny you these rights or to ask you to surrender these
907rights.  These restrictions translate to certain responsibilities for
908you if you distribute copies of the library or if you modify it.
909
910  For example, if you distribute copies of the library, whether gratis
911or for a fee, you must give the recipients all the rights that we gave
912you.  You must make sure that they, too, receive or can get the source
913code.  If you link other code with the library, you must provide
914complete object files to the recipients, so that they can relink them
915with the library after making changes to the library and recompiling
916it.  And you must show them these terms so they know their rights.
917
918  We protect your rights with a two-step method: (1) we copyright the
919library, and (2) we offer you this license, which gives you legal
920permission to copy, distribute and/or modify the library.
921
922  To protect each distributor, we want to make it very clear that
923there is no warranty for the free library.  Also, if the library is
924modified by someone else and passed on, the recipients should know
925that what they have is not the original version, so that the original
926author's reputation will not be affected by problems that might be
927introduced by others.
928
929  Finally, software patents pose a constant threat to the existence of
930any free program.  We wish to make sure that a company cannot
931effectively restrict the users of a free program by obtaining a
932restrictive license from a patent holder.  Therefore, we insist that
933any patent license obtained for a version of the library must be
934consistent with the full freedom of use specified in this license.
935
936  Most GNU software, including some libraries, is covered by the
937ordinary GNU General Public License.  This license, the GNU Lesser
938General Public License, applies to certain designated libraries, and
939is quite different from the ordinary General Public License.  We use
940this license for certain libraries in order to permit linking those
941libraries into non-free programs.
942
943  When a program is linked with a library, whether statically or using
944a shared library, the combination of the two is legally speaking a
945combined work, a derivative of the original library.  The ordinary
946General Public License therefore permits such linking only if the
947entire combination fits its criteria of freedom.  The Lesser General
948Public License permits more lax criteria for linking other code with
949the library.
950
951  We call this license the "Lesser" General Public License because it
952does Less to protect the user's freedom than the ordinary General
953Public License.  It also provides other free software developers Less
954of an advantage over competing non-free programs.  These disadvantages
955are the reason we use the ordinary General Public License for many
956libraries.  However, the Lesser license provides advantages in certain
957special circumstances.
958
959  For example, on rare occasions, there may be a special need to
960encourage the widest possible use of a certain library, so that it becomes
961a de-facto standard.  To achieve this, non-free programs must be
962allowed to use the library.  A more frequent case is that a free
963library does the same job as widely used non-free libraries.  In this
964case, there is little to gain by limiting the free library to free
965software only, so we use the Lesser General Public License.
966
967  In other cases, permission to use a particular library in non-free
968programs enables a greater number of people to use a large body of
969free software.  For example, permission to use the GNU C Library in
970non-free programs enables many more people to use the whole GNU
971operating system, as well as its variant, the GNU/Linux operating
972system.
973
974  Although the Lesser General Public License is Less protective of the
975users' freedom, it does ensure that the user of a program that is
976linked with the Library has the freedom and the wherewithal to run
977that program using a modified version of the Library.
978
979  The precise terms and conditions for copying, distribution and
980modification follow.  Pay close attention to the difference between a
981"work based on the library" and a "work that uses the library".  The
982former contains code derived from the library, whereas the latter must
983be combined with the library in order to run.
984
985                  GNU LESSER GENERAL PUBLIC LICENSE
986   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
987
988  0. This License Agreement applies to any software library or other
989program which contains a notice placed by the copyright holder or
990other authorized party saying it may be distributed under the terms of
991this Lesser General Public License (also called "this License").
992Each licensee is addressed as "you".
993
994  A "library" means a collection of software functions and/or data
995prepared so as to be conveniently linked with application programs
996(which use some of those functions and data) to form executables.
997
998  The "Library", below, refers to any such software library or work
999which has been distributed under these terms.  A "work based on the
1000Library" means either the Library or any derivative work under
1001copyright law: that is to say, a work containing the Library or a
1002portion of it, either verbatim or with modifications and/or translated
1003straightforwardly into another language.  (Hereinafter, translation is
1004included without limitation in the term "modification".)
1005
1006  "Source code" for a work means the preferred form of the work for
1007making modifications to it.  For a library, complete source code means
1008all the source code for all modules it contains, plus any associated
1009interface definition files, plus the scripts used to control compilation
1010and installation of the library.
1011
1012  Activities other than copying, distribution and modification are not
1013covered by this License; they are outside its scope.  The act of
1014running a program using the Library is not restricted, and output from
1015such a program is covered only if its contents constitute a work based
1016on the Library (independent of the use of the Library in a tool for
1017writing it).  Whether that is true depends on what the Library does
1018and what the program that uses the Library does.
1019
1020  1. You may copy and distribute verbatim copies of the Library's
1021complete source code as you receive it, in any medium, provided that
1022you conspicuously and appropriately publish on each copy an
1023appropriate copyright notice and disclaimer of warranty; keep intact
1024all the notices that refer to this License and to the absence of any
1025warranty; and distribute a copy of this License along with the
1026Library.
1027
1028  You may charge a fee for the physical act of transferring a copy,
1029and you may at your option offer warranty protection in exchange for a
1030fee.
1031
1032  2. You may modify your copy or copies of the Library or any portion
1033of it, thus forming a work based on the Library, and copy and
1034distribute such modifications or work under the terms of Section 1
1035above, provided that you also meet all of these conditions:
1036
1037    a) The modified work must itself be a software library.
1038
1039    b) You must cause the files modified to carry prominent notices
1040    stating that you changed the files and the date of any change.
1041
1042    c) You must cause the whole of the work to be licensed at no
1043    charge to all third parties under the terms of this License.
1044
1045    d) If a facility in the modified Library refers to a function or a
1046    table of data to be supplied by an application program that uses
1047    the facility, other than as an argument passed when the facility
1048    is invoked, then you must make a good faith effort to ensure that,
1049    in the event an application does not supply such function or
1050    table, the facility still operates, and performs whatever part of
1051    its purpose remains meaningful.
1052
1053    (For example, a function in a library to compute square roots has
1054    a purpose that is entirely well-defined independent of the
1055    application.  Therefore, Subsection 2d requires that any
1056    application-supplied function or table used by this function must
1057    be optional: if the application does not supply it, the square
1058    root function must still compute square roots.)
1059
1060These requirements apply to the modified work as a whole.  If
1061identifiable sections of that work are not derived from the Library,
1062and can be reasonably considered independent and separate works in
1063themselves, then this License, and its terms, do not apply to those
1064sections when you distribute them as separate works.  But when you
1065distribute the same sections as part of a whole which is a work based
1066on the Library, the distribution of the whole must be on the terms of
1067this License, whose permissions for other licensees extend to the
1068entire whole, and thus to each and every part regardless of who wrote
1069it.
1070
1071Thus, it is not the intent of this section to claim rights or contest
1072your rights to work written entirely by you; rather, the intent is to
1073exercise the right to control the distribution of derivative or
1074collective works based on the Library.
1075
1076In addition, mere aggregation of another work not based on the Library
1077with the Library (or with a work based on the Library) on a volume of
1078a storage or distribution medium does not bring the other work under
1079the scope of this License.
1080
1081  3. You may opt to apply the terms of the ordinary GNU General Public
1082License instead of this License to a given copy of the Library.  To do
1083this, you must alter all the notices that refer to this License, so
1084that they refer to the ordinary GNU General Public License, version 2,
1085instead of to this License.  (If a newer version than version 2 of the
1086ordinary GNU General Public License has appeared, then you can specify
1087that version instead if you wish.)  Do not make any other change in
1088these notices.
1089
1090  Once this change is made in a given copy, it is irreversible for
1091that copy, so the ordinary GNU General Public License applies to all
1092subsequent copies and derivative works made from that copy.
1093
1094  This option is useful when you wish to copy part of the code of
1095the Library into a program that is not a library.
1096
1097  4. You may copy and distribute the Library (or a portion or
1098derivative of it, under Section 2) in object code or executable form
1099under the terms of Sections 1 and 2 above provided that you accompany
1100it with the complete corresponding machine-readable source code, which
1101must be distributed under the terms of Sections 1 and 2 above on a
1102medium customarily used for software interchange.
1103
1104  If distribution of object code is made by offering access to copy
1105from a designated place, then offering equivalent access to copy the
1106source code from the same place satisfies the requirement to
1107distribute the source code, even though third parties are not
1108compelled to copy the source along with the object code.
1109
1110  5. A program that contains no derivative of any portion of the
1111Library, but is designed to work with the Library by being compiled or
1112linked with it, is called a "work that uses the Library".  Such a
1113work, in isolation, is not a derivative work of the Library, and
1114therefore falls outside the scope of this License.
1115
1116  However, linking a "work that uses the Library" with the Library
1117creates an executable that is a derivative of the Library (because it
1118contains portions of the Library), rather than a "work that uses the
1119library".  The executable is therefore covered by this License.
1120Section 6 states terms for distribution of such executables.
1121
1122  When a "work that uses the Library" uses material from a header file
1123that is part of the Library, the object code for the work may be a
1124derivative work of the Library even though the source code is not.
1125Whether this is true is especially significant if the work can be
1126linked without the Library, or if the work is itself a library.  The
1127threshold for this to be true is not precisely defined by law.
1128
1129  If such an object file uses only numerical parameters, data
1130structure layouts and accessors, and small macros and small inline
1131functions (ten lines or less in length), then the use of the object
1132file is unrestricted, regardless of whether it is legally a derivative
1133work.  (Executables containing this object code plus portions of the
1134Library will still fall under Section 6.)
1135
1136  Otherwise, if the work is a derivative of the Library, you may
1137distribute the object code for the work under the terms of Section 6.
1138Any executables containing that work also fall under Section 6,
1139whether or not they are linked directly with the Library itself.
1140
1141  6. As an exception to the Sections above, you may also combine or
1142link a "work that uses the Library" with the Library to produce a
1143work containing portions of the Library, and distribute that work
1144under terms of your choice, provided that the terms permit
1145modification of the work for the customer's own use and reverse
1146engineering for debugging such modifications.
1147
1148  You must give prominent notice with each copy of the work that the
1149Library is used in it and that the Library and its use are covered by
1150this License.  You must supply a copy of this License.  If the work
1151during execution displays copyright notices, you must include the
1152copyright notice for the Library among them, as well as a reference
1153directing the user to the copy of this License.  Also, you must do one
1154of these things:
1155
1156    a) Accompany the work with the complete corresponding
1157    machine-readable source code for the Library including whatever
1158    changes were used in the work (which must be distributed under
1159    Sections 1 and 2 above); and, if the work is an executable linked
1160    with the Library, with the complete machine-readable "work that
1161    uses the Library", as object code and/or source code, so that the
1162    user can modify the Library and then relink to produce a modified
1163    executable containing the modified Library.  (It is understood
1164    that the user who changes the contents of definitions files in the
1165    Library will not necessarily be able to recompile the application
1166    to use the modified definitions.)
1167
1168    b) Use a suitable shared library mechanism for linking with the
1169    Library.  A suitable mechanism is one that (1) uses at run time a
1170    copy of the library already present on the user's computer system,
1171    rather than copying library functions into the executable, and (2)
1172    will operate properly with a modified version of the library, if
1173    the user installs one, as long as the modified version is
1174    interface-compatible with the version that the work was made with.
1175
1176    c) Accompany the work with a written offer, valid for at
1177    least three years, to give the same user the materials
1178    specified in Subsection 6a, above, for a charge no more
1179    than the cost of performing this distribution.
1180
1181    d) If distribution of the work is made by offering access to copy
1182    from a designated place, offer equivalent access to copy the above
1183    specified materials from the same place.
1184
1185    e) Verify that the user has already received a copy of these
1186    materials or that you have already sent this user a copy.
1187
1188  For an executable, the required form of the "work that uses the
1189Library" must include any data and utility programs needed for
1190reproducing the executable from it.  However, as a special exception,
1191the materials to be distributed need not include anything that is
1192normally distributed (in either source or binary form) with the major
1193components (compiler, kernel, and so on) of the operating system on
1194which the executable runs, unless that component itself accompanies
1195the executable.
1196
1197  It may happen that this requirement contradicts the license
1198restrictions of other proprietary libraries that do not normally
1199accompany the operating system.  Such a contradiction means you cannot
1200use both them and the Library together in an executable that you
1201distribute.
1202
1203  7. You may place library facilities that are a work based on the
1204Library side-by-side in a single library together with other library
1205facilities not covered by this License, and distribute such a combined
1206library, provided that the separate distribution of the work based on
1207the Library and of the other library facilities is otherwise
1208permitted, and provided that you do these two things:
1209
1210    a) Accompany the combined library with a copy of the same work
1211    based on the Library, uncombined with any other library
1212    facilities.  This must be distributed under the terms of the
1213    Sections above.
1214
1215    b) Give prominent notice with the combined library of the fact
1216    that part of it is a work based on the Library, and explaining
1217    where to find the accompanying uncombined form of the same work.
1218
1219  8. You may not copy, modify, sublicense, link with, or distribute
1220the Library except as expressly provided under this License.  Any
1221attempt otherwise to copy, modify, sublicense, link with, or
1222distribute the Library is void, and will automatically terminate your
1223rights under this License.  However, parties who have received copies,
1224or rights, from you under this License will not have their licenses
1225terminated so long as such parties remain in full compliance.
1226
1227  9. You are not required to accept this License, since you have not
1228signed it.  However, nothing else grants you permission to modify or
1229distribute the Library or its derivative works.  These actions are
1230prohibited by law if you do not accept this License.  Therefore, by
1231modifying or distributing the Library (or any work based on the
1232Library), you indicate your acceptance of this License to do so, and
1233all its terms and conditions for copying, distributing or modifying
1234the Library or works based on it.
1235
1236  10. Each time you redistribute the Library (or any work based on the
1237Library), the recipient automatically receives a license from the
1238original licensor to copy, distribute, link with or modify the Library
1239subject to these terms and conditions.  You may not impose any further
1240restrictions on the recipients' exercise of the rights granted herein.
1241You are not responsible for enforcing compliance by third parties with
1242this License.
1243
1244  11. If, as a consequence of a court judgment or allegation of patent
1245infringement or for any other reason (not limited to patent issues),
1246conditions are imposed on you (whether by court order, agreement or
1247otherwise) that contradict the conditions of this License, they do not
1248excuse you from the conditions of this License.  If you cannot
1249distribute so as to satisfy simultaneously your obligations under this
1250License and any other pertinent obligations, then as a consequence you
1251may not distribute the Library at all.  For example, if a patent
1252license would not permit royalty-free redistribution of the Library by
1253all those who receive copies directly or indirectly through you, then
1254the only way you could satisfy both it and this License would be to
1255refrain entirely from distribution of the Library.
1256
1257If any portion of this section is held invalid or unenforceable under any
1258particular circumstance, the balance of the section is intended to apply,
1259and the section as a whole is intended to apply in other circumstances.
1260
1261It is not the purpose of this section to induce you to infringe any
1262patents or other property right claims or to contest validity of any
1263such claims; this section has the sole purpose of protecting the
1264integrity of the free software distribution system which is
1265implemented by public license practices.  Many people have made
1266generous contributions to the wide range of software distributed
1267through that system in reliance on consistent application of that
1268system; it is up to the author/donor to decide if he or she is willing
1269to distribute software through any other system and a licensee cannot
1270impose that choice.
1271
1272This section is intended to make thoroughly clear what is believed to
1273be a consequence of the rest of this License.
1274
1275  12. If the distribution and/or use of the Library is restricted in
1276certain countries either by patents or by copyrighted interfaces, the
1277original copyright holder who places the Library under this License may add
1278an explicit geographical distribution limitation excluding those countries,
1279so that distribution is permitted only in or among countries not thus
1280excluded.  In such case, this License incorporates the limitation as if
1281written in the body of this License.
1282
1283  13. The Free Software Foundation may publish revised and/or new
1284versions of the Lesser General Public License from time to time.
1285Such new versions will be similar in spirit to the present version,
1286but may differ in detail to address new problems or concerns.
1287
1288Each version is given a distinguishing version number.  If the Library
1289specifies a version number of this License which applies to it and
1290"any later version", you have the option of following the terms and
1291conditions either of that version or of any later version published by
1292the Free Software Foundation.  If the Library does not specify a
1293license version number, you may choose any version ever published by
1294the Free Software Foundation.
1295
1296  14. If you wish to incorporate parts of the Library into other free
1297programs whose distribution conditions are incompatible with these,
1298write to the author to ask for permission.  For software which is
1299copyrighted by the Free Software Foundation, write to the Free
1300Software Foundation; we sometimes make exceptions for this.  Our
1301decision will be guided by the two goals of preserving the free status
1302of all derivatives of our free software and of promoting the sharing
1303and reuse of software generally.
1304
1305                            NO WARRANTY
1306
1307  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
1308WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
1309EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
1310OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
1311KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
1312IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1313PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
1314LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
1315THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
1316
1317  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
1318WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
1319AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
1320FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
1321CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
1322LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
1323RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
1324FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
1325SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
1326DAMAGES.
1327
1328                     END OF TERMS AND CONDITIONS
1329
1330           How to Apply These Terms to Your New Libraries
1331
1332  If you develop a new library, and you want it to be of the greatest
1333possible use to the public, we recommend making it free software that
1334everyone can redistribute and change.  You can do so by permitting
1335redistribution under these terms (or, alternatively, under the terms of the
1336ordinary General Public License).
1337
1338  To apply these terms, attach the following notices to the library.  It is
1339safest to attach them to the start of each source file to most effectively
1340convey the exclusion of warranty; and each file should have at least the
1341"copyright" line and a pointer to where the full notice is found.
1342
1343    <one line to give the library's name and a brief idea of what it does.>
1344    Copyright (C) <year>  <name of author>
1345
1346    This library is free software; you can redistribute it and/or
1347    modify it under the terms of the GNU Lesser General Public
1348    License as published by the Free Software Foundation; either
1349    version 2.1 of the License, or (at your option) any later version.
1350
1351    This library is distributed in the hope that it will be useful,
1352    but WITHOUT ANY WARRANTY; without even the implied warranty of
1353    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1354    Lesser General Public License for more details.
1355
1356    You should have received a copy of the GNU Lesser General Public
1357    License along with this library; if not, write to the Free Software
1358    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
1359
1360Also add information on how to contact you by electronic and paper mail.
1361
1362You should also get your employer (if you work as a programmer) or your
1363school, if any, to sign a "copyright disclaimer" for the library, if
1364necessary.  Here is a sample; alter the names:
1365
1366  Yoyodyne, Inc., hereby disclaims all copyright interest in the
1367  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
1368
1369  <signature of Ty Coon>, 1 April 1990
1370  Ty Coon, President of Vice
1371
1372That's all there is to it!