summaryrefslogtreecommitdiff
path: root/include/libcamera/formats.h.in
blob: 8e7b95812afa917a76d4d59f81e249a3a5bd9f21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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__ */