1a696f5d667227365da732481770767dcb330dd23Mathias Agopian/*
2a696f5d667227365da732481770767dcb330dd23Mathias Agopian * Copyright (C) 2010 The Android Open Source Project
3a696f5d667227365da732481770767dcb330dd23Mathias Agopian *
4a696f5d667227365da732481770767dcb330dd23Mathias Agopian * Licensed under the Apache License, Version 2.0 (the "License");
5a696f5d667227365da732481770767dcb330dd23Mathias Agopian * you may not use this file except in compliance with the License.
6a696f5d667227365da732481770767dcb330dd23Mathias Agopian * You may obtain a copy of the License at
7a696f5d667227365da732481770767dcb330dd23Mathias Agopian *
8a696f5d667227365da732481770767dcb330dd23Mathias Agopian *      http://www.apache.org/licenses/LICENSE-2.0
9a696f5d667227365da732481770767dcb330dd23Mathias Agopian *
10a696f5d667227365da732481770767dcb330dd23Mathias Agopian * Unless required by applicable law or agreed to in writing, software
11a696f5d667227365da732481770767dcb330dd23Mathias Agopian * distributed under the License is distributed on an "AS IS" BASIS,
12a696f5d667227365da732481770767dcb330dd23Mathias Agopian * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13a696f5d667227365da732481770767dcb330dd23Mathias Agopian * See the License for the specific language governing permissions and
14a696f5d667227365da732481770767dcb330dd23Mathias Agopian * limitations under the License.
15a696f5d667227365da732481770767dcb330dd23Mathias Agopian */
16a696f5d667227365da732481770767dcb330dd23Mathias Agopian
17a696f5d667227365da732481770767dcb330dd23Mathias Agopianpackage android.graphics;
18a696f5d667227365da732481770767dcb330dd23Mathias Agopian
19058d0390a44f68b67788021bae9ca1775812997bMathias Agopianpublic class ImageFormat {
20525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    /*
21525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     * these constants are chosen to be binary compatible with their previous
22525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     * location in PixelFormat.java
23525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     */
24a696f5d667227365da732481770767dcb330dd23Mathias Agopian
25525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    public static final int UNKNOWN = 0;
26a696f5d667227365da732481770767dcb330dd23Mathias Agopian
27525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    /**
289184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * RGB format used for pictures encoded as RGB_565. See
29525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     * {@link android.hardware.Camera.Parameters#setPictureFormat(int)}.
30525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     */
31525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    public static final int RGB_565 = 4;
32a696f5d667227365da732481770767dcb330dd23Mathias Agopian
33525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    /**
349184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * <p>Android YUV format.</p>
3558a7775d3e12efdc5aaaf19d0ac5e487d622cf36Mathias Agopian     *
369184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * <p>This format is exposed to software decoders and applications.</p>
3758a7775d3e12efdc5aaaf19d0ac5e487d622cf36Mathias Agopian     *
389184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * <p>YV12 is a 4:2:0 YCrCb planar format comprised of a WxH Y plane followed
399184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * by (W/2) x (H/2) Cr and Cb planes.</p>
4058a7775d3e12efdc5aaaf19d0ac5e487d622cf36Mathias Agopian     *
419184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * <p>This format assumes
429184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * <ul>
439184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * <li>an even width</li>
449184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * <li>an even height</li>
459184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * <li>a horizontal stride multiple of 16 pixels</li>
469184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * <li>a vertical stride equal to the height</li>
479184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * </ul>
489184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * </p>
4958a7775d3e12efdc5aaaf19d0ac5e487d622cf36Mathias Agopian     *
509184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * <pre> y_size = stride * height
51951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     * c_stride = ALIGN(stride/2, 16)
52951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     * c_size = c_stride * height/2
539184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * size = y_size + c_size * 2
549184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * cr_offset = y_size
559184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * cb_offset = y_size + c_size</pre>
5658a7775d3e12efdc5aaaf19d0ac5e487d622cf36Mathias Agopian     *
57b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * <p>For the {@link android.hardware.camera2} API, the {@link #YUV_420_888} format is
58b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * recommended for YUV output instead.</p>
59b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     *
60b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * <p>For the older camera API, this format is guaranteed to be supported for
61b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * {@link android.hardware.Camera} preview images since API level 12; for earlier API versions,
62b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * check {@link android.hardware.Camera.Parameters#getSupportedPreviewFormats()}.
63951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     *
64951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     * <p>Note that for camera preview callback use (see
65951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     * {@link android.hardware.Camera#setPreviewCallback}), the
66951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     * <var>stride</var> value is the smallest possible; that is, it is equal
67951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     * to:
68951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     *
69951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     * <pre>stride = ALIGN(width, 16)</pre>
70951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     *
71951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     * @see android.hardware.Camera.Parameters#setPreviewCallback
72951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     * @see android.hardware.Camera.Parameters#setPreviewFormat
73951516358e2841d2425f610bcd0175d9960135d2Eino-Ville Talvala     * @see android.hardware.Camera.Parameters#getSupportedPreviewFormats
749184ec307be30719b2b7bfc3fb3e0a1365ccdf73Eino-Ville Talvala     * </p>
75525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     */
76525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    public static final int YV12 = 0x32315659;
77a696f5d667227365da732481770767dcb330dd23Mathias Agopian
78525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    /**
791eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <p>Android Y8 format.</p>
801eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
811eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <p>Y8 is a YUV planar format comprised of a WxH Y plane only, with each pixel
821eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * being represented by 8 bits. It is equivalent to just the Y plane from {@link #YV12}
831eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * format.</p>
841eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
851eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <p>This format assumes
861eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <ul>
871eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <li>an even width</li>
881eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <li>an even height</li>
891eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <li>a horizontal stride multiple of 16 pixels</li>
901eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * </ul>
911eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * </p>
921eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
931eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <pre> y_size = stride * height </pre>
941eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
951eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <p>For example, the {@link android.media.Image} object can provide data
962f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvala     * in this format from a {@link android.hardware.camera2.CameraDevice}
971eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * through a {@link android.media.ImageReader} object if this format is
982f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvala     * supported by {@link android.hardware.camera2.CameraDevice}.</p>
991eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
1001eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * @see android.media.Image
1011eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * @see android.media.ImageReader
1022f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvala     * @see android.hardware.camera2.CameraDevice
1031eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
1041eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * @hide
1051eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     */
1061eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He    public static final int Y8 = 0x20203859;
1071eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He
1081eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He    /**
1091eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <p>Android Y16 format.</p>
1101eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
1111eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * Y16 is a YUV planar format comprised of a WxH Y plane, with each pixel
1121eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * being represented by 16 bits. It is just like {@link #Y8}, but has 16
1131eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * bits per pixel (little endian).</p>
1141eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
1151eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <p>This format assumes
1161eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <ul>
1171eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <li>an even width</li>
1181eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <li>an even height</li>
1191eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <li>a horizontal stride multiple of 16 pixels</li>
1201eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * </ul>
1211eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * </p>
1221eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
1231eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <pre> y_size = stride * height </pre>
1241eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
1251eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * <p>For example, the {@link android.media.Image} object can provide data
1262f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvala     * in this format from a {@link android.hardware.camera2.CameraDevice}
1271eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * through a {@link android.media.ImageReader} object if this format is
1282f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvala     * supported by {@link android.hardware.camera2.CameraDevice}.</p>
1291eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
1301eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * @see android.media.Image
1311eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * @see android.media.ImageReader
1322f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvala     * @see android.hardware.camera2.CameraDevice
1331eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     *
1341eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     * @hide
1351eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He     */
1361eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He    public static final int Y16 = 0x20363159;
1371eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He
1381eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He    /**
139b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * YCbCr format, used for video.
140b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     *
141b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * <p>For the {@link android.hardware.camera2} API, the {@link #YUV_420_888} format is
142b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * recommended for YUV output instead.</p>
143b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     *
144b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * <p>Whether this format is supported by the old camera API can be determined by
145b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * {@link android.hardware.Camera.Parameters#getSupportedPreviewFormats()}.</p>
146b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     *
147525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     */
148525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    public static final int NV16 = 0x10;
149a696f5d667227365da732481770767dcb330dd23Mathias Agopian
150525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    /**
151b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * YCrCb format used for images, which uses the NV21 encoding format.
152b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     *
153b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * <p>This is the default format
154b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * for {@link android.hardware.Camera} preview images, when not otherwise set with
155b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * {@link android.hardware.Camera.Parameters#setPreviewFormat(int)}.</p>
156b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     *
157b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * <p>For the {@link android.hardware.camera2} API, the {@link #YUV_420_888} format is
158b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * recommended for YUV output instead.</p>
159525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     */
160525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    public static final int NV21 = 0x11;
161a696f5d667227365da732481770767dcb330dd23Mathias Agopian
162525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    /**
163525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     * YCbCr format used for images, which uses YUYV (YUY2) encoding format.
164b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     *
165b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * <p>For the {@link android.hardware.camera2} API, the {@link #YUV_420_888} format is
166b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * recommended for YUV output instead.</p>
167b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     *
168b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * <p>This is an alternative format for {@link android.hardware.Camera} preview images. Whether
169b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * this format is supported by the camera hardware can be determined by
170b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * {@link android.hardware.Camera.Parameters#getSupportedPreviewFormats()}.</p>
171525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     */
172525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    public static final int YUY2 = 0x14;
173a696f5d667227365da732481770767dcb330dd23Mathias Agopian
174525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    /**
175b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * Compressed JPEG format.
176b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     *
177b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * <p>This format is always supported as an output format for the
178b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * {@link android.hardware.camera2} API, and as a picture format for the older
179b942b05093d2b1cee59ac73196a4b99962f10addEino-Ville Talvala     * {@link android.hardware.Camera} API</p>
180525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     */
181525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    public static final int JPEG = 0x100;
182a696f5d667227365da732481770767dcb330dd23Mathias Agopian
183525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    /**
184b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * <p>Multi-plane Android YUV format</p>
185b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     *
186b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * <p>This format is a generic YCbCr format, capable of describing any 4:2:0
1877a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * chroma-subsampled planar or semiplanar buffer (but not fully interleaved),
1887a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * with 8 bits per color sample.</p>
189b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     *
190b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * <p>Images in this format are always represented by three separate buffers
191b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * of data, one for each color plane. Additional information always
192b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * accompanies the buffers, describing the row stride and the pixel stride
193b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * for each plane.</p>
194b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     *
1957a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * <p>The order of planes in the array returned by
1967a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * {@link android.media.Image#getPlanes() Image#getPlanes()} is guaranteed such that
1977a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * plane #0 is always Y, plane #1 is always U (Cb), and plane #2 is always V (Cr).</p>
1987a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     *
1997a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * <p>The Y-plane is guaranteed not to be interleaved with the U/V planes
2007a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * (in particular, pixel stride is always 1 in
2017a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * {@link android.media.Image.Plane#getPixelStride() yPlane.getPixelStride()}).</p>
2027a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     *
2037a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * <p>The U/V planes are guaranteed to have the same row stride and pixel stride
2047a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * (in particular,
2057a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * {@link android.media.Image.Plane#getRowStride() uPlane.getRowStride()}
2067a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * == {@link android.media.Image.Plane#getRowStride() vPlane.getRowStride()} and
2077a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * {@link android.media.Image.Plane#getPixelStride() uPlane.getPixelStride()}
2087a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * == {@link android.media.Image.Plane#getPixelStride() vPlane.getPixelStride()};
2097a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     * ).</p>
2107a600ff65fa79696a2668c7d33101b6ac6696f04Igor Murashkin     *
211b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * <p>For example, the {@link android.media.Image} object can provide data
2122f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvala     * in this format from a {@link android.hardware.camera2.CameraDevice}
213b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * through a {@link android.media.ImageReader} object.</p>
214b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     *
215b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * @see android.media.Image
216b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * @see android.media.ImageReader
2172f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvala     * @see android.hardware.camera2.CameraDevice
218b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     */
219b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala    public static final int YUV_420_888 = 0x23;
220b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala
221b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala    /**
222b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * <p>General raw camera sensor image format, usually representing a
223b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * single-channel Bayer-mosaic image. Each pixel color sample is stored with
224b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * 16 bits of precision.</p>
225b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     *
226b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * <p>The layout of the color mosaic, the maximum and minimum encoding
227b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * values of the raw pixel data, the color space of the image, and all other
228b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * needed information to interpret a raw sensor image must be queried from
2292f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvala     * the {@link android.hardware.camera2.CameraDevice} which produced the
230b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     * image.</p>
231b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     */
2321eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He    public static final int RAW_SENSOR = 0x20;
233b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala
234b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala    /**
235d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <p>
236d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * Android 10-bit raw format
237d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </p>
238d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <p>
2394c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * This is a single-plane, 10-bit per pixel, densely packed (in each row),
2404c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * unprocessed format, usually representing raw Bayer-pattern images coming
2414c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * from an image sensor.
242d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </p>
243d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <p>
2444c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * In an image buffer with this format, starting from the first pixel of
2454c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * each row, each 4 consecutive pixels are packed into 5 bytes (40 bits).
2464c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * Each one of the first 4 bytes contains the top 8 bits of each pixel, The
2474c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * fifth byte contains the 2 least significant bits of the 4 pixels, the
2484c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * exact layout data for each 4 consecutive pixels is illustrated below
2494c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * ({@code Pi[j]} stands for the jth bit of the ith pixel):
250d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </p>
251d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <table>
252d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <thead>
253d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <tr>
254d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <th align="center"></th>
255d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <th align="center">bit 7</th>
256d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <th align="center">bit 6</th>
257d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <th align="center">bit 5</th>
258d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <th align="center">bit 4</th>
259d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <th align="center">bit 3</th>
260d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <th align="center">bit 2</th>
261d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <th align="center">bit 1</th>
262d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <th align="center">bit 0</th>
263d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </tr>
264d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </thead> <tbody>
265d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <tr>
266d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">Byte 0:</td>
267d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P0[9]</td>
268d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P0[8]</td>
269d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P0[7]</td>
270d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P0[6]</td>
271d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P0[5]</td>
272d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P0[4]</td>
273d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P0[3]</td>
274d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P0[2]</td>
275d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </tr>
276d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <tr>
277d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">Byte 1:</td>
278d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P1[9]</td>
279d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P1[8]</td>
280d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P1[7]</td>
281d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P1[6]</td>
282d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P1[5]</td>
283d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P1[4]</td>
284d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P1[3]</td>
285d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P1[2]</td>
286d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </tr>
287d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <tr>
288d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">Byte 2:</td>
289d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P2[9]</td>
290d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P2[8]</td>
291d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P2[7]</td>
292d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P2[6]</td>
293d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P2[5]</td>
294d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P2[4]</td>
295d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P2[3]</td>
296d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P2[2]</td>
297d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </tr>
298d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <tr>
299d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">Byte 3:</td>
300d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P3[9]</td>
301d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P3[8]</td>
302d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P3[7]</td>
303d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P3[6]</td>
304d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P3[5]</td>
305d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P3[4]</td>
306d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P3[3]</td>
307d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P3[2]</td>
308d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </tr>
309d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <tr>
310d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">Byte 4:</td>
311d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P3[1]</td>
312d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P3[0]</td>
313d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P2[1]</td>
314d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P2[0]</td>
315d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P1[1]</td>
316d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P1[0]</td>
317d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P0[1]</td>
318d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <td align="center">P0[0]</td>
319d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </tr>
320d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </tbody>
321d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </table>
322d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <p>
323d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * This format assumes
324d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <ul>
325d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <li>a width multiple of 4 pixels</li>
326d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <li>an even height</li>
327d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </ul>
328d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </p>
329d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     *
3304c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * <pre>size = row stride * height</pre> where the row stride is in <em>bytes</em>,
3314c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * not pixels.
3324c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     *
333d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <p>
3344c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * Since this is a densely packed format, the pixel stride is always 0. The
3354c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * application must use the pixel data layout defined in above table to
3364c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * access each row data. When row stride is equal to {@code width * (10 / 8)}, there
3374c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * will be no padding bytes at the end of each row, the entire image data is
3384c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * densely packed. When stride is larger than {@code width * (10 / 8)}, padding
3394c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * bytes will be present at the end of each row.
340d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </p>
341d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * <p>
342d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * For example, the {@link android.media.Image} object can provide data in
3434c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * this format from a {@link android.hardware.camera2.CameraDevice} (if
3444c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * supported) through a {@link android.media.ImageReader} object. The
345d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * {@link android.media.Image#getPlanes() Image#getPlanes()} will return a
3464c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * single plane containing the pixel data. The pixel stride is always 0 in
3474c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * {@link android.media.Image.Plane#getPixelStride()}, and the
3484c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * {@link android.media.Image.Plane#getRowStride()} describes the vertical
3494c4064fa66f551f49b7e1017b1ebe65a05f9df21Zhijun He     * neighboring pixel distance (in bytes) between adjacent rows.
350d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * </p>
351d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     *
352d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * @see android.media.Image
353d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * @see android.media.ImageReader
354d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     * @see android.hardware.camera2.CameraDevice
355d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He     */
356d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He    public static final int RAW10 = 0x25;
357d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He
358d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He    /**
359525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     * Use this function to retrieve the number of bits per pixel of an
360525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     * ImageFormat.
36170fb9085044c5e6f52c33c970d238b764cf2373bWu-cheng Li     *
362525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     * @param format
363525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     * @return the number of bits per pixel of the given format or -1 if the
364525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     *         format doesn't exist or is not supported.
365525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian     */
366525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    public static int getBitsPerPixel(int format) {
367525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian        switch (format) {
368525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian            case RGB_565:
369525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian                return 16;
370525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian            case NV16:
371525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian                return 16;
372525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian            case YUY2:
373525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian                return 16;
374525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian            case YV12:
375525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian                return 12;
3761eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He            case Y8:
3771eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He                return 8;
3781eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He            case Y16:
3791eb818e5b3481ee1c9722ad6b7bd925afdadb441Zhijun He                return 16;
380525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian            case NV21:
381525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian                return 12;
382b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala            case YUV_420_888:
383b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala                return 12;
384b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala            case RAW_SENSOR:
385b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala                return 16;
386d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He            case RAW10:
387d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He                return 10;
388525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian        }
389525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian        return -1;
390525af5d5b0fcd4de9bac2f4be016cdd2f3534a40Mathias Agopian    }
39194814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin
39294814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin    /**
39394814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin     * Determine whether or not this is a public-visible {@code format}.
39494814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin     *
39594814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin     * <p>In particular, {@code @hide} formats will return {@code false}.</p>
39694814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin     *
39794814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin     * <p>Any other formats (including UNKNOWN) will return {@code false}.</p>
39894814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin     *
39994814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin     * @param format an integer format
40094814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin     * @return a boolean
40194814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin     *
40294814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin     * @hide
40394814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin     */
40494814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin    public static boolean isPublicFormat(int format) {
40594814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin        switch (format) {
40694814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin            case RGB_565:
40794814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin            case NV16:
40894814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin            case YUY2:
40994814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin            case YV12:
4109c595174ccaaf3d36315c4a100e47ee4369073f6Igor Murashkin            case JPEG:
41194814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin            case NV21:
41294814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin            case YUV_420_888:
41394814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin            case RAW_SENSOR:
414d1988a98ed69db8c33b77b5c085ab91d22ef3bbcZhijun He            case RAW10:
41594814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin                return true;
41694814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin        }
41794814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin
41894814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin        return false;
41994814218d2313a989a5a8969f633e3fc33e43071Igor Murashkin    }
420a696f5d667227365da732481770767dcb330dd23Mathias Agopian}
421