This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpixel_format.go
executable file
·589 lines (585 loc) · 21.5 KB
/
pixel_format.go
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
// Code generated by go generate; DO NOT EDIT.
// This code was generated by robots at
// 2017-11-28 11:51:44.525706288 +1100 AEDT m=+0.041348982
package ffmpeg
type PixelFormat int
const (
PixelFormatYuv420P PixelFormat = iota // 3 12
PixelFormatYuyv422 // 3 16
PixelFormatRgb24 // 3 24
PixelFormatBgr24 // 3 24
PixelFormatYuv422P // 3 16
PixelFormatYuv444P // 3 24
PixelFormatYuv410P // 3 9
PixelFormatYuv411P // 3 12
PixelFormatGray // 1 8
PixelFormatMonow // 1 1
PixelFormatMonob // 1 1
PixelFormatPal8 // 1 8
PixelFormatYuvj420P // 3 12
PixelFormatYuvj422P // 3 16
PixelFormatYuvj444P // 3 24
PixelFormatXvmcmc // 0 0
PixelFormatXvmcidct // 0 0
PixelFormatUyvy422 // 3 16
PixelFormatUyyvyy411 // 3 12
PixelFormatBgr8 // 3 8
PixelFormatBgr4 // 3 4
PixelFormatBgr4Byte // 3 4
PixelFormatRgb8 // 3 8
PixelFormatRgb4 // 3 4
PixelFormatRgb4Byte // 3 4
PixelFormatNv12 // 3 12
PixelFormatNv21 // 3 12
PixelFormatArgb // 4 32
PixelFormatRgba // 4 32
PixelFormatAbgr // 4 32
PixelFormatBgra // 4 32
PixelFormatGray16Be // 1 16
PixelFormatGray16Le // 1 16
PixelFormatYuv440P // 3 16
PixelFormatYuvj440P // 3 16
PixelFormatYuva420P // 4 20
PixelFormatVdpauH264 // 0 0
PixelFormatVdpauMpeg1 // 0 0
PixelFormatVdpauMpeg2 // 0 0
PixelFormatVdpauWmv3 // 0 0
PixelFormatVdpauVc1 // 0 0
PixelFormatRgb48Be // 3 48
PixelFormatRgb48Le // 3 48
PixelFormatRgb565Be // 3 16
PixelFormatRgb565Le // 3 16
PixelFormatRgb555Be // 3 15
PixelFormatRgb555Le // 3 15
PixelFormatBgr565Be // 3 16
PixelFormatBgr565Le // 3 16
PixelFormatBgr555Be // 3 15
PixelFormatBgr555Le // 3 15
PixelFormatVaapiMoco // 0 0
PixelFormatVaapiIdct // 0 0
PixelFormatVaapiVld // 0 0
PixelFormatYuv420P16Le // 3 24
PixelFormatYuv420P16Be // 3 24
PixelFormatYuv422P16Le // 3 32
PixelFormatYuv422P16Be // 3 32
PixelFormatYuv444P16Le // 3 48
PixelFormatYuv444P16Be // 3 48
PixelFormatVdpauMpeg4 // 0 0
PixelFormatDxva2Vld // 0 0
PixelFormatRgb444Le // 3 12
PixelFormatRgb444Be // 3 12
PixelFormatBgr444Le // 3 12
PixelFormatBgr444Be // 3 12
PixelFormatYa8 // 2 16
PixelFormatBgr48Be // 3 48
PixelFormatBgr48Le // 3 48
PixelFormatYuv420P9Be // 3 13
PixelFormatYuv420P9Le // 3 13
PixelFormatYuv420P10Be // 3 15
PixelFormatYuv420P10Le // 3 15
PixelFormatYuv422P10Be // 3 20
PixelFormatYuv422P10Le // 3 20
PixelFormatYuv444P9Be // 3 27
PixelFormatYuv444P9Le // 3 27
PixelFormatYuv444P10Be // 3 30
PixelFormatYuv444P10Le // 3 30
PixelFormatYuv422P9Be // 3 18
PixelFormatYuv422P9Le // 3 18
PixelFormatVdaVld // 0 0
PixelFormatGbrp // 3 24
PixelFormatGbrp9Be // 3 27
PixelFormatGbrp9Le // 3 27
PixelFormatGbrp10Be // 3 30
PixelFormatGbrp10Le // 3 30
PixelFormatGbrp16Be // 3 48
PixelFormatGbrp16Le // 3 48
PixelFormatYuva422P // 4 24
PixelFormatYuva444P // 4 32
PixelFormatYuva420P9Be // 4 22
PixelFormatYuva420P9Le // 4 22
PixelFormatYuva422P9Be // 4 27
PixelFormatYuva422P9Le // 4 27
PixelFormatYuva444P9Be // 4 36
PixelFormatYuva444P9Le // 4 36
PixelFormatYuva420P10Be // 4 25
PixelFormatYuva420P10Le // 4 25
PixelFormatYuva422P10Be // 4 30
PixelFormatYuva422P10Le // 4 30
PixelFormatYuva444P10Be // 4 40
PixelFormatYuva444P10Le // 4 40
PixelFormatYuva420P16Be // 4 40
PixelFormatYuva420P16Le // 4 40
PixelFormatYuva422P16Be // 4 48
PixelFormatYuva422P16Le // 4 48
PixelFormatYuva444P16Be // 4 64
PixelFormatYuva444P16Le // 4 64
PixelFormatVdpau // 0 0
PixelFormatXyz12Le // 3 36
PixelFormatXyz12Be // 3 36
PixelFormatNv16 // 3 16
PixelFormatNv20Le // 3 20
PixelFormatNv20Be // 3 20
PixelFormatRgba64Be // 4 64
PixelFormatRgba64Le // 4 64
PixelFormatBgra64Be // 4 64
PixelFormatBgra64Le // 4 64
PixelFormatYvyu422 // 3 16
PixelFormatVda // 0 0
PixelFormatYa16Be // 2 32
PixelFormatYa16Le // 2 32
PixelFormatGbrap // 4 32
PixelFormatGbrap16Be // 4 64
PixelFormatGbrap16Le // 4 64
PixelFormatQsv // 0 0
PixelFormatMmal // 0 0
PixelFormatD3D11VaVld // 0 0
PixelFormatCuda // 0 0
PixelFormat0Rgb // 3 24
PixelFormatRgb0 // 3 24
PixelFormat0Bgr // 3 24
PixelFormatBgr0 // 3 24
PixelFormatYuv420P12Be // 3 18
PixelFormatYuv420P12Le // 3 18
PixelFormatYuv420P14Be // 3 21
PixelFormatYuv420P14Le // 3 21
PixelFormatYuv422P12Be // 3 24
PixelFormatYuv422P12Le // 3 24
PixelFormatYuv422P14Be // 3 28
PixelFormatYuv422P14Le // 3 28
PixelFormatYuv444P12Be // 3 36
PixelFormatYuv444P12Le // 3 36
PixelFormatYuv444P14Be // 3 42
PixelFormatYuv444P14Le // 3 42
PixelFormatGbrp12Be // 3 36
PixelFormatGbrp12Le // 3 36
PixelFormatGbrp14Be // 3 42
PixelFormatGbrp14Le // 3 42
PixelFormatYuvj411P // 3 12
PixelFormatBayerBggr8 // 3 8
PixelFormatBayerRggb8 // 3 8
PixelFormatBayerGbrg8 // 3 8
PixelFormatBayerGrbg8 // 3 8
PixelFormatBayerBggr16Le // 3 16
PixelFormatBayerBggr16Be // 3 16
PixelFormatBayerRggb16Le // 3 16
PixelFormatBayerRggb16Be // 3 16
PixelFormatBayerGbrg16Le // 3 16
PixelFormatBayerGbrg16Be // 3 16
PixelFormatBayerGrbg16Le // 3 16
PixelFormatBayerGrbg16Be // 3 16
PixelFormatYuv440P10Le // 3 20
PixelFormatYuv440P10Be // 3 20
PixelFormatYuv440P12Le // 3 24
PixelFormatYuv440P12Be // 3 24
PixelFormatAyuv64Le // 4 64
PixelFormatAyuv64Be // 4 64
PixelFormatVideotoolboxVld // 0 0
PixelFormatP010Le // 3 15
PixelFormatP010Be // 3 15
PixelFormatGbrap12Be // 4 48
PixelFormatGbrap12Le // 4 48
PixelFormatGbrap10Be // 4 40
PixelFormatGbrap10Le // 4 40
PixelFormatMediacodec // 0 0
PixelFormatGray12Be // 1 12
PixelFormatGray12Le // 1 12
PixelFormatGray10Be // 1 10
PixelFormatGray10Le // 1 10
PixelFormatP016Le // 3 24
PixelFormatP016Be // 3 24
PixelFormatD3D11 // 0 0
PixelFormatGray9Be // 1 9
PixelFormatGray9Le // 1 9
PixelFormatGbrpf32Be // 3 96
PixelFormatGbrpf32Le // 3 96
PixelFormatGbrapf32Be // 4 128
PixelFormatGbrapf32Le // 4 128
PixelFormatDrmPrime // 0 0
)
func (typ PixelFormat) String() string {
switch typ {
case PixelFormatYuv420P:
return "yuv420p"
case PixelFormatYuyv422:
return "yuyv422"
case PixelFormatRgb24:
return "rgb24"
case PixelFormatBgr24:
return "bgr24"
case PixelFormatYuv422P:
return "yuv422p"
case PixelFormatYuv444P:
return "yuv444p"
case PixelFormatYuv410P:
return "yuv410p"
case PixelFormatYuv411P:
return "yuv411p"
case PixelFormatGray:
return "gray"
case PixelFormatMonow:
return "monow"
case PixelFormatMonob:
return "monob"
case PixelFormatPal8:
return "pal8"
case PixelFormatYuvj420P:
return "yuvj420p"
case PixelFormatYuvj422P:
return "yuvj422p"
case PixelFormatYuvj444P:
return "yuvj444p"
case PixelFormatXvmcmc:
return "xvmcmc"
case PixelFormatXvmcidct:
return "xvmcidct"
case PixelFormatUyvy422:
return "uyvy422"
case PixelFormatUyyvyy411:
return "uyyvyy411"
case PixelFormatBgr8:
return "bgr8"
case PixelFormatBgr4:
return "bgr4"
case PixelFormatBgr4Byte:
return "bgr4_byte"
case PixelFormatRgb8:
return "rgb8"
case PixelFormatRgb4:
return "rgb4"
case PixelFormatRgb4Byte:
return "rgb4_byte"
case PixelFormatNv12:
return "nv12"
case PixelFormatNv21:
return "nv21"
case PixelFormatArgb:
return "argb"
case PixelFormatRgba:
return "rgba"
case PixelFormatAbgr:
return "abgr"
case PixelFormatBgra:
return "bgra"
case PixelFormatGray16Be:
return "gray16be"
case PixelFormatGray16Le:
return "gray16le"
case PixelFormatYuv440P:
return "yuv440p"
case PixelFormatYuvj440P:
return "yuvj440p"
case PixelFormatYuva420P:
return "yuva420p"
case PixelFormatVdpauH264:
return "vdpau_h264"
case PixelFormatVdpauMpeg1:
return "vdpau_mpeg1"
case PixelFormatVdpauMpeg2:
return "vdpau_mpeg2"
case PixelFormatVdpauWmv3:
return "vdpau_wmv3"
case PixelFormatVdpauVc1:
return "vdpau_vc1"
case PixelFormatRgb48Be:
return "rgb48be"
case PixelFormatRgb48Le:
return "rgb48le"
case PixelFormatRgb565Be:
return "rgb565be"
case PixelFormatRgb565Le:
return "rgb565le"
case PixelFormatRgb555Be:
return "rgb555be"
case PixelFormatRgb555Le:
return "rgb555le"
case PixelFormatBgr565Be:
return "bgr565be"
case PixelFormatBgr565Le:
return "bgr565le"
case PixelFormatBgr555Be:
return "bgr555be"
case PixelFormatBgr555Le:
return "bgr555le"
case PixelFormatVaapiMoco:
return "vaapi_moco"
case PixelFormatVaapiIdct:
return "vaapi_idct"
case PixelFormatVaapiVld:
return "vaapi_vld"
case PixelFormatYuv420P16Le:
return "yuv420p16le"
case PixelFormatYuv420P16Be:
return "yuv420p16be"
case PixelFormatYuv422P16Le:
return "yuv422p16le"
case PixelFormatYuv422P16Be:
return "yuv422p16be"
case PixelFormatYuv444P16Le:
return "yuv444p16le"
case PixelFormatYuv444P16Be:
return "yuv444p16be"
case PixelFormatVdpauMpeg4:
return "vdpau_mpeg4"
case PixelFormatDxva2Vld:
return "dxva2_vld"
case PixelFormatRgb444Le:
return "rgb444le"
case PixelFormatRgb444Be:
return "rgb444be"
case PixelFormatBgr444Le:
return "bgr444le"
case PixelFormatBgr444Be:
return "bgr444be"
case PixelFormatYa8:
return "ya8"
case PixelFormatBgr48Be:
return "bgr48be"
case PixelFormatBgr48Le:
return "bgr48le"
case PixelFormatYuv420P9Be:
return "yuv420p9be"
case PixelFormatYuv420P9Le:
return "yuv420p9le"
case PixelFormatYuv420P10Be:
return "yuv420p10be"
case PixelFormatYuv420P10Le:
return "yuv420p10le"
case PixelFormatYuv422P10Be:
return "yuv422p10be"
case PixelFormatYuv422P10Le:
return "yuv422p10le"
case PixelFormatYuv444P9Be:
return "yuv444p9be"
case PixelFormatYuv444P9Le:
return "yuv444p9le"
case PixelFormatYuv444P10Be:
return "yuv444p10be"
case PixelFormatYuv444P10Le:
return "yuv444p10le"
case PixelFormatYuv422P9Be:
return "yuv422p9be"
case PixelFormatYuv422P9Le:
return "yuv422p9le"
case PixelFormatVdaVld:
return "vda_vld"
case PixelFormatGbrp:
return "gbrp"
case PixelFormatGbrp9Be:
return "gbrp9be"
case PixelFormatGbrp9Le:
return "gbrp9le"
case PixelFormatGbrp10Be:
return "gbrp10be"
case PixelFormatGbrp10Le:
return "gbrp10le"
case PixelFormatGbrp16Be:
return "gbrp16be"
case PixelFormatGbrp16Le:
return "gbrp16le"
case PixelFormatYuva422P:
return "yuva422p"
case PixelFormatYuva444P:
return "yuva444p"
case PixelFormatYuva420P9Be:
return "yuva420p9be"
case PixelFormatYuva420P9Le:
return "yuva420p9le"
case PixelFormatYuva422P9Be:
return "yuva422p9be"
case PixelFormatYuva422P9Le:
return "yuva422p9le"
case PixelFormatYuva444P9Be:
return "yuva444p9be"
case PixelFormatYuva444P9Le:
return "yuva444p9le"
case PixelFormatYuva420P10Be:
return "yuva420p10be"
case PixelFormatYuva420P10Le:
return "yuva420p10le"
case PixelFormatYuva422P10Be:
return "yuva422p10be"
case PixelFormatYuva422P10Le:
return "yuva422p10le"
case PixelFormatYuva444P10Be:
return "yuva444p10be"
case PixelFormatYuva444P10Le:
return "yuva444p10le"
case PixelFormatYuva420P16Be:
return "yuva420p16be"
case PixelFormatYuva420P16Le:
return "yuva420p16le"
case PixelFormatYuva422P16Be:
return "yuva422p16be"
case PixelFormatYuva422P16Le:
return "yuva422p16le"
case PixelFormatYuva444P16Be:
return "yuva444p16be"
case PixelFormatYuva444P16Le:
return "yuva444p16le"
case PixelFormatVdpau:
return "vdpau"
case PixelFormatXyz12Le:
return "xyz12le"
case PixelFormatXyz12Be:
return "xyz12be"
case PixelFormatNv16:
return "nv16"
case PixelFormatNv20Le:
return "nv20le"
case PixelFormatNv20Be:
return "nv20be"
case PixelFormatRgba64Be:
return "rgba64be"
case PixelFormatRgba64Le:
return "rgba64le"
case PixelFormatBgra64Be:
return "bgra64be"
case PixelFormatBgra64Le:
return "bgra64le"
case PixelFormatYvyu422:
return "yvyu422"
case PixelFormatVda:
return "vda"
case PixelFormatYa16Be:
return "ya16be"
case PixelFormatYa16Le:
return "ya16le"
case PixelFormatGbrap:
return "gbrap"
case PixelFormatGbrap16Be:
return "gbrap16be"
case PixelFormatGbrap16Le:
return "gbrap16le"
case PixelFormatQsv:
return "qsv"
case PixelFormatMmal:
return "mmal"
case PixelFormatD3D11VaVld:
return "d3d11va_vld"
case PixelFormatCuda:
return "cuda"
case PixelFormat0Rgb:
return "0rgb"
case PixelFormatRgb0:
return "rgb0"
case PixelFormat0Bgr:
return "0bgr"
case PixelFormatBgr0:
return "bgr0"
case PixelFormatYuv420P12Be:
return "yuv420p12be"
case PixelFormatYuv420P12Le:
return "yuv420p12le"
case PixelFormatYuv420P14Be:
return "yuv420p14be"
case PixelFormatYuv420P14Le:
return "yuv420p14le"
case PixelFormatYuv422P12Be:
return "yuv422p12be"
case PixelFormatYuv422P12Le:
return "yuv422p12le"
case PixelFormatYuv422P14Be:
return "yuv422p14be"
case PixelFormatYuv422P14Le:
return "yuv422p14le"
case PixelFormatYuv444P12Be:
return "yuv444p12be"
case PixelFormatYuv444P12Le:
return "yuv444p12le"
case PixelFormatYuv444P14Be:
return "yuv444p14be"
case PixelFormatYuv444P14Le:
return "yuv444p14le"
case PixelFormatGbrp12Be:
return "gbrp12be"
case PixelFormatGbrp12Le:
return "gbrp12le"
case PixelFormatGbrp14Be:
return "gbrp14be"
case PixelFormatGbrp14Le:
return "gbrp14le"
case PixelFormatYuvj411P:
return "yuvj411p"
case PixelFormatBayerBggr8:
return "bayer_bggr8"
case PixelFormatBayerRggb8:
return "bayer_rggb8"
case PixelFormatBayerGbrg8:
return "bayer_gbrg8"
case PixelFormatBayerGrbg8:
return "bayer_grbg8"
case PixelFormatBayerBggr16Le:
return "bayer_bggr16le"
case PixelFormatBayerBggr16Be:
return "bayer_bggr16be"
case PixelFormatBayerRggb16Le:
return "bayer_rggb16le"
case PixelFormatBayerRggb16Be:
return "bayer_rggb16be"
case PixelFormatBayerGbrg16Le:
return "bayer_gbrg16le"
case PixelFormatBayerGbrg16Be:
return "bayer_gbrg16be"
case PixelFormatBayerGrbg16Le:
return "bayer_grbg16le"
case PixelFormatBayerGrbg16Be:
return "bayer_grbg16be"
case PixelFormatYuv440P10Le:
return "yuv440p10le"
case PixelFormatYuv440P10Be:
return "yuv440p10be"
case PixelFormatYuv440P12Le:
return "yuv440p12le"
case PixelFormatYuv440P12Be:
return "yuv440p12be"
case PixelFormatAyuv64Le:
return "ayuv64le"
case PixelFormatAyuv64Be:
return "ayuv64be"
case PixelFormatVideotoolboxVld:
return "videotoolbox_vld"
case PixelFormatP010Le:
return "p010le"
case PixelFormatP010Be:
return "p010be"
case PixelFormatGbrap12Be:
return "gbrap12be"
case PixelFormatGbrap12Le:
return "gbrap12le"
case PixelFormatGbrap10Be:
return "gbrap10be"
case PixelFormatGbrap10Le:
return "gbrap10le"
case PixelFormatMediacodec:
return "mediacodec"
case PixelFormatGray12Be:
return "gray12be"
case PixelFormatGray12Le:
return "gray12le"
case PixelFormatGray10Be:
return "gray10be"
case PixelFormatGray10Le:
return "gray10le"
case PixelFormatP016Le:
return "p016le"
case PixelFormatP016Be:
return "p016be"
case PixelFormatD3D11:
return "d3d11"
case PixelFormatGray9Be:
return "gray9be"
case PixelFormatGray9Le:
return "gray9le"
case PixelFormatGbrpf32Be:
return "gbrpf32be"
case PixelFormatGbrpf32Le:
return "gbrpf32le"
case PixelFormatGbrapf32Be:
return "gbrapf32be"
case PixelFormatGbrapf32Le:
return "gbrapf32le"
case PixelFormatDrmPrime:
return "drm_prime"
}
return ""
}