hc
2024-03-26 e0728245c89800c2038c23308f2d88969d5b41c8
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
/* 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 __IA_CSS_DPC2_PARAM_H
#define __IA_CSS_DPC2_PARAM_H
 
#include "type_support.h"
#include "vmem.h" /* for VMEM_ARRAY*/
 
/* 4 planes : GR, R, B, GB */
#define NUM_PLANES        4
 
/* ToDo: Move this to testsetup */
#define MAX_FRAME_SIMDWIDTH    30
 
/* 3 lines state per color plane input_line_state */
#define DPC2_STATE_INPUT_BUFFER_HEIGHT    (3 * NUM_PLANES)
/* Each plane has width equal to half frame line */
#define DPC2_STATE_INPUT_BUFFER_WIDTH    CEIL_DIV(MAX_FRAME_SIMDWIDTH, 2)
 
/* 1 line state per color plane for local deviation state*/
#define DPC2_STATE_LOCAL_DEVIATION_BUFFER_HEIGHT    (1 * NUM_PLANES)
/* Each plane has width equal to half frame line */
#define DPC2_STATE_LOCAL_DEVIATION_BUFFER_WIDTH        CEIL_DIV(MAX_FRAME_SIMDWIDTH, 2)
 
/* MINMAX state buffer stores 1 full input line (GR-R color line) */
#define DPC2_STATE_SECOND_MINMAX_BUFFER_HEIGHT    1
#define DPC2_STATE_SECOND_MINMAX_BUFFER_WIDTH    MAX_FRAME_SIMDWIDTH
 
struct ia_css_isp_dpc2_params {
   s32 metric1;
   s32 metric2;
   s32 metric3;
   s32 wb_gain_gr;
   s32 wb_gain_r;
   s32 wb_gain_b;
   s32 wb_gain_gb;
};
 
#endif /* __IA_CSS_DPC2_PARAM_H */