blob: ae7d721f060e4c98fd79f92ea439a2dba514fb66 [file] [log] [blame]
Wind Yuan75564b12015-01-15 06:51:15 -05001/*
2 * Copyright (c) 2014 Intel Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * Author: Wind Yuan <feng.yuan@intel.com>
17 */
18
19/*
20 * \file xcam_cpf_reader.h
21 * \brief xcam CPF reader
22*/
23
24#ifndef _XCAM_CPF_READER_H
25#define _XCAM_CPF_READER_H
26
Wind Yuan29a49f52015-01-26 17:57:37 +080027#include <base/xcam_common.h>
Wind Yuan75564b12015-01-15 06:51:15 -050028#include <stdint.h>
29#include <string.h>
30#include <stddef.h>
31
32XCAM_BEGIN_DECLARE
33
34
35typedef int boolean;
36
37#ifndef TRUE
38#define TRUE 1
39#endif
40
41#ifndef FALSE
42#define FALSE 0
43#endif
44
45typedef struct _XCamCpfBlob XCamCpfBlob;
46
47/*! \brief CPF blob
48 */
49struct _XCamCpfBlob {
50 uint8_t *data; /*!< pointer to buffer*/
51 uint32_t size; /*!< buffer size*/
52};
53
54/*! \brief XCam CPF blob allocation.
55 * buffer is initialized to zero
56 *
57 * \return pointer to XCam CPF Blob
58 */
59XCamCpfBlob * xcam_cpf_blob_new ();
60
61/*! \brief XCam CPF blob release.
62 * release the blob structure as well as the buffer inside it.
63 *
64 * \param[in,out] pointer to XCam CPF Blob
65 */
66void xcam_cpf_blob_free (XCamCpfBlob *blob);
67
68/*! \brief XCam CPF blob release.
69 * release the blob structure as well as the buffer inside it. Called in xcam_3a_init().
70 *
71 * \param[in] cpf_file CPF file name
72 * \param[out] aiq_cpf pointer to XCam CPF Blob which will hold AIQ records
73 * \param[out] hal_cpf pointer to XCam CPF HAL which will hold HAL records
74 */
75boolean xcam_cpf_read (const char *cpf_file, XCamCpfBlob *aiq_cpf, XCamCpfBlob *hal_cpf);
76
77XCAM_END_DECLARE
78
79#endif //_XCAM_CPF_READER_H