docs: design: add IYU2 raw video format description
[platform/upstream/gstreamer.git] / docs / design / part-mediatype-video-raw.txt
1 Media Types
2 -----------
3
4  video/x-raw
5
6   width, G_TYPE_INT, mandatory
7     The width of the image in pixels.
8
9   height, G_TYPE_INT, mandatory
10     The height of the image in pixels
11
12   framerate, GST_TYPE_FRACTION, default 0/1
13     The framerate of the video 0/1 for variable framerate
14
15   max-framerate, GST_TYPE_FRACTION, default as framerate
16     For variable framerates this would be the maximum framerate that
17     is expected. This value is only valid when the framerate is 0/1
18
19   views, G_TYPE_INT, default 1
20     The number of views for multiview video. Each buffer contains
21     multiple GstVideoMeta buffers that describe each view. use the frame id to
22     get access to the different views.
23
24   interlace-mode, G_TYPE_STRING, default progressive
25     The interlace mode. The following values are possible:
26
27     "progressive"  : all frames are progressive
28     "interleaved"  : 2 fields are interleaved in one video frame. Extra buffer
29                      flags describe the field order.
30     "mixed"        : progressive and interleaved frames, extra buffer flags describe
31                      the frame and fields.
32     "fields"       : 2 fields are stored in one buffer, use the frame ID
33                      to get access to the required field. For multiview (the
34                      'views' property > 1) the fields of view N can be found at
35                      frame ID (N * 2) and (N * 2) + 1.
36                      Each view has only half the amount of lines as noted in the
37                      height property, pads specifying the "fields" property
38                      must be prepared for this. This mode requires multiple
39                      GstVideoMeta metadata to describe the fields.
40
41   chroma-site, G_TYPE_STRING, default UNKNOWN
42     The chroma siting of the video frames.
43
44     "jpeg" : GST_VIDEO_CHROMA_SITE_JPEG
45     "mpeg2": GST_VIDEO_CHROMA_SITE_MPEG2
46     "dv"   : GST_VIDEO_CHROMA_SITE_DV
47
48   colorimetry, G_TYPE_STRING, default UNKNOWN
49     The colorimetry of the video frames predefined colorimetry is given with
50     the following values:
51
52     "bt601"
53     "bt709"
54     "smpte240m"
55
56   pixel-aspect-ratio, GST_TYPE_FRACTION, default 1/1
57     The pixel aspect ration of the video
58
59   format, G_TYPE_STRING, mandatory
60     The format of the video, see the Formats section for a list of valid format
61     strings.
62
63 Metadata
64 --------
65
66  "GstVideoMeta"
67    contains the description of one video field or frame. It has
68    stride support and support for having multiple memory regions per frame.
69
70    Multiple GstVideoMeta can be added to a buffer and can be identified with a
71    unique id. This id can be used to select fields in interlaced formats or
72    views in multiview formats.
73
74  "GstVideoCropMeta"
75    Contains the cropping region of the video.
76
77
78 Formats
79 -------
80
81  "I420" planar 4:2:0 YUV
82
83         Component 0: Y
84           depth:           8
85           pstride:         1
86           default offset:  0
87           default rstride: RU4 (width)
88           default size:    rstride (component0) * RU2 (height)
89
90         Component 1: U
91           depth:           8
92           pstride:         1
93           default offset:  size (component0)
94           default rstride: RU4 (RU2 (width) / 2)
95           default size:    rstride (component1) * RU2 (height) / 2
96
97         Component 2: V
98           depth            8
99           pstride:         1
100           default offset:  offset (component1) + size (component1)
101           default rstride: RU4 (RU2 (width) / 2)
102           default size:    rstride (component2) * RU2 (height) / 2
103
104         Image
105           default size: size (component0) + 
106                         size (component1) +
107                         size (component2)
108  
109  "YV12" planar 4:2:0 YUV
110
111         Same as I420 but with U and V planes swapped
112
113         Component 0: Y
114           depth:           8
115           pstride:         1
116           default offset:  0
117           default rstride: RU4 (width)
118           default size:    rstride (component0) * RU2 (height)
119
120         Component 1: U
121           depth            8
122           pstride:         1
123           default offset:  offset (component2) + size (component2)
124           default rstride: RU4 (RU2 (width) / 2)
125           default size:    rstride (component1) * RU2 (height) / 2
126
127         Component 2: V
128           depth:           8
129           pstride:         1
130           default offset:  size (component0)
131           default rstride: RU4 (RU2 (width) / 2)
132           default size:    rstride (component2) * RU2 (height) / 2
133
134         Image
135           default size: size (component0) + 
136                         size (component1) +
137                         size (component2)
138
139  "YUY2" packed 4:2:2 YUV
140
141        +--+--+--+--+ +--+--+--+--+
142        |Y0|U0|Y1|V0| |Y2|U2|Y3|V2| ...
143        +--+--+--+--+ +--+--+--+--+
144
145         Component 0: Y
146           depth:           8
147           pstride:         2
148           offset:          0
149
150         Component 1: U
151           depth:           8
152           offset:          1
153           pstride:         4
154
155         Component 2: V
156           depth            8
157           offset:          3
158           pstride:         4
159
160         Image
161           default rstride: RU4 (width * 2)
162           default size:    rstride (image) * height
163
164
165  "YVYU" packed 4:2:2 YUV
166   
167       Same as "YUY2" but with U and V planes swapped
168
169        +--+--+--+--+ +--+--+--+--+
170        |Y0|V0|Y1|U0| |Y2|V2|Y3|U2| ...
171        +--+--+--+--+ +--+--+--+--+
172
173         Component 0: Y
174           depth:           8
175           pstride:         2
176           offset:          0
177
178         Component 1: U
179           depth:           8
180           pstride:         4
181           offset:          3
182
183         Component 2: V
184           depth            8
185           pstride:         4
186           offset:          1
187
188         Image
189           default rstride: RU4 (width * 2)
190           default size:    rstride (image) * height
191
192
193  "UYVY" packed 4:2:2 YUV
194
195        +--+--+--+--+ +--+--+--+--+
196        |U0|Y0|V0|Y1| |U2|Y2|V2|Y3| ...
197        +--+--+--+--+ +--+--+--+--+
198
199         Component 0: Y
200           depth:           8
201           pstride:         2
202           offset:          1
203
204         Component 1: U
205           depth:           8
206           pstride:         4
207           offset:          0
208
209         Component 2: V
210           depth            8
211           pstride:         4
212           offset:          2
213
214         Image
215           default rstride: RU4 (width * 2)
216           default size:    rstride (image) * height
217
218
219  "AYUV" packed 4:4:4 YUV with alpha channel
220   
221        +--+--+--+--+ +--+--+--+--+
222        |A0|Y0|U0|V0| |A1|Y1|U1|V1| ...
223        +--+--+--+--+ +--+--+--+--+
224
225         Component 0: Y
226           depth:           8
227           pstride:         4
228           offset:          1
229
230         Component 1: U
231           depth:           8
232           pstride:         4
233           offset:          2
234
235         Component 2: V
236           depth            8
237           pstride:         4
238           offset:          3
239
240         Component 3: A
241           depth            8
242           pstride:         4
243           offset:          0
244
245         Image
246           default rstride: width * 4
247           default size:    rstride (image) * height
248
249
250  "RGBx" sparse rgb packed into 32 bit, space last
251
252        +--+--+--+--+ +--+--+--+--+
253        |R0|G0|B0|X | |R1|G1|B1|X | ...
254        +--+--+--+--+ +--+--+--+--+
255
256         Component 0: R
257           depth:           8
258           pstride:         4
259           offset:          0
260
261         Component 1: G
262           depth:           8
263           pstride:         4
264           offset:          1
265
266         Component 2: B
267           depth            8
268           pstride:         4
269           offset:          2
270
271         Image
272           default rstride: width * 4
273           default size:    rstride (image) * height
274
275  "BGRx" sparse reverse rgb packed into 32 bit, space last
276
277        +--+--+--+--+ +--+--+--+--+
278        |B0|G0|R0|X | |B1|G1|R1|X | ...
279        +--+--+--+--+ +--+--+--+--+
280
281         Component 0: R
282           depth:           8
283           pstride:         4
284           offset:          2
285
286         Component 1: G
287           depth:           8
288           pstride:         4
289           offset:          1
290
291         Component 2: B
292           depth            8
293           pstride:         4
294           offset:          0
295
296         Image
297           default rstride: width * 4
298           default size:    rstride (image) * height
299
300  "xRGB" sparse rgb packed into 32 bit, space first
301
302        +--+--+--+--+ +--+--+--+--+
303        |X |R0|G0|B0| |X |R1|G1|B1| ...
304        +--+--+--+--+ +--+--+--+--+
305
306         Component 0: R
307           depth:           8
308           pstride:         4
309           offset:          1
310
311         Component 1: G
312           depth:           8
313           pstride:         4
314           offset:          2
315
316         Component 2: B
317           depth            8
318           pstride:         4
319           offset:          3
320
321         Image
322           default rstride: width * 4
323           default size:    rstride (image) * height
324
325  "xBGR" sparse reverse rgb packed into 32 bit, space first
326
327        +--+--+--+--+ +--+--+--+--+
328        |X |B0|G0|R0| |X |B1|G1|R1| ...
329        +--+--+--+--+ +--+--+--+--+
330
331         Component 0: R
332           depth:           8
333           pstride:         4
334           offset:          3
335
336         Component 1: G
337           depth:           8
338           pstride:         4
339           offset:          2
340
341         Component 2: B
342           depth            8
343           pstride:         4
344           offset:          1
345
346         Image
347           default rstride: width * 4
348           default size:    rstride (image) * height
349
350  "RGBA" rgb with alpha channel last
351
352        +--+--+--+--+ +--+--+--+--+
353        |R0|G0|B0|A0| |R1|G1|B1|A1| ...
354        +--+--+--+--+ +--+--+--+--+
355
356         Component 0: R
357           depth:           8
358           pstride:         4
359           offset:          0
360
361         Component 1: G
362           depth:           8
363           pstride:         4
364           offset:          1
365
366         Component 2: B
367           depth            8
368           pstride:         4
369           offset:          2
370
371         Component 3: A
372           depth            8
373           pstride:         4
374           offset:          3
375
376         Image
377           default rstride: width * 4
378           default size:    rstride (image) * height
379
380  "BGRA" reverse rgb with alpha channel last
381
382        +--+--+--+--+ +--+--+--+--+
383        |B0|G0|R0|A0| |B1|G1|R1|A1| ...
384        +--+--+--+--+ +--+--+--+--+
385
386         Component 0: R
387           depth:           8
388           pstride:         4
389           offset:          2
390
391         Component 1: G
392           depth:           8
393           pstride:         4
394           offset:          1
395
396         Component 2: B
397           depth            8
398           pstride:         4
399           offset:          0
400
401         Component 3: A
402           depth            8
403           pstride:         4
404           offset:          3
405
406         Image
407           default rstride: width * 4
408           default size:    rstride (image) * height
409
410  "ARGB" rgb with alpha channel first
411
412        +--+--+--+--+ +--+--+--+--+
413        |A0|R0|G0|B0| |A1|R1|G1|B1| ...
414        +--+--+--+--+ +--+--+--+--+
415
416         Component 0: R
417           depth:           8
418           pstride:         4
419           offset:          1
420
421         Component 1: G
422           depth:           8
423           pstride:         4
424           offset:          2
425
426         Component 2: B
427           depth            8
428           pstride:         4
429           offset:          3
430
431         Component 3: A
432           depth            8
433           pstride:         4
434           offset:          0
435
436         Image
437           default rstride: width * 4
438           default size:    rstride (image) * height
439
440  "ABGR" reverse rgb with alpha channel first
441
442        +--+--+--+--+ +--+--+--+--+
443        |A0|R0|G0|B0| |A1|R1|G1|B1| ...
444        +--+--+--+--+ +--+--+--+--+
445
446         Component 0: R
447           depth:           8
448           pstride:         4
449           offset:          1
450
451         Component 1: G
452           depth:           8
453           pstride:         4
454           offset:          2
455
456         Component 2: B
457           depth            8
458           pstride:         4
459           offset:          3
460
461         Component 3: A
462           depth            8
463           pstride:         4
464           offset:          0
465
466         Image
467           default rstride: width * 4
468           default size:    rstride (image) * height
469
470  "RGB" rgb
471
472        +--+--+--+ +--+--+--+
473        |R0|G0|B0| |R1|G1|B1| ...
474        +--+--+--+ +--+--+--+
475
476         Component 0: R
477           depth:           8
478           pstride:         3
479           offset:          0
480
481         Component 1: G
482           depth:           8
483           pstride:         3
484           offset:          1
485
486         Component 2: B
487           depth            8
488           pstride:         3
489           offset:          2
490
491         Image
492           default rstride: RU4 (width * 3)
493           default size:    rstride (image) * height
494
495  "BGR" reverse rgb
496
497        +--+--+--+ +--+--+--+
498        |B0|G0|R0| |B1|G1|R1| ...
499        +--+--+--+ +--+--+--+
500
501         Component 0: R
502           depth:           8
503           pstride:         3
504           offset:          2
505
506         Component 1: G
507           depth:           8
508           pstride:         3
509           offset:          1
510
511         Component 2: B
512           depth            8
513           pstride:         3
514           offset:          0
515
516         Image
517           default rstride: RU4 (width * 3)
518           default size:    rstride (image) * height
519
520  "Y41B" planar 4:1:1 YUV
521
522         Component 0: Y
523           depth:           8
524           pstride:         1
525           default offset:  0
526           default rstride: RU4 (width)
527           default size:    rstride (component0) * height
528
529         Component 1: U
530           depth            8
531           pstride:         1
532           default offset:  size (component0)
533           default rstride: RU16 (width) / 4
534           default size:    rstride (component1) * height
535
536         Component 2: V
537           depth:           8
538           pstride:         1
539           default offset:  offset (component1) + size (component1)
540           default rstride: RU16 (width) / 4
541           default size:    rstride (component2) * height
542
543         Image
544           default size: size (component0) + 
545                         size (component1) +
546                         size (component2)
547
548  "Y42B" planar 4:2:2 YUV
549
550         Component 0: Y
551           depth:           8
552           pstride:         1
553           default offset:  0
554           default rstride: RU4 (width)
555           default size:    rstride (component0) * height
556
557         Component 1: U
558           depth            8
559           pstride:         1
560           default offset:  size (component0)
561           default rstride: RU8 (width) / 2
562           default size:    rstride (component1) * height
563
564         Component 2: V
565           depth:           8
566           pstride:         1
567           default offset:  offset (component1) + size (component1)
568           default rstride: RU8 (width) / 2
569           default size:    rstride (component2) * height
570
571         Image
572           default size: size (component0) + 
573                         size (component1) +
574                         size (component2)
575
576  "Y444" planar 4:4:4 YUV
577
578         Component 0: Y
579           depth:           8
580           pstride:         1
581           default offset:  0
582           default rstride: RU4 (width)
583           default size:    rstride (component0) * height
584
585         Component 1: U
586           depth            8
587           pstride:         1
588           default offset:  size (component0)
589           default rstride: RU4 (width)
590           default size:    rstride (component1) * height
591
592         Component 2: V
593           depth:           8
594           pstride:         1
595           default offset:  offset (component1) + size (component1)
596           default rstride: RU4 (width)
597           default size:    rstride (component2) * height
598
599         Image
600           default size: size (component0) + 
601                         size (component1) +
602                         size (component2)
603
604  "v210" packed 4:2:2 10-bit YUV, complex format
605
606         Component 0: Y
607           depth:           10
608
609         Component 1: U
610           depth            10
611
612         Component 2: V
613           depth:           10
614
615         Image
616           default rstride: RU48 (width) * 128
617           default size:    rstride (image) * height
618
619
620  "v216" packed 4:2:2 16-bit YUV, Y0-U0-Y1-V1 order
621
622        +--+--+--+--+ +--+--+--+--+
623        |U0|Y0|V0|Y1| |U1|Y2|V1|Y3| ...
624        +--+--+--+--+ +--+--+--+--+
625
626         Component 0: Y
627           depth:           16 LE
628           pstride:         4
629           offset:          2
630
631         Component 1: U
632           depth            16 LE
633           pstride:         8
634           offset:          0
635
636         Component 2: V
637           depth:           16 LE
638           pstride:         8
639           offset:          4
640
641         Image
642           default rstride: RU8 (width * 2)
643           default size:    rstride (image) * height
644
645  "NV12" planar 4:2:0 YUV with interleaved UV plane
646
647         Component 0: Y
648           depth:           8
649           pstride:         1
650           default offset:  0
651           default rstride: RU4 (width)
652           default size:    rstride (component0) * RU2 (height)
653
654         Component 1: U
655           depth            8
656           pstride:         2
657           default offset:  size (component0)
658           default rstride: RU4 (width)
659
660         Component 2: V
661           depth:           8
662           pstride:         2
663           default offset:  offset (component1) + 1
664           default rstride: RU4 (width)
665
666         Image
667           default size: RU4 (width) * RU2 (height) * 3 / 2
668
669
670  "NV21" planar 4:2:0 YUV with interleaved VU plane
671
672         Component 0: Y
673           depth:           8
674           pstride:         1
675           default offset:  0
676           default rstride: RU4 (width)
677           default size:    rstride (component0) * RU2 (height)
678
679         Component 1: U
680           depth            8
681           pstride:         2
682           default offset:  offset (component1) + 1
683           default rstride: RU4 (width)
684
685         Component 2: V
686           depth:           8
687           pstride:         2
688           default offset:  size (component0)
689           default rstride: RU4 (width)
690
691         Image
692           default size: RU4 (width) * RU2 (height) * 3 / 2
693
694  "GRAY8"  8-bit grayscale
695  "Y800" same as "GRAY8"
696
697         Component 0: Y
698           depth:           8
699           offset:          0
700           pstride:         1
701           default rstride: RU4 (width)
702           default size:    rstride (component0) * height
703
704         Image
705           default size:    size (component0)
706
707  "GRAY16_BE" 16-bit grayscale, most significant byte first
708
709         Component 0: Y
710           depth:           16
711           offset:          0
712           pstride:         2
713           default rstride: RU4 (width * 2)
714           default size:    rstride (component0) * height
715
716         Image
717           default size:    size (component0)
718
719  "GRAY16_LE" 16-bit grayscale, least significant byte first
720  "Y16" same as "GRAY16_LE"
721
722         Component 0: Y
723           depth:           16 LE
724           offset:          0
725           pstride:         2
726           default rstride: RU4 (width * 2)
727           default size:    rstride (component0) * height
728
729         Image
730           default size:    size (component0)
731
732  "v308" packed 4:4:4 YUV
733
734        +--+--+--+ +--+--+--+
735        |Y0|U0|V0| |Y1|U1|V1| ...
736        +--+--+--+ +--+--+--+
737
738         Component 0: Y
739           depth:           8
740           pstride:         3
741           offset:          0
742
743         Component 1: U
744           depth            8
745           pstride:         3
746           offset:          1
747
748         Component 2: V
749           depth:           8
750           pstride:         3
751           offset:          2
752
753         Image
754           default rstride: RU4 (width * 3)
755           default size:    rstride (image) * height
756
757  "IYU2" packed 4:4:4 YUV, U-Y-V order
758
759        +--+--+--+ +--+--+--+
760        |U0|Y0|V0| |U1|Y1|V1| ...
761        +--+--+--+ +--+--+--+
762
763         Component 0: Y
764           depth:           8
765           pstride:         3
766           offset:          1
767
768         Component 1: U
769           depth            8
770           pstride:         3
771           offset:          0
772
773         Component 2: V
774           depth:           8
775           pstride:         3
776           offset:          2
777
778         Image
779           default rstride: RU4 (width * 3)
780           default size:    rstride (image) * height
781
782  "RGB16" rgb 5-6-5 bits per component
783
784        +--+--+--+ +--+--+--+
785        |R0|G0|B0| |R1|G1|B1| ...
786        +--+--+--+ +--+--+--+
787
788         Component 0: R
789           depth:           5
790           pstride:         2
791
792         Component 1: G
793           depth            6
794           pstride:         2
795
796         Component 2: B
797           depth:           5
798           pstride:         2
799
800         Image
801           default rstride: RU4 (width * 2)
802           default size:    rstride (image) * height
803
804  "BGR16" reverse rgb 5-6-5 bits per component
805
806        +--+--+--+ +--+--+--+
807        |B0|G0|R0| |B1|G1|R1| ...
808        +--+--+--+ +--+--+--+
809
810         Component 0: R
811           depth:           5
812           pstride:         2
813
814         Component 1: G
815           depth            6
816           pstride:         2
817
818         Component 2: B
819           depth:           5
820           pstride:         2
821
822         Image
823           default rstride: RU4 (width * 2)
824           default size:    rstride (image) * height
825
826  "RGB15" rgb 5-5-5 bits per component
827
828        +--+--+--+ +--+--+--+
829        |R0|G0|B0| |R1|G1|B1| ...
830        +--+--+--+ +--+--+--+
831
832         Component 0: R
833           depth:           5
834           pstride:         2
835
836         Component 1: G
837           depth            5
838           pstride:         2
839
840         Component 2: B
841           depth:           5
842           pstride:         2
843
844         Image
845           default rstride: RU4 (width * 2)
846           default size:    rstride (image) * height
847
848  "BGR15" reverse rgb 5-5-5 bits per component
849
850        +--+--+--+ +--+--+--+
851        |B0|G0|R0| |B1|G1|R1| ...
852        +--+--+--+ +--+--+--+
853
854         Component 0: R
855           depth:           5
856           pstride:         2
857
858         Component 1: G
859           depth            5
860           pstride:         2
861
862         Component 2: B
863           depth:           5
864           pstride:         2
865
866         Image
867           default rstride: RU4 (width * 2)
868           default size:    rstride (image) * height
869
870  "UYVP" packed 10-bit 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 ...)
871
872         Component 0: Y
873           depth:           10
874
875         Component 1: U
876           depth            10
877
878         Component 2: V
879           depth:           10
880
881         Image
882           default rstride: RU4 (width * 2 * 5)
883           default size:    rstride (image) * height
884
885  "A420" planar 4:4:2:0 AYUV
886
887         Component 0: Y
888           depth:           8
889           pstride:         1
890           default offset:  0
891           default rstride: RU4 (width)
892           default size:    rstride (component0) * RU2 (height)
893
894         Component 1: U
895           depth            8
896           pstride:         1
897           default offset:  size (component0)
898           default rstride: RU4 (RU2 (width) / 2)
899           default size:    rstride (component1) * (RU2 (height) / 2)
900
901         Component 2: V
902           depth:           8
903           pstride:         1
904           default offset:  size (component0) + size (component1)
905           default rstride: RU4 (RU2 (width) / 2)
906           default size:    rstride (component2) * (RU2 (height) / 2)
907
908         Component 3: A
909           depth:           8
910           pstride:         1
911           default offset:  size (component0) + size (component1) +
912                            size (component2)
913           default rstride: RU4 (width)
914           default size:    rstride (component3) * RU2 (height)
915
916         Image
917           default size:    size (component0) +
918                            size (component1) + 
919                            size (component2) +
920                            size (component3)
921
922  "RGB8P" 8-bit paletted RGB
923
924         Component 0: INDEX
925           depth:           8
926           pstride:         1
927           default offset:  0
928           default rstride: RU4 (width)
929           default size:    rstride (component0) * height
930
931         Component 1: PALETTE
932           depth            32
933           pstride:         4
934           default offset:  size (component0)
935           rstride:         4
936           size:            256 * 4
937
938         Image
939           default size:    size (component0) + size (component1)
940
941  "YUV9" planar 4:1:0 YUV
942
943         Component 0: Y
944           depth:           8
945           pstride:         1
946           default offset:  0
947           default rstride: RU4 (width)
948           default size:    rstride (component0) * height
949
950         Component 1: U
951           depth            8
952           pstride:         1
953           default offset:  size (component0)
954           default rstride: RU4 (RU4 (width) / 4)
955           default size:    rstride (component1) * (RU4 (height) / 4)
956
957         Component 2: V
958           depth:           8
959           pstride:         1
960           default offset:  offset (component1) + size (component1)
961           default rstride: RU4 (RU4 (width) / 4)
962           default size:    rstride (component2) * (RU4 (height) / 4)
963
964         Image
965           default size: size (component0) + 
966                         size (component1) +
967                         size (component2)
968
969  "YVU9" planar 4:1:0 YUV (like YUV9 but UV planes swapped)
970
971         Component 0: Y
972           depth:           8
973           pstride:         1
974           default offset:  0
975           default rstride: RU4 (width)
976           default size:    rstride (component0) * height
977
978         Component 1: U
979           depth            8
980           pstride:         1
981           default offset:  offset (component2) + size (component2)
982           default rstride: RU4 (RU4 (width) / 4)
983           default size:    rstride (component1) * (RU4 (height) / 4)
984
985         Component 2: V
986           depth:           8
987           pstride:         1
988           default offset:  size (component0)
989           default rstride: RU4 (RU4 (width) / 4)
990           default size:    rstride (component2) * (RU4 (height) / 4)
991
992         Image
993           default size: size (component0) + 
994                         size (component1) +
995                         size (component2)
996
997  "IYU1"  packed 4:1:1 YUV (Cb-Y0-Y1-Cr-Y2-Y3 ...)
998
999        +--+--+--+ +--+--+--+
1000        |B0|G0|R0| |B1|G1|R1| ...
1001        +--+--+--+ +--+--+--+
1002
1003         Component 0: Y
1004           depth:           8
1005           offset:          1
1006           pstride:         2
1007
1008         Component 1: U
1009           depth            5
1010           offset:          0
1011           pstride:         2
1012
1013         Component 2: V
1014           depth:           5
1015           offset:          4
1016           pstride:         2
1017
1018         Image
1019           default rstride: RU4 (RU4 (width) + RU4 (width) / 2)
1020           default size:    rstride (image) * height
1021
1022  "ARGB64" rgb with alpha channel first, 16 bits per channel
1023
1024        +--+--+--+--+ +--+--+--+--+
1025        |A0|R0|G0|B0| |A1|R1|G1|B1| ...
1026        +--+--+--+--+ +--+--+--+--+
1027
1028         Component 0: R
1029           depth:           16 LE
1030           pstride:         8
1031           offset:          2
1032
1033         Component 1: G
1034           depth            16 LE
1035           pstride:         8
1036           offset:          4
1037
1038         Component 2: B
1039           depth:           16 LE
1040           pstride:         8
1041           offset:          6
1042
1043         Component 3: A
1044           depth:           16 LE
1045           pstride:         8
1046           offset:          0
1047
1048         Image
1049           default rstride: width * 8
1050           default size:    rstride (image) * height
1051
1052  "AYUV64" packed 4:4:4 YUV with alpha channel, 16 bits per channel (A0-Y0-U0-V0 ...)
1053
1054        +--+--+--+--+ +--+--+--+--+
1055        |A0|Y0|U0|V0| |A1|Y1|U1|V1| ...
1056        +--+--+--+--+ +--+--+--+--+
1057
1058         Component 0: Y
1059           depth:           16 LE
1060           pstride:         8
1061           offset:          2
1062
1063         Component 1: U
1064           depth            16 LE
1065           pstride:         8
1066           offset:          4
1067
1068         Component 2: V
1069           depth:           16 LE
1070           pstride:         8
1071           offset:          6
1072
1073         Component 3: A
1074           depth:           16 LE
1075           pstride:         8
1076           offset:          0
1077
1078         Image
1079           default rstride: width * 8
1080           default size:    rstride (image) * height
1081
1082  "r210" packed 4:4:4 RGB, 10 bits per channel
1083
1084        +--+--+--+ +--+--+--+
1085        |R0|G0|B0| |R1|G1|B1| ...
1086        +--+--+--+ +--+--+--+
1087
1088         Component 0: R
1089           depth:           10
1090           pstride:         4
1091
1092         Component 1: G
1093           depth            10
1094           pstride:         4
1095
1096         Component 2: B
1097           depth:           10
1098           pstride:         4
1099
1100         Image
1101           default rstride: width * 4
1102           default size:    rstride (image) * height
1103
1104  "I420_10LE" planar 4:2:0 YUV, 10 bits per channel LE
1105
1106         Component 0: Y
1107           depth:           10 LE
1108           pstride:         2
1109           default offset:  0
1110           default rstride: RU4 (width * 2)
1111           default size:    rstride (component0) * RU2 (height)
1112
1113         Component 1: U
1114           depth:           10 LE
1115           pstride:         2
1116           default offset:  size (component0)
1117           default rstride: RU4 (width)
1118           default size:    rstride (component1) * RU2 (height) / 2
1119
1120         Component 2: V
1121           depth            10 LE
1122           pstride:         2
1123           default offset:  offset (component1) + size (component1)
1124           default rstride: RU4 (width)
1125           default size:    rstride (component2) * RU2 (height) / 2
1126
1127         Image
1128           default size: size (component0) + 
1129                         size (component1) +
1130                         size (component2)
1131
1132  "I420_10BE" planar 4:2:0 YUV, 10 bits per channel BE
1133
1134         Component 0: Y
1135           depth:           10 BE
1136           pstride:         2
1137           default offset:  0
1138           default rstride: RU4 (width * 2)
1139           default size:    rstride (component0) * RU2 (height)
1140
1141         Component 1: U
1142           depth:           10 BE
1143           pstride:         2
1144           default offset:  size (component0)
1145           default rstride: RU4 (width)
1146           default size:    rstride (component1) * RU2 (height) / 2
1147
1148         Component 2: V
1149           depth            10 BE
1150           pstride:         2
1151           default offset:  offset (component1) + size (component1)
1152           default rstride: RU4 (width)
1153           default size:    rstride (component2) * RU2 (height) / 2
1154
1155         Image
1156           default size: size (component0) + 
1157                         size (component1) +
1158                         size (component2)
1159
1160  "I422_10LE" planar 4:2:2 YUV, 10 bits per channel LE
1161
1162         Component 0: Y
1163           depth:           10 LE
1164           pstride:         2
1165           default offset:  0
1166           default rstride: RU4 (width * 2)
1167           default size:    rstride (component0) * RU2 (height)
1168
1169         Component 1: U
1170           depth:           10 LE
1171           pstride:         2
1172           default offset:  size (component0)
1173           default rstride: RU4 (width)
1174           default size:    rstride (component1) * RU2 (height)
1175
1176         Component 2: V
1177           depth            10 LE
1178           pstride:         2
1179           default offset:  offset (component1) + size (component1)
1180           default rstride: RU4 (width)
1181           default size:    rstride (component2) * RU2 (height)
1182
1183         Image
1184           default size: size (component0) + 
1185                         size (component1) +
1186                         size (component2)
1187
1188  "I422_10BE" planar 4:2:2 YUV, 10 bits per channel BE
1189
1190         Component 0: Y
1191           depth:           10 BE
1192           pstride:         2
1193           default offset:  0
1194           default rstride: RU4 (width * 2)
1195           default size:    rstride (component0) * RU2 (height)
1196
1197         Component 1: U
1198           depth:           10 BE
1199           pstride:         2
1200           default offset:  size (component0)
1201           default rstride: RU4 (width)
1202           default size:    rstride (component1) * RU2 (height)
1203
1204         Component 2: V
1205           depth            10 BE
1206           pstride:         2
1207           default offset:  offset (component1) + size (component1)
1208           default rstride: RU4 (width)
1209           default size:    rstride (component2) * RU2 (height)
1210
1211         Image
1212           default size: size (component0) + 
1213                         size (component1) +
1214                         size (component2)
1215
1216  "Y444_10BE" planar 4:4:4 YUV, 10 bits per channel
1217  "Y444_10LE" planar 4:4:4 YUV, 10 bits per channel
1218
1219  "GBR" planar 4:4:4 RGB, 8 bits per channel
1220  "GBR_10BE" planar 4:4:4 RGB, 10 bits per channel
1221  "GBR_10LE" planar 4:4:4 RGB, 10 bits per channel
1222
1223  "NV16" planar 4:2:2 YUV with interleaved UV plane
1224  "NV61" planar 4:2:2 YUV with interleaved VU plane
1225  "NV24" planar 4:4:4 YUV with interleaved UV plane
1226
1227
1228  "NV12_64Z32" planar 4:2:0 YUV with interleaved UV plane in 64x32 tiles zigzag
1229
1230         Component 0: Y
1231           depth:           8
1232           pstride:         1
1233           default offset:  0
1234           default rstride: RU128 (width)
1235           default size:    rstride (component0) * RU32 (height)
1236
1237         Component 1: U
1238           depth            8
1239           pstride:         2
1240           default offset:  size (component0)
1241           default rstride: (y_tiles << 16) | x_tiles
1242           default x_tiles: RU128 (width) >> tile_width
1243           default y_tiles: RU32 (height) >> tile_height
1244
1245         Component 2: V
1246           depth:           8
1247           pstride:         2
1248           default offset:  offset (component1) + 1
1249           default rstride: (y_tiles << 16) | x_tiles
1250           default x_tiles: RU128 (width) >> tile_width
1251           default y_tiles: RU64 (height) >> (tile_height + 1)
1252
1253         Image
1254           default size: RU128 (width) * (RU32 (height) + RU64 (height) / 2)
1255           tile mode:    ZFLIPZ_2X2
1256           tile width:   6
1257           tile height:  5
1258