2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
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.
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
15 #include "sh_css_stream_format.h"
16 #include <ia_css_stream_format.h>
18 unsigned int sh_css_stream_format_2_bits_per_subpixel(
19 enum ia_css_stream_format format)
24 case IA_CSS_STREAM_FORMAT_RGB_444:
27 case IA_CSS_STREAM_FORMAT_RGB_555:
30 case IA_CSS_STREAM_FORMAT_RGB_565:
31 case IA_CSS_STREAM_FORMAT_RGB_666:
32 case IA_CSS_STREAM_FORMAT_RAW_6:
35 case IA_CSS_STREAM_FORMAT_RAW_7:
38 case IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY:
39 case IA_CSS_STREAM_FORMAT_YUV420_8:
40 case IA_CSS_STREAM_FORMAT_YUV422_8:
41 case IA_CSS_STREAM_FORMAT_RGB_888:
42 case IA_CSS_STREAM_FORMAT_RAW_8:
43 case IA_CSS_STREAM_FORMAT_BINARY_8:
44 case IA_CSS_STREAM_FORMAT_USER_DEF1:
45 case IA_CSS_STREAM_FORMAT_USER_DEF2:
46 case IA_CSS_STREAM_FORMAT_USER_DEF3:
47 case IA_CSS_STREAM_FORMAT_USER_DEF4:
48 case IA_CSS_STREAM_FORMAT_USER_DEF5:
49 case IA_CSS_STREAM_FORMAT_USER_DEF6:
50 case IA_CSS_STREAM_FORMAT_USER_DEF7:
51 case IA_CSS_STREAM_FORMAT_USER_DEF8:
54 case IA_CSS_STREAM_FORMAT_YUV420_10:
55 case IA_CSS_STREAM_FORMAT_YUV422_10:
56 case IA_CSS_STREAM_FORMAT_RAW_10:
59 case IA_CSS_STREAM_FORMAT_RAW_12:
62 case IA_CSS_STREAM_FORMAT_RAW_14:
65 case IA_CSS_STREAM_FORMAT_RAW_16:
66 case IA_CSS_STREAM_FORMAT_YUV420_16:
67 case IA_CSS_STREAM_FORMAT_YUV422_16: