Home | History | Annotate | Download | only in isp
      1 /*
      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 (at) 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 
     27 #include <base/xcam_common.h>
     28 #include <stdint.h>
     29 #include <string.h>
     30 #include <stddef.h>
     31 
     32 XCAM_BEGIN_DECLARE
     33 
     34 
     35 typedef int boolean;
     36 
     37 #ifndef TRUE
     38 #define TRUE 1
     39 #endif
     40 
     41 #ifndef FALSE
     42 #define FALSE 0
     43 #endif
     44 
     45 typedef struct _XCamCpfBlob XCamCpfBlob;
     46 
     47 /*! \brief CPF blob
     48  */
     49 struct _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  */
     59 XCamCpfBlob * 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  */
     66 void 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  */
     75 boolean xcam_cpf_read (const char *cpf_file, XCamCpfBlob *aiq_cpf, XCamCpfBlob *hal_cpf);
     76 
     77 XCAM_END_DECLARE
     78 
     79 #endif //_XCAM_CPF_READER_H
     80