提交 d82a4a14 编写于 作者: C Corentin Labbe 提交者: Mauro Carvalho Chehab

media: staging: media: atomisp2: remove unused headers

All thoses headers are not used by any source files.
Lets just remove them.
Signed-off-by: NCorentin Labbe <clabbe@baylibre.com>
Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 01b61059
/*
* vlv2_plat_clock.h
*
* Copyright (C) 2013 Intel Corp
* Author: Asutosh Pathak <asutosh.pathak@intel.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that 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.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#ifndef __VLV2_PLAT_CLOCK_H
#define __VLV2_PLAT_CLOCK_H
int vlv2_plat_set_clock_freq(int clock_num, int freq_type);
int vlv2_plat_get_clock_freq(int clock_num);
int vlv2_plat_configure_clock(int clock_num, u32 conf);
int vlv2_plat_get_clock_status(int clock_num);
#endif /* __VLV2_PLAT_CLOCK_H */
/*
* 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 _gp_regs_defs_h
#define _gp_regs_defs_h
#define _HRT_GP_REGS_IS_FWD_REG_IDX 0
#define _HRT_GP_REGS_REG_ALIGN 4
#endif /* _gp_regs_defs_h */
#ifndef ISP2401
/*
* 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 _sp_hrt_h_
#define _sp_hrt_h_
#define hrt_sp_dmem(cell) HRT_PROC_TYPE_PROP(cell, _dmem)
#define hrt_sp_dmem_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_sp_dmem(cell))
#endif /* _sp_hrt_h_ */
#endif
/*
* 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 _gp_regs_defs_h
#define _gp_regs_defs_h
#define _HRT_GP_REGS_IS_FWD_REG_IDX 0
#define _HRT_GP_REGS_REG_ALIGN 4
#endif /* _gp_regs_defs_h */
#ifndef ISP2401
/*
* 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 _sp_hrt_h_
#define _sp_hrt_h_
#define hrt_sp_dmem(cell) HRT_PROC_TYPE_PROP(cell, _dmem)
#define hrt_sp_dmem_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_sp_dmem(cell))
#endif /* _sp_hrt_h_ */
#endif
/*
* 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 _gp_regs_defs_h
#define _gp_regs_defs_h
#define _HRT_GP_REGS_IS_FWD_REG_IDX 0
#define _HRT_GP_REGS_REG_ALIGN 4
#endif /* _gp_regs_defs_h */
#ifndef ISP2401
/*
* 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 _sp_hrt_h_
#define _sp_hrt_h_
#define hrt_sp_dmem(cell) HRT_PROC_TYPE_PROP(cell, _dmem)
#define hrt_sp_dmem_master_port_address(cell) hrt_mem_master_port_address(cell, hrt_sp_dmem(cell))
#endif /* _sp_hrt_h_ */
#endif
/*
* Support for Intel Camera Imaging ISP subsystem.
* Copyright (c) 2010-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 _hive_isp_css_ddr_hrt_modified_h_
#define _hive_isp_css_ddr_hrt_modified_h_
#include <hmm_64/hmm.h>
/* This function reads an image from DDR and stores it in the img_buf array
that has been allocated by the caller.
The specifics of how the pixels are stored into DDR by the DMA are taken
into account (bits padded to a width of 256, depending on the number of
elements per ddr word).
The DMA specific parameters give to this function (elems_per_xword and sign_extend)
should correspond to those given to the DMA engine.
The address is a virtual address which will be translated to a physical address before
data is loaded from or stored to that address.
The return value is 0 in case of success and 1 in case of failure.
*/
unsigned int
hrt_isp_css_read_image_from_ddr(
unsigned short *img_buf,
unsigned int width,
unsigned int height,
unsigned int elems_per_xword,
unsigned int sign_extend,
hmm_ptr virt_addr);
/* This function writes an image to DDR, keeping the same aspects into account as the read_image function
above. */
unsigned int
hrt_isp_css_write_image_to_ddr(
const unsigned short *img_buf,
unsigned int width,
unsigned int height,
unsigned int elems_per_xword,
unsigned int sign_extend,
hmm_ptr virt_addr);
/* return the size in bytes of an image (frame or plane). */
unsigned int
hrt_isp_css_sizeof_image_in_ddr(
unsigned int width,
unsigned int height,
unsigned int bits_per_element);
unsigned int
hrt_isp_css_stride_of_image_in_ddr(
unsigned int width,
unsigned int bits_per_element);
hmm_ptr
hrt_isp_css_alloc_image_in_ddr(
unsigned int width,
unsigned int height,
unsigned int elems_per_xword);
hmm_ptr
hrt_isp_css_calloc_image_in_ddr(
unsigned int width,
unsigned int height,
unsigned int elems_per_xword);
#ifndef HIVE_ISP_NO_GDC
#include "gdc_v2_defs.h"
hmm_ptr
hrt_isp_css_alloc_gdc_lut_in_ddr(void);
void
hrt_isp_css_write_gdc_lut_to_ddr(
short values[4][HRT_GDC_N],
hmm_ptr virt_addr);
#endif
#ifdef _HIVE_ISP_CSS_FPGA_SYSTEM
hmm_ptr
hrt_isp_css_alloc_image_for_display(
unsigned int width,
unsigned int height,
unsigned int elems_per_xword);
hmm_ptr
hrt_isp_css_calloc_image_for_display(
unsigned int width,
unsigned int height,
unsigned int elems_per_xword);
#endif
/* New set of functions, these do not require the elems_per_xword, but use bits_per_element instead,
this way the user does not need to know about the width of a DDR word. */
unsigned int
hrt_isp_css_read_unsigned(
unsigned short *target,
unsigned int width,
unsigned int height,
unsigned int source_bits_per_element,
hmm_ptr source);
unsigned int
hrt_isp_css_read_signed(
short *target,
unsigned int width,
unsigned int height,
unsigned int source_bits_per_element,
hmm_ptr source);
unsigned int
hrt_isp_css_write_unsigned(
const unsigned short *source,
unsigned int width,
unsigned int height,
unsigned int target_bits_per_element,
hmm_ptr target);
unsigned int
hrt_isp_css_write_signed(
const short *source,
unsigned int width,
unsigned int height,
unsigned int target_bits_per_element,
hmm_ptr target);
hmm_ptr
hrt_isp_css_alloc(
unsigned int width,
unsigned int height,
unsigned int bits_per_element);
hmm_ptr
hrt_isp_css_calloc(
unsigned int width,
unsigned int height,
unsigned int bits_per_element);
#endif /* _hive_isp_css_ddr_hrt_modified_h_ */
/*
* Support for Intel Camera Imaging ISP subsystem.
* Copyright (c) 2010-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 _hive_isp_css_hrt_h
#define _hive_isp_css_hrt_h
#include "system_types.h"
#include "hive_isp_css_host_ids_hrt.h"
#include "hive_isp_css_defs.h"
#ifdef HRT_ISP_CSS_CUSTOM_HOST
#ifndef HRT_USE_VIR_ADDRS
#define HRT_USE_VIR_ADDRS
#endif
/*#include "hive_isp_css_custom_host_hrt.h"*/
#endif
#include <gpio_block.h>
#include <gp_regs.h>
#include <gp_timer_hrt.h>
#include <css_receiver_2400_hrt.h>
// #include <isp2400_mamoiada_params.h>
// #include <isp2400_support.h>
/* insert idle signal clearing and setting around hrt_main */
#if !defined(HRT_HW) || defined(HRT_ISP_CSS_INSERT_IDLE_SIGNAL)
#define hrt_main _hrt_isp_css_main
#endif
#ifdef _HIVE_ISP_CSS_SPECMAN_SYSTEM
#include "hive_isp_css_2400_specman_system.h"
#else
#if defined(IS_ISP_2400_MAMOIADA_SYSTEM)
#include "hive_isp_css_2400_system.h"
#elif defined(IS_ISP_2401_MAMOIADA_SYSTEM)
#include "hive_isp_css_2401_system.h"
#else
#error "hive_isp_css_hrt_modified.h: SYSTEM must be one of {2400_MAMOIADA_SYSTEM, 2401_MAMOIADA_SYSTEM}"
#endif
#endif
#include <sp_hrt.h>
#include <input_system_hrt.h>
#include <input_selector_hrt.h>
#include <sig_monitor_hrt.h>
#include "hive_isp_css_sdram_wakeup_hrt.h"
#include "hive_isp_css_idle_signal_hrt.h"
#include "hive_isp_css_sp_hrt.h"
#include "hive_isp_css_isp_hrt.h"
#include "hive_isp_css_streaming_to_mipi_hrt.h"
#include "hive_isp_css_testbench_hrt.h"
#include "hive_isp_css_streaming_monitors_hrt.h"
#include "hive_isp_css_gp_regs_hrt.h"
#if defined(IS_ISP_2400_MAMOIADA_SYSTEM)
#include "hive_isp_css_irq_hrt.h"
#elif defined(IS_ISP_2401_MAMOIADA_SYSTEM)
#include "hive_isp_css_2401_irq_hrt.h"
#else
#error "hive_isp_css_hrt_modified.h: SYSTEM must be one of {2400_MAMOIADA_SYSTEM, 2401_MAMOIADA_SYSTEM}"
#endif
#include "hive_isp_css_stream_switch_hrt.h"
#include "hive_isp_css_ddr_hrt_modified.h"
#include "hive_isp_css_dma_set_hrt.h"
#define HIVE_ISP_CSS_NO_STREAM_SWITCH 1
#endif /* _hive_isp_css_hrt_h */
/*
* 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 __RESOURCE_GLOBAL_H_INCLUDED__
#define __RESOURCE_GLOBAL_H_INCLUDED__
#define IS_RESOURCE_VERSION_1
typedef enum {
DMA_CHANNEL_RESOURCE_TYPE,
IRQ_CHANNEL_RESOURCE_TYPE,
MEM_SECTION_RESOURCE_TYPE,
N_RESOURCE_TYPE
} resource_type_ID_t;
typedef enum {
PERMANENT_RESOURCE_RESERVATION,
PERSISTENT_RESOURCE_RESERVATION,
DEDICTATED_RESOURCE_RESERVATION,
SHARED_RESOURCE_RESERVATION,
N_RESOURCE_RESERVATION
} resource_reservation_t;
#endif /* __RESOURCE_GLOBAL_H_INCLUDED__ */
/*
* 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 __XMEM_GLOBAL_H_INCLUDED__
#define __XMEM_GLOBAL_H_INCLUDED__
#include "isp.h"
#endif /* __XMEM_GLOBAL_H_INCLUDED__ */
/*
* 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 __BAMEM_H_INCLUDED__
#define __BAMEM_H_INCLUDED__
/*
* This file is included on every cell {SP,ISP,host} and on every system
* that uses the BAMEM device. It defines the API to DLI bridge
*
* System and cell specific interfaces and inline code are included
* conditionally through Makefile path settings.
*
* - . system and cell agnostic interfaces, constants and identifiers
* - public: system agnostic, cell specific interfaces
* - private: system dependent, cell specific interfaces & inline implementations
* - global: system specific constants and identifiers
* - local: system and cell specific constants and identifiers
*/
#include "system_local.h"
#include "bamem_local.h"
#ifndef __INLINE_BAMEM__
#define STORAGE_CLASS_BAMEM_H extern
#define STORAGE_CLASS_BAMEM_C
#include "bamem_public.h"
#else /* __INLINE_BAMEM__ */
#define STORAGE_CLASS_BAMEM_H static inline
#define STORAGE_CLASS_BAMEM_C static inline
#include "bamem_private.h"
#endif /* __INLINE_BAMEM__ */
#endif /* __BAMEM_H_INCLUDED__ */
/*
* 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 __BBB_CONFIG_H_INCLUDED__
#define __BBB_CONFIG_H_INCLUDED__
/* This header contains BBB defines common to ISP and host */
#define BFA_MAX_KWAY (49)
#define BFA_RW_LUT_SIZE (7)
#define SAD3x3_IN_SHIFT (2) /* input right shift value for SAD3x3 */
#define SAD3x3_OUT_SHIFT (2) /* output right shift value for SAD3x3 */
/* XCU and BMA related defines shared between host and ISP
* also need to be moved here */
#endif /* __BBB_CONFIG_H_INCLUDED__ */
/*
* 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 __CPU_MEM_SUPPORT_H_INCLUDED__
#define __CPU_MEM_SUPPORT_H_INCLUDED__
#if defined (__KERNEL__)
#include <linux/string.h> /* memset */
#else
#include <string.h> /* memset */
#endif
#include "sh_css_internal.h" /* sh_css_malloc and sh_css_free */
static inline void*
ia_css_cpu_mem_alloc(unsigned int size)
{
return sh_css_malloc(size);
}
static inline void*
ia_css_cpu_mem_copy(void* dst, const void* src, unsigned int size)
{
if(!src || !dst)
return NULL;
return memcpy(dst, src, size);
}
static inline void*
ia_css_cpu_mem_set_zero(void* dst, unsigned int size)
{
if(!dst)
return NULL;
return memset(dst, 0, size);
}
static inline void
ia_css_cpu_mem_free(void* ptr)
{
if(!ptr)
return;
sh_css_free(ptr);
}
#endif /* __CPU_MEM_SUPPORT_H_INCLUDED__ */
/*
* 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 __ISP2400_CONFIG_H_INCLUDED__
#define __ISP2400_CONFIG_H_INCLUDED__
#define NUM_BITS 14
#define NUM_SLICE_ELEMS 4
#define ROUNDMODE ROUND_NEAREST_EVEN
#define MAX_SHIFT_1W (NUM_BITS-1) /* Max number of bits a 1w input can be shifted */
#define MAX_SHIFT_2W (2*NUM_BITS-1) /* Max number of bits a 2w input can be shifted */
#endif /* __ISP2400_CONFIG_H_INCLUDED__ */
/*
* 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 __ISP2500_CONFIG_H_INCLUDED__
#define __ISP2500_CONFIG_H_INCLUDED__
#define NUM_BITS 12
#define NUM_SLICE_ELEMS 4
#define ROUNDMODE ROUND_NEAREST_EVEN
#define MAX_SHIFT_1W (NUM_BITS-1) /* Max number of bits a 1w input can be shifted */
#define MAX_SHIFT_2W (2*NUM_BITS-1) /* Max number of bits a 2w input can be shifted */
#define HAS_div_unit
#define HAS_vec_sub
#endif /* __ISP2500_CONFIG_H_INCLUDED__ */
/*
* 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 __ISP2600_CONFIG_H_INCLUDED__
#define __ISP2600_CONFIG_H_INCLUDED__
#define NUM_BITS 16
#define NUM_SLICE_ELEMS 8
#define ROUNDMODE ROUND_NEAREST_EVEN
#define MAX_SHIFT_1W (NUM_BITS-1) /* Max number of bits a 1w input can be shifted */
#define MAX_SHIFT_2W (2*NUM_BITS-1) /* Max number of bits a 2w input can be shifted */
#define ISP_NWAY 32 /* Number of elements in a vector in ISP 2600 */
#define HAS_div_unit
#define HAS_1w_sqrt_u_unit
#define HAS_2w_sqrt_u_unit
#define HAS_vec_sub
#endif /* __ISP2600_CONFIG_H_INCLUDED__ */
#ifndef ISP2401
/*
* 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 __ISP2601_CONFIG_H_INCLUDED__
#define __ISP2601_CONFIG_H_INCLUDED__
#define NUM_BITS 16
#define ISP_VEC_ELEMBITS NUM_BITS
#define ISP_NWAY 32
#define NUM_SLICE_ELEMS 4
#define ROUNDMODE ROUND_NEAREST_EVEN
#define MAX_SHIFT_1W (NUM_BITS-1) /* Max number of bits a 1w input can be shifted */
#define MAX_SHIFT_2W (2*NUM_BITS-1) /* Max number of bits a 2w input can be shifted */
#define HAS_div_unit
#define HAS_bfa_unit
#define HAS_1w_sqrt_u_unit
#define HAS_2w_sqrt_u_unit
#define HAS_vec_sub
/* Bit widths and element widths defined in HW implementation of BFA */
#define BFA_THRESHOLD_BIT_CNT (8)
#define BFA_THRESHOLD_MASK ((1<<BFA_THRESHOLD_BIT_CNT)-1)
#define BFA_SW_BIT_CNT (7)
#define BFA_SW_MASK ((1<<BFA_SW_BIT_CNT)-1)
#define BFA_RW_BIT_CNT (7)
#define BFA_RW_MASK ((1<<BFA_RW_BIT_CNT)-1)
#define BFA_RW_SLOPE_BIT_POS (8)
#define BFA_RW_SLOPE_BIT_SHIFT (5)
#define BFA_RW_IDX_BIT_CNT (3)
#define BFA_RW_FRAC_BIT_CNT (5)
#define BFA_RW_LUT0_FRAC_START_BIT (0)
#define BFA_RW_LUT0_FRAC_END_BIT (BFA_RW_LUT0_FRAC_START_BIT+BFA_RW_FRAC_BIT_CNT-1) /* 4 */
#define BFA_RW_LUT1_FRAC_START_BIT (2)
#define BFA_RW_LUT1_FRAC_END_BIT (BFA_RW_LUT1_FRAC_START_BIT+BFA_RW_FRAC_BIT_CNT-1) /* 6 */
/* LUT IDX end bit computation, start+idx_bit_cnt-2, one -1 comes as we count
* bits from 0, another -1 comes as we use 2 lut table, so idx_bit_cnt is one
* bit more */
#define BFA_RW_LUT0_IDX_START_BIT (BFA_RW_LUT0_FRAC_END_BIT+1) /* 5 */
#define BFA_RW_LUT0_IDX_END_BIT (BFA_RW_LUT0_IDX_START_BIT+BFA_RW_IDX_BIT_CNT-2) /* 6 */
#define BFA_RW_LUT1_IDX_START_BIT (BFA_RW_LUT1_FRAC_END_BIT + 1) /* 7 */
#define BFA_RW_LUT1_IDX_END_BIT (BFA_RW_LUT1_IDX_START_BIT+BFA_RW_IDX_BIT_CNT-2) /* 8 */
#define BFA_RW_LUT_THRESHOLD (1<<(BFA_RW_LUT1_IDX_END_BIT-1)) /* 0x80 : next bit after lut1 end is set */
#define BFA_RW_LUT1_IDX_OFFSET ((1<<(BFA_RW_IDX_BIT_CNT-1))-1) /* 3 */
#define BFA_CP_MASK (0xFFFFFF80)
#define BFA_SUBABS_SHIFT (6)
#define BFA_SUBABS_BIT_CNT (8)
#define BFA_SUBABS_MAX ((1<<BFA_SUBABS_BIT_CNT)-1)
#define BFA_SUBABSSAT_BIT_CNT (9)
#define BFA_SUBABSSAT_MAX ((1<<BFA_SUBABSSAT_BIT_CNT)-1)
#define BFA_WEIGHT_SHIFT (6)
#endif /* __ISP2601_CONFIG_H_INCLUDED__ */
#endif
/*
* 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 __ISP_CONFIG_H_INCLUDED__
#define __ISP_CONFIG_H_INCLUDED__
#if defined(ISP2400) || defined(ISP2401)
#include "isp2400_config.h"
#else
#error "Please define a core {ISP2400, ISP2401}"
#endif
#endif /* __ISP_CONFIG_H_INCLUDED__ */
/*
* 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 __ISP_OP1W_TYPES_H_INCLUDED__
#define __ISP_OP1W_TYPES_H_INCLUDED__
/*
* This file is part of the Multi-precision vector operations exstension package.
*/
/*
* Single-precision vector operations
*/
/*
* Prerequisites:
*
*/
#include "mpmath.h"
/*
* Single-precision data type specification
*/
typedef mpsdata_t tvector1w;
typedef mpsdata_t tscalar1w;
typedef spsdata_t tflags;
typedef mpudata_t tvector1w_unsigned;
typedef mpsdata_t tscalar1w_weight;
typedef mpsdata_t tvector1w_signed_positive;
typedef mpsdata_t tvector1w_weight;
#ifdef ISP2401
typedef bool tscalar_bool;
#endif
typedef struct {
tvector1w d;
tflags f;
} tvector1w_tflags1w;
#endif /* __ISP_OP1W_TYPES_H_INCLUDED__ */
/*
* 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 __ISP_OP2W_H_INCLUDED__
#define __ISP_OP2W_H_INCLUDED__
/*
* This file is part of the Multi-precision vector operations exstension package.
*/
/*
* Double-precision vector operations
*/
/*
* Prerequisites:
*
*/
#ifdef INLINE_ISP_OP2W
#define STORAGE_CLASS_ISP_OP2W_FUNC_H static inline
#define STORAGE_CLASS_ISP_OP2W_DATA_H static inline_DATA
#else /* INLINE_ISP_OP2W */
#define STORAGE_CLASS_ISP_OP2W_FUNC_H extern
#define STORAGE_CLASS_ISP_OP2W_DATA_H extern_DATA
#endif /* INLINE_ISP_OP2W */
/*
* Double-precision data type specification
*/
#include "isp_op2w_types.h"
/*
* Double-precision prototype specification
*/
/* Arithmetic */
/* @brief bitwise AND
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return bitwise and of both input arguments
*
* This function will calculate the bitwise and.
* result = _a & _b
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_and(
const tvector2w _a,
const tvector2w _b);
/* @brief bitwise OR
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return bitwise or of both input arguments
*
* This function will calculate the bitwise or.
* result = _a | _b
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_or(
const tvector2w _a,
const tvector2w _b);
/* @brief bitwise XOR
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return bitwise xor of both input arguments
*
* This function will calculate the bitwise xor.
* result = _a ^ _b
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_xor(
const tvector2w _a,
const tvector2w _b);
/* @brief bitwise inverse
*
* @param[in] _a first argument
*
* @return bitwise inverse of both input arguments
*
* This function will calculate the bitwise inverse.
* result = ~_a
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_inv(
const tvector2w _a);
/* Additive */
/* @brief addition
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return sum of both input arguments
*
* This function will calculate the sum of the input arguments.
* in case of overflow it will wrap around.
* result = _a + _b
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_add(
const tvector2w _a,
const tvector2w _b);
/* @brief subtraction
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return _b subtracted from _a.
*
* This function will subtract _b from _a.
* in case of overflow it will wrap around.
* result = _a - _b
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_sub(
const tvector2w _a,
const tvector2w _b);
/* @brief saturated addition
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return saturated sum of both input arguments
*
* This function will calculate the sum of the input arguments.
* in case of overflow it will saturate
* result = CLIP(_a + _b, MIN_RANGE, MAX_RANGE);
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_addsat(
const tvector2w _a,
const tvector2w _b);
/* @brief saturated subtraction
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return saturated subtraction of both input arguments
*
* This function will subtract _b from _a.
* in case of overflow it will saturate
* result = CLIP(_a - _b, MIN_RANGE, MAX_RANGE);
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subsat(
const tvector2w _a,
const tvector2w _b);
/* @brief subtraction with shift right and rounding
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return (a - b) >> 1
*
* This function subtracts _b from _a and right shifts
* the result by 1 bit with rounding.
* No overflow can occur.
* result = (_a - _b) >> 1
*
* Note: This function will be deprecated due to
* the naming confusion and it will be replaced
* by "OP_2w_subhalfrnd".
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subasr1(
const tvector2w _a,
const tvector2w _b);
/* @brief Subtraction with shift right and rounding
*
* @param[in] _a first operand
* @param[in] _b second operand
*
* @return (_a - _b) >> 1
*
* This function subtracts _b from _a and right shifts
* the result by 1 bit with rounding.
* No overflow can occur.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subhalfrnd(
const tvector2w _a,
const tvector2w _b);
/* @brief Subtraction with shift right and no rounding
*
* @param[in] _a first operand
* @param[in] _b second operand
*
* @return (_a - _b) >> 1
*
* This function subtracts _b from _a and right shifts
* the result by 1 bit without rounding (i.e. truncation).
* No overflow can occur.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subhalf(
const tvector2w _a,
const tvector2w _b);
/* @brief saturated absolute value
*
* @param[in] _a input
*
* @return saturated absolute value of the input
*
* This function will calculate the saturated absolute value of the input.
* In case of overflow it will saturate.
* if (_a > 0) return _a;<br>
* else return CLIP(-_a, MIN_RANGE, MAX_RANGE);<br>
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_abs(
const tvector2w _a);
/* @brief saturated absolute difference
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return sat(abs(sat(a-b)));
*
* This function will calculate the saturated absolute value
* of the saturated difference of both inputs.
* result = sat(abs(sat(_a - _b)));
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subabssat(
const tvector2w _a,
const tvector2w _b);
/* Multiplicative */
/* @brief integer multiply
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return product of _a and _b
*
* This function will calculate the product
* of the input arguments and returns the LSB
* aligned double precision result.
* In case of overflow it will wrap around.
* result = _a * _b;
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_mul(
const tvector2w _a,
const tvector2w _b);
/* @brief fractional saturating multiply
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return saturated product of _a and _b
*
* This function will calculate the fixed point
* product of the input arguments
* and returns a double precision result.
* In case of overflow it will saturate.
* result =((_a * _b) << 1) >> (2*NUM_BITS);
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_qmul(
const tvector2w _a,
const tvector2w _b);
/* @brief fractional saturating multiply with rounding
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return product of _a and _b
*
* This function will calculate the fixed point
* product of the input arguments
* and returns a double precision result.
* Depending on the rounding mode of the core
* it will round to nearest or to nearest even.
* In case of overflow it will saturate.
* result = ((_a * _b) << 1) >> (2*NUM_BITS);
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_qrmul(
const tvector2w _a,
const tvector2w _b);
/* Comparative */
/* @brief equal
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return _a == _b
*
* This function will return true if both inputs
* are equal, and false if not equal.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_eq(
const tvector2w _a,
const tvector2w _b);
/* @brief not equal
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return _a != _b
*
* This function will return false if both inputs
* are equal, and true if not equal.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_ne(
const tvector2w _a,
const tvector2w _b);
/* @brief less or equal
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return _a <= _b
*
* This function will return true if _a is smaller
* or equal than _b.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_le(
const tvector2w _a,
const tvector2w _b);
/* @brief less then
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return _a < _b
*
* This function will return true if _a is smaller
* than _b.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_lt(
const tvector2w _a,
const tvector2w _b);
/* @brief greater or equal
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return _a >= _b
*
* This function will return true if _a is greater
* or equal than _b.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_ge(
const tvector2w _a,
const tvector2w _b);
/* @brief greater than
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return _a > _b
*
* This function will return true if _a is greater
* than _b.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_gt(
const tvector2w _a,
const tvector2w _b);
/* Shift */
/* @brief aritmetic shift right
*
* @param[in] _a input
* @param[in] _b shift amount
*
* @return _a >> _b
*
* This function will shift _a with _b bits to the right,
* preserving the sign bit.
* It asserts 0 <= _b <= MAX_SHIFT_2W.
* The operation count for this function assumes that
* the shift amount is a cloned scalar input.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_asr(
const tvector2w _a,
const tvector2w _b);
/* @brief aritmetic shift right with rounding
*
* @param[in] _a input
* @param[in] _b shift amount
*
* @return _a >> _b
*
* If _b < 2*NUM_BITS, this function will shift _a with _b bits to the right,
* preserving the sign bit, and depending on the rounding mode of the core
* it will round to nearest or to nearest even.
* If _b >= 2*NUM_BITS, this function will return 0.
* It asserts 0 <= _b <= MAX_SHIFT_2W.
* The operation count for this function assumes that
* the shift amount is a cloned scalar input.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_asrrnd(
const tvector2w _a,
const tvector2w _b);
/* @brief saturating aritmetic shift left
*
* @param[in] _a input
* @param[in] _b shift amount
*
* @return _a << _b
*
* If _b < MAX_BITDEPTH, this function will shift _a with _b bits to the left,
* saturating at MIN_RANGE/MAX_RANGE in case of overflow.
* If _b >= MAX_BITDEPTH, this function will return MIN_RANGE if _a < 0,
* MAX_RANGE if _a > 0, 0 if _a == 0.
* (with MAX_BITDEPTH=64)
* It asserts 0 <= _b <= MAX_SHIFT_2W.
* The operation count for this function assumes that
* the shift amount is a cloned scalar input.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_asl(
const tvector2w _a,
const tvector2w _b);
/* @brief saturating aritmetic shift left
*
* @param[in] _a input
* @param[in] _b shift amount
*
* @return _a << _b
*
* This function is identical to OP_2w_asl( )
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_aslsat(
const tvector2w _a,
const tvector2w _b);
/* @brief logical shift left
*
* @param[in] _a input
* @param[in] _b shift amount
*
* @return _a << _b
*
* This function will shift _a with _b bits to the left.
* It will insert zeroes on the right.
* It asserts 0 <= _b <= MAX_SHIFT_2W.
* The operation count for this function assumes that
* the shift amount is a cloned scalar input.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_lsl(
const tvector2w _a,
const tvector2w _b);
/* @brief logical shift right
*
* @param[in] _a input
* @param[in] _b shift amount
*
* @return _a >> _b
*
* This function will shift _a with _b bits to the right.
* It will insert zeroes on the left.
* It asserts 0 <= _b <= MAX_SHIFT_2W.
* The operation count for this function assumes that
* the shift amount is a cloned scalar input.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_lsr(
const tvector2w _a,
const tvector2w _b);
/* clipping */
/* @brief Clip asymmetrical
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return _a clipped between ~_b and b
*
* This function will clip the first argument between
* (-_b - 1) and _b.
* It asserts _b >= 0.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_clip_asym(
const tvector2w _a,
const tvector2w _b);
/* @brief Clip zero
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return _a clipped beteween 0 and _b
*
* This function will clip the first argument between
* zero and _b.
* It asserts _b >= 0.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_clipz(
const tvector2w _a,
const tvector2w _b);
/* division */
/* @brief Truncated division
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return trunc( _a / _b )
*
* This function will divide the first argument by
* the second argument, with rounding toward 0.
* If _b == 0 and _a < 0, the function will return MIN_RANGE.
* If _b == 0 and _a == 0, the function will return 0.
* If _b == 0 and _a > 0, the function will return MAX_RANGE.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_div(
const tvector2w _a,
const tvector2w _b);
/* @brief Saturating truncated division
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return CLIP( trunc( _a / _b ), MIN_RANGE1w, MAX_RANGE1w )
*
* This function will divide the first argument by
* the second argument, with rounding toward 0, and
* saturate the result to the range of single precision.
* If _b == 0 and _a < 0, the function will return MIN_RANGE.
* If _b == 0 and _a == 0, the function will return 0.
* If _b == 0 and _a > 0, the function will return MAX_RANGE.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector1w OP_2w_divh(
const tvector2w _a,
const tvector1w _b);
/* @brief Modulo
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return n/a
*
* This function has not yet been implemented.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_mod(
const tvector2w _a,
const tvector2w _b);
/* @brief Unsigned Integer Square root
*
* @param[in] _a input
*
* @return square root of _a
*
* This function will calculate the unsigned integer square root of _a
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector1w_unsigned OP_2w_sqrt_u(
const tvector2w_unsigned _a);
/* Miscellaneous */
/* @brief Multiplexer
*
* @param[in] _a first argument
* @param[in] _b second argument
* @param[in] _c condition
*
* @return _c ? _a : _b
*
* This function will return _a if the condition _c
* is true and _b otherwise.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_mux(
const tvector2w _a,
const tvector2w _b,
const tflags _c);
/* @brief Average without rounding
*
* @param[in] _a first operand
* @param[in] _b second operand
*
* @return (_a + _b) >> 1
*
* This function will add _a and _b, and right shift
* the result by one without rounding. No overflow
* will occur because addition is performed in the
* proper precision.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_avg(
const tvector2w _a,
const tvector2w _b);
/* @brief Average with rounding
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return (_a + _b) >> 1
*
* This function will add _a and _b at full precision,
* and right shift with rounding the result with 1 bit.
* Depending on the rounding mode of the core
* it will round to nearest or to nearest even.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_avgrnd(
const tvector2w _a,
const tvector2w _b);
/* @brief Minimum
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return (_a < _b) ? _a : _b;
*
* This function will return the smallest of both
* input arguments.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_min(
const tvector2w _a,
const tvector2w _b);
/* @brief Maximum
*
* @param[in] _a first argument
* @param[in] _b second argument
*
* @return (_a > _b) ? _a : _b;
*
* This function will return the largest of both
* input arguments.
*/
STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_max(
const tvector2w _a,
const tvector2w _b);
#ifndef INLINE_ISP_OP2W
#define STORAGE_CLASS_ISP_OP2W_FUNC_C
#define STORAGE_CLASS_ISP_OP2W_DATA_C const
#else /* INLINE_ISP_OP2W */
#define STORAGE_CLASS_ISP_OP2W_FUNC_C STORAGE_CLASS_ISP_OP2W_FUNC_H
#define STORAGE_CLASS_ISP_OP2W_DATA_C STORAGE_CLASS_ISP_OP2W_DATA_H
#include "isp_op2w.c"
#define ISP_OP2W_INLINED
#endif /* INLINE_ISP_OP2W */
#endif /* __ISP_OP2W_H_INCLUDED__ */
/*
* 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 __ISP_OP2W_TYPES_H_INCLUDED__
#define __ISP_OP2W_TYPES_H_INCLUDED__
/*
* This file is part of the Multi-precision vector operations exstension package.
*/
/*
* Double-precision vector operations
*/
/*
* Prerequisites:
*
*/
#include "mpmath.h"
#include "isp_op1w_types.h"
/*
* Single-precision data type specification
*/
typedef mpsdata_t tvector2w;
typedef mpsdata_t tscalar2w;
typedef mpsdata_t tvector2w_signed_positive;
typedef mpudata_t tvector2w_unsigned;
typedef struct {
tvector2w d;
tflags f;
} tvector2w_tflags;
#endif /* __ISP_OP2W_TYPES_H_INCLUDED__ */
/*
* 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 __ISP_OP_COUNT_H_INCLUDED__
#define __ISP_OP_COUNT_H_INCLUDED__
#include <stdio.h>
typedef struct {
long long bbb_cnt; /* number of bbb */
int bbb_op; /* operations per bbb */
long long total_cnt; /* bbb_cnt * bbb_op */
} bbb_stat_t;
typedef enum {
bbb_func_OP_1w_and,
bbb_func_OP_1w_or,
bbb_func_OP_1w_xor,
bbb_func_OP_1w_inv,
bbb_func_OP_1w_add,
bbb_func_OP_1w_sub,
bbb_func_OP_1w_addsat,
bbb_func_OP_1w_subsat,
bbb_func_OP_1w_subasr1,
bbb_func_OP_1w_subhalf,
bbb_func_OP_1w_subhalfrnd,
bbb_func_OP_1w_abs,
bbb_func_OP_1w_subabssat,
#ifdef ISP2401
bbb_func_OP_1w_subsat_u,
#endif
bbb_func_OP_1w_muld,
bbb_func_OP_1w_mul,
bbb_func_OP_1w_qmul,
bbb_func_OP_1w_qrmul,
bbb_func_OP_1w_eq,
bbb_func_OP_1w_ne,
bbb_func_OP_1w_le,
bbb_func_OP_1w_lt,
bbb_func_OP_1w_ge,
bbb_func_OP_1w_gt,
bbb_func_OP_1w_asr,
bbb_func_OP_1w_asrrnd,
bbb_func_OP_1w_asl,
bbb_func_OP_1w_aslsat,
bbb_func_OP_1w_lsl,
bbb_func_OP_1w_lsr,
#ifdef ISP2401
bbb_func_OP_1w_ashift,
bbb_func_OP_1w_lshift,
#endif
bbb_func_OP_int_cast_to_1w ,
bbb_func_OP_1w_cast_to_int ,
bbb_func_OP_1w_cast_to_2w ,
bbb_func_OP_2w_cast_to_1w ,
bbb_func_OP_2w_sat_cast_to_1w ,
bbb_func_OP_1w_clip_asym,
bbb_func_OP_1w_clipz,
bbb_func_OP_1w_div,
bbb_func_OP_1w_qdiv,
bbb_func_OP_1w_mod,
bbb_func_OP_1w_sqrt_u,
bbb_func_OP_1w_mux,
bbb_func_OP_1w_avg,
bbb_func_OP_1w_avgrnd,
bbb_func_OP_1w_min,
bbb_func_OP_1w_max,
bbb_func_OP_2w_and,
bbb_func_OP_2w_or,
bbb_func_OP_2w_xor,
bbb_func_OP_2w_inv,
bbb_func_OP_2w_add,
bbb_func_OP_2w_sub,
bbb_func_OP_2w_addsat,
bbb_func_OP_2w_subsat,
bbb_func_OP_2w_subasr1,
bbb_func_OP_2w_subhalf,
bbb_func_OP_2w_subhalfrnd,
bbb_func_OP_2w_abs,
bbb_func_OP_2w_subabssat,
bbb_func_OP_2w_mul,
bbb_func_OP_2w_qmul,
bbb_func_OP_2w_qrmul,
bbb_func_OP_2w_eq,
bbb_func_OP_2w_ne,
bbb_func_OP_2w_le,
bbb_func_OP_2w_lt,
bbb_func_OP_2w_ge,
bbb_func_OP_2w_gt,
bbb_func_OP_2w_asr,
bbb_func_OP_2w_asrrnd,
bbb_func_OP_2w_asl,
bbb_func_OP_2w_aslsat,
bbb_func_OP_2w_lsl,
bbb_func_OP_2w_lsr,
bbb_func_OP_2w_clip_asym,
bbb_func_OP_2w_clipz,
bbb_func_OP_2w_div,
bbb_func_OP_2w_divh,
bbb_func_OP_2w_mod,
bbb_func_OP_2w_sqrt_u,
bbb_func_OP_2w_mux,
bbb_func_OP_2w_avg,
bbb_func_OP_2w_avgrnd,
bbb_func_OP_2w_min,
bbb_func_OP_2w_max,
bbb_func_OP_1w_mul_realigning,
#ifdef ISP2401
bbb_func_OP_1w_imax32,
bbb_func_OP_1w_imaxidx32,
bbb_func_OP_1w_cond_add,
#endif
bbb_func_num_functions
} bbb_functions_t;
typedef enum {
core_func_OP_and,
core_func_OP_or,
core_func_OP_xor,
core_func_OP_inv,
core_func_OP_add,
core_func_OP_sub,
core_func_OP_addsat,
core_func_OP_subsat,
core_func_OP_subasr1,
core_func_OP_abs,
core_func_OP_subabssat,
#ifdef ISP2401
core_func_OP_subsat_u,
#endif
core_func_OP_muld,
core_func_OP_mul,
core_func_OP_qrmul,
core_func_OP_eq,
core_func_OP_ne,
core_func_OP_le,
core_func_OP_lt,
core_func_OP_ge,
core_func_OP_gt,
core_func_OP_asr,
core_func_OP_asl,
core_func_OP_asrrnd,
core_func_OP_lsl,
core_func_OP_lslsat,
core_func_OP_lsr,
core_func_OP_lsrrnd,
core_func_OP_clip_asym,
core_func_OP_clipz,
core_func_OP_div,
core_func_OP_mod,
core_func_OP_sqrt,
core_func_OP_mux,
core_func_OP_avgrnd,
core_func_OP_min,
core_func_OP_max,
core_func_num_functions
} core_functions_t;
/* inc_bbb_count() can be used for building blocks that are implemented with one operation
inc_bbb_count_ext() will be used in case the operation count is not known or greater than one.
For some operations there is a difference in operation count for the cloned version and the
not cloned version. this difference is not vissible on the reference code side.
We could add a min and max operation count for those operations, and keep track of those counts
separately. That way in the report the impact can be seen. */
#ifdef DISABLE_OPCNT
#define inc_bbb_count(func)
#define inc_bbb_count_ext(func, cnt)
#define enable_bbb_count()
#define disable_bbb_count()
#else
#define inc_bbb_count(func) _inc_bbb_count(func)
#define inc_bbb_count_ext(func, cnt) _inc_bbb_count_ext(func, cnt)
#define enable_bbb_count() _enable_bbb_count()
#define disable_bbb_count() _disable_bbb_count()
#endif
void
inc_core_count_n(
core_functions_t func,
unsigned n);
void
_enable_bbb_count(void);
void
_disable_bbb_count(void);
void
_inc_bbb_count(
bbb_functions_t func);
void
_inc_bbb_count_ext(
bbb_functions_t func,
int op_count);
void
bbb_func_reset_count(void);
void
bbb_func_print_totals(
FILE * fp,
unsigned non_zero_only);
void
core_func_print_totals(
FILE* fp,
unsigned non_zero_only);
#endif
/*
* 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 __OSYS_PUBLIC_H_INCLUDED__
#define __OSYS_PUBLIC_H_INCLUDED__
#include "system_types.h"
#endif /* __OSYS_PUBLIC_H_INCLUDED__ */
/*
* 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 __PIPELINE_PUBLIC_H_INCLUDED__
#define __PIPELINE_PUBLIC_H_INCLUDED__
#endif /* __PIPELINE_PUBLIC_H_INCLUDED__ */
/*
* 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 __REF_VECTOR_FUNC_TYPES_H_INCLUDED__
#define __REF_VECTOR_FUNC_TYPES_H_INCLUDED__
/*
* Prerequisites:
*
*/
#include "mpmath.h"
#include "bbb_config.h"
#include "isp_op1w_types.h"
#include "isp_op2w_types.h"
/* Defines for the Config Unit */
#define MAX_CONFIG_POINTS 5
#define INPUT_OFFSET_FACTOR 10
#define INPUT_SCALE_FACTOR 10
#define OUTPUT_SCALE_FACTOR 10
#define SLOPE_A_RESOLUTION 10
#define CONFIG_UNIT_LUT_SIZE_32 32 /*XCU works for ISP_NWAY = 32 */
#define LXCU_LUT_SIZE 16
#ifdef ISP2401
#define IMAX32_ELEM_SIZE 32
#endif
#define ONE_IN_Q14 (1<<(NUM_BITS-2))
#define Q29_TO_Q15_SHIFT_VAL (NUM_BITS-2)
#define Q28_TO_Q15_SHIFT_VAL (NUM_BITS-3)
#define MAX_ELEM(width_in_bits) ((1<<(width_in_bits))-1)
/* Block matching algorithm related data */
/* NUM_OF_SADS = ((SEARCH_AREA_HEIGHT - REF_BLOCK_HEIGHT)/PIXEL_SHIFT + 1)* \
((SEARCH_AREA_WIDTH - REF_BLOCK_WIDTH)/PIXEL_SHIFT + 1) */
#define SADS(sw_h,sw_w, ref_h, ref_w, p_sh) (((sw_h - ref_h)/p_sh + 1)*((sw_w - ref_w)/p_sh + 1))
#define SADS_16x16_1 SADS(16, 16, 8, 8, 1)
#define SADS_16x16_2 SADS(16, 16, 8, 8, 2)
#define SADS_14x14_1 SADS(14, 14, 8, 8, 1)
#define SADS_14x14_2 SADS(14, 14, 8, 8, 2)
#define BMA_OUTPUT_MATRIX_DIM(sw_h, ref_h, p_sh) ((sw_h - ref_h)/p_sh + 1)
#define BMA_OUT_16x16_2_32 BMA_OUTPUT_MATRIX_DIM(16, 8, 2)
#define BMA_OUT_14x14_2_32 BMA_OUTPUT_MATRIX_DIM(14, 8, 2)
#define BMA_OUT_16x16_1_32 BMA_OUTPUT_MATRIX_DIM(16, 8, 1)
#define BMA_OUT_14x14_1_32 BMA_OUTPUT_MATRIX_DIM(14, 8, 1)
#define BMA_SEARCH_BLOCK_SZ_16 16
#define BMA_REF_BLOCK_SZ_8 8
#define PIXEL_SHIFT_2 2
#define PIXEL_SHIFT_1 1
#define BMA_SEARCH_WIN_SZ_16 16
#define BMA_SEARCH_WIN_SZ_14 14
/*
* Struct type specification
*/
typedef unsigned short tscalar1w_3bit; /* tscalar1w in interval [0, 2^3) */
typedef short tscalar1w_5bit_signed; /* tscalar1w in interval [-2^(5-1), 2^(5-1)) */
typedef unsigned short tscalar1w_5bit; /* tscalar1w in interval [0, 2^5) */
typedef short tscalar1w_range1wbit; /* tscalar1w in interval [-NUM_BITS, NUM_BITS] */
typedef short tscalar1w_unsigned_range1wbit; /* tscalar1w in interval [0, NUM_BITS] */
typedef unsigned short tvector_8bit; /* 8 bit positive number */
typedef unsigned short tvector_5bit;
typedef unsigned short tvector_4bit;
typedef unsigned short tscalar1w_16bit;
typedef unsigned short tscalar1w_4bit_bma_shift;
typedef struct {
tvector1w v0 ;
tvector1w v1 ;
} s_1w_2x1_matrix;
#define S_1W_2X1_MATRIX_DEFAULT ((s_1w_2x1_matrix)\
{ 0, 0 })
typedef struct {
tvector1w v00;
tvector1w v01;
} s_1w_1x2_matrix;
#define S_1W_1X2_MATRIX_DEFAULT ((s_1w_1x2_matrix)\
{ 0, 0 })
typedef struct {
tvector1w v00 ;
tvector1w v01 ;
tvector1w v02 ;
} s_1w_1x3_matrix;
#define S_1W_1X3_MATRIX_DEFAULT ((s_1w_1x3_matrix)\
{ 0, 0, 0, })
typedef struct {
tvector1w v00; tvector1w v01; tvector1w v02;
tvector1w v10; tvector1w v11; tvector1w v12;
} s_1w_2x3_matrix;
#define S_1W_2X3_MATRIX_DEFAULT ((s_1w_2x3_matrix)\
{ 0, 0, 0, \
0, 0, 0 })
typedef struct {
tvector1w v00 ; tvector1w v01 ; tvector1w v02 ;
tvector1w v10 ; tvector1w v11 ; tvector1w v12 ;
tvector1w v20 ; tvector1w v21 ; tvector1w v22 ;
} s_1w_3x3_matrix;
#define S_1W_3X3_MATRIX_DEFAULT ((s_1w_3x3_matrix)\
{ 0, 0, 0, \
0, 0, 0, \
0, 0, 0 })
typedef struct {
tvector1w v00 ; tvector1w v01 ; tvector1w v02 ;
tvector1w v10 ; tvector1w v11 ; tvector1w v12 ;
tvector1w v20 ; tvector1w v21 ; tvector1w v22 ;
tvector1w v30 ; tvector1w v31 ; tvector1w v32 ;
} s_1w_4x3_matrix;
#define S_1W_4X3_MATRIX_DEFAULT ((s_1w_4x3_matrix)\
{ 0, 0, 0, \
0, 0, 0, \
0, 0, 0, \
0, 0, 0 })
typedef struct {
tvector1w v00 ;
tvector1w v01 ;
tvector1w v02 ;
tvector1w v03 ;
tvector1w v04 ;
} s_1w_1x5_matrix;
#define S_1W_1X5_MATRIX_DEFAULT ((s_1w_1x5_matrix)\
{ 0, 0, 0, 0, 0 })
typedef struct {
tvector1w v00 ; tvector1w v01 ; tvector1w v02 ; tvector1w v03 ; tvector1w v04 ;
tvector1w v10 ; tvector1w v11 ; tvector1w v12 ; tvector1w v13 ; tvector1w v14 ;
tvector1w v20 ; tvector1w v21 ; tvector1w v22 ; tvector1w v23 ; tvector1w v24 ;
tvector1w v30 ; tvector1w v31 ; tvector1w v32 ; tvector1w v33 ; tvector1w v34 ;
tvector1w v40 ; tvector1w v41 ; tvector1w v42 ; tvector1w v43 ; tvector1w v44 ;
} s_1w_5x5_matrix;
#define S_1W_5X5_MATRIX_DEFAULT ((s_1w_5x5_matrix)\
{ 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, \
0, 0, 0, 0, 0 })
#ifndef ISP2401
#else
#endif
typedef struct {
tvector1w v00;
tvector1w v01;
tvector1w v02;
tvector1w v03;
tvector1w v04;
tvector1w v05;
tvector1w v06;
} s_1w_1x7_matrix;
#define S_1W_1X7_MATRIX_DEFAULT ((s_1w_1x7_matrix)\
{ 0, 0, 0, 0, 0, 0, 0 })
typedef struct {
tvector1w v00;
tvector1w v01;
tvector1w v02;
tvector1w v03;
tvector1w v04;
tvector1w v05;
tvector1w v06;
tvector1w v07;
tvector1w v08;
} s_1w_1x9_matrix;
#define S_1W_1X9_MATRIX_DEFAULT ((s_1w_1x9_matrix)\
{ 0, 0, 0, 0, 0, 0, 0, 0, 0 })
typedef struct {
tvector1w v00;
tvector1w v01;
tvector1w v02;
tvector1w v03;
} s_1w_1x4_matrix;
#define S_1W_1X4_MATRIX ((s_1w_1x4_matrix)\
{ 0, 0, 0, 0 })
typedef struct {
tvector1w v00; tvector1w v01; tvector1w v02; tvector1w v03;
tvector1w v10; tvector1w v11; tvector1w v12; tvector1w v13;
tvector1w v20; tvector1w v21; tvector1w v22; tvector1w v23;
tvector1w v30; tvector1w v31; tvector1w v32; tvector1w v33;
} s_1w_4x4_matrix;
#define S_1W_4X4_MATRIX_DEFAULT ((s_1w_4x4_matrix)\
{ 0, 0, 0, 0, \
0, 0, 0, 0, \
0, 0, 0, 0, \
0, 0, 0, 0 })
typedef struct {
tvector1w v00;
tvector1w v01;
tvector1w v02;
tvector1w v03;
tvector1w v04;
tvector1w v05;
} s_1w_1x6_matrix;
#define S_1W_1X6_MATRIX_DEFAULT ((s_1w_1x6_matrix)\
{ 0, 0, 0, 0, 0, 0 })
typedef struct {
tvector1w v00; tvector1w v01; tvector1w v02; tvector1w v03; tvector1w v04; tvector1w v05;
tvector1w v10; tvector1w v11; tvector1w v12; tvector1w v13; tvector1w v14; tvector1w v15;
tvector1w v20; tvector1w v21; tvector1w v22; tvector1w v23; tvector1w v24; tvector1w v25;
tvector1w v30; tvector1w v31; tvector1w v32; tvector1w v33; tvector1w v34; tvector1w v35;
tvector1w v40; tvector1w v41; tvector1w v42; tvector1w v43; tvector1w v44; tvector1w v45;
tvector1w v50; tvector1w v51; tvector1w v52; tvector1w v53; tvector1w v54; tvector1w v55;
} s_1w_6x6_matrix;
#define S_1W_6X6_MATRIX_DEFAULT ((s_1w_6x6_matrix)\
{ 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0 })
typedef struct {
tvector1w v00; tvector1w v01; tvector1w v02; tvector1w v03; tvector1w v04;
tvector1w v05; tvector1w v06; tvector1w v07; tvector1w v08;
tvector1w v10; tvector1w v11; tvector1w v12; tvector1w v13; tvector1w v14;
tvector1w v15; tvector1w v16; tvector1w v17; tvector1w v18;
tvector1w v20; tvector1w v21; tvector1w v22; tvector1w v23; tvector1w v24;
tvector1w v25; tvector1w v26; tvector1w v27; tvector1w v28;
tvector1w v30; tvector1w v31; tvector1w v32; tvector1w v33; tvector1w v34;
tvector1w v35; tvector1w v36; tvector1w v37; tvector1w v38;
tvector1w v40; tvector1w v41; tvector1w v42; tvector1w v43; tvector1w v44;
tvector1w v45; tvector1w v46; tvector1w v47; tvector1w v48;
tvector1w v50; tvector1w v51; tvector1w v52; tvector1w v53; tvector1w v54;
tvector1w v55; tvector1w v56; tvector1w v57; tvector1w v58;
tvector1w v60; tvector1w v61; tvector1w v62; tvector1w v63; tvector1w v64;
tvector1w v65; tvector1w v66; tvector1w v67; tvector1w v68;
tvector1w v70; tvector1w v71; tvector1w v72; tvector1w v73; tvector1w v74;
tvector1w v75; tvector1w v76; tvector1w v77; tvector1w v78;
tvector1w v80; tvector1w v81; tvector1w v82; tvector1w v83; tvector1w v84;
tvector1w v85; tvector1w v86; tvector1w v87; tvector1w v88;
} s_1w_9x9_matrix;
#define S_1W_9X9_MATRIX_DEFAULT ((s_1w_9x9_matrix)\
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0 })
typedef struct {
tvector1w v00; tvector1w v01; tvector1w v02; tvector1w v03; tvector1w v04;
tvector1w v05; tvector1w v06;
tvector1w v10; tvector1w v11; tvector1w v12; tvector1w v13; tvector1w v14;
tvector1w v15; tvector1w v16;
tvector1w v20; tvector1w v21; tvector1w v22; tvector1w v23; tvector1w v24;
tvector1w v25; tvector1w v26;
tvector1w v30; tvector1w v31; tvector1w v32; tvector1w v33; tvector1w v34;
tvector1w v35; tvector1w v36;
tvector1w v40; tvector1w v41; tvector1w v42; tvector1w v43; tvector1w v44;
tvector1w v45; tvector1w v46;
tvector1w v50; tvector1w v51; tvector1w v52; tvector1w v53; tvector1w v54;
tvector1w v55; tvector1w v56;
tvector1w v60; tvector1w v61; tvector1w v62; tvector1w v63; tvector1w v64;
tvector1w v65; tvector1w v66;
} s_1w_7x7_matrix;
#define S_1W_7X7_MATRIX_DEFAULT ((s_1w_7x7_matrix)\
{ 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0 })
typedef struct {
tvector1w v0_0;
tvector1w v0_1;
tvector1w v0_2;
tvector1w v0_3;
tvector1w v0_4;
tvector1w v0_5;
tvector1w v0_6;
tvector1w v0_7;
tvector1w v0_8;
tvector1w v0_9;
tvector1w v0_10;
} s_1w_1x11_matrix;
#define S_1W_1X11_MATRIX_DEFAULT ((s_1w_1x11_matrix)\
{ 0, 0, 0, 0, 0, 0, 0, 0, 0 })
typedef struct {
tvector1w x_cord[MAX_CONFIG_POINTS];
tvector1w slope[MAX_CONFIG_POINTS-1];
tvector1w y_offset[MAX_CONFIG_POINTS-1];
} ref_config_points;
typedef struct {
tscalar1w_range1wbit slope_vec[CONFIG_UNIT_LUT_SIZE_32];
tscalar1w_range1wbit offset_vec[CONFIG_UNIT_LUT_SIZE_32];
tscalar1w_16bit x_cord_vec[CONFIG_UNIT_LUT_SIZE_32];
tscalar1w_16bit x_cord_max;
tscalar1w_5bit exponent;
tscalar1w_5bit slope_resolution;
} xcu_ref_init_vectors;
typedef struct {
#ifdef ISP2401
tvector1w elem[IMAX32_ELEM_SIZE];
} imax32_ref_in_vector;
typedef struct {
#endif
tscalar1w search[BMA_SEARCH_BLOCK_SZ_16][BMA_SEARCH_BLOCK_SZ_16];
} bma_16x16_search_window;
typedef struct {
tscalar1w ref[BMA_REF_BLOCK_SZ_8][BMA_REF_BLOCK_SZ_8];
} ref_block_8x8;
typedef struct {
tscalar1w sads[SADS_16x16_1];
} bma_output_16_1;
typedef struct {
tscalar1w sads[SADS_16x16_2];
} bma_output_16_2;
typedef struct {
tscalar1w sads[SADS_14x14_2];
} bma_output_14_2;
typedef struct {
tscalar1w sads[SADS_14x14_1];
} bma_output_14_1;
typedef struct {
tvector1w spatial_weight_lut[BFA_MAX_KWAY]; /* spatial weight LUT */
/* range weight LUT, (BFA_RW_LUT_SIZE + 1) numbers of LUT values are compressed in BFA_RW_LUT_SIZE buffer.
* range_weight_lut[k] = packed(drop[k], range_weight[k])
* where, drop[k] = range_weight[k+1] - range_weight[k]
* pack(msb, lsb): two 8bits numbers packed in one 16bits number */
tvector1w range_weight_lut[BFA_RW_LUT_SIZE];
} bfa_weights;
/* Return type for BFA BBBs */
typedef struct {
tvector2w sop; /* weighted sum of pixels */
tvector1w sow; /* sum of weights */
} bfa_7x7_output;
#endif /* __REF_VECTOR_FUNC_TYPES_H_INCLUDED__ */
/*
* 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 __OSYS_H_INCLUDED__
#define __OSYS_H_INCLUDED__
/*
* This file is included on every cell {SP,ISP,host} and on every system
* that uses the OSYS device. It defines the API to DLI bridge
*
* System and cell specific interfaces and inline code are included
* conditionally through Makefile path settings.
*
* - . system and cell agnostic interfaces, constants and identifiers
* - public: system agnostic, cell specific interfaces
* - private: system dependent, cell specific interfaces & inline implementations
* - global: system specific constants and identifiers
* - local: system and cell specific constants and identifiers
*
*/
#include "system_local.h"
#include "osys_local.h"
#ifndef __INLINE_OSYS__
#define STORAGE_CLASS_OSYS_H extern
#define STORAGE_CLASS_OSYS_C
#include "osys_public.h"
#else /* __INLINE_OSYS__ */
#define STORAGE_CLASS_OSYS_H static inline
#define STORAGE_CLASS_OSYS_C static inline
#include "osys_private.h"
#endif /* __INLINE_OSYS__ */
#endif /* __OSYS_H_INCLUDED__ */
/*
* 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 __STREAM_BUFFER_GLOBAL_H_INCLUDED__
#define __STREAM_BUFFER_GLOBAL_H_INCLUDED__
typedef struct stream_buffer_s stream_buffer_t;
struct stream_buffer_s {
unsigned base;
unsigned limit;
unsigned top;
};
#endif /* __STREAM_BUFFER_GLOBAL_H_INCLUDED__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册