Repository navigation
Expand file tree
/
Copy pathNOTICE
More file actions
1552 lines (1278 loc) · 83.8 KB
/
Copy pathNOTICE
File metadata and controls
1552 lines (1278 loc) · 83.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
prec
Copyright (c) 2026 Cătălin Ilinca
The code is under the MIT licence in LICENSE. The prec binary also carries
these third-party files, compiled in, each under its own MIT licence below:
- assets/xterm/: xterm.js 5.5.0, @xterm/addon-canvas 0.7.0 and
@xterm/addon-unicode11 0.8.0 (https://github.com/xtermjs/xterm.js),
vendored as published; assets/xterm/VERSIONS lists their sha256.
- assets/vhs-themes.json: the built-in theme set of VHS v0.11.0
(https://github.com/charmbracelet/vhs), extracted verbatim.
- pito-codecs 2.1.0 (https://github.com/gmrdad82/pito-codecs, tag v2.1.0,
commit 10ac87cb1edb247422c0a0e5da53d3f70514a3a0), compiled in with its
h264, mp4, filter and png parts to encode clip masters; its MIT licence and
the notices of the work it adapts are copied verbatim at the end of this file.
The images in docs/images/ illustrate the README and the docs bundle. The
GIFs record.gif and typing.gif are recorded by prec from this repository's own
shots (render/terminal.toml's record and examples/demo's typing) and made GIFs
by pcod (pito-codecs), under the MIT licence like the code. The stills are
prec renders of examples/demo's palette shot: themes.png (six themes from one
recording), frame.png (window and bare) and sizes.png (a crop of the 720p and
2160p stills), laid out with ImageMagick. The charts frames-vs-vhs.png and
rerender.png are drawn by pito-compare (pcmp) from docs/bench/*.toml, with
numbers measured by docs/bench/bench.sh against VHS v0.11.0. All are under the
MIT licence like the code.
The PITO MD wordmark docs/images/pitomd-wordmark.svg, shown at the README's
Licence section, is copied by bin/marks from the PITO MD brand masters
(exports/pitomd/readme/wordmark.svg) at aa3aee8b232a1b848995bf3d9a012a01d4aff8ec.
The prec and PITO MD names and their logos are © Catalin Ilinca, all rights
reserved and not covered by the MIT licence (TRADEMARKS.md).
----- assets/xterm/LICENSE
Copyright (c) 2017-2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)
Copyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com)
Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
----- assets/xterm/LICENSE-addon-canvas
Copyright (c) 2017, The xterm.js authors (https://github.com/xtermjs/xterm.js)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
----- assets/xterm/LICENSE-addon-unicode11
Copyright (c) 2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
----- assets/LICENSE-vhs
MIT License
Copyright (c) 2022-2023 Charmbracelet, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
----- pito-codecs 2.1.0 LICENSE
MIT License
Copyright (c) 2026 Cătălin Ilinca
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
----- pito-codecs 2.1.0 NOTICE
Parts of this package are adapted from FilmCraft
(https://github.com/storytold/filmcraft, tag v0.6.0, commit 2ff3f5e266838700c292a35aaf762e3d4dcef980),
Copyright (c) 2026 ArtCraft Team and the FilmCraft contributors, used under
the MIT License (FilmCraft is dual-licensed MIT OR Apache-2.0; the MIT terms
are taken here):
MIT License
Copyright (c) 2026 ArtCraft Team and the FilmCraft contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Adapted modules (one line per module, filled in by each task):
- src/h264/: from crates/h264 (the H.264 decoder), crates/h264enc (the encoder) and crates/bitstream (bit reader and writer).
- src/hevc/: from crates/hevc (the H.265 decoder) and crates/bitstream (bit reader, NAL splitting); adapted to the shared Frame and Packet types, with an hvcC writer added.
- src/aac/: from crates/aac (the AAC-LC decoder and encoder) and crates/bitstream; src/aac/pcm.rs is new. The radix-2 FFT of its MDCT moved unchanged to src/media/fft.rs, which the spectrogram shares.
- src/mp4/: from crates/isobmff (the MP4 and MOV reader and writer); remux, the MOV brand and the vp09 sample entry are new.
- src/gpu/: decode from crates/platform/src/vaapi (the VA-API front ends, libva FFI and session) and crates/platform/src/biplanar.rs, with the H.264 and HEVC parameter, slice and DPB code of crates/h264 and crates/hevc in src/gpu/syntax; the VA-API encoders, packed headers, VPP and dma-buf export are new.
- src/gpu/nvenc/: from crates/platform/src/nvenc (ffi, session, device, HEVC).
- src/gpu/videotoolbox/: from crates/platform/src/videotoolbox.rs and videotoolbox_encode.rs.
- src/gpu/media_foundation/: from crates/platform/src/media_foundation and crates/platform/src/annexb.rs.
- src/filter/: the EBU R128 meter (K-weighting filters, gating histogram, loudness range) and the true-peak polyphase oversampler from crates/audio-dsp; the rest is new, the spectrogram in src/filter/spectrum.rs included, with its colour stops sampled from matplotlib's inferno colour map (CC0 1.0, Nathaniel J. Smith and Stefan van der Walt) and its 5x7 glyphs taken from this package's bench charts.
- src/vp9/: the VP9 decoder from crates/vp9 (header and superframe parsing, boolean decoder, probability adaptation, tiles, prediction, transforms, loop filter, frame threading); the shared Frame and Packet front and the bit reader (from crates/bitstream) are adapted.
- src/opus/: the decoder (SILK, CELT, hybrid, multistream, OpusHead) from crates/opus; the range encoder, the FFT butterflies and the Ogg reader and writer are new.
- src/mkv/: the Matroska and WebM reader (EBML, lacing, Cues, damage resync) from crates/matroska; the writer, remux and MP4 to MKV are reworked or new.
- src/vp9/enc/: the VP9 encoder; its motion vector prediction (mvref.rs) and the syntax contexts of entropy.rs mirror crates/vp9's tile.rs, and it reuses the decoder's tables, probability adaptation and loop filter; the rest is new.
- src/gif/: written from the GIF89a specification; the encoder's frame differencing, its clamped Sierra-2-4A diffusion and its 7-bit nearest-colour table in src/gif/encode.rs are adapted from pconv v1.0.1 (commit 8879614b928b8fdde500a16376b85a2c95551dc9), Copyright (c) 2026 Cătălin Ilinca, MIT, the same author and licence as this package.
- src/vp9/enc/tx/: the inverse DCT and ADST butterflies (transform_gen.rs), the scan, band and energy-class tables and the coefficient-context neighbours from crates/vp9; the forward transforms (the transposes of those butterflies), the quantiser, the trellis and the AVX2 kernels are new.
- src/webp/: new, written from RFC 9649 (the container, VP8L lossless and animation); src/webp/vp8/ is described below; the lossy animation sub-frames (the quality-to-difference limit, similar-pixel rectangles and flattened similar 8x8 blocks) in src/webp/anim.rs follow libwebp's anim_encode.c.
- src/opus/enc/: the CELT encoder is new, written from RFC 6716; it shares the decoder's tables and range coder.
The VA-API declarations in src/gpu/vaapi/ffi.rs are transcribed from libva's
headers (va.h, va_dec_hevc.h, va_enc_h264.h, va_enc_hevc.h, va_vpp.h, va_drm.h,
va_drmcommon.h; libva 2.23, https://github.com/intel/libva), which carry this
notice:
Copyright (c) 2007-2009 Intel Corporation. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sub license, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The NVENC declarations in src/gpu/nvenc/ffi.rs are transcribed from NVIDIA's
nvEncodeAPI.h (Video Codec SDK, API 12.1), which carries this notice:
Copyright (c) 2010-2023 NVIDIA Corporation
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the software, and to permit persons to whom the
software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
src/webp/vp8/ (the VP8 lossy codec of WebP) is written from RFC 6386 and
RFC 9649. Its loop filter, intra prediction, token and transform details
follow the reference decoder published in RFC 6386, Section 20, and its YUV
to RGB conversion, fancy chroma upsampler, SSE2 loop filter layout, forward
transforms and quality scale are adapted from libwebp (v1.6.0,
https://chromium.googlesource.com/webm/libwebp). They carry these notices:
RFC 6386 reference decoder:
Copyright (c) 2010, 2011, Google Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Google nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
libwebp:
Copyright (c) 2010, Google Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Google nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The AC-3 and E-AC-3 decoder in src/ac3/ is adapted from oxideav-ac3
(https://github.com/OxideAV/oxideav-ac3, version 0.0.11, commit
99228831d2b29a35fe2b2035118a18f8cb0cae59), which is written from ATSC A/52
and ETSI TS 102 366: its syncframe and bit stream information parsing,
exponent decoding, parametric bit allocation, mantissa dequantisation,
coupling, rematrixing, spectral extension, adaptive hybrid transform (with its
vector quantisation tables) and IMDCT structure. The batched SIMD IMDCT, the
computed KBD window, the cached bit allocation, the channel layout and the
container wiring are new. It carries this notice:
MIT License
Copyright (c) 2026 Karpelès Lab Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The MPEG audio decoder in src/mp3/ (layers I, II and III: frame sync, side
information, scale factors, Huffman decoding, stereo processing, the IMDCT and
the polyphase synthesis with its SSE and NEON layout, and their tables, and
the VBR-tag, ID3 and gapless handling of minimp3_ex.h) is ported from minimp3 (https://github.com/lieff/minimp3, commit
ea99364f61c14656440e8d77e9c233ccf3124633) by lieff, which its authors
dedicated to the public domain under CC0 1.0 Universal:
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
The CC0 1.0 Universal text, as minimp3 ships it:
CC0 1.0 Universal
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for the
purpose of contributing to a commons of creative, cultural and scientific
works ("Commons") that the public can reliably and without fear of later
claims of infringement build upon, modify, incorporate in other works, reuse
and redistribute as freely as possible in any form whatsoever and for any
purposes, including without limitation commercial purposes. These owners may
contribute to the Commons to promote the ideal of a free culture and the
further production of creative, cultural and scientific works, or to gain
reputation or greater distribution for their Work in part through the use and
efforts of others.
For these and/or other purposes and motivations, and without any expectation
of additional consideration or compensation, the person associating CC0 with a
Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
and publicly distribute the Work under its terms, with knowledge of his or her
Copyright and Related Rights in the Work and the meaning and intended legal
effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not limited
to, the following:
i. the right to reproduce, adapt, distribute, perform, display, communicate,
and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or likeness
depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data in
a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation thereof,
including any amended or successor version of such directive); and
vii. other similar, equivalent or corresponding rights throughout the world
based on applicable law or treaty, and any national implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention of,
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
and Related Rights and associated claims and causes of action, whether now
known or unknown (including existing as well as future claims and causes of
action), in the Work (i) in all territories worldwide, (ii) for the maximum
duration provided by applicable law or treaty (including future time
extensions), (iii) in any current or future medium and for any number of
copies, and (iv) for any purpose whatsoever, including without limitation
commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
the Waiver for the benefit of each member of the public at large and to the
detriment of Affirmer's heirs and successors, fully intending that such Waiver
shall not be subject to revocation, rescission, cancellation, termination, or
any other legal or equitable action to disrupt the quiet enjoyment of the Work
by the public as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason be
judged legally invalid or ineffective under applicable law, then the Waiver
shall be preserved to the maximum extent permitted taking into account
Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
is so judged Affirmer hereby grants to each affected person a royalty-free,
non transferable, non sublicensable, non exclusive, irrevocable and
unconditional license to exercise Affirmer's Copyright and Related Rights in
the Work (i) in all territories worldwide, (ii) for the maximum duration
provided by applicable law or treaty (including future time extensions), (iii)
in any current or future medium and for any number of copies, and (iv) for any
purpose whatsoever, including without limitation commercial, advertising or
promotional purposes (the "License"). The License shall be deemed effective as
of the date CC0 was applied by Affirmer to the Work. Should any part of the
License for any reason be judged legally invalid or ineffective under
applicable law, such partial invalidity or ineffectiveness shall not
invalidate the remainder of the License, and in such case Affirmer hereby
affirms that he or she will not (i) exercise any of his or her remaining
Copyright and Related Rights in the Work or (ii) assert any associated claims
and causes of action with respect to the Work, in either case contrary to
Affirmer's express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or warranties
of any kind concerning the Work, express, implied, statutory or otherwise,
including without limitation warranties of title, merchantability, fitness
for a particular purpose, non infringement, or the absence of latent or
other defects, accuracy, or the present or absence of errors, whether or not
discoverable, all to the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without limitation
any person's Copyright and Related Rights in the Work. Further, Affirmer
disclaims responsibility for obtaining any necessary consents, permissions
or other rights required for any use of the Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to this
CC0 or use of the Work.
For more information, please see
<http://creativecommons.org/publicdomain/zero/1.0/>
Images in this repository that are not code, where each comes from, and what
covers it, all under the MIT licence like the code:
- docs/images/decode.gif and strip.gif: terminal clips recorded by prec from
this repository's own shots (render/terminal.toml and render/terminal/),
running src/bin/pcod.rs over a clip render/terminal/clip.sh makes from the
public-domain NASA solstice interview
- docs/images/chart-*.png: charts drawn by pito-compare (MIT) from the data
files in docs/charts/, which hold this repository's own measurements on
public-domain NASA footage ("A Message of Resilience from the International
Space Station" and the NASA solstice interview) and on synthetic test
patterns (ffmpeg's testsrc2)
- docs/images/filmstrip.gif, overlay.gif, animated.gif and animated.webp:
pictures examples/readme_shots.rs makes with this repository's own decoders,
overlay blend and GIF and WebP encoders from public-domain NASA footage ("A
Message of Resilience from the International Space Station", NASA Johnson)
The PNG encoder in src/png/encode.rs is adapted from fdeflate 0.3.7 (commit
c365c7e6ffa81feb2e1fb762eed7299f05c9b0ca) of https://github.com/image-rs/fdeflate,
by The image-rs Developers, dual-licensed MIT OR Apache-2.0; the MIT terms are
taken here. From fdeflate: the fixed Huffman code tuned for filtered PNG rows,
its precomputed dynamic-block header, the zero-run encoding and the 64-bit bit
writer. The Paeth filter pass, the chunk writer and the CRC are new. It
carries this notice:
MIT License
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
The PNG decoder in src/png/ is adapted from zune-png 0.4.10 (commit
aaf40839ed2596fa83091ccfb49629eb5d8efd91) and zune-inflate 0.2.54 (commit
69502ce83fdfecdd0beefd677e2abb3781b29d98), both of
https://github.com/etemesi254/zune-image, dual-licensed MIT OR Apache-2.0 OR
Zlib; the MIT terms are taken here. From zune-inflate: the whole-buffer zlib
and deflate decoder with its decode tables, fast and slow loops and match
copies (src/png/inflate.rs). From zune-png: the scanline de-filters with their
SSE2 and SSE4.1 kernels (src/png/filter.rs), the chunk and IHDR checks, the
bit unpacking, palette and tRNS expansion and the Adam7 pass geometry
(src/png/mod.rs). The row loop that expands every colour type straight to
8-bit RGBA, the reused buffers and the error paths are new. They carry this
notice:
MIT License
Copyright (c) 2023 Caleb Etemesi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
zune-inflate is itself a port of libdeflate's decompressor
(https://github.com/ebiggers/libdeflate), which carries this notice:
Copyright 2016 Eric Biggers
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The Adler-32 in src/png/inflate.rs follows adler2 2.0.1
(https://github.com/oyvindln/adler2, commit
89a031a0f42eeff31c70dc598b398cbf31f1680f) by Jonas Schievink and oyvindln,
licensed 0BSD OR MIT OR Apache-2.0; it is used under the 0BSD terms, which ask
for no notice, and is credited here.
The CRC-32 in src/png/crc.rs follows the slice-by-16 baseline of crc32fast
1.5.2 (https://github.com/srijs/rust-crc32fast, commit
7eb0b8a2c9b246d27dc4cb5a53d3fc3b43a4bb83), dual-licensed MIT OR Apache-2.0; the
MIT terms are taken here, under this notice:
Copyright (c) 2018 Sam Rijs, Alex Crichton and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The JPEG encoder in src/jpeg/ is adapted from jpeg-encoder 0.7.1
(https://github.com/vstroebel/jpeg-encoder, commit
baf40191ae25a32e56a884fa6e001c4fe938d451), licensed (MIT OR Apache-2.0) AND
IJG; the MIT terms are taken for its own code. From it: the baseline
interleaved scan, the quality-scaled Annex K quantisation tables and their
reciprocal quantiser, the Annex K Huffman tables and code construction, the
64-bit bit writer with byte stuffing, the marker writers, the integer RGB to
YCbCr conversion and its AVX2 form, the 2x2 box downsampling with libjpeg's
alternating bias and the edge replication. Changed here: one fixed 4:2:0
RGBA path written into a Vec, component ids 1 to 3, an RGBA load in the AVX2
colour conversion, and the 16-bit pass-2 rounding constant of the AVX2 forward
DCT (the original adds a 32-bit constant, which rounds only half the lanes).
Its MIT notice:
Copyright (c) 2021 Volker Ströbel
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
The JPEG decoder in src/jpeg/decode.rs and src/jpeg/decode/ is adapted from
zune-jpeg 0.5.15 (https://github.com/etemesi254/zune-image, crates/zune-jpeg,
commit 31d81fed7551c8ccea456d9d8e2b1fd8bebb6995), licensed MIT OR Apache-2.0
OR Zlib; the MIT terms are taken. From it: the Huffman table derivation with
its 9-bit lookahead and fast AC table, the bit reader's marker and stuffing
handling, the baseline block decode, the progressive DC and AC first and
refinement passes, the scalar integer IDCT (its port of stb_image's), the
fancy horizontal, vertical and 2x2 upsampling and the 14-bit YCbCr to RGB
conversion. Changed here: the reader works on a byte slice and refuses data
consumed past the end of the file or a marker, frames decode into whole
planes that upsample row by row, the IDCT writes bytes, the refinement pass follows libjpeg's
loop, and EXIF orientation, Adobe RGB and the CMYK and YCCK refusals are new.
Its MIT notice:
MIT License
Copyright (c) zune-image developers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The forward DCT in src/jpeg/dct.rs (jpeg-encoder's port of jfdctint.c, the
slow-but-accurate integer DCT, through mozjpeg and libjpeg-turbo) and the
progressive AC refinement loop in src/jpeg/decode/bits.rs (after jdphuff.c)
are based in part on the work of the Independent JPEG Group. They carry this
notice:
This software is copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding.
All Rights Reserved except as specified below. libjpeg-turbo Modifications:
Copyright (C) 2015, 2020, D. R. Commander.
The authors make NO WARRANTY or representation, either express or implied,
with respect to this software, its quality, accuracy, merchantability, or
fitness for a particular purpose. This software is provided "AS IS", and you,
its user, assume the entire risk as to its quality and accuracy.
Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to these
conditions:
(1) If any part of the source code for this software is distributed, then this
README file must be included, with this copyright and no-warranty notice
unaltered; and any additions, deletions, or changes to the original files
must be clearly indicated in accompanying documentation.
(2) If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the work of
the Independent JPEG Group".
(3) Permission for use of this software is granted only if the user accepts
full responsibility for any undesirable consequences; the authors accept
NO LIABILITY for damages of any kind.
These conditions apply to any software derived from or based on the IJG code,
not just to the unmodified library. If you use our work, you ought to
acknowledge us.
Permission is NOT granted for the use of any IJG author's name or company name
in advertising or publicity relating to this software or products derived from
it. This software may be referred to only as "the Independent JPEG Group's
software".
We specifically permit and encourage the use of this software as the basis of
commercial products, provided that all warranty or liability claims are
assumed by the product vendor.
The changes to the IJG code here: translated to Rust, comments removed, the
block held in a 32-byte aligned array of 16-bit samples.
The AVX2 forward DCT in src/jpeg/avx2.rs is jpeg-encoder's port of
libjpeg-turbo's jfdctint-avx2.asm, under libjpeg-turbo's SIMD licence (zlib):
Copyright 2009 Pierre Ossman for Cendio AB
Copyright (C) 2009, 2016, 2018, 2020, D. R. Commander.
Based on the x86 SIMD extension for IJG JPEG library
Copyright (C) 1999-2006, MIYASAKA Masaru.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
The alterations: translated to Rust intrinsics, comments removed, the pass-2
rounding constant held in 16-bit lanes as the assembly has it.
The AV1 decode structures in src/gpu/vaapi/av1.rs are transcribed from libva's
va_dec_av1.h (libva 2.23, https://github.com/intel/libva), Copyright (c) 2019
Intel Corporation, under the same MIT terms as the libva notice above.
The AV1 syntax parser in src/av1/ (OBU reader, sequence and frame headers with
reference frame state, order hints, segmentation, loop filter, quantizer, delta,
CDEF, loop restoration, global motion and film grain parameters, tile info and
tile groups, and the subexp, uvlc and leb128 helpers) and the VA-API AV1
picture and tile parameter fill in src/gpu/vaapi/av1.rs are adapted from
cros-codecs (https://github.com/chromeos/cros-codecs, commit
5ff6d693ffae0b36935b8fc13092c733b4c2646f: src/codec/av1/parser.rs, reader.rs,
helpers.rs, src/decoder/stateless/av1.rs and av1/vaapi.rs). Changed: the bit
reader is src/syntax/bits.rs, Annex B input and the encoder side are left out,
indexing driven by the bitstream is checked, and film grain output, show
existing frames and the surface handling are reworked for this package's
VA-API session. It carries this notice:
Copyright 2022 The ChromiumOS Authors
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The SHA-256 in src/bin/pcod/sha256.rs is adapted from the sha2 crate 0.10.9
(https://github.com/RustCrypto/hashes, commit
82c36a428f8d6f05f3bfccdedb243e9d1f85359d) by the RustCrypto Developers,
dual-licensed MIT OR Apache-2.0; the MIT terms are taken here. From sha2: the
portable compression function with its four-lane message schedule, the x86-64
SHA-NI and AArch64 SHA2 compression functions and the round constants. The
streaming buffer, the padding and the runtime dispatch are new. It carries
this notice:
Copyright (c) 2006-2009 Graydon Hoare
Copyright (c) 2009-2013 Mozilla Foundation
Copyright (c) 2016 Artyom Pavlov
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
The progress line, the probe and manifest JSON shapes in src/bin/pcod/ are
adapted from pconv 1.0.1 (commit 8879614), MIT, by Cătălin Ilinca, the author
of pito-codecs.
The linear-light resize in src/filter/linear.rs follows zimg
(https://github.com/sekrit-twc/zimg, commit
67e0603271c080e22c8429856dd4a8a56587e61e) by sekrit-twc: the resampling filter
construction (pixel-centre positions, half-up rounding, mirrored edges, f32
coefficient error diffusion), the Lanczos weights and the BT.1886, BT.709 and
sRGB transfer functions with their constants. zimg is licensed under the Do What
The F*ck You Want To Public License, version 2 (Sam Hocevar, 2004), whose only
term is: "0. You just DO WHAT THE FUCK YOU WANT TO."; it is credited here.
The interleaved RGBA f32 convolution layout in src/filter/linear.rs (taps taken
in pairs across one 256-bit register, rows convolved over flat components) is
adapted from fast_image_resize 6.1.0
(https://github.com/Cykooz/fast_image_resize, commit
ce36aeb20ed4a33805baa3c0ff4caff7cf163e19), licensed MIT OR Apache-2.0; the MIT
terms are taken here:
MIT License
Copyright (c) 2021 Kirill Kuzminykh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The PITO MD wordmark in assets/marks/pitomd-wordmark.svg is copied by bin/marks
from the PITO MD brand masters at aa3aee8b232a1b848995bf3d9a012a01d4aff8ec
(exports/pitomd/readme/wordmark.svg). The PITO MD name and its logos are
© Catalin Ilinca, all rights reserved and not covered by the MIT licence
(TRADEMARKS.md).
The VP9 alpha layout in src/mkv/writer.rs and src/mkv/reader.rs (a BlockGroup
with BlockAdditions, BlockMore, BlockAddID 1 and BlockAdditional, written in
libwebm's element order, and AlphaMode and MaxBlockAdditionID on the track)
follows libwebm (libwebm-1.0.0.32,
https://chromium.googlesource.com/webm/libwebm), which carries this notice:
Copyright (c) 2010, Google Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Google nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Parts of this package are adapted from rav1d
(https://github.com/memorysafety/rav1d, commit 0c851fa046d6a36430570459283e5886fbdd8a66),
the Rust port of dav1d, used under the BSD-2-Clause License. Adapted module:
src/av1/cpu/ (the AV1 decoder: OBU parsing, entropy decoding, reconstruction,
loop filter, CDEF, loop restoration, film grain and frame and tile threading;
the assembly dispatch, C API and logging are dropped, the crate dependencies
are replaced by std code, and the frame front in src/av1/cpu/decoder.rs is new):
Copyright © 2018-2019, VideoLAN and dav1d authors
Copyright © 2023-2024, VideoLAN, dav1d authors, and Internet Security Research Group
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The Vorbis bit reader, Huffman codebook decode and header parsing in
src/vorbis/ are adapted from lewton (https://github.com/RustAudio/lewton,
commit bb2955b717094b40260902cf2f8dd9c5ea62a84a, 29 commits after 0.10.2),
dual-licensed MIT OR Apache-2.0; the MIT terms are taken here. From lewton:
the module layout (bitpacking, huffman_tree, header, header_cached), the
codebook tree with its 8-bit lookup table, the identification, comment and
setup header readers with their types and checks, the VQ lookup tables, the
float32 unpacking, and the window, twiddle, bit-reverse and bark-map tables
derived from the headers, with their unit test vectors; and the audio packet
decode (floor 0 and floor 1 curves, residues 0, 1 and 2, inverse coupling, the
fast inverse MDCT translated from stb_vorbis, windowing and overlap-add) with
its neighbour and render-point test values. Changed in this package: the bit
reader reads through a 128-bit window instead of per-width
macros, residue books read all eight cascade stages (lewton reads seven), the
floor 0 book list refuses an index equal to the codebook count, the lookup
table fills every slot of a short code, empty codebooks and out-of-range
indices return errors instead of panicking, the comment header checks lengths
before allocating, a setup header may ask for at most 2^20 codebook entries
and 2^22 VQ lookup values in all (more is refused before allocating), the
header types drop the floor 0 rate and bark map size and the mapping submap
count once checked (the decode never reads them), errors are the package's
own, the identification header reads one framing bit as libvorbis does, the
first audio packet returns the part of its block past the centre that no
overlap needs (lewton drops it), the audio decode returns errors where lewton
panics (missing neighbours, mismatched windows, codebooks
without a value mapping), floor 1 values are clamped to their range as they