Skip to content

Commit bb9bcdf

Browse files
committed
formats: Add formats from PC
1 parent ed176d5 commit bb9bcdf

1 file changed

Lines changed: 145 additions & 0 deletions

File tree

pixutils/formats/pixelformats.py

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,17 @@ def get_formats():
222222
( ( 1, ), ),
223223
)
224224

225+
# Color-indexed (palette) 8-bit
226+
C8 = PixelFormat('C8',
227+
'C8 ', # DRM_FORMAT_C8
228+
None,
229+
None,
230+
PixelColorEncoding.UNDEFINED,
231+
False,
232+
( 1, 1 ),
233+
( ( 1, ), ),
234+
)
235+
225236
# RGB 8-bit
226237
RGB332 = PixelFormat('RGB332',
227238
'RGB8', None, None,
@@ -514,7 +525,36 @@ def get_formats():
514525
( ( 4, ), ),
515526
)
516527

528+
# RGB 64-bit, no alpha
529+
XRGB16161616 = PixelFormat('XRGB16161616',
530+
'XR48', # DRM_FORMAT_XRGB16161616
531+
None,
532+
None,
533+
PixelColorEncoding.RGB,
534+
False,
535+
( 1, 1 ),
536+
( ( 8, ), ),
537+
)
538+
XBGR16161616 = PixelFormat('XBGR16161616',
539+
'XB48', # DRM_FORMAT_XBGR16161616
540+
None,
541+
None,
542+
PixelColorEncoding.RGB,
543+
False,
544+
( 1, 1 ),
545+
( ( 8, ), ),
546+
)
547+
517548
# RGB 64-bit, alpha
549+
ARGB16161616 = PixelFormat('ARGB16161616',
550+
'AR48', # DRM_FORMAT_ARGB16161616
551+
None,
552+
None,
553+
PixelColorEncoding.RGB,
554+
False,
555+
( 1, 1 ),
556+
( ( 8, ), ),
557+
)
518558
ABGR16161616 = PixelFormat('ABGR16161616',
519559
'AB48', # DRM_FORMAT_ABGR16161616
520560
None,
@@ -525,6 +565,44 @@ def get_formats():
525565
( ( 8, ), ),
526566
)
527567

568+
# RGB 64-bit, half-float per channel
569+
XRGB16161616F = PixelFormat('XRGB16161616F',
570+
'XR4H', # DRM_FORMAT_XRGB16161616F
571+
None,
572+
None,
573+
PixelColorEncoding.RGB,
574+
False,
575+
( 1, 1 ),
576+
( ( 8, ), ),
577+
)
578+
XBGR16161616F = PixelFormat('XBGR16161616F',
579+
'XB4H', # DRM_FORMAT_XBGR16161616F
580+
None,
581+
None,
582+
PixelColorEncoding.RGB,
583+
False,
584+
( 1, 1 ),
585+
( ( 8, ), ),
586+
)
587+
ARGB16161616F = PixelFormat('ARGB16161616F',
588+
'AR4H', # DRM_FORMAT_ARGB16161616F
589+
None,
590+
None,
591+
PixelColorEncoding.RGB,
592+
False,
593+
( 1, 1 ),
594+
( ( 8, ), ),
595+
)
596+
ABGR16161616F = PixelFormat('ABGR16161616F',
597+
'AB4H', # DRM_FORMAT_ABGR16161616F
598+
None,
599+
None,
600+
PixelColorEncoding.RGB,
601+
False,
602+
( 1, 1 ),
603+
( ( 8, ), ),
604+
)
605+
528606
# YUV Packed
529607

530608
YUYV = PixelFormat('YUYV',
@@ -579,6 +657,16 @@ def get_formats():
579657
( ( 4, ), ),
580658
)
581659

660+
XYUV8888 = PixelFormat('XYUV8888',
661+
'XYUV', # DRM_FORMAT_XYUV8888
662+
None,
663+
None,
664+
PixelColorEncoding.YUV,
665+
False,
666+
( 1, 1 ),
667+
( ( 4, ), ),
668+
)
669+
582670
Y210 = PixelFormat('Y210',
583671
'Y210', # DRM_FORMAT_Y210
584672
None,
@@ -647,6 +735,33 @@ def get_formats():
647735
( 2, 1, 2, 1), ),
648736
)
649737

738+
P010 = PixelFormat('P010',
739+
'P010', None, None,
740+
PixelColorEncoding.YUV,
741+
False,
742+
( 2, 2 ),
743+
( ( 2, 1, 1, 1 ),
744+
( 4, 1, 2, 2 ), ),
745+
)
746+
747+
P012 = PixelFormat('P012',
748+
'P012', None, None,
749+
PixelColorEncoding.YUV,
750+
False,
751+
( 2, 2 ),
752+
( ( 2, 1, 1, 1 ),
753+
( 4, 1, 2, 2 ), ),
754+
)
755+
756+
P016 = PixelFormat('P016',
757+
'P016', None, None,
758+
PixelColorEncoding.YUV,
759+
False,
760+
( 2, 2 ),
761+
( ( 2, 1, 1, 1 ),
762+
( 4, 1, 2, 2 ), ),
763+
)
764+
650765
P030 = PixelFormat('P030',
651766
'P030', None, None,
652767
PixelColorEncoding.YUV,
@@ -673,6 +788,36 @@ def get_formats():
673788
( ( 4, ), ),
674789
)
675790

791+
XVYU2101010 = PixelFormat('XVYU2101010',
792+
'XV30', # DRM_FORMAT_XVYU2101010
793+
None,
794+
None,
795+
PixelColorEncoding.YUV,
796+
False,
797+
( 1, 1 ),
798+
( ( 4, ), ),
799+
)
800+
801+
XVYU12_16161616 = PixelFormat('XVYU12_16161616',
802+
'XV36', # DRM_FORMAT_XVYU12_16161616
803+
None,
804+
None,
805+
PixelColorEncoding.YUV,
806+
False,
807+
( 1, 1 ),
808+
( ( 8, ), ),
809+
)
810+
811+
XVYU16161616 = PixelFormat('XVYU16161616',
812+
'XV48', # DRM_FORMAT_XVYU16161616
813+
None,
814+
None,
815+
PixelColorEncoding.YUV,
816+
False,
817+
( 1, 1 ),
818+
( ( 8, ), ),
819+
)
820+
676821
# YUV Planar
677822

678823
YUV420 = PixelFormat('YUV420',

0 commit comments

Comments
 (0)