1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 #[doc = " Expresses the color space used to interpret video pixel values.\n\n This list has a separate entry for each variant of a color space standard.\n\n For this reason, should we ever add support for the RGB variant of 709, for\n example, we\'d add a separate entry to this list for that variant. Similarly\n for the RGB variants of 2020 or 2100. Similarly for the YcCbcCrc variant of\n 2020. Similarly for the ICtCp variant of 2100.\n\n See ImageFormatIsSupportedColorSpaceForPixelFormat() for whether a\n combination of `PixelFormat` and `ColorSpace` is potentially supported.\n\n Generally, a `ColorSpace` is not supported for any `PixelFormat` whose\n bits-per-sample isn\'t compatible with the color space\'s spec, nor for any\n `PixelFormat` which is a mismatch in terms of RGB vs. YUV.\n\n The \"limited range\" in comments below refers to where black and white are\n defined to be (and simimlar for chroma), but should not be interpreted as\n guaranteeing that there won\'t be values outside the nominal \"limited range\".\n In other words, \"limited range\" doesn\'t necessarily mean there won\'t be any\n values below black or above white, or outside the \"limited\" chroma range.\n For \"full range\", black is 0 and white is the max possible/permitted numeric\n value (and similar for chroma).\n"]
8 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9 #[repr(u32)]
10 pub enum ColorSpace {
11 Invalid = 0,
12 Srgb = 1,
13 Rec601Ntsc = 2,
14 Rec601NtscFullRange = 3,
15 Rec601Pal = 4,
16 Rec601PalFullRange = 5,
17 Rec709 = 6,
18 Rec2020 = 7,
19 Rec2100 = 8,
20 Passthrough = 9,
21 DoNotCare = 4294967294,
22 UnknownOrdinal_(u32) = 4294967295,
23 }
24 impl ::std::convert::From<u32> for ColorSpace {
25 fn from(value: u32) -> Self {
26 match value {
27 0 => Self::Invalid,
28 1 => Self::Srgb,
29 2 => Self::Rec601Ntsc,
30 3 => Self::Rec601NtscFullRange,
31 4 => Self::Rec601Pal,
32 5 => Self::Rec601PalFullRange,
33 6 => Self::Rec709,
34 7 => Self::Rec2020,
35 8 => Self::Rec2100,
36 9 => Self::Passthrough,
37 4294967294 => Self::DoNotCare,
38
39 _ => Self::UnknownOrdinal_(value),
40 }
41 }
42 }
43
44 impl ::std::convert::From<ColorSpace> for u32 {
45 fn from(value: ColorSpace) -> Self {
46 match value {
47 ColorSpace::Invalid => 0,
48 ColorSpace::Srgb => 1,
49 ColorSpace::Rec601Ntsc => 2,
50 ColorSpace::Rec601NtscFullRange => 3,
51 ColorSpace::Rec601Pal => 4,
52 ColorSpace::Rec601PalFullRange => 5,
53 ColorSpace::Rec709 => 6,
54 ColorSpace::Rec2020 => 7,
55 ColorSpace::Rec2100 => 8,
56 ColorSpace::Passthrough => 9,
57 ColorSpace::DoNotCare => 4294967294,
58
59 ColorSpace::UnknownOrdinal_(value) => value,
60 }
61 }
62 }
63
64 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ColorSpace, ___E> for ColorSpace
65 where
66 ___E: ?Sized,
67 {
68 #[inline]
69 fn encode(
70 self,
71 encoder: &mut ___E,
72 out: &mut ::core::mem::MaybeUninit<crate::wire::ColorSpace>,
73 _: (),
74 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
75 ::fidl_next::Encode::encode(&self, encoder, out, ())
76 }
77 }
78
79 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ColorSpace, ___E> for &'a ColorSpace
80 where
81 ___E: ?Sized,
82 {
83 #[inline]
84 fn encode(
85 self,
86 encoder: &mut ___E,
87 out: &mut ::core::mem::MaybeUninit<crate::wire::ColorSpace>,
88 _: (),
89 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
90 ::fidl_next::munge!(let crate::wire::ColorSpace { value } = out);
91 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
92 ColorSpace::Invalid => 0,
93
94 ColorSpace::Srgb => 1,
95
96 ColorSpace::Rec601Ntsc => 2,
97
98 ColorSpace::Rec601NtscFullRange => 3,
99
100 ColorSpace::Rec601Pal => 4,
101
102 ColorSpace::Rec601PalFullRange => 5,
103
104 ColorSpace::Rec709 => 6,
105
106 ColorSpace::Rec2020 => 7,
107
108 ColorSpace::Rec2100 => 8,
109
110 ColorSpace::Passthrough => 9,
111
112 ColorSpace::DoNotCare => 4294967294,
113
114 ColorSpace::UnknownOrdinal_(value) => value,
115 }));
116
117 Ok(())
118 }
119 }
120
121 impl ::core::convert::From<crate::wire::ColorSpace> for ColorSpace {
122 fn from(wire: crate::wire::ColorSpace) -> Self {
123 match u32::from(wire.value) {
124 0 => Self::Invalid,
125
126 1 => Self::Srgb,
127
128 2 => Self::Rec601Ntsc,
129
130 3 => Self::Rec601NtscFullRange,
131
132 4 => Self::Rec601Pal,
133
134 5 => Self::Rec601PalFullRange,
135
136 6 => Self::Rec709,
137
138 7 => Self::Rec2020,
139
140 8 => Self::Rec2100,
141
142 9 => Self::Passthrough,
143
144 4294967294 => Self::DoNotCare,
145
146 value => Self::UnknownOrdinal_(value),
147 }
148 }
149 }
150
151 impl ::fidl_next::FromWire<crate::wire::ColorSpace> for ColorSpace {
152 #[inline]
153 fn from_wire(wire: crate::wire::ColorSpace) -> Self {
154 Self::from(wire)
155 }
156 }
157
158 impl ::fidl_next::FromWireRef<crate::wire::ColorSpace> for ColorSpace {
159 #[inline]
160 fn from_wire_ref(wire: &crate::wire::ColorSpace) -> Self {
161 Self::from(*wire)
162 }
163 }
164
165 #[doc = " The upper 8 bits are a vendor code. The lower 56 bits are vendor-defined.\n\n The defined `PixelFormatModifier` values are specific, complete, and valid\n values (except for `INVALID` and `DO_NOT_CARE` which have their own\n meanings).\n\n Some other valid or potentially-valid `pixel_format_modifier` values are not\n defined as a `PixelFormatModifier` value, typically because the value isn\'t\n used in practice (or potentially is newly used but not yet defined in\n `PixelFormatModifier`). It is permitted to specify such a value as a\n `PixelFormatModifier` value in a `pixel_format_modifier` field, despite the\n lack of corresponding defined `PixelFormatModifier` value. If such a value\n is used outside test code, please consider adding it as a defined value in\n `PixelFormatModifier`. All such values must conform to the upper 8 bits\n vendor code (don\'t define/use values outside the/an appropriate vendor\n code).\n\n The separately-defined `FORMAT_MODIFIER_*` uint64 values are vendor-specific\n bit field values, not complete valid values on their own. These uint64\n values can be used to help create or interpret a `PixelFormatModifier` value\n in terms of vendor-specific bitfields.\n\n When the `pixel_format_modifier` is set to a supported value (excluding\n `DO_NOT_CARE`, `INVALID`, `LINEAR`), the arrangement of pixel data otherwise\n specified by the `pixel_format` field is \"modified\", typically to allow for\n some combination of tiling, compression (typically lossless, typically for\n memory bandwidth reduction not framebuffer size reduction), transaction\n elimination, dirt tracking, but typically not modifying the bit depth of the\n `pixel_format`. In some cases there\'s a per-image or per-tile header\n involved, or similar. The `pixel_format` field often still needs to be set\n to a valid supported value that works in combination with the\n `pixel_format_modifier`, and that `pixel_format` value can also contribute\n to the overall meaning of the `ImageFormat`. In other words, the \"modifier\"\n part of the name is more accurate than \"override\" would be.\n"]
166 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
167 #[repr(u64)]
168 pub enum PixelFormatModifier {
169 DoNotCare = 72057594037927934,
170 Invalid = 72057594037927935,
171 Linear = 0,
172 IntelI915XTiled = 72057594037927937,
173 IntelI915YTiled = 72057594037927938,
174 IntelI915YfTiled = 72057594037927939,
175 IntelI915YTiledCcs = 72057594054705154,
176 IntelI915YfTiledCcs = 72057594054705155,
177 ArmAfbc16X16 = 576460752303423489,
178 ArmAfbc32X8 = 576460752303423490,
179 ArmLinearTe = 576460752303427584,
180 ArmAfbc16X16Te = 576460752303427585,
181 ArmAfbc32X8Te = 576460752303427586,
182 ArmAfbc16X16YuvTiledHeader = 576460752303431697,
183 ArmAfbc16X16SplitBlockSparseYuv = 576460752303423601,
184 ArmAfbc16X16SplitBlockSparseYuvTe = 576460752303427697,
185 ArmAfbc16X16SplitBlockSparseYuvTiledHeader = 576460752303431793,
186 ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader = 576460752303435889,
187 GoogleGoldfishOptimal = 7421932185906577409,
188 UnknownOrdinal_(u64) = 7421932185906577410,
189 }
190 impl ::std::convert::From<u64> for PixelFormatModifier {
191 fn from(value: u64) -> Self {
192 match value {
193 72057594037927934 => Self::DoNotCare,
194 72057594037927935 => Self::Invalid,
195 0 => Self::Linear,
196 72057594037927937 => Self::IntelI915XTiled,
197 72057594037927938 => Self::IntelI915YTiled,
198 72057594037927939 => Self::IntelI915YfTiled,
199 72057594054705154 => Self::IntelI915YTiledCcs,
200 72057594054705155 => Self::IntelI915YfTiledCcs,
201 576460752303423489 => Self::ArmAfbc16X16,
202 576460752303423490 => Self::ArmAfbc32X8,
203 576460752303427584 => Self::ArmLinearTe,
204 576460752303427585 => Self::ArmAfbc16X16Te,
205 576460752303427586 => Self::ArmAfbc32X8Te,
206 576460752303431697 => Self::ArmAfbc16X16YuvTiledHeader,
207 576460752303423601 => Self::ArmAfbc16X16SplitBlockSparseYuv,
208 576460752303427697 => Self::ArmAfbc16X16SplitBlockSparseYuvTe,
209 576460752303431793 => Self::ArmAfbc16X16SplitBlockSparseYuvTiledHeader,
210 576460752303435889 => Self::ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader,
211 7421932185906577409 => Self::GoogleGoldfishOptimal,
212
213 _ => Self::UnknownOrdinal_(value),
214 }
215 }
216 }
217
218 impl ::std::convert::From<PixelFormatModifier> for u64 {
219 fn from(value: PixelFormatModifier) -> Self {
220 match value {
221 PixelFormatModifier::DoNotCare => 72057594037927934,
222 PixelFormatModifier::Invalid => 72057594037927935,
223 PixelFormatModifier::Linear => 0,
224 PixelFormatModifier::IntelI915XTiled => 72057594037927937,
225 PixelFormatModifier::IntelI915YTiled => 72057594037927938,
226 PixelFormatModifier::IntelI915YfTiled => 72057594037927939,
227 PixelFormatModifier::IntelI915YTiledCcs => 72057594054705154,
228 PixelFormatModifier::IntelI915YfTiledCcs => 72057594054705155,
229 PixelFormatModifier::ArmAfbc16X16 => 576460752303423489,
230 PixelFormatModifier::ArmAfbc32X8 => 576460752303423490,
231 PixelFormatModifier::ArmLinearTe => 576460752303427584,
232 PixelFormatModifier::ArmAfbc16X16Te => 576460752303427585,
233 PixelFormatModifier::ArmAfbc32X8Te => 576460752303427586,
234 PixelFormatModifier::ArmAfbc16X16YuvTiledHeader => 576460752303431697,
235 PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuv => 576460752303423601,
236 PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTe => 576460752303427697,
237 PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTiledHeader => {
238 576460752303431793
239 }
240 PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader => {
241 576460752303435889
242 }
243 PixelFormatModifier::GoogleGoldfishOptimal => 7421932185906577409,
244
245 PixelFormatModifier::UnknownOrdinal_(value) => value,
246 }
247 }
248 }
249
250 unsafe impl<___E> ::fidl_next::Encode<crate::wire::PixelFormatModifier, ___E>
251 for PixelFormatModifier
252 where
253 ___E: ?Sized,
254 {
255 #[inline]
256 fn encode(
257 self,
258 encoder: &mut ___E,
259 out: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormatModifier>,
260 _: (),
261 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
262 ::fidl_next::Encode::encode(&self, encoder, out, ())
263 }
264 }
265
266 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PixelFormatModifier, ___E>
267 for &'a PixelFormatModifier
268 where
269 ___E: ?Sized,
270 {
271 #[inline]
272 fn encode(
273 self,
274 encoder: &mut ___E,
275 out: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormatModifier>,
276 _: (),
277 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
278 ::fidl_next::munge!(let crate::wire::PixelFormatModifier { value } = out);
279 let _ = value.write(::fidl_next::wire::Uint64::from(match *self {
280 PixelFormatModifier::DoNotCare => 72057594037927934,
281
282 PixelFormatModifier::Invalid => 72057594037927935,
283
284 PixelFormatModifier::Linear => 0,
285
286 PixelFormatModifier::IntelI915XTiled => 72057594037927937,
287
288 PixelFormatModifier::IntelI915YTiled => 72057594037927938,
289
290 PixelFormatModifier::IntelI915YfTiled => 72057594037927939,
291
292 PixelFormatModifier::IntelI915YTiledCcs => 72057594054705154,
293
294 PixelFormatModifier::IntelI915YfTiledCcs => 72057594054705155,
295
296 PixelFormatModifier::ArmAfbc16X16 => 576460752303423489,
297
298 PixelFormatModifier::ArmAfbc32X8 => 576460752303423490,
299
300 PixelFormatModifier::ArmLinearTe => 576460752303427584,
301
302 PixelFormatModifier::ArmAfbc16X16Te => 576460752303427585,
303
304 PixelFormatModifier::ArmAfbc32X8Te => 576460752303427586,
305
306 PixelFormatModifier::ArmAfbc16X16YuvTiledHeader => 576460752303431697,
307
308 PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuv => 576460752303423601,
309
310 PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTe => 576460752303427697,
311
312 PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTiledHeader => {
313 576460752303431793
314 }
315
316 PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader => {
317 576460752303435889
318 }
319
320 PixelFormatModifier::GoogleGoldfishOptimal => 7421932185906577409,
321
322 PixelFormatModifier::UnknownOrdinal_(value) => value,
323 }));
324
325 Ok(())
326 }
327 }
328
329 impl ::core::convert::From<crate::wire::PixelFormatModifier> for PixelFormatModifier {
330 fn from(wire: crate::wire::PixelFormatModifier) -> Self {
331 match u64::from(wire.value) {
332 72057594037927934 => Self::DoNotCare,
333
334 72057594037927935 => Self::Invalid,
335
336 0 => Self::Linear,
337
338 72057594037927937 => Self::IntelI915XTiled,
339
340 72057594037927938 => Self::IntelI915YTiled,
341
342 72057594037927939 => Self::IntelI915YfTiled,
343
344 72057594054705154 => Self::IntelI915YTiledCcs,
345
346 72057594054705155 => Self::IntelI915YfTiledCcs,
347
348 576460752303423489 => Self::ArmAfbc16X16,
349
350 576460752303423490 => Self::ArmAfbc32X8,
351
352 576460752303427584 => Self::ArmLinearTe,
353
354 576460752303427585 => Self::ArmAfbc16X16Te,
355
356 576460752303427586 => Self::ArmAfbc32X8Te,
357
358 576460752303431697 => Self::ArmAfbc16X16YuvTiledHeader,
359
360 576460752303423601 => Self::ArmAfbc16X16SplitBlockSparseYuv,
361
362 576460752303427697 => Self::ArmAfbc16X16SplitBlockSparseYuvTe,
363
364 576460752303431793 => Self::ArmAfbc16X16SplitBlockSparseYuvTiledHeader,
365
366 576460752303435889 => Self::ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader,
367
368 7421932185906577409 => Self::GoogleGoldfishOptimal,
369
370 value => Self::UnknownOrdinal_(value),
371 }
372 }
373 }
374
375 impl ::fidl_next::FromWire<crate::wire::PixelFormatModifier> for PixelFormatModifier {
376 #[inline]
377 fn from_wire(wire: crate::wire::PixelFormatModifier) -> Self {
378 Self::from(wire)
379 }
380 }
381
382 impl ::fidl_next::FromWireRef<crate::wire::PixelFormatModifier> for PixelFormatModifier {
383 #[inline]
384 fn from_wire_ref(wire: &crate::wire::PixelFormatModifier) -> Self {
385 Self::from(*wire)
386 }
387 }
388
389 #[doc = " Expresses the manner in which video pixels are encoded.\n\n The ordering of the channels in the format name reflects the actual layout\n of the channel.\n\n Each of these values is opinionated re. the color spaces that should be\n contained within (in contrast with Vulkan).\n"]
390 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
391 #[repr(u32)]
392 pub enum PixelFormat {
393 Invalid = 0,
394 R8G8B8A8 = 1,
395 R8G8B8X8 = 119,
396 B8G8R8A8 = 101,
397 B8G8R8X8 = 120,
398 I420 = 102,
399 M420 = 103,
400 Nv12 = 104,
401 Yuy2 = 105,
402 Mjpeg = 106,
403 Yv12 = 107,
404 B8G8R8 = 108,
405 R5G6B5 = 109,
406 R3G3B2 = 110,
407 R2G2B2X2 = 111,
408 L8 = 112,
409 R8 = 113,
410 R8G8 = 114,
411 A2R10G10B10 = 115,
412 A2B10G10R10 = 116,
413 P010 = 117,
414 R8G8B8 = 118,
415 DoNotCare = 4294967294,
416 UnknownOrdinal_(u32) = 4294967295,
417 }
418 impl ::std::convert::From<u32> for PixelFormat {
419 fn from(value: u32) -> Self {
420 match value {
421 0 => Self::Invalid,
422 1 => Self::R8G8B8A8,
423 119 => Self::R8G8B8X8,
424 101 => Self::B8G8R8A8,
425 120 => Self::B8G8R8X8,
426 102 => Self::I420,
427 103 => Self::M420,
428 104 => Self::Nv12,
429 105 => Self::Yuy2,
430 106 => Self::Mjpeg,
431 107 => Self::Yv12,
432 108 => Self::B8G8R8,
433 109 => Self::R5G6B5,
434 110 => Self::R3G3B2,
435 111 => Self::R2G2B2X2,
436 112 => Self::L8,
437 113 => Self::R8,
438 114 => Self::R8G8,
439 115 => Self::A2R10G10B10,
440 116 => Self::A2B10G10R10,
441 117 => Self::P010,
442 118 => Self::R8G8B8,
443 4294967294 => Self::DoNotCare,
444
445 _ => Self::UnknownOrdinal_(value),
446 }
447 }
448 }
449
450 impl ::std::convert::From<PixelFormat> for u32 {
451 fn from(value: PixelFormat) -> Self {
452 match value {
453 PixelFormat::Invalid => 0,
454 PixelFormat::R8G8B8A8 => 1,
455 PixelFormat::R8G8B8X8 => 119,
456 PixelFormat::B8G8R8A8 => 101,
457 PixelFormat::B8G8R8X8 => 120,
458 PixelFormat::I420 => 102,
459 PixelFormat::M420 => 103,
460 PixelFormat::Nv12 => 104,
461 PixelFormat::Yuy2 => 105,
462 PixelFormat::Mjpeg => 106,
463 PixelFormat::Yv12 => 107,
464 PixelFormat::B8G8R8 => 108,
465 PixelFormat::R5G6B5 => 109,
466 PixelFormat::R3G3B2 => 110,
467 PixelFormat::R2G2B2X2 => 111,
468 PixelFormat::L8 => 112,
469 PixelFormat::R8 => 113,
470 PixelFormat::R8G8 => 114,
471 PixelFormat::A2R10G10B10 => 115,
472 PixelFormat::A2B10G10R10 => 116,
473 PixelFormat::P010 => 117,
474 PixelFormat::R8G8B8 => 118,
475 PixelFormat::DoNotCare => 4294967294,
476
477 PixelFormat::UnknownOrdinal_(value) => value,
478 }
479 }
480 }
481
482 unsafe impl<___E> ::fidl_next::Encode<crate::wire::PixelFormat, ___E> for PixelFormat
483 where
484 ___E: ?Sized,
485 {
486 #[inline]
487 fn encode(
488 self,
489 encoder: &mut ___E,
490 out: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormat>,
491 _: (),
492 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
493 ::fidl_next::Encode::encode(&self, encoder, out, ())
494 }
495 }
496
497 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PixelFormat, ___E> for &'a PixelFormat
498 where
499 ___E: ?Sized,
500 {
501 #[inline]
502 fn encode(
503 self,
504 encoder: &mut ___E,
505 out: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormat>,
506 _: (),
507 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
508 ::fidl_next::munge!(let crate::wire::PixelFormat { value } = out);
509 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
510 PixelFormat::Invalid => 0,
511
512 PixelFormat::R8G8B8A8 => 1,
513
514 PixelFormat::R8G8B8X8 => 119,
515
516 PixelFormat::B8G8R8A8 => 101,
517
518 PixelFormat::B8G8R8X8 => 120,
519
520 PixelFormat::I420 => 102,
521
522 PixelFormat::M420 => 103,
523
524 PixelFormat::Nv12 => 104,
525
526 PixelFormat::Yuy2 => 105,
527
528 PixelFormat::Mjpeg => 106,
529
530 PixelFormat::Yv12 => 107,
531
532 PixelFormat::B8G8R8 => 108,
533
534 PixelFormat::R5G6B5 => 109,
535
536 PixelFormat::R3G3B2 => 110,
537
538 PixelFormat::R2G2B2X2 => 111,
539
540 PixelFormat::L8 => 112,
541
542 PixelFormat::R8 => 113,
543
544 PixelFormat::R8G8 => 114,
545
546 PixelFormat::A2R10G10B10 => 115,
547
548 PixelFormat::A2B10G10R10 => 116,
549
550 PixelFormat::P010 => 117,
551
552 PixelFormat::R8G8B8 => 118,
553
554 PixelFormat::DoNotCare => 4294967294,
555
556 PixelFormat::UnknownOrdinal_(value) => value,
557 }));
558
559 Ok(())
560 }
561 }
562
563 impl ::core::convert::From<crate::wire::PixelFormat> for PixelFormat {
564 fn from(wire: crate::wire::PixelFormat) -> Self {
565 match u32::from(wire.value) {
566 0 => Self::Invalid,
567
568 1 => Self::R8G8B8A8,
569
570 119 => Self::R8G8B8X8,
571
572 101 => Self::B8G8R8A8,
573
574 120 => Self::B8G8R8X8,
575
576 102 => Self::I420,
577
578 103 => Self::M420,
579
580 104 => Self::Nv12,
581
582 105 => Self::Yuy2,
583
584 106 => Self::Mjpeg,
585
586 107 => Self::Yv12,
587
588 108 => Self::B8G8R8,
589
590 109 => Self::R5G6B5,
591
592 110 => Self::R3G3B2,
593
594 111 => Self::R2G2B2X2,
595
596 112 => Self::L8,
597
598 113 => Self::R8,
599
600 114 => Self::R8G8,
601
602 115 => Self::A2R10G10B10,
603
604 116 => Self::A2B10G10R10,
605
606 117 => Self::P010,
607
608 118 => Self::R8G8B8,
609
610 4294967294 => Self::DoNotCare,
611
612 value => Self::UnknownOrdinal_(value),
613 }
614 }
615 }
616
617 impl ::fidl_next::FromWire<crate::wire::PixelFormat> for PixelFormat {
618 #[inline]
619 fn from_wire(wire: crate::wire::PixelFormat) -> Self {
620 Self::from(wire)
621 }
622 }
623
624 impl ::fidl_next::FromWireRef<crate::wire::PixelFormat> for PixelFormat {
625 #[inline]
626 fn from_wire_ref(wire: &crate::wire::PixelFormat) -> Self {
627 Self::from(*wire)
628 }
629 }
630
631 #[doc = " Describes the format of images.\n"]
632 #[derive(Debug, Default, Clone, PartialEq)]
633 pub struct ImageFormat {
634 pub pixel_format: ::core::option::Option<crate::natural::PixelFormat>,
635
636 pub pixel_format_modifier: ::core::option::Option<crate::natural::PixelFormatModifier>,
637
638 pub color_space: ::core::option::Option<crate::natural::ColorSpace>,
639
640 pub size: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
641
642 pub bytes_per_row: ::core::option::Option<u32>,
643
644 pub display_rect: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::RectU>,
645
646 pub valid_size: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
647
648 pub pixel_aspect_ratio:
649 ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
650 }
651
652 impl ImageFormat {
653 fn __max_ordinal(&self) -> usize {
654 if self.pixel_aspect_ratio.is_some() {
655 return 8;
656 }
657
658 if self.valid_size.is_some() {
659 return 7;
660 }
661
662 if self.display_rect.is_some() {
663 return 6;
664 }
665
666 if self.bytes_per_row.is_some() {
667 return 5;
668 }
669
670 if self.size.is_some() {
671 return 4;
672 }
673
674 if self.color_space.is_some() {
675 return 3;
676 }
677
678 if self.pixel_format_modifier.is_some() {
679 return 2;
680 }
681
682 if self.pixel_format.is_some() {
683 return 1;
684 }
685
686 0
687 }
688 }
689
690 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ImageFormat<'static>, ___E> for ImageFormat
691 where
692 ___E: ::fidl_next::Encoder + ?Sized,
693 {
694 #[inline]
695 fn encode(
696 mut self,
697 encoder: &mut ___E,
698 out: &mut ::core::mem::MaybeUninit<crate::wire::ImageFormat<'static>>,
699 _: (),
700 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
701 ::fidl_next::munge!(let crate::wire::ImageFormat { table } = out);
702
703 let max_ord = self.__max_ordinal();
704
705 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
706 ::fidl_next::Wire::zero_padding(&mut out);
707
708 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
709 ::fidl_next::wire::Envelope,
710 >(encoder, max_ord);
711
712 for i in 1..=max_ord {
713 match i {
714 8 => {
715 if let Some(value) = self.pixel_aspect_ratio.take() {
716 ::fidl_next::wire::Envelope::encode_value::<
717 ::fidl_next_common_fuchsia_math::wire::SizeU,
718 ___E,
719 >(
720 value, preallocated.encoder, &mut out, ()
721 )?;
722 } else {
723 ::fidl_next::wire::Envelope::encode_zero(&mut out)
724 }
725 }
726
727 7 => {
728 if let Some(value) = self.valid_size.take() {
729 ::fidl_next::wire::Envelope::encode_value::<
730 ::fidl_next_common_fuchsia_math::wire::SizeU,
731 ___E,
732 >(
733 value, preallocated.encoder, &mut out, ()
734 )?;
735 } else {
736 ::fidl_next::wire::Envelope::encode_zero(&mut out)
737 }
738 }
739
740 6 => {
741 if let Some(value) = self.display_rect.take() {
742 ::fidl_next::wire::Envelope::encode_value::<
743 ::fidl_next_common_fuchsia_math::wire::RectU,
744 ___E,
745 >(
746 value, preallocated.encoder, &mut out, ()
747 )?;
748 } else {
749 ::fidl_next::wire::Envelope::encode_zero(&mut out)
750 }
751 }
752
753 5 => {
754 if let Some(value) = self.bytes_per_row.take() {
755 ::fidl_next::wire::Envelope::encode_value::<
756 ::fidl_next::wire::Uint32,
757 ___E,
758 >(
759 value, preallocated.encoder, &mut out, ()
760 )?;
761 } else {
762 ::fidl_next::wire::Envelope::encode_zero(&mut out)
763 }
764 }
765
766 4 => {
767 if let Some(value) = self.size.take() {
768 ::fidl_next::wire::Envelope::encode_value::<
769 ::fidl_next_common_fuchsia_math::wire::SizeU,
770 ___E,
771 >(
772 value, preallocated.encoder, &mut out, ()
773 )?;
774 } else {
775 ::fidl_next::wire::Envelope::encode_zero(&mut out)
776 }
777 }
778
779 3 => {
780 if let Some(value) = self.color_space.take() {
781 ::fidl_next::wire::Envelope::encode_value::<
782 crate::wire::ColorSpace,
783 ___E,
784 >(
785 value, preallocated.encoder, &mut out, ()
786 )?;
787 } else {
788 ::fidl_next::wire::Envelope::encode_zero(&mut out)
789 }
790 }
791
792 2 => {
793 if let Some(value) = self.pixel_format_modifier.take() {
794 ::fidl_next::wire::Envelope::encode_value::<
795 crate::wire::PixelFormatModifier,
796 ___E,
797 >(
798 value, preallocated.encoder, &mut out, ()
799 )?;
800 } else {
801 ::fidl_next::wire::Envelope::encode_zero(&mut out)
802 }
803 }
804
805 1 => {
806 if let Some(value) = self.pixel_format.take() {
807 ::fidl_next::wire::Envelope::encode_value::<
808 crate::wire::PixelFormat,
809 ___E,
810 >(
811 value, preallocated.encoder, &mut out, ()
812 )?;
813 } else {
814 ::fidl_next::wire::Envelope::encode_zero(&mut out)
815 }
816 }
817
818 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
819 }
820 unsafe {
821 preallocated.write_next(out.assume_init_ref());
822 }
823 }
824
825 ::fidl_next::wire::Table::encode_len(table, max_ord);
826
827 Ok(())
828 }
829 }
830
831 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ImageFormat<'static>, ___E>
832 for &'a ImageFormat
833 where
834 ___E: ::fidl_next::Encoder + ?Sized,
835 {
836 #[inline]
837 fn encode(
838 self,
839 encoder: &mut ___E,
840 out: &mut ::core::mem::MaybeUninit<crate::wire::ImageFormat<'static>>,
841 _: (),
842 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
843 ::fidl_next::munge!(let crate::wire::ImageFormat { table } = out);
844
845 let max_ord = self.__max_ordinal();
846
847 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
848 ::fidl_next::Wire::zero_padding(&mut out);
849
850 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
851 ::fidl_next::wire::Envelope,
852 >(encoder, max_ord);
853
854 for i in 1..=max_ord {
855 match i {
856 8 => {
857 if let Some(value) = &self.pixel_aspect_ratio {
858 ::fidl_next::wire::Envelope::encode_value::<
859 ::fidl_next_common_fuchsia_math::wire::SizeU,
860 ___E,
861 >(
862 value, preallocated.encoder, &mut out, ()
863 )?;
864 } else {
865 ::fidl_next::wire::Envelope::encode_zero(&mut out)
866 }
867 }
868
869 7 => {
870 if let Some(value) = &self.valid_size {
871 ::fidl_next::wire::Envelope::encode_value::<
872 ::fidl_next_common_fuchsia_math::wire::SizeU,
873 ___E,
874 >(
875 value, preallocated.encoder, &mut out, ()
876 )?;
877 } else {
878 ::fidl_next::wire::Envelope::encode_zero(&mut out)
879 }
880 }
881
882 6 => {
883 if let Some(value) = &self.display_rect {
884 ::fidl_next::wire::Envelope::encode_value::<
885 ::fidl_next_common_fuchsia_math::wire::RectU,
886 ___E,
887 >(
888 value, preallocated.encoder, &mut out, ()
889 )?;
890 } else {
891 ::fidl_next::wire::Envelope::encode_zero(&mut out)
892 }
893 }
894
895 5 => {
896 if let Some(value) = &self.bytes_per_row {
897 ::fidl_next::wire::Envelope::encode_value::<
898 ::fidl_next::wire::Uint32,
899 ___E,
900 >(
901 value, preallocated.encoder, &mut out, ()
902 )?;
903 } else {
904 ::fidl_next::wire::Envelope::encode_zero(&mut out)
905 }
906 }
907
908 4 => {
909 if let Some(value) = &self.size {
910 ::fidl_next::wire::Envelope::encode_value::<
911 ::fidl_next_common_fuchsia_math::wire::SizeU,
912 ___E,
913 >(
914 value, preallocated.encoder, &mut out, ()
915 )?;
916 } else {
917 ::fidl_next::wire::Envelope::encode_zero(&mut out)
918 }
919 }
920
921 3 => {
922 if let Some(value) = &self.color_space {
923 ::fidl_next::wire::Envelope::encode_value::<
924 crate::wire::ColorSpace,
925 ___E,
926 >(
927 value, preallocated.encoder, &mut out, ()
928 )?;
929 } else {
930 ::fidl_next::wire::Envelope::encode_zero(&mut out)
931 }
932 }
933
934 2 => {
935 if let Some(value) = &self.pixel_format_modifier {
936 ::fidl_next::wire::Envelope::encode_value::<
937 crate::wire::PixelFormatModifier,
938 ___E,
939 >(
940 value, preallocated.encoder, &mut out, ()
941 )?;
942 } else {
943 ::fidl_next::wire::Envelope::encode_zero(&mut out)
944 }
945 }
946
947 1 => {
948 if let Some(value) = &self.pixel_format {
949 ::fidl_next::wire::Envelope::encode_value::<
950 crate::wire::PixelFormat,
951 ___E,
952 >(
953 value, preallocated.encoder, &mut out, ()
954 )?;
955 } else {
956 ::fidl_next::wire::Envelope::encode_zero(&mut out)
957 }
958 }
959
960 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
961 }
962 unsafe {
963 preallocated.write_next(out.assume_init_ref());
964 }
965 }
966
967 ::fidl_next::wire::Table::encode_len(table, max_ord);
968
969 Ok(())
970 }
971 }
972
973 impl<'de> ::fidl_next::FromWire<crate::wire::ImageFormat<'de>> for ImageFormat {
974 #[inline]
975 fn from_wire(wire_: crate::wire::ImageFormat<'de>) -> Self {
976 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
977
978 let pixel_format = wire_.table.get(1);
979
980 let pixel_format_modifier = wire_.table.get(2);
981
982 let color_space = wire_.table.get(3);
983
984 let size = wire_.table.get(4);
985
986 let bytes_per_row = wire_.table.get(5);
987
988 let display_rect = wire_.table.get(6);
989
990 let valid_size = wire_.table.get(7);
991
992 let pixel_aspect_ratio = wire_.table.get(8);
993
994 Self {
995 pixel_format: pixel_format.map(|envelope| {
996 ::fidl_next::FromWire::from_wire(unsafe {
997 envelope.read_unchecked::<crate::wire::PixelFormat>()
998 })
999 }),
1000
1001 pixel_format_modifier: pixel_format_modifier.map(|envelope| {
1002 ::fidl_next::FromWire::from_wire(unsafe {
1003 envelope.read_unchecked::<crate::wire::PixelFormatModifier>()
1004 })
1005 }),
1006
1007 color_space: color_space.map(|envelope| {
1008 ::fidl_next::FromWire::from_wire(unsafe {
1009 envelope.read_unchecked::<crate::wire::ColorSpace>()
1010 })
1011 }),
1012
1013 size: size.map(|envelope| {
1014 ::fidl_next::FromWire::from_wire(unsafe {
1015 envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1016 })
1017 }),
1018
1019 bytes_per_row: bytes_per_row.map(|envelope| {
1020 ::fidl_next::FromWire::from_wire(unsafe {
1021 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
1022 })
1023 }),
1024
1025 display_rect: display_rect.map(|envelope| {
1026 ::fidl_next::FromWire::from_wire(unsafe {
1027 envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::RectU>()
1028 })
1029 }),
1030
1031 valid_size: valid_size.map(|envelope| {
1032 ::fidl_next::FromWire::from_wire(unsafe {
1033 envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1034 })
1035 }),
1036
1037 pixel_aspect_ratio: pixel_aspect_ratio.map(|envelope| {
1038 ::fidl_next::FromWire::from_wire(unsafe {
1039 envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1040 })
1041 }),
1042 }
1043 }
1044 }
1045
1046 impl<'de> ::fidl_next::FromWireRef<crate::wire::ImageFormat<'de>> for ImageFormat {
1047 #[inline]
1048 fn from_wire_ref(wire: &crate::wire::ImageFormat<'de>) -> Self {
1049 Self {
1050 pixel_format: wire.table.get(1).map(|envelope| {
1051 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1052 envelope.deref_unchecked::<crate::wire::PixelFormat>()
1053 })
1054 }),
1055
1056 pixel_format_modifier: wire.table.get(2).map(|envelope| {
1057 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1058 envelope.deref_unchecked::<crate::wire::PixelFormatModifier>()
1059 })
1060 }),
1061
1062 color_space: wire.table.get(3).map(|envelope| {
1063 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1064 envelope.deref_unchecked::<crate::wire::ColorSpace>()
1065 })
1066 }),
1067
1068 size: wire.table.get(4).map(|envelope| {
1069 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1070 envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1071 })
1072 }),
1073
1074 bytes_per_row: wire.table.get(5).map(|envelope| {
1075 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1076 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
1077 })
1078 }),
1079
1080 display_rect: wire.table.get(6).map(|envelope| {
1081 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1082 envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::RectU>()
1083 })
1084 }),
1085
1086 valid_size: wire.table.get(7).map(|envelope| {
1087 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1088 envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1089 })
1090 }),
1091
1092 pixel_aspect_ratio: wire.table.get(8).map(|envelope| {
1093 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1094 envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1095 })
1096 }),
1097 }
1098 }
1099 }
1100}
1101
1102pub mod wire {
1103
1104 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1106 #[repr(transparent)]
1107 pub struct ColorSpace {
1108 pub(crate) value: ::fidl_next::wire::Uint32,
1109 }
1110
1111 impl ::fidl_next::Constrained for ColorSpace {
1112 type Constraint = ();
1113
1114 fn validate(
1115 _: ::fidl_next::Slot<'_, Self>,
1116 _: Self::Constraint,
1117 ) -> Result<(), ::fidl_next::ValidationError> {
1118 Ok(())
1119 }
1120 }
1121
1122 unsafe impl ::fidl_next::Wire for ColorSpace {
1123 type Narrowed<'de> = Self;
1124
1125 #[inline]
1126 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1127 }
1129 }
1130
1131 impl ColorSpace {
1132 pub const INVALID: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(0) };
1133
1134 pub const SRGB: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(1) };
1135
1136 pub const REC601_NTSC: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(2) };
1137
1138 pub const REC601_NTSC_FULL_RANGE: ColorSpace =
1139 ColorSpace { value: ::fidl_next::wire::Uint32(3) };
1140
1141 pub const REC601_PAL: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(4) };
1142
1143 pub const REC601_PAL_FULL_RANGE: ColorSpace =
1144 ColorSpace { value: ::fidl_next::wire::Uint32(5) };
1145
1146 pub const REC709: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(6) };
1147
1148 pub const REC2020: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(7) };
1149
1150 pub const REC2100: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(8) };
1151
1152 pub const PASSTHROUGH: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(9) };
1153
1154 pub const DO_NOT_CARE: ColorSpace =
1155 ColorSpace { value: ::fidl_next::wire::Uint32(4294967294) };
1156 }
1157
1158 unsafe impl<___D> ::fidl_next::Decode<___D> for ColorSpace
1159 where
1160 ___D: ?Sized,
1161 {
1162 fn decode(
1163 slot: ::fidl_next::Slot<'_, Self>,
1164 _: &mut ___D,
1165 _: (),
1166 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1167 Ok(())
1168 }
1169 }
1170
1171 impl ::core::convert::From<crate::natural::ColorSpace> for ColorSpace {
1172 fn from(natural: crate::natural::ColorSpace) -> Self {
1173 match natural {
1174 crate::natural::ColorSpace::Invalid => ColorSpace::INVALID,
1175
1176 crate::natural::ColorSpace::Srgb => ColorSpace::SRGB,
1177
1178 crate::natural::ColorSpace::Rec601Ntsc => ColorSpace::REC601_NTSC,
1179
1180 crate::natural::ColorSpace::Rec601NtscFullRange => {
1181 ColorSpace::REC601_NTSC_FULL_RANGE
1182 }
1183
1184 crate::natural::ColorSpace::Rec601Pal => ColorSpace::REC601_PAL,
1185
1186 crate::natural::ColorSpace::Rec601PalFullRange => ColorSpace::REC601_PAL_FULL_RANGE,
1187
1188 crate::natural::ColorSpace::Rec709 => ColorSpace::REC709,
1189
1190 crate::natural::ColorSpace::Rec2020 => ColorSpace::REC2020,
1191
1192 crate::natural::ColorSpace::Rec2100 => ColorSpace::REC2100,
1193
1194 crate::natural::ColorSpace::Passthrough => ColorSpace::PASSTHROUGH,
1195
1196 crate::natural::ColorSpace::DoNotCare => ColorSpace::DO_NOT_CARE,
1197
1198 crate::natural::ColorSpace::UnknownOrdinal_(value) => {
1199 ColorSpace { value: ::fidl_next::wire::Uint32::from(value) }
1200 }
1201 }
1202 }
1203 }
1204
1205 impl ::fidl_next::IntoNatural for ColorSpace {
1206 type Natural = crate::natural::ColorSpace;
1207 }
1208
1209 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1211 #[repr(transparent)]
1212 pub struct PixelFormatModifier {
1213 pub(crate) value: ::fidl_next::wire::Uint64,
1214 }
1215
1216 impl ::fidl_next::Constrained for PixelFormatModifier {
1217 type Constraint = ();
1218
1219 fn validate(
1220 _: ::fidl_next::Slot<'_, Self>,
1221 _: Self::Constraint,
1222 ) -> Result<(), ::fidl_next::ValidationError> {
1223 Ok(())
1224 }
1225 }
1226
1227 unsafe impl ::fidl_next::Wire for PixelFormatModifier {
1228 type Narrowed<'de> = Self;
1229
1230 #[inline]
1231 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1232 }
1234 }
1235
1236 impl PixelFormatModifier {
1237 pub const DO_NOT_CARE: PixelFormatModifier =
1238 PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594037927934) };
1239
1240 pub const INVALID: PixelFormatModifier =
1241 PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594037927935) };
1242
1243 pub const LINEAR: PixelFormatModifier =
1244 PixelFormatModifier { value: ::fidl_next::wire::Uint64(0) };
1245
1246 pub const INTEL_I915_X_TILED: PixelFormatModifier =
1247 PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594037927937) };
1248
1249 pub const INTEL_I915_Y_TILED: PixelFormatModifier =
1250 PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594037927938) };
1251
1252 pub const INTEL_I915_YF_TILED: PixelFormatModifier =
1253 PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594037927939) };
1254
1255 pub const INTEL_I915_Y_TILED_CCS: PixelFormatModifier =
1256 PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594054705154) };
1257
1258 pub const INTEL_I915_YF_TILED_CCS: PixelFormatModifier =
1259 PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594054705155) };
1260
1261 pub const ARM_AFBC_16_X16: PixelFormatModifier =
1262 PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303423489) };
1263
1264 pub const ARM_AFBC_32_X8: PixelFormatModifier =
1265 PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303423490) };
1266
1267 pub const ARM_LINEAR_TE: PixelFormatModifier =
1268 PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303427584) };
1269
1270 pub const ARM_AFBC_16_X16_TE: PixelFormatModifier =
1271 PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303427585) };
1272
1273 pub const ARM_AFBC_32_X8_TE: PixelFormatModifier =
1274 PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303427586) };
1275
1276 pub const ARM_AFBC_16_X16_YUV_TILED_HEADER: PixelFormatModifier =
1277 PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303431697) };
1278
1279 pub const ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV: PixelFormatModifier =
1280 PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303423601) };
1281
1282 pub const ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TE: PixelFormatModifier =
1283 PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303427697) };
1284
1285 pub const ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TILED_HEADER: PixelFormatModifier =
1286 PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303431793) };
1287
1288 pub const ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TE_TILED_HEADER: PixelFormatModifier =
1289 PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303435889) };
1290
1291 pub const GOOGLE_GOLDFISH_OPTIMAL: PixelFormatModifier =
1292 PixelFormatModifier { value: ::fidl_next::wire::Uint64(7421932185906577409) };
1293 }
1294
1295 unsafe impl<___D> ::fidl_next::Decode<___D> for PixelFormatModifier
1296 where
1297 ___D: ?Sized,
1298 {
1299 fn decode(
1300 slot: ::fidl_next::Slot<'_, Self>,
1301 _: &mut ___D,
1302 _: (),
1303 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1304 Ok(())
1305 }
1306 }
1307
1308 impl ::core::convert::From<crate::natural::PixelFormatModifier> for PixelFormatModifier {
1309 fn from(natural: crate::natural::PixelFormatModifier) -> Self {
1310 match natural {
1311
1312 crate::natural::PixelFormatModifier::DoNotCare => PixelFormatModifier::DO_NOT_CARE,
1313
1314 crate::natural::PixelFormatModifier::Invalid => PixelFormatModifier::INVALID,
1315
1316 crate::natural::PixelFormatModifier::Linear => PixelFormatModifier::LINEAR,
1317
1318 crate::natural::PixelFormatModifier::IntelI915XTiled => PixelFormatModifier::INTEL_I915_X_TILED,
1319
1320 crate::natural::PixelFormatModifier::IntelI915YTiled => PixelFormatModifier::INTEL_I915_Y_TILED,
1321
1322 crate::natural::PixelFormatModifier::IntelI915YfTiled => PixelFormatModifier::INTEL_I915_YF_TILED,
1323
1324 crate::natural::PixelFormatModifier::IntelI915YTiledCcs => PixelFormatModifier::INTEL_I915_Y_TILED_CCS,
1325
1326 crate::natural::PixelFormatModifier::IntelI915YfTiledCcs => PixelFormatModifier::INTEL_I915_YF_TILED_CCS,
1327
1328 crate::natural::PixelFormatModifier::ArmAfbc16X16 => PixelFormatModifier::ARM_AFBC_16_X16,
1329
1330 crate::natural::PixelFormatModifier::ArmAfbc32X8 => PixelFormatModifier::ARM_AFBC_32_X8,
1331
1332 crate::natural::PixelFormatModifier::ArmLinearTe => PixelFormatModifier::ARM_LINEAR_TE,
1333
1334 crate::natural::PixelFormatModifier::ArmAfbc16X16Te => PixelFormatModifier::ARM_AFBC_16_X16_TE,
1335
1336 crate::natural::PixelFormatModifier::ArmAfbc32X8Te => PixelFormatModifier::ARM_AFBC_32_X8_TE,
1337
1338 crate::natural::PixelFormatModifier::ArmAfbc16X16YuvTiledHeader => PixelFormatModifier::ARM_AFBC_16_X16_YUV_TILED_HEADER,
1339
1340 crate::natural::PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuv => PixelFormatModifier::ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV,
1341
1342 crate::natural::PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTe => PixelFormatModifier::ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TE,
1343
1344 crate::natural::PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTiledHeader => PixelFormatModifier::ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TILED_HEADER,
1345
1346 crate::natural::PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader => PixelFormatModifier::ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TE_TILED_HEADER,
1347
1348 crate::natural::PixelFormatModifier::GoogleGoldfishOptimal => PixelFormatModifier::GOOGLE_GOLDFISH_OPTIMAL,
1349
1350
1351 crate::natural::PixelFormatModifier::UnknownOrdinal_(value) => PixelFormatModifier {
1352 value: ::fidl_next::wire::Uint64::from(value),
1353 }
1354
1355 }
1356 }
1357 }
1358
1359 impl ::fidl_next::IntoNatural for PixelFormatModifier {
1360 type Natural = crate::natural::PixelFormatModifier;
1361 }
1362
1363 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1365 #[repr(transparent)]
1366 pub struct PixelFormat {
1367 pub(crate) value: ::fidl_next::wire::Uint32,
1368 }
1369
1370 impl ::fidl_next::Constrained for PixelFormat {
1371 type Constraint = ();
1372
1373 fn validate(
1374 _: ::fidl_next::Slot<'_, Self>,
1375 _: Self::Constraint,
1376 ) -> Result<(), ::fidl_next::ValidationError> {
1377 Ok(())
1378 }
1379 }
1380
1381 unsafe impl ::fidl_next::Wire for PixelFormat {
1382 type Narrowed<'de> = Self;
1383
1384 #[inline]
1385 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1386 }
1388 }
1389
1390 impl PixelFormat {
1391 pub const INVALID: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(0) };
1392
1393 pub const R8_G8_B8_A8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(1) };
1394
1395 pub const R8_G8_B8_X8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(119) };
1396
1397 pub const B8_G8_R8_A8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(101) };
1398
1399 pub const B8_G8_R8_X8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(120) };
1400
1401 pub const I420: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(102) };
1402
1403 pub const M420: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(103) };
1404
1405 pub const NV12: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(104) };
1406
1407 pub const YUY2: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(105) };
1408
1409 pub const MJPEG: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(106) };
1410
1411 pub const YV12: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(107) };
1412
1413 pub const B8_G8_R8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(108) };
1414
1415 pub const R5_G6_B5: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(109) };
1416
1417 pub const R3_G3_B2: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(110) };
1418
1419 pub const R2_G2_B2_X2: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(111) };
1420
1421 pub const L8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(112) };
1422
1423 pub const R8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(113) };
1424
1425 pub const R8_G8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(114) };
1426
1427 pub const A2_R10_G10_B10: PixelFormat =
1428 PixelFormat { value: ::fidl_next::wire::Uint32(115) };
1429
1430 pub const A2_B10_G10_R10: PixelFormat =
1431 PixelFormat { value: ::fidl_next::wire::Uint32(116) };
1432
1433 pub const P010: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(117) };
1434
1435 pub const R8_G8_B8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(118) };
1436
1437 pub const DO_NOT_CARE: PixelFormat =
1438 PixelFormat { value: ::fidl_next::wire::Uint32(4294967294) };
1439 }
1440
1441 unsafe impl<___D> ::fidl_next::Decode<___D> for PixelFormat
1442 where
1443 ___D: ?Sized,
1444 {
1445 fn decode(
1446 slot: ::fidl_next::Slot<'_, Self>,
1447 _: &mut ___D,
1448 _: (),
1449 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1450 Ok(())
1451 }
1452 }
1453
1454 impl ::core::convert::From<crate::natural::PixelFormat> for PixelFormat {
1455 fn from(natural: crate::natural::PixelFormat) -> Self {
1456 match natural {
1457 crate::natural::PixelFormat::Invalid => PixelFormat::INVALID,
1458
1459 crate::natural::PixelFormat::R8G8B8A8 => PixelFormat::R8_G8_B8_A8,
1460
1461 crate::natural::PixelFormat::R8G8B8X8 => PixelFormat::R8_G8_B8_X8,
1462
1463 crate::natural::PixelFormat::B8G8R8A8 => PixelFormat::B8_G8_R8_A8,
1464
1465 crate::natural::PixelFormat::B8G8R8X8 => PixelFormat::B8_G8_R8_X8,
1466
1467 crate::natural::PixelFormat::I420 => PixelFormat::I420,
1468
1469 crate::natural::PixelFormat::M420 => PixelFormat::M420,
1470
1471 crate::natural::PixelFormat::Nv12 => PixelFormat::NV12,
1472
1473 crate::natural::PixelFormat::Yuy2 => PixelFormat::YUY2,
1474
1475 crate::natural::PixelFormat::Mjpeg => PixelFormat::MJPEG,
1476
1477 crate::natural::PixelFormat::Yv12 => PixelFormat::YV12,
1478
1479 crate::natural::PixelFormat::B8G8R8 => PixelFormat::B8_G8_R8,
1480
1481 crate::natural::PixelFormat::R5G6B5 => PixelFormat::R5_G6_B5,
1482
1483 crate::natural::PixelFormat::R3G3B2 => PixelFormat::R3_G3_B2,
1484
1485 crate::natural::PixelFormat::R2G2B2X2 => PixelFormat::R2_G2_B2_X2,
1486
1487 crate::natural::PixelFormat::L8 => PixelFormat::L8,
1488
1489 crate::natural::PixelFormat::R8 => PixelFormat::R8,
1490
1491 crate::natural::PixelFormat::R8G8 => PixelFormat::R8_G8,
1492
1493 crate::natural::PixelFormat::A2R10G10B10 => PixelFormat::A2_R10_G10_B10,
1494
1495 crate::natural::PixelFormat::A2B10G10R10 => PixelFormat::A2_B10_G10_R10,
1496
1497 crate::natural::PixelFormat::P010 => PixelFormat::P010,
1498
1499 crate::natural::PixelFormat::R8G8B8 => PixelFormat::R8_G8_B8,
1500
1501 crate::natural::PixelFormat::DoNotCare => PixelFormat::DO_NOT_CARE,
1502
1503 crate::natural::PixelFormat::UnknownOrdinal_(value) => {
1504 PixelFormat { value: ::fidl_next::wire::Uint32::from(value) }
1505 }
1506 }
1507 }
1508 }
1509
1510 impl ::fidl_next::IntoNatural for PixelFormat {
1511 type Natural = crate::natural::PixelFormat;
1512 }
1513
1514 #[repr(C)]
1516 pub struct ImageFormat<'de> {
1517 pub(crate) table: ::fidl_next::wire::Table<'de>,
1518 }
1519
1520 impl<'de> Drop for ImageFormat<'de> {
1521 fn drop(&mut self) {
1522 let _ = self
1523 .table
1524 .get(1)
1525 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::PixelFormat>() });
1526
1527 let _ = self.table.get(2).map(|envelope| unsafe {
1528 envelope.read_unchecked::<crate::wire::PixelFormatModifier>()
1529 });
1530
1531 let _ = self
1532 .table
1533 .get(3)
1534 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::ColorSpace>() });
1535
1536 let _ = self.table.get(4).map(|envelope| unsafe {
1537 envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1538 });
1539
1540 let _ = self
1541 .table
1542 .get(5)
1543 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
1544
1545 let _ = self.table.get(6).map(|envelope| unsafe {
1546 envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::RectU>()
1547 });
1548
1549 let _ = self.table.get(7).map(|envelope| unsafe {
1550 envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1551 });
1552
1553 let _ = self.table.get(8).map(|envelope| unsafe {
1554 envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1555 });
1556 }
1557 }
1558
1559 impl ::fidl_next::Constrained for ImageFormat<'_> {
1560 type Constraint = ();
1561
1562 fn validate(
1563 _: ::fidl_next::Slot<'_, Self>,
1564 _: Self::Constraint,
1565 ) -> Result<(), ::fidl_next::ValidationError> {
1566 Ok(())
1567 }
1568 }
1569
1570 unsafe impl ::fidl_next::Wire for ImageFormat<'static> {
1571 type Narrowed<'de> = ImageFormat<'de>;
1572
1573 #[inline]
1574 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1575 ::fidl_next::munge!(let Self { table } = out);
1576 ::fidl_next::wire::Table::zero_padding(table);
1577 }
1578 }
1579
1580 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ImageFormat<'de>
1581 where
1582 ___D: ::fidl_next::Decoder<'de> + ?Sized,
1583 {
1584 fn decode(
1585 slot: ::fidl_next::Slot<'_, Self>,
1586 decoder: &mut ___D,
1587 _: (),
1588 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1589 ::fidl_next::munge!(let Self { table } = slot);
1590
1591 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1592 match ordinal {
1593 0 => unsafe { ::core::hint::unreachable_unchecked() },
1594
1595 1 => {
1596 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::PixelFormat>(
1597 slot.as_mut(),
1598 decoder,
1599 (),
1600 )?;
1601
1602 Ok(())
1603 }
1604
1605 2 => {
1606 ::fidl_next::wire::Envelope::decode_as::<
1607 ___D,
1608 crate::wire::PixelFormatModifier,
1609 >(slot.as_mut(), decoder, ())?;
1610
1611 Ok(())
1612 }
1613
1614 3 => {
1615 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::ColorSpace>(
1616 slot.as_mut(),
1617 decoder,
1618 (),
1619 )?;
1620
1621 Ok(())
1622 }
1623
1624 4 => {
1625 ::fidl_next::wire::Envelope::decode_as::<
1626 ___D,
1627 ::fidl_next_common_fuchsia_math::wire::SizeU,
1628 >(slot.as_mut(), decoder, ())?;
1629
1630 Ok(())
1631 }
1632
1633 5 => {
1634 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
1635 slot.as_mut(),
1636 decoder,
1637 (),
1638 )?;
1639
1640 Ok(())
1641 }
1642
1643 6 => {
1644 ::fidl_next::wire::Envelope::decode_as::<
1645 ___D,
1646 ::fidl_next_common_fuchsia_math::wire::RectU,
1647 >(slot.as_mut(), decoder, ())?;
1648
1649 Ok(())
1650 }
1651
1652 7 => {
1653 ::fidl_next::wire::Envelope::decode_as::<
1654 ___D,
1655 ::fidl_next_common_fuchsia_math::wire::SizeU,
1656 >(slot.as_mut(), decoder, ())?;
1657
1658 Ok(())
1659 }
1660
1661 8 => {
1662 ::fidl_next::wire::Envelope::decode_as::<
1663 ___D,
1664 ::fidl_next_common_fuchsia_math::wire::SizeU,
1665 >(slot.as_mut(), decoder, ())?;
1666
1667 Ok(())
1668 }
1669
1670 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
1671 }
1672 })
1673 }
1674 }
1675
1676 impl<'de> ImageFormat<'de> {
1677 pub fn pixel_format(&self) -> ::core::option::Option<&crate::wire::PixelFormat> {
1678 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1679 }
1680
1681 pub fn take_pixel_format(&mut self) -> ::core::option::Option<crate::wire::PixelFormat> {
1682 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
1683 }
1684
1685 pub fn pixel_format_modifier(
1686 &self,
1687 ) -> ::core::option::Option<&crate::wire::PixelFormatModifier> {
1688 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1689 }
1690
1691 pub fn take_pixel_format_modifier(
1692 &mut self,
1693 ) -> ::core::option::Option<crate::wire::PixelFormatModifier> {
1694 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
1695 }
1696
1697 pub fn color_space(&self) -> ::core::option::Option<&crate::wire::ColorSpace> {
1698 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1699 }
1700
1701 pub fn take_color_space(&mut self) -> ::core::option::Option<crate::wire::ColorSpace> {
1702 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
1703 }
1704
1705 pub fn size(
1706 &self,
1707 ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
1708 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
1709 }
1710
1711 pub fn take_size(
1712 &mut self,
1713 ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
1714 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
1715 }
1716
1717 pub fn bytes_per_row(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
1718 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
1719 }
1720
1721 pub fn take_bytes_per_row(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
1722 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
1723 }
1724
1725 pub fn display_rect(
1726 &self,
1727 ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::RectU> {
1728 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
1729 }
1730
1731 pub fn take_display_rect(
1732 &mut self,
1733 ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::RectU> {
1734 unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
1735 }
1736
1737 pub fn valid_size(
1738 &self,
1739 ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
1740 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
1741 }
1742
1743 pub fn take_valid_size(
1744 &mut self,
1745 ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
1746 unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
1747 }
1748
1749 pub fn pixel_aspect_ratio(
1750 &self,
1751 ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
1752 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
1753 }
1754
1755 pub fn take_pixel_aspect_ratio(
1756 &mut self,
1757 ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
1758 unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
1759 }
1760 }
1761
1762 impl<'de> ::core::fmt::Debug for ImageFormat<'de> {
1763 fn fmt(
1764 &self,
1765 f: &mut ::core::fmt::Formatter<'_>,
1766 ) -> ::core::result::Result<(), ::core::fmt::Error> {
1767 f.debug_struct("ImageFormat")
1768 .field("pixel_format", &self.pixel_format())
1769 .field("pixel_format_modifier", &self.pixel_format_modifier())
1770 .field("color_space", &self.color_space())
1771 .field("size", &self.size())
1772 .field("bytes_per_row", &self.bytes_per_row())
1773 .field("display_rect", &self.display_rect())
1774 .field("valid_size", &self.valid_size())
1775 .field("pixel_aspect_ratio", &self.pixel_aspect_ratio())
1776 .finish()
1777 }
1778 }
1779
1780 impl<'de> ::fidl_next::IntoNatural for ImageFormat<'de> {
1781 type Natural = crate::natural::ImageFormat;
1782 }
1783}
1784
1785pub mod wire_optional {}
1786
1787pub mod generic {}
1788
1789pub use self::natural::*;
1790
1791pub const FORMAT_MODIFIER_ARM_BCH_BIT: u64 = 2048 as u64;
1792
1793pub const FORMAT_MODIFIER_ARM_SPARSE_BIT: u64 = 64 as u64;
1794
1795pub const FORMAT_MODIFIER_ARM_SPLIT_BLOCK_BIT: u64 = 32 as u64;
1796
1797pub const FORMAT_MODIFIER_ARM_TE_BIT: u64 = 4096 as u64;
1798
1799pub const FORMAT_MODIFIER_ARM_TILED_HEADER_BIT: u64 = 8192 as u64;
1800
1801pub const FORMAT_MODIFIER_ARM_YUV_BIT: u64 = 16 as u64;
1802
1803#[doc = " Format has a color control surface after the tile data\n"]
1804pub const FORMAT_MODIFIER_INTEL_CCS_BIT: u64 = 16777216 as u64;
1805
1806pub const FORMAT_MODIFIER_VENDOR_ALLWINNER: u64 = 648518346341351424 as u64;
1807
1808pub const FORMAT_MODIFIER_VENDOR_AMD: u64 = 144115188075855872 as u64;
1809
1810pub const FORMAT_MODIFIER_VENDOR_AMLOGIC: u64 = 720575940379279360 as u64;
1811
1812pub const FORMAT_MODIFIER_VENDOR_ARM: u64 = 576460752303423488 as u64;
1813
1814pub const FORMAT_MODIFIER_VENDOR_BROADCOM: u64 = 504403158265495552 as u64;
1815
1816pub const FORMAT_MODIFIER_VENDOR_GOOGLE: u64 = 7421932185906577408 as u64;
1817
1818pub const FORMAT_MODIFIER_VENDOR_INTEL: u64 = 72057594037927936 as u64;
1819
1820pub const FORMAT_MODIFIER_VENDOR_NVIDIA: u64 = 216172782113783808 as u64;
1821
1822pub const FORMAT_MODIFIER_VENDOR_QCOM: u64 = 360287970189639680 as u64;
1823
1824pub const FORMAT_MODIFIER_VENDOR_SAMSUNG: u64 = 288230376151711744 as u64;
1825
1826pub const FORMAT_MODIFIER_VENDOR_VIVANTE: u64 = 432345564227567616 as u64;