linux/drivers/staging/media/atomisp/pci/sh_css_param_dvs.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * 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 _SH_CSS_PARAMS_DVS_H_
#define _SH_CSS_PARAMS_DVS_H_

#include <math_support.h>
#include <ia_css_types.h>
#include <sh_css_dvs_info.h>
#include "gdc_global.h" /* gdc_warp_param_mem_t */

#define DVS_ENV_MIN_X
#define DVS_ENV_MIN_Y

#define DVS_BLOCKDIM_X
#define DVS_BLOCKDIM_Y_LUMA
#define DVS_BLOCKDIM_Y_CHROMA

/* ISP2400 */
/* horizontal 64x64 blocks round up to DVS_BLOCKDIM_X, make even */
#define DVS_NUM_BLOCKS_X(X)

/* ISP2400 */
/* vertical   64x64 blocks round up to DVS_BLOCKDIM_Y */
#define DVS_NUM_BLOCKS_Y(X)
#define DVS_NUM_BLOCKS_X_CHROMA(X)
#define DVS_NUM_BLOCKS_Y_CHROMA(X)

#define DVS_TABLE_IN_BLOCKDIM_X_LUMA(X)
#define DVS_TABLE_IN_BLOCKDIM_X_CHROMA(X)
#define DVS_TABLE_IN_BLOCKDIM_Y_LUMA(X)
#define DVS_TABLE_IN_BLOCKDIM_Y_CHROMA(X)

#define DVS_ENVELOPE_X(X)
#define DVS_ENVELOPE_Y(X)

#define DVS_COORD_FRAC_BITS

/* ISP2400 */
#define DVS_INPUT_BYTES_PER_PIXEL

#define XMEM_ALIGN_LOG2

#define DVS_6AXIS_COORDS_ELEMS

/* currently we only support two output with the same resolution, output 0 is th default one. */
#define DVS_6AXIS_BYTES(binary)

/*
 * ISP2400:
 * Bilinear interpolation (HRT_GDC_BLI_MODE) is the supported method currently.
 * Bicubic interpolation (HRT_GDC_BCI_MODE) is not supported yet */
#define DVS_GDC_INTERP_METHOD

struct ia_css_dvs_6axis_config *
generate_dvs_6axis_table(const struct ia_css_resolution	*frame_res,
			 const struct ia_css_resolution *dvs_offset);

struct ia_css_dvs_6axis_config *
generate_dvs_6axis_table_from_config(struct ia_css_dvs_6axis_config
				     *dvs_config_src);

void
free_dvs_6axis_table(struct ia_css_dvs_6axis_config  **dvs_6axis_config);

void
copy_dvs_6axis_table(struct ia_css_dvs_6axis_config *dvs_config_dst,
		     const struct ia_css_dvs_6axis_config *dvs_config_src);

#endif