blob: ed0b6ab371dac00e43816676d95a0e8d68975969 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
/*
* Support for Intel Camera Imaging ISP subsystem.
* Copyright (c) 2015, Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#ifndef __IA_CSS_METADATA_H
#define __IA_CSS_METADATA_H
/* @file
* This file contains structure for processing sensor metadata.
*/
#include <type_support.h>
#include "ia_css_types.h"
#include "ia_css_stream_format.h"
/* Metadata configuration. This data structure contains necessary info
* to process sensor metadata.
*/
struct ia_css_metadata_config {
enum atomisp_input_format data_type; /** Data type of CSI-2 embedded
data. The default value is ATOMISP_INPUT_FORMAT_EMBEDDED. For
certain sensors, user can choose non-default data type for embedded
data. */
struct ia_css_resolution resolution; /** Resolution */
};
struct ia_css_metadata_info {
struct ia_css_resolution resolution; /** Resolution */
uint32_t stride; /** Stride in bytes */
uint32_t size; /** Total size in bytes */
};
struct ia_css_metadata {
struct ia_css_metadata_info info; /** Layout info */
ia_css_ptr address; /** CSS virtual address */
uint32_t exp_id;
/** Exposure ID, see ia_css_event_public.h for more detail */
};
#define SIZE_OF_IA_CSS_METADATA_STRUCT sizeof(struct ia_css_metadata)
/* @brief Allocate a metadata buffer.
* @param[in] metadata_info Metadata info struct, contains details on metadata buffers.
* @return Pointer of metadata buffer or NULL (if error)
*
* This function allocates a metadata buffer according to the properties
* specified in the metadata_info struct.
*/
struct ia_css_metadata *
ia_css_metadata_allocate(const struct ia_css_metadata_info *metadata_info);
/* @brief Free a metadata buffer.
*
* @param[in] metadata Pointer of metadata buffer.
* @return None
*
* This function frees a metadata buffer.
*/
void
ia_css_metadata_free(struct ia_css_metadata *metadata);
#endif /* __IA_CSS_METADATA_H */
|