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

27
src/libcamera/formats.cpp Normal file
View file

@ -0,0 +1,27 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2019, Google Inc.
*
* formats.cpp - Libcamera image formats
*/
#include "formats.h"
/**
* \file formats.h
* \brief Types and helper methods to handle libcamera image formats
*/
namespace libcamera {
/**
* \typedef FormatEnum
* \brief Type definition for the map of image formats and sizes
*
* Type definition used to enumerate the supported pixel formats and image
* frame sizes. The type associates in a map a pixel format (for memory
* formats) or a media bus code (for bus formats), to a vector of image
* resolutions represented by SizeRange items.
*/
} /* namespace libcamera */