3 * Support for Intel Camera Imaging ISP subsystem.
4 * Copyright (c) 2015, Intel Corporation.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 Support for Intel Camera Imaging ISP subsystem.
18 Copyright (c) 2010 - 2015, Intel Corporation.
20 This program is free software; you can redistribute it and/or modify it
21 under the terms and conditions of the GNU General Public License,
22 version 2, as published by the Free Software Foundation.
24 This program is distributed in the hope it will be useful, but WITHOUT
25 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
26 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
31 #ifndef __IA_CSS_FRAME_COMM_H__
32 #define __IA_CSS_FRAME_COMM_H__
34 #include "type_support.h"
35 #include "platform_support.h"
36 #include "runtime/bufq/interface/ia_css_bufq_comm.h"
37 #include <system_types.h> /* hrt_vaddress */
40 * These structs are derived from structs defined in ia_css_types.h
41 * (just take out the "_sp" from the struct name to get the "original")
42 * All the fields that are not needed by the SP are removed.
44 struct ia_css_frame_sp_plane {
45 unsigned int offset; /* offset in bytes to start of frame data */
46 /* offset is wrt data in sh_css_sp_sp_frame */
49 struct ia_css_frame_sp_binary_plane {
51 struct ia_css_frame_sp_plane data;
54 struct ia_css_frame_sp_yuv_planes {
55 struct ia_css_frame_sp_plane y;
56 struct ia_css_frame_sp_plane u;
57 struct ia_css_frame_sp_plane v;
60 struct ia_css_frame_sp_nv_planes {
61 struct ia_css_frame_sp_plane y;
62 struct ia_css_frame_sp_plane uv;
65 struct ia_css_frame_sp_rgb_planes {
66 struct ia_css_frame_sp_plane r;
67 struct ia_css_frame_sp_plane g;
68 struct ia_css_frame_sp_plane b;
71 struct ia_css_frame_sp_plane6 {
72 struct ia_css_frame_sp_plane r;
73 struct ia_css_frame_sp_plane r_at_b;
74 struct ia_css_frame_sp_plane gr;
75 struct ia_css_frame_sp_plane gb;
76 struct ia_css_frame_sp_plane b;
77 struct ia_css_frame_sp_plane b_at_r;
80 struct ia_css_sp_resolution {
81 uint16_t width; /* width of valid data in pixels */
82 uint16_t height; /* Height of valid data in lines */
86 * Frame info struct. This describes the contents of an image frame buffer.
88 struct ia_css_frame_sp_info {
89 struct ia_css_sp_resolution res;
90 uint16_t padded_width; /* stride of line in memory
92 unsigned char format; /* format of the frame data */
93 unsigned char raw_bit_depth; /* number of valid bits per pixel,
94 only valid for RAW bayer frames */
95 unsigned char raw_bayer_order; /* bayer order, only valid
96 for RAW bayer frames */
97 unsigned char padding[3]; /* Extend to 32 bit multiple */
100 struct ia_css_buffer_sp {
102 hrt_vaddress xmem_addr;
103 enum sh_css_queue_id queue_id;
105 enum ia_css_buffer_type buf_type;
108 struct ia_css_frame_sp {
109 struct ia_css_frame_sp_info info;
110 struct ia_css_buffer_sp buf_attr;
112 struct ia_css_frame_sp_plane raw;
113 struct ia_css_frame_sp_plane rgb;
114 struct ia_css_frame_sp_rgb_planes planar_rgb;
115 struct ia_css_frame_sp_plane yuyv;
116 struct ia_css_frame_sp_yuv_planes yuv;
117 struct ia_css_frame_sp_nv_planes nv;
118 struct ia_css_frame_sp_plane6 plane6;
119 struct ia_css_frame_sp_binary_plane binary;
123 void ia_css_frame_info_to_frame_sp_info(
124 struct ia_css_frame_sp_info *sp_info,
125 const struct ia_css_frame_info *info);
127 void ia_css_resolution_to_sp_resolution(
128 struct ia_css_sp_resolution *sp_info,
129 const struct ia_css_resolution *info);
131 #endif /*__IA_CSS_FRAME_COMM_H__*/