@libmedia/avutil 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/cjs/audiosamplefmt.d.ts +122 -99
  2. package/dist/cjs/codecs/ac3.d.ts +1 -2
  3. package/dist/cjs/codecs/ac3.js.map +1 -1
  4. package/dist/cjs/codecs/av1.js +1 -1
  5. package/dist/cjs/codecs/av1.js.map +1 -1
  6. package/dist/cjs/codecs/h264.d.ts +4 -4
  7. package/dist/cjs/codecs/h264.js.map +1 -1
  8. package/dist/cjs/codecs/hevc.d.ts +4 -4
  9. package/dist/cjs/codecs/hevc.js.map +1 -1
  10. package/dist/cjs/codecs/vp9.js +1 -1
  11. package/dist/cjs/codecs/vp9.js.map +1 -1
  12. package/dist/cjs/codecs/vvc.d.ts +4 -4
  13. package/dist/cjs/codecs/vvc.js.map +1 -1
  14. package/dist/cjs/enum.d.ts +201 -182
  15. package/dist/cjs/enum.js +162 -122
  16. package/dist/cjs/enum.js.map +1 -1
  17. package/dist/cjs/function/audioData2AVFrame.js +1 -1
  18. package/dist/cjs/function/audioData2AVFrame.js.map +1 -1
  19. package/dist/cjs/function/avframe2AudioData.js +2 -1
  20. package/dist/cjs/function/avframe2AudioData.js.map +1 -1
  21. package/dist/cjs/function/avframe2VideoFrame.js +2 -2
  22. package/dist/cjs/function/avframe2VideoFrame.js.map +1 -1
  23. package/dist/cjs/function/encodedAudioChunk2AVPacket.js +1 -1
  24. package/dist/cjs/function/encodedAudioChunk2AVPacket.js.map +1 -1
  25. package/dist/cjs/function/encodedVideoChunk2AVPacket.js.map +1 -1
  26. package/dist/cjs/function/hasAlphaChannel.js +1 -1
  27. package/dist/cjs/function/hasAlphaChannel.js.map +1 -1
  28. package/dist/cjs/function/isHdr.js +1 -1
  29. package/dist/cjs/function/isHdr.js.map +1 -1
  30. package/dist/cjs/function/videoFrame2AVFrame.d.ts +1 -1
  31. package/dist/cjs/function/videoFrame2AVFrame.js +4 -4
  32. package/dist/cjs/function/videoFrame2AVFrame.js.map +1 -1
  33. package/dist/cjs/implement/AVFramePoolImpl.js +4 -5
  34. package/dist/cjs/implement/AVFramePoolImpl.js.map +1 -1
  35. package/dist/cjs/implement/AVPCMBufferPoolImpl.js +3 -4
  36. package/dist/cjs/implement/AVPCMBufferPoolImpl.js.map +1 -1
  37. package/dist/cjs/implement/AVPacketPoolImpl.js +3 -3
  38. package/dist/cjs/implement/AVPacketPoolImpl.js.map +1 -1
  39. package/dist/cjs/pixelFormatDescriptor.d.ts +3 -4
  40. package/dist/cjs/pixelFormatDescriptor.js +128 -1069
  41. package/dist/cjs/pixelFormatDescriptor.js.map +1 -1
  42. package/dist/cjs/pixfmt.d.ts +78 -82
  43. package/dist/cjs/stringEnum.d.ts +3 -2
  44. package/dist/cjs/stringEnum.js +40 -2
  45. package/dist/cjs/stringEnum.js.map +1 -1
  46. package/dist/cjs/util/avbuffer.js +2 -2
  47. package/dist/cjs/util/avbuffer.js.map +1 -1
  48. package/dist/cjs/util/avdict.js.map +1 -1
  49. package/dist/cjs/util/avframe.js +1 -1
  50. package/dist/cjs/util/avframe.js.map +1 -1
  51. package/dist/cjs/util/avpacket.js.map +1 -1
  52. package/dist/cjs/util/channel.d.ts +1 -1
  53. package/dist/cjs/util/channel.js +1 -1
  54. package/dist/cjs/util/channel.js.map +1 -1
  55. package/dist/cjs/util/codecparameters.js.map +1 -1
  56. package/dist/cjs/util/mem.d.ts +3 -3
  57. package/dist/cjs/util/mem.js.map +1 -1
  58. package/dist/cjs/util/pixel.js +5 -5
  59. package/dist/cjs/util/pixel.js.map +1 -1
  60. package/dist/cjs/util/sample.js.map +1 -1
  61. package/dist/cjs/util/serialize.js.map +1 -1
  62. package/dist/esm/audiosamplefmt.d.ts +122 -99
  63. package/dist/esm/codecs/ac3.d.ts +1 -2
  64. package/dist/esm/codecs/ac3.js.map +1 -1
  65. package/dist/esm/codecs/av1.js +2 -2
  66. package/dist/esm/codecs/av1.js.map +1 -1
  67. package/dist/esm/codecs/h264.d.ts +4 -4
  68. package/dist/esm/codecs/h264.js.map +1 -1
  69. package/dist/esm/codecs/hevc.d.ts +4 -4
  70. package/dist/esm/codecs/hevc.js.map +1 -1
  71. package/dist/esm/codecs/vp9.js +2 -2
  72. package/dist/esm/codecs/vp9.js.map +1 -1
  73. package/dist/esm/codecs/vvc.d.ts +4 -4
  74. package/dist/esm/codecs/vvc.js.map +1 -1
  75. package/dist/esm/enum.d.ts +201 -182
  76. package/dist/esm/enum.js +165 -126
  77. package/dist/esm/enum.js.map +1 -1
  78. package/dist/esm/function/audioData2AVFrame.js +2 -2
  79. package/dist/esm/function/audioData2AVFrame.js.map +1 -1
  80. package/dist/esm/function/avframe2AudioData.js +4 -4
  81. package/dist/esm/function/avframe2AudioData.js.map +1 -1
  82. package/dist/esm/function/avframe2VideoFrame.js +3 -3
  83. package/dist/esm/function/avframe2VideoFrame.js.map +1 -1
  84. package/dist/esm/function/encodedAudioChunk2AVPacket.js +1 -1
  85. package/dist/esm/function/encodedAudioChunk2AVPacket.js.map +1 -1
  86. package/dist/esm/function/encodedVideoChunk2AVPacket.js.map +1 -1
  87. package/dist/esm/function/hasAlphaChannel.js +2 -2
  88. package/dist/esm/function/hasAlphaChannel.js.map +1 -1
  89. package/dist/esm/function/isHdr.js +2 -2
  90. package/dist/esm/function/isHdr.js.map +1 -1
  91. package/dist/esm/function/videoFrame2AVFrame.d.ts +1 -1
  92. package/dist/esm/function/videoFrame2AVFrame.js +5 -5
  93. package/dist/esm/function/videoFrame2AVFrame.js.map +1 -1
  94. package/dist/esm/implement/AVFramePoolImpl.js +1 -3
  95. package/dist/esm/implement/AVFramePoolImpl.js.map +1 -1
  96. package/dist/esm/implement/AVPCMBufferPoolImpl.js +1 -3
  97. package/dist/esm/implement/AVPCMBufferPoolImpl.js.map +1 -1
  98. package/dist/esm/implement/AVPacketPoolImpl.js +1 -3
  99. package/dist/esm/implement/AVPacketPoolImpl.js.map +1 -1
  100. package/dist/esm/pixelFormatDescriptor.d.ts +3 -4
  101. package/dist/esm/pixelFormatDescriptor.js +128 -1069
  102. package/dist/esm/pixelFormatDescriptor.js.map +1 -1
  103. package/dist/esm/pixfmt.d.ts +78 -82
  104. package/dist/esm/stringEnum.d.ts +3 -2
  105. package/dist/esm/stringEnum.js +41 -1
  106. package/dist/esm/stringEnum.js.map +1 -1
  107. package/dist/esm/util/avbuffer.js +2 -2
  108. package/dist/esm/util/avbuffer.js.map +1 -1
  109. package/dist/esm/util/avdict.js.map +1 -1
  110. package/dist/esm/util/avframe.js +2 -2
  111. package/dist/esm/util/avframe.js.map +1 -1
  112. package/dist/esm/util/avpacket.js.map +1 -1
  113. package/dist/esm/util/channel.d.ts +1 -1
  114. package/dist/esm/util/channel.js +2 -2
  115. package/dist/esm/util/channel.js.map +1 -1
  116. package/dist/esm/util/codecparameters.js.map +1 -1
  117. package/dist/esm/util/mem.d.ts +3 -3
  118. package/dist/esm/util/mem.js.map +1 -1
  119. package/dist/esm/util/pixel.js +6 -6
  120. package/dist/esm/util/pixel.js.map +1 -1
  121. package/dist/esm/util/sample.js.map +1 -1
  122. package/dist/esm/util/serialize.js.map +1 -1
  123. package/package.json +3 -3
@@ -1,1071 +1,130 @@
1
- export const PixelFormatDescriptorsMap = {
2
- 0: {
3
- nbComponents: 3,
4
- log2ChromaW: 1,
5
- log2ChromaH: 1,
6
- flags: 16,
7
- comp: [ {
8
- plane: 0,
9
- step: 1,
10
- offset: 0,
11
- shift: 0,
12
- depth: 8
13
- }, {
14
- plane: 1,
15
- step: 1,
16
- offset: 0,
17
- shift: 0,
18
- depth: 8
19
- }, {
20
- plane: 2,
21
- step: 1,
22
- offset: 0,
23
- shift: 0,
24
- depth: 8
25
- } ]
26
- },
27
- 12: {
28
- nbComponents: 3,
29
- log2ChromaW: 1,
30
- log2ChromaH: 1,
31
- flags: 16,
32
- comp: [ {
33
- plane: 0,
34
- step: 1,
35
- offset: 0,
36
- shift: 0,
37
- depth: 8
38
- }, {
39
- plane: 1,
40
- step: 1,
41
- offset: 0,
42
- shift: 0,
43
- depth: 8
44
- }, {
45
- plane: 2,
46
- step: 1,
47
- offset: 0,
48
- shift: 0,
49
- depth: 8
50
- } ]
51
- },
52
- 4: {
53
- nbComponents: 3,
54
- log2ChromaW: 1,
55
- log2ChromaH: 0,
56
- flags: 16,
57
- comp: [ {
58
- plane: 0,
59
- step: 1,
60
- offset: 0,
61
- shift: 0,
62
- depth: 8
63
- }, {
64
- plane: 1,
65
- step: 1,
66
- offset: 0,
67
- shift: 0,
68
- depth: 8
69
- }, {
70
- plane: 2,
71
- step: 1,
72
- offset: 0,
73
- shift: 0,
74
- depth: 8
75
- } ]
76
- },
77
- 13: {
78
- nbComponents: 3,
79
- log2ChromaW: 1,
80
- log2ChromaH: 0,
81
- flags: 16,
82
- comp: [ {
83
- plane: 0,
84
- step: 1,
85
- offset: 0,
86
- shift: 0,
87
- depth: 8
88
- }, {
89
- plane: 1,
90
- step: 1,
91
- offset: 0,
92
- shift: 0,
93
- depth: 8
94
- }, {
95
- plane: 2,
96
- step: 1,
97
- offset: 0,
98
- shift: 0,
99
- depth: 8
100
- } ]
101
- },
102
- 5: {
103
- nbComponents: 3,
104
- log2ChromaW: 0,
105
- log2ChromaH: 0,
106
- flags: 16,
107
- comp: [ {
108
- plane: 0,
109
- step: 1,
110
- offset: 0,
111
- shift: 0,
112
- depth: 8
113
- }, {
114
- plane: 1,
115
- step: 1,
116
- offset: 0,
117
- shift: 0,
118
- depth: 8
119
- }, {
120
- plane: 2,
121
- step: 1,
122
- offset: 0,
123
- shift: 0,
124
- depth: 8
125
- } ]
126
- },
127
- 14: {
128
- nbComponents: 3,
129
- log2ChromaW: 0,
130
- log2ChromaH: 0,
131
- flags: 16,
132
- comp: [ {
133
- plane: 0,
134
- step: 1,
135
- offset: 0,
136
- shift: 0,
137
- depth: 8
138
- }, {
139
- plane: 1,
140
- step: 1,
141
- offset: 0,
142
- shift: 0,
143
- depth: 8
144
- }, {
145
- plane: 2,
146
- step: 1,
147
- offset: 0,
148
- shift: 0,
149
- depth: 8
150
- } ]
151
- },
152
- 23: {
153
- nbComponents: 3,
154
- log2ChromaW: 1,
155
- log2ChromaH: 1,
156
- flags: 16,
157
- comp: [ {
158
- plane: 0,
159
- step: 1,
160
- offset: 0,
161
- shift: 0,
162
- depth: 8
163
- }, {
164
- plane: 1,
165
- step: 2,
166
- offset: 0,
167
- shift: 0,
168
- depth: 8
169
- }, {
170
- plane: 1,
171
- step: 2,
172
- offset: 1,
173
- shift: 0,
174
- depth: 8
175
- } ]
176
- },
177
- 59: {
178
- nbComponents: 3,
179
- log2ChromaW: 1,
180
- log2ChromaH: 1,
181
- flags: 17,
182
- comp: [ {
183
- plane: 0,
184
- step: 1,
185
- offset: 0,
186
- shift: 0,
187
- depth: 9
188
- }, {
189
- plane: 1,
190
- step: 1,
191
- offset: 0,
192
- shift: 0,
193
- depth: 9
194
- }, {
195
- plane: 2,
196
- step: 1,
197
- offset: 0,
198
- shift: 0,
199
- depth: 9
200
- } ]
201
- },
202
- 60: {
203
- nbComponents: 3,
204
- log2ChromaW: 1,
205
- log2ChromaH: 1,
206
- flags: 16,
207
- comp: [ {
208
- plane: 0,
209
- step: 1,
210
- offset: 0,
211
- shift: 0,
212
- depth: 9
213
- }, {
214
- plane: 1,
215
- step: 1,
216
- offset: 0,
217
- shift: 0,
218
- depth: 9
219
- }, {
220
- plane: 2,
221
- step: 1,
222
- offset: 0,
223
- shift: 0,
224
- depth: 9
225
- } ]
226
- },
227
- 61: {
228
- nbComponents: 3,
229
- log2ChromaW: 1,
230
- log2ChromaH: 1,
231
- flags: 17,
232
- comp: [ {
233
- plane: 0,
234
- step: 1,
235
- offset: 0,
236
- shift: 0,
237
- depth: 10
238
- }, {
239
- plane: 1,
240
- step: 1,
241
- offset: 0,
242
- shift: 0,
243
- depth: 10
244
- }, {
245
- plane: 2,
246
- step: 1,
247
- offset: 0,
248
- shift: 0,
249
- depth: 10
250
- } ]
251
- },
252
- 62: {
253
- nbComponents: 3,
254
- log2ChromaW: 1,
255
- log2ChromaH: 1,
256
- flags: 16,
257
- comp: [ {
258
- plane: 0,
259
- step: 1,
260
- offset: 0,
261
- shift: 0,
262
- depth: 10
263
- }, {
264
- plane: 1,
265
- step: 1,
266
- offset: 0,
267
- shift: 0,
268
- depth: 10
269
- }, {
270
- plane: 2,
271
- step: 1,
272
- offset: 0,
273
- shift: 0,
274
- depth: 10
275
- } ]
276
- },
277
- 122: {
278
- nbComponents: 3,
279
- log2ChromaW: 1,
280
- log2ChromaH: 1,
281
- flags: 17,
282
- comp: [ {
283
- plane: 0,
284
- step: 1,
285
- offset: 0,
286
- shift: 0,
287
- depth: 12
288
- }, {
289
- plane: 1,
290
- step: 1,
291
- offset: 0,
292
- shift: 0,
293
- depth: 12
294
- }, {
295
- plane: 2,
296
- step: 1,
297
- offset: 0,
298
- shift: 0,
299
- depth: 12
300
- } ]
301
- },
302
- 123: {
303
- nbComponents: 3,
304
- log2ChromaW: 1,
305
- log2ChromaH: 1,
306
- flags: 16,
307
- comp: [ {
308
- plane: 0,
309
- step: 1,
310
- offset: 0,
311
- shift: 0,
312
- depth: 12
313
- }, {
314
- plane: 1,
315
- step: 1,
316
- offset: 0,
317
- shift: 0,
318
- depth: 12
319
- }, {
320
- plane: 2,
321
- step: 1,
322
- offset: 0,
323
- shift: 0,
324
- depth: 12
325
- } ]
326
- },
327
- 124: {
328
- nbComponents: 3,
329
- log2ChromaW: 1,
330
- log2ChromaH: 1,
331
- flags: 17,
332
- comp: [ {
333
- plane: 0,
334
- step: 1,
335
- offset: 0,
336
- shift: 0,
337
- depth: 14
338
- }, {
339
- plane: 1,
340
- step: 1,
341
- offset: 0,
342
- shift: 0,
343
- depth: 14
344
- }, {
345
- plane: 2,
346
- step: 1,
347
- offset: 0,
348
- shift: 0,
349
- depth: 14
350
- } ]
351
- },
352
- 125: {
353
- nbComponents: 3,
354
- log2ChromaW: 1,
355
- log2ChromaH: 1,
356
- flags: 16,
357
- comp: [ {
358
- plane: 0,
359
- step: 1,
360
- offset: 0,
361
- shift: 0,
362
- depth: 14
363
- }, {
364
- plane: 1,
365
- step: 1,
366
- offset: 0,
367
- shift: 0,
368
- depth: 14
369
- }, {
370
- plane: 2,
371
- step: 1,
372
- offset: 0,
373
- shift: 0,
374
- depth: 14
375
- } ]
376
- },
377
- 46: {
378
- nbComponents: 3,
379
- log2ChromaW: 1,
380
- log2ChromaH: 1,
381
- flags: 17,
382
- comp: [ {
383
- plane: 0,
384
- step: 1,
385
- offset: 0,
386
- shift: 0,
387
- depth: 16
388
- }, {
389
- plane: 1,
390
- step: 1,
391
- offset: 0,
392
- shift: 0,
393
- depth: 16
394
- }, {
395
- plane: 2,
396
- step: 1,
397
- offset: 0,
398
- shift: 0,
399
- depth: 16
400
- } ]
401
- },
402
- 45: {
403
- nbComponents: 3,
404
- log2ChromaW: 1,
405
- log2ChromaH: 1,
406
- flags: 16,
407
- comp: [ {
408
- plane: 0,
409
- step: 1,
410
- offset: 0,
411
- shift: 0,
412
- depth: 16
413
- }, {
414
- plane: 1,
415
- step: 1,
416
- offset: 0,
417
- shift: 0,
418
- depth: 16
419
- }, {
420
- plane: 2,
421
- step: 1,
422
- offset: 0,
423
- shift: 0,
424
- depth: 16
425
- } ]
426
- },
427
- 69: {
428
- nbComponents: 3,
429
- log2ChromaW: 1,
430
- log2ChromaH: 0,
431
- flags: 17,
432
- comp: [ {
433
- plane: 0,
434
- step: 1,
435
- offset: 0,
436
- shift: 0,
437
- depth: 9
438
- }, {
439
- plane: 1,
440
- step: 1,
441
- offset: 0,
442
- shift: 0,
443
- depth: 9
444
- }, {
445
- plane: 2,
446
- step: 1,
447
- offset: 0,
448
- shift: 0,
449
- depth: 9
450
- } ]
451
- },
452
- 70: {
453
- nbComponents: 3,
454
- log2ChromaW: 1,
455
- log2ChromaH: 0,
456
- flags: 16,
457
- comp: [ {
458
- plane: 0,
459
- step: 1,
460
- offset: 0,
461
- shift: 0,
462
- depth: 9
463
- }, {
464
- plane: 1,
465
- step: 1,
466
- offset: 0,
467
- shift: 0,
468
- depth: 9
469
- }, {
470
- plane: 2,
471
- step: 1,
472
- offset: 0,
473
- shift: 0,
474
- depth: 9
475
- } ]
476
- },
477
- 63: {
478
- nbComponents: 3,
479
- log2ChromaW: 1,
480
- log2ChromaH: 0,
481
- flags: 17,
482
- comp: [ {
483
- plane: 0,
484
- step: 1,
485
- offset: 0,
486
- shift: 0,
487
- depth: 10
488
- }, {
489
- plane: 1,
490
- step: 1,
491
- offset: 0,
492
- shift: 0,
493
- depth: 10
494
- }, {
495
- plane: 2,
496
- step: 1,
497
- offset: 0,
498
- shift: 0,
499
- depth: 10
500
- } ]
501
- },
502
- 64: {
503
- nbComponents: 3,
504
- log2ChromaW: 1,
505
- log2ChromaH: 0,
506
- flags: 16,
507
- comp: [ {
508
- plane: 0,
509
- step: 1,
510
- offset: 0,
511
- shift: 0,
512
- depth: 10
513
- }, {
514
- plane: 1,
515
- step: 1,
516
- offset: 0,
517
- shift: 0,
518
- depth: 10
519
- }, {
520
- plane: 2,
521
- step: 1,
522
- offset: 0,
523
- shift: 0,
524
- depth: 10
525
- } ]
526
- },
527
- 126: {
528
- nbComponents: 3,
529
- log2ChromaW: 1,
530
- log2ChromaH: 0,
531
- flags: 17,
532
- comp: [ {
533
- plane: 0,
534
- step: 1,
535
- offset: 0,
536
- shift: 0,
537
- depth: 12
538
- }, {
539
- plane: 1,
540
- step: 1,
541
- offset: 0,
542
- shift: 0,
543
- depth: 12
544
- }, {
545
- plane: 2,
546
- step: 1,
547
- offset: 0,
548
- shift: 0,
549
- depth: 12
550
- } ]
551
- },
552
- 127: {
553
- nbComponents: 3,
554
- log2ChromaW: 1,
555
- log2ChromaH: 0,
556
- flags: 16,
557
- comp: [ {
558
- plane: 0,
559
- step: 1,
560
- offset: 0,
561
- shift: 0,
562
- depth: 12
563
- }, {
564
- plane: 1,
565
- step: 1,
566
- offset: 0,
567
- shift: 0,
568
- depth: 12
569
- }, {
570
- plane: 2,
571
- step: 1,
572
- offset: 0,
573
- shift: 0,
574
- depth: 12
575
- } ]
576
- },
577
- 128: {
578
- nbComponents: 3,
579
- log2ChromaW: 1,
580
- log2ChromaH: 0,
581
- flags: 17,
582
- comp: [ {
583
- plane: 0,
584
- step: 1,
585
- offset: 0,
586
- shift: 0,
587
- depth: 14
588
- }, {
589
- plane: 1,
590
- step: 1,
591
- offset: 0,
592
- shift: 0,
593
- depth: 14
594
- }, {
595
- plane: 2,
596
- step: 1,
597
- offset: 0,
598
- shift: 0,
599
- depth: 14
600
- } ]
601
- },
602
- 129: {
603
- nbComponents: 3,
604
- log2ChromaW: 1,
605
- log2ChromaH: 0,
606
- flags: 16,
607
- comp: [ {
608
- plane: 0,
609
- step: 1,
610
- offset: 0,
611
- shift: 0,
612
- depth: 14
613
- }, {
614
- plane: 1,
615
- step: 1,
616
- offset: 0,
617
- shift: 0,
618
- depth: 14
619
- }, {
620
- plane: 2,
621
- step: 1,
622
- offset: 0,
623
- shift: 0,
624
- depth: 14
625
- } ]
626
- },
627
- 48: {
628
- nbComponents: 3,
629
- log2ChromaW: 1,
630
- log2ChromaH: 0,
631
- flags: 17,
632
- comp: [ {
633
- plane: 0,
634
- step: 1,
635
- offset: 0,
636
- shift: 0,
637
- depth: 16
638
- }, {
639
- plane: 1,
640
- step: 1,
641
- offset: 0,
642
- shift: 0,
643
- depth: 16
644
- }, {
645
- plane: 2,
646
- step: 1,
647
- offset: 0,
648
- shift: 0,
649
- depth: 16
650
- } ]
651
- },
652
- 47: {
653
- nbComponents: 3,
654
- log2ChromaW: 1,
655
- log2ChromaH: 0,
656
- flags: 16,
657
- comp: [ {
658
- plane: 0,
659
- step: 1,
660
- offset: 0,
661
- shift: 0,
662
- depth: 16
663
- }, {
664
- plane: 1,
665
- step: 1,
666
- offset: 0,
667
- shift: 0,
668
- depth: 16
669
- }, {
670
- plane: 2,
671
- step: 1,
672
- offset: 0,
673
- shift: 0,
674
- depth: 16
675
- } ]
676
- },
677
- 65: {
678
- nbComponents: 3,
679
- log2ChromaW: 0,
680
- log2ChromaH: 0,
681
- flags: 17,
682
- comp: [ {
683
- plane: 0,
684
- step: 1,
685
- offset: 0,
686
- shift: 0,
687
- depth: 9
688
- }, {
689
- plane: 1,
690
- step: 1,
691
- offset: 0,
692
- shift: 0,
693
- depth: 9
694
- }, {
695
- plane: 2,
696
- step: 1,
697
- offset: 0,
698
- shift: 0,
699
- depth: 9
700
- } ]
701
- },
702
- 66: {
703
- nbComponents: 3,
704
- log2ChromaW: 0,
705
- log2ChromaH: 0,
706
- flags: 16,
707
- comp: [ {
708
- plane: 0,
709
- step: 1,
710
- offset: 0,
711
- shift: 0,
712
- depth: 9
713
- }, {
714
- plane: 1,
715
- step: 1,
716
- offset: 0,
717
- shift: 0,
718
- depth: 9
719
- }, {
720
- plane: 2,
721
- step: 1,
722
- offset: 0,
723
- shift: 0,
724
- depth: 9
725
- } ]
726
- },
727
- 67: {
728
- nbComponents: 3,
729
- log2ChromaW: 0,
730
- log2ChromaH: 0,
731
- flags: 17,
732
- comp: [ {
733
- plane: 0,
734
- step: 1,
735
- offset: 0,
736
- shift: 0,
737
- depth: 10
738
- }, {
739
- plane: 1,
740
- step: 1,
741
- offset: 0,
742
- shift: 0,
743
- depth: 10
744
- }, {
745
- plane: 2,
746
- step: 1,
747
- offset: 0,
748
- shift: 0,
749
- depth: 10
750
- } ]
751
- },
752
- 68: {
753
- nbComponents: 3,
754
- log2ChromaW: 0,
755
- log2ChromaH: 0,
756
- flags: 16,
757
- comp: [ {
758
- plane: 0,
759
- step: 1,
760
- offset: 0,
761
- shift: 0,
762
- depth: 10
763
- }, {
764
- plane: 1,
765
- step: 1,
766
- offset: 0,
767
- shift: 0,
768
- depth: 10
769
- }, {
770
- plane: 2,
771
- step: 1,
772
- offset: 0,
773
- shift: 0,
774
- depth: 10
775
- } ]
776
- },
777
- 130: {
778
- nbComponents: 3,
779
- log2ChromaW: 0,
780
- log2ChromaH: 0,
781
- flags: 17,
782
- comp: [ {
783
- plane: 0,
784
- step: 1,
785
- offset: 0,
786
- shift: 0,
787
- depth: 12
788
- }, {
789
- plane: 1,
790
- step: 1,
791
- offset: 0,
792
- shift: 0,
793
- depth: 12
794
- }, {
795
- plane: 2,
796
- step: 1,
797
- offset: 0,
798
- shift: 0,
799
- depth: 12
800
- } ]
801
- },
802
- 131: {
803
- nbComponents: 3,
804
- log2ChromaW: 0,
805
- log2ChromaH: 0,
806
- flags: 16,
807
- comp: [ {
808
- plane: 0,
809
- step: 1,
810
- offset: 0,
811
- shift: 0,
812
- depth: 12
813
- }, {
814
- plane: 1,
815
- step: 1,
816
- offset: 0,
817
- shift: 0,
818
- depth: 12
819
- }, {
820
- plane: 2,
821
- step: 1,
822
- offset: 0,
823
- shift: 0,
824
- depth: 12
825
- } ]
826
- },
827
- 132: {
828
- nbComponents: 3,
829
- log2ChromaW: 0,
830
- log2ChromaH: 0,
831
- flags: 17,
832
- comp: [ {
833
- plane: 0,
834
- step: 1,
835
- offset: 0,
836
- shift: 0,
837
- depth: 14
838
- }, {
839
- plane: 1,
840
- step: 1,
841
- offset: 0,
842
- shift: 0,
843
- depth: 14
844
- }, {
845
- plane: 2,
846
- step: 1,
847
- offset: 0,
848
- shift: 0,
849
- depth: 14
850
- } ]
851
- },
852
- 133: {
853
- nbComponents: 3,
854
- log2ChromaW: 0,
855
- log2ChromaH: 0,
856
- flags: 16,
857
- comp: [ {
858
- plane: 0,
859
- step: 1,
860
- offset: 0,
861
- shift: 0,
862
- depth: 14
863
- }, {
864
- plane: 1,
865
- step: 1,
866
- offset: 0,
867
- shift: 0,
868
- depth: 14
869
- }, {
870
- plane: 2,
871
- step: 1,
872
- offset: 0,
873
- shift: 0,
874
- depth: 14
875
- } ]
876
- },
877
- 50: {
878
- nbComponents: 3,
879
- log2ChromaW: 0,
880
- log2ChromaH: 0,
881
- flags: 17,
882
- comp: [ {
883
- plane: 0,
884
- step: 1,
885
- offset: 0,
886
- shift: 0,
887
- depth: 16
888
- }, {
889
- plane: 1,
890
- step: 1,
891
- offset: 0,
892
- shift: 0,
893
- depth: 16
894
- }, {
895
- plane: 2,
896
- step: 1,
897
- offset: 0,
898
- shift: 0,
899
- depth: 16
900
- } ]
901
- },
902
- 49: {
903
- nbComponents: 3,
904
- log2ChromaW: 0,
905
- log2ChromaH: 0,
906
- flags: 16,
907
- comp: [ {
908
- plane: 0,
909
- step: 1,
910
- offset: 0,
911
- shift: 0,
912
- depth: 16
913
- }, {
914
- plane: 1,
915
- step: 1,
916
- offset: 0,
917
- shift: 0,
918
- depth: 16
919
- }, {
920
- plane: 2,
921
- step: 1,
922
- offset: 0,
923
- shift: 0,
924
- depth: 16
925
- } ]
926
- },
927
- 26: {
928
- nbComponents: 4,
929
- log2ChromaW: 0,
930
- log2ChromaH: 0,
931
- flags: 160,
932
- comp: [ {
933
- plane: 0,
934
- step: 4,
935
- offset: 0,
936
- shift: 0,
937
- depth: 8
938
- }, {
939
- plane: 0,
940
- step: 4,
941
- offset: 1,
942
- shift: 0,
943
- depth: 8
944
- }, {
945
- plane: 0,
946
- step: 4,
947
- offset: 2,
948
- shift: 0,
949
- depth: 8
950
- }, {
951
- plane: 0,
952
- step: 4,
953
- offset: 3,
954
- shift: 0,
955
- depth: 8
956
- } ]
957
- },
958
- 119: {
959
- nbComponents: 3,
960
- log2ChromaW: 0,
961
- log2ChromaH: 0,
962
- flags: 32,
963
- comp: [ {
964
- plane: 0,
965
- step: 4,
966
- offset: 0,
967
- shift: 0,
968
- depth: 8
969
- }, {
970
- plane: 0,
971
- step: 4,
972
- offset: 1,
973
- shift: 0,
974
- depth: 8
975
- }, {
976
- plane: 0,
977
- step: 4,
978
- offset: 2,
979
- shift: 0,
980
- depth: 8
981
- } ]
982
- },
983
- 28: {
984
- nbComponents: 4,
985
- log2ChromaW: 0,
986
- log2ChromaH: 0,
987
- flags: 160,
988
- comp: [ {
989
- plane: 0,
990
- step: 4,
991
- offset: 2,
992
- shift: 0,
993
- depth: 8
994
- }, {
995
- plane: 0,
996
- step: 4,
997
- offset: 1,
998
- shift: 0,
999
- depth: 8
1000
- }, {
1001
- plane: 0,
1002
- step: 4,
1003
- offset: 0,
1004
- shift: 0,
1005
- depth: 8
1006
- }, {
1007
- plane: 0,
1008
- step: 4,
1009
- offset: 3,
1010
- shift: 0,
1011
- depth: 8
1012
- } ]
1013
- },
1014
- 121: {
1015
- nbComponents: 3,
1016
- log2ChromaW: 0,
1017
- log2ChromaH: 0,
1018
- flags: 32,
1019
- comp: [ {
1020
- plane: 0,
1021
- step: 4,
1022
- offset: 2,
1023
- shift: 0,
1024
- depth: 8
1025
- }, {
1026
- plane: 0,
1027
- step: 4,
1028
- offset: 1,
1029
- shift: 0,
1030
- depth: 8
1031
- }, {
1032
- plane: 0,
1033
- step: 4,
1034
- offset: 0,
1035
- shift: 0,
1036
- depth: 8
1037
- } ]
1038
- },
1039
- 33: {
1040
- nbComponents: 4,
1041
- log2ChromaW: 1,
1042
- log2ChromaH: 1,
1043
- flags: 144,
1044
- comp: [ {
1045
- plane: 0,
1046
- step: 1,
1047
- offset: 0,
1048
- shift: 0,
1049
- depth: 8
1050
- }, {
1051
- plane: 1,
1052
- step: 1,
1053
- offset: 0,
1054
- shift: 0,
1055
- depth: 8
1056
- }, {
1057
- plane: 2,
1058
- step: 1,
1059
- offset: 0,
1060
- shift: 0,
1061
- depth: 8
1062
- }, {
1063
- plane: 3,
1064
- step: 1,
1065
- offset: 0,
1066
- shift: 0,
1067
- depth: 8
1068
- } ]
1069
- }
1
+ const cache = new Map;
2
+
3
+ export function getAVPixelFormatDescriptor(format) {
4
+ if (cache.has(format)) return cache.get(format);
5
+ const data = AVPixelFormatDescriptorsData[format];
6
+ if (!data) return;
7
+ const descriptor = {
8
+ log2ChromaW: data[0],
9
+ log2ChromaH: data[1],
10
+ flags: data[2],
11
+ comp: data[3].map((com => ({
12
+ plane: com[0],
13
+ step: com[1],
14
+ offset: com[2],
15
+ shift: com[3],
16
+ depth: com[4]
17
+ })))
18
+ };
19
+ return cache.set(format, descriptor), descriptor;
20
+ }
21
+
22
+ const PlaneYUV8 = [ [ 0, 1, 0, 0, 8 ], [ 1, 1, 0, 0, 8 ], [ 2, 1, 0, 0, 8 ] ], PlaneYUVA8 = [ ...PlaneYUV8, [ 3, 1, 0, 0, 8 ] ], PlaneYUV9 = [ [ 0, 2, 0, 0, 9 ], [ 1, 2, 0, 0, 9 ], [ 2, 2, 0, 0, 9 ] ], PlaneYUVA9 = [ ...PlaneYUV9, [ 3, 2, 0, 0, 9 ] ], PlaneYUV10 = [ [ 0, 2, 0, 0, 10 ], [ 1, 2, 0, 0, 10 ], [ 2, 2, 0, 0, 10 ] ], PlaneYUVA10 = [ ...PlaneYUV10, [ 3, 2, 0, 0, 10 ] ], PlaneYUV12 = [ [ 0, 2, 0, 0, 12 ], [ 1, 2, 0, 0, 12 ], [ 2, 2, 0, 0, 12 ] ], PlaneYUVA12 = [ ...PlaneYUV12, [ 3, 2, 0, 0, 12 ] ], PlaneYUV14 = [ [ 0, 2, 0, 0, 14 ], [ 1, 2, 0, 0, 14 ], [ 2, 2, 0, 0, 14 ] ], PlaneYUV16 = [ [ 0, 2, 0, 0, 16 ], [ 1, 2, 0, 0, 16 ], [ 2, 2, 0, 0, 16 ] ], PlaneYUVA16 = [ ...PlaneYUV16, [ 3, 2, 0, 0, 16 ] ], PlaneNV12 = [ [ 0, 1, 0, 0, 8 ], [ 1, 2, 0, 0, 8 ], [ 1, 2, 1, 0, 8 ] ], PlaneNV21 = [ [ 0, 1, 0, 0, 8 ], [ 1, 2, 1, 0, 8 ], [ 1, 2, 0, 0, 8 ] ], PlaneAYUV16 = [ [ 0, 8, 2, 0, 16 ], [ 0, 8, 4, 0, 16 ], [ 0, 8, 6, 0, 16 ], [ 0, 8, 0, 0, 16 ] ], PlaneP010 = [ [ 0, 2, 0, 6, 10 ], [ 1, 4, 0, 6, 10 ], [ 1, 4, 2, 6, 10 ] ], PlaneP012 = [ [ 0, 2, 0, 4, 12 ], [ 1, 4, 0, 4, 12 ], [ 1, 4, 2, 4, 12 ] ], PlaneP016 = [ [ 0, 2, 0, 0, 16 ], [ 1, 4, 0, 0, 16 ], [ 1, 4, 2, 0, 16 ] ], PlaneRGBA16 = [ [ 0, 8, 0, 0, 16 ], [ 0, 8, 2, 0, 16 ], [ 0, 8, 4, 0, 16 ], [ 0, 8, 6, 0, 16 ] ], PlaneBGRA16 = [ [ 0, 8, 4, 0, 16 ], [ 0, 8, 2, 0, 16 ], [ 0, 8, 0, 0, 16 ], [ 0, 8, 6, 0, 16 ] ], PlaneBGRP9 = [ [ 2, 2, 0, 0, 9 ], [ 0, 2, 0, 0, 9 ], [ 1, 2, 0, 0, 9 ] ], PlaneBGRP10 = [ [ 2, 2, 0, 0, 10 ], [ 0, 2, 0, 0, 10 ], [ 1, 2, 0, 0, 10 ] ], PlaneBGRP12 = [ [ 2, 2, 0, 0, 12 ], [ 0, 2, 0, 0, 12 ], [ 1, 2, 0, 0, 12 ] ], PlaneBGRP14 = [ [ 2, 2, 0, 0, 14 ], [ 0, 2, 0, 0, 14 ], [ 1, 2, 0, 0, 14 ] ], PlaneBGRP16 = [ [ 2, 2, 0, 0, 16 ], [ 0, 2, 0, 0, 16 ], [ 1, 2, 0, 0, 16 ] ], PlaneBGRAP16 = [ [ 2, 2, 0, 0, 16 ], [ 0, 2, 0, 0, 16 ], [ 1, 2, 0, 0, 16 ], [ 3, 2, 0, 0, 16 ] ], AVPixelFormatDescriptorsData = {
23
+ 6: [ 2, 2, 16, PlaneYUV8 ],
24
+ 0: [ 1, 1, 16, PlaneYUV8 ],
25
+ 12: [ 1, 1, 16, PlaneYUV8 ],
26
+ 4: [ 1, 0, 16, PlaneYUV8 ],
27
+ 13: [ 1, 0, 16, PlaneYUV8 ],
28
+ 5: [ 0, 0, 16, PlaneYUV8 ],
29
+ 14: [ 0, 0, 16, PlaneYUV8 ],
30
+ 23: [ 1, 1, 16, PlaneNV12 ],
31
+ 24: [ 1, 1, 16, PlaneNV21 ],
32
+ 188: [ 0, 0, 16, PlaneNV12 ],
33
+ 189: [ 0, 0, 16, PlaneNV21 ],
34
+ 59: [ 1, 1, 17, PlaneYUV9 ],
35
+ 60: [ 1, 1, 16, PlaneYUV9 ],
36
+ 69: [ 1, 0, 17, PlaneYUV9 ],
37
+ 70: [ 1, 0, 16, PlaneYUV9 ],
38
+ 65: [ 0, 0, 17, PlaneYUV9 ],
39
+ 66: [ 0, 0, 16, PlaneYUV9 ],
40
+ 61: [ 1, 1, 17, PlaneYUV10 ],
41
+ 62: [ 1, 1, 16, PlaneYUV10 ],
42
+ 63: [ 1, 0, 17, PlaneYUV10 ],
43
+ 64: [ 1, 0, 16, PlaneYUV10 ],
44
+ 67: [ 0, 0, 17, PlaneYUV10 ],
45
+ 68: [ 0, 0, 16, PlaneYUV10 ],
46
+ 122: [ 1, 1, 17, PlaneYUV12 ],
47
+ 123: [ 1, 1, 16, PlaneYUV12 ],
48
+ 126: [ 1, 0, 17, PlaneYUV12 ],
49
+ 127: [ 1, 0, 16, PlaneYUV12 ],
50
+ 130: [ 0, 0, 17, PlaneYUV12 ],
51
+ 131: [ 0, 0, 16, PlaneYUV12 ],
52
+ 124: [ 1, 1, 17, PlaneYUV14 ],
53
+ 125: [ 1, 1, 16, PlaneYUV14 ],
54
+ 128: [ 1, 0, 17, PlaneYUV14 ],
55
+ 129: [ 1, 0, 16, PlaneYUV14 ],
56
+ 132: [ 0, 0, 17, PlaneYUV14 ],
57
+ 133: [ 0, 0, 16, PlaneYUV14 ],
58
+ 46: [ 1, 1, 17, PlaneYUV16 ],
59
+ 45: [ 1, 1, 16, PlaneYUV16 ],
60
+ 48: [ 1, 0, 17, PlaneYUV16 ],
61
+ 47: [ 1, 0, 16, PlaneYUV16 ],
62
+ 50: [ 0, 0, 17, PlaneYUV16 ],
63
+ 49: [ 0, 0, 16, PlaneYUV16 ],
64
+ 33: [ 1, 1, 144, PlaneYUVA8 ],
65
+ 78: [ 1, 0, 144, PlaneYUVA8 ],
66
+ 79: [ 0, 0, 144, PlaneYUVA8 ],
67
+ 80: [ 1, 1, 145, PlaneYUVA9 ],
68
+ 81: [ 1, 1, 144, PlaneYUVA9 ],
69
+ 82: [ 1, 0, 145, PlaneYUVA9 ],
70
+ 83: [ 1, 0, 144, PlaneYUVA9 ],
71
+ 84: [ 0, 0, 145, PlaneYUVA9 ],
72
+ 85: [ 0, 0, 144, PlaneYUVA9 ],
73
+ 86: [ 1, 1, 145, PlaneYUVA10 ],
74
+ 87: [ 1, 1, 144, PlaneYUVA10 ],
75
+ 88: [ 1, 0, 145, PlaneYUVA10 ],
76
+ 89: [ 1, 0, 144, PlaneYUVA10 ],
77
+ 90: [ 0, 0, 145, PlaneYUVA10 ],
78
+ 91: [ 0, 0, 144, PlaneYUVA10 ],
79
+ 184: [ 1, 0, 145, PlaneYUVA12 ],
80
+ 185: [ 1, 0, 144, PlaneYUVA12 ],
81
+ 186: [ 0, 0, 145, PlaneYUVA12 ],
82
+ 187: [ 0, 0, 144, PlaneYUVA12 ],
83
+ 92: [ 1, 1, 145, PlaneYUVA16 ],
84
+ 93: [ 1, 1, 144, PlaneYUVA16 ],
85
+ 94: [ 1, 0, 145, PlaneYUVA16 ],
86
+ 95: [ 1, 0, 144, PlaneYUVA16 ],
87
+ 96: [ 0, 0, 145, PlaneYUVA16 ],
88
+ 97: [ 0, 0, 144, PlaneYUVA16 ],
89
+ 156: [ 0, 0, 129, PlaneAYUV16 ],
90
+ 155: [ 0, 0, 128, PlaneAYUV16 ],
91
+ 159: [ 1, 1, 17, PlaneP010 ],
92
+ 158: [ 1, 1, 16, PlaneP010 ],
93
+ 210: [ 1, 1, 17, PlaneP012 ],
94
+ 209: [ 1, 1, 16, PlaneP012 ],
95
+ 170: [ 1, 1, 17, PlaneP016 ],
96
+ 169: [ 1, 1, 16, PlaneP016 ],
97
+ 8: [ 0, 0, 0, [ [ 0, 1, 0, 0, 8 ] ] ],
98
+ 29: [ 0, 0, 1, [ [ 0, 2, 0, 0, 16 ] ] ],
99
+ 30: [ 0, 0, 0, [ [ 0, 2, 0, 0, 16 ] ] ],
100
+ 56: [ 0, 0, 128, [ [ 0, 2, 0, 0, 8 ], [ 0, 2, 1, 0, 8 ] ] ],
101
+ 109: [ 0, 0, 129, [ [ 0, 4, 0, 0, 16 ], [ 0, 4, 2, 0, 16 ] ] ],
102
+ 110: [ 0, 0, 128, [ [ 0, 4, 0, 0, 16 ], [ 0, 4, 2, 0, 16 ] ] ],
103
+ 26: [ 0, 0, 160, [ [ 0, 4, 0, 0, 8 ], [ 0, 4, 1, 0, 8 ], [ 0, 4, 2, 0, 8 ], [ 0, 4, 3, 0, 8 ] ] ],
104
+ 25: [ 0, 0, 160, [ [ 0, 4, 1, 0, 8 ], [ 0, 4, 2, 0, 8 ], [ 0, 4, 3, 0, 8 ], [ 0, 4, 0, 0, 8 ] ] ],
105
+ 104: [ 0, 0, 161, PlaneRGBA16 ],
106
+ 105: [ 0, 0, 160, PlaneRGBA16 ],
107
+ 28: [ 0, 0, 160, [ [ 0, 4, 2, 0, 8 ], [ 0, 4, 1, 0, 8 ], [ 0, 4, 0, 0, 8 ], [ 0, 4, 3, 0, 8 ] ] ],
108
+ 27: [ 0, 0, 160, [ [ 0, 4, 3, 0, 8 ], [ 0, 4, 2, 0, 8 ], [ 0, 4, 1, 0, 8 ], [ 0, 4, 0, 0, 8 ] ] ],
109
+ 106: [ 0, 0, 161, PlaneBGRA16 ],
110
+ 107: [ 0, 0, 160, PlaneBGRA16 ],
111
+ 2: [ 0, 0, 32, [ [ 0, 3, 0, 0, 8 ], [ 0, 3, 1, 0, 8 ], [ 0, 3, 2, 0, 8 ] ] ],
112
+ 3: [ 0, 0, 32, [ [ 0, 3, 2, 0, 8 ], [ 0, 3, 1, 0, 8 ], [ 0, 3, 0, 0, 8 ] ] ],
113
+ 119: [ 0, 0, 32, [ [ 0, 4, 0, 0, 8 ], [ 0, 4, 1, 0, 8 ], [ 0, 4, 2, 0, 8 ] ] ],
114
+ 121: [ 0, 0, 32, [ [ 0, 4, 2, 0, 8 ], [ 0, 4, 1, 0, 8 ], [ 0, 4, 0, 0, 8 ] ] ],
115
+ 71: [ 0, 0, 48, [ [ 2, 1, 0, 0, 8 ], [ 0, 1, 0, 0, 8 ], [ 1, 1, 0, 0, 8 ] ] ],
116
+ 111: [ 0, 0, 176, [ [ 2, 1, 0, 0, 8 ], [ 0, 1, 0, 0, 8 ], [ 1, 1, 0, 0, 8 ], [ 3, 1, 0, 0, 8 ] ] ],
117
+ 72: [ 0, 0, 49, PlaneBGRP9 ],
118
+ 73: [ 0, 0, 48, PlaneBGRP9 ],
119
+ 74: [ 0, 0, 49, PlaneBGRP10 ],
120
+ 75: [ 0, 0, 48, PlaneBGRP10 ],
121
+ 134: [ 0, 0, 49, PlaneBGRP12 ],
122
+ 135: [ 0, 0, 48, PlaneBGRP12 ],
123
+ 136: [ 0, 0, 49, PlaneBGRP14 ],
124
+ 137: [ 0, 0, 48, PlaneBGRP14 ],
125
+ 76: [ 0, 0, 49, PlaneBGRP16 ],
126
+ 77: [ 0, 0, 48, PlaneBGRP16 ],
127
+ 112: [ 0, 0, 177, PlaneBGRAP16 ],
128
+ 113: [ 0, 0, 176, PlaneBGRAP16 ]
1070
129
  };
1071
130
  //# sourceMappingURL=pixelFormatDescriptor.js.map