| // Copyright 2020 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library fuchsia.hardware.camera; |
| |
| type BayerPattern = strict enum : uint8 { |
| RGGB = 1; |
| GRBG = 2; |
| GBRG = 3; |
| BGGR = 4; |
| }; |
| |
| /// Encodes R, Gr, B, Gb pixel values. |
| type ColorVal = struct { |
| red uint16; |
| green_r uint16; |
| blue uint16; |
| green_b uint16; |
| }; |
| |
| /// Encodes frame rate as separate a separate numerator and denominator. |
| /// Decoded via frames_per_sec_numerator / frames_per_sec_denominator. |
| type FrameRate = struct { |
| frames_per_sec_numerator uint32; |
| frames_per_sec_denominator uint32; |
| }; |
| |
| /// Encodes a pair of width and height values. |
| /// For example, for use as a representation of frame resolution |
| /// where |x| is width and |y| is height. |
| type Dimensions = struct { |
| x float32; |
| y float32; |
| }; |
| |
| /// Encodes a pair of minimum and maximum values. |
| /// For example, for use as sensor constraints for exposure settings. |
| type MinMaxConstraints = struct { |
| min uint32; |
| max uint32; |
| }; |
| |
| /// Encodes information to represent a rectangle on a grid. |
| type Rect = struct { |
| x uint32; |
| y uint32; |
| width uint32; |
| height uint32; |
| }; |