libcamera: formats: Define FormatEnum type

Add an internal format.h and format.cpp files to collect libcamera image
format related types, helpers and structures. Define and document the
FormatEnum type, used to enumerate pixel image formats and associated
image resolutions.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi
2019-03-12 12:03:22 +01:00
parent ee81275238
commit 8dcd871fec
5 changed files with 54 additions and 5 deletions
+22
View File
@@ -0,0 +1,22 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2019, Google Inc.
*
* formats.h - Libcamera image formats
*/
#ifndef __LIBCAMERA_FORMATS_H__
#define __LIBCAMERA_FORMATS_H__
#include <map>
#include <vector>
#include "geometry.h"
namespace libcamera {
typedef std::map<unsigned int, std::vector<SizeRange>> FormatEnum;
} /* namespace libcamera */
#endif /* __LIBCAMERA_FORMATS_H__ */