]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_state.h
staging/atomisp: Add support for the Intel IPU v2
[mirror_ubuntu-hirsute-kernel.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / isp / kernels / aa / aa_2 / ia_css_aa2_state.h
1 /*
2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 */
14
15 #ifndef __IA_CSS_AA2_STATE_H
16 #define __IA_CSS_AA2_STATE_H
17
18 #include "type_support.h"
19 #include "vmem.h" /* for VMEM_ARRAY*/
20
21 /* Denotes the maximum number of pixels per line that can be processed:
22 * MAX_AA_VECTORS_PER_LINE = maximum_line_width / ISP_NWAY */
23 #ifndef MAX_AA_VECTORS_PER_LINE
24 #error Please define MAX_AA_VECTORS_PER_LINE.
25 #endif
26
27 /* This uses 2 history lines for both y, u and v*/
28 #define AA_STATE_Y_BUFFER_HEIGHT 2
29 #define AA_STATE_UV_BUFFER_HEIGHT 2
30 #define AA_STATE_Y_BUFFER_WIDTH MAX_AA_VECTORS_PER_LINE
31 /* The number of u and v elements is half y due to yuv420 downsampling. */
32 #define AA_STATE_UV_BUFFER_WIDTH (AA_STATE_Y_BUFFER_WIDTH/2)
33
34
35 struct ia_css_isp_aa_vmem_state {
36 VMEM_ARRAY(y[AA_STATE_Y_BUFFER_HEIGHT], AA_STATE_Y_BUFFER_WIDTH*ISP_NWAY);
37 VMEM_ARRAY(u[AA_STATE_UV_BUFFER_HEIGHT], AA_STATE_UV_BUFFER_WIDTH*ISP_NWAY);
38 VMEM_ARRAY(v[AA_STATE_UV_BUFFER_HEIGHT], AA_STATE_UV_BUFFER_WIDTH*ISP_NWAY);
39 };
40
41 #endif /* __IA_CSS_AA2_STATE_H */