diff options
Diffstat (limited to 'include/libcamera/formats.h.in')
-rw-r--r-- | include/libcamera/formats.h.in | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/libcamera/formats.h.in b/include/libcamera/formats.h.in new file mode 100644 index 00000000..8e7b9581 --- /dev/null +++ b/include/libcamera/formats.h.in @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2020, Google Inc. + * + * formats.h - Formats + * + * This file is auto-generated. Do not edit. + */ +#ifndef __LIBCAMERA_FORMATS_H__ +#define __LIBCAMERA_FORMATS_H__ + +#include <stdint.h> + +#include <libcamera/pixel_format.h> + +namespace libcamera { + +namespace formats { + +namespace { + +constexpr uint32_t __fourcc(char a, char b, char c, char d) +{ + return (static_cast<uint32_t>(a) << 0) | + (static_cast<uint32_t>(b) << 8) | + (static_cast<uint32_t>(c) << 16) | + (static_cast<uint32_t>(d) << 24); +} + +constexpr uint64_t __mod(unsigned int vendor, unsigned int mod) +{ + return (static_cast<uint64_t>(vendor) << 56) | + (static_cast<uint64_t>(mod) << 0); +} + +} /* namespace */ + +${formats} + +} /* namespace formats */ + +} /* namespace libcamera */ + +#endif /* __LIBCAMERA_FORMATS_H__ */ |