| /* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved. |
| * |
| * Redistribution and use in source and binary forms, with or without |
| * modification, are permitted provided that the following conditions are |
| * met: |
| * * Redistributions of source code must retain the above copyright |
| * notice, this list of conditions and the following disclaimer. |
| * * Redistributions in binary form must reproduce the above |
| * copyright notice, this list of conditions and the following |
| * disclaimer in the documentation and/or other materials provided |
| * with the distribution. |
| * * Neither the name of The Linux Foundation nor the names of its |
| * contributors may be used to endorse or promote products derived |
| * from this software without specific prior written permission. |
| * |
| * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| * |
| */ |
| |
| #ifndef __QCAMERA3VENDORTAGS_H__ |
| #define __QCAMERA3VENDORTAGS_H__ |
| |
| // Camera dependencies |
| #include "system/camera_metadata.h" |
| |
| namespace qcamera { |
| |
| enum qcamera3_ext_section { |
| QCAMERA3_PRIVATEDATA = VENDOR_SECTION, |
| QCAMERA3_CDS, |
| QCAMERA3_OPAQUE_RAW, |
| QCAMERA3_CROP, |
| QCAMERA3_TUNING_META_DATA, |
| QCAMERA3_TEMPORAL_DENOISE, |
| QCAMERA3_AV_TIMER, |
| QCAMERA3_SENSOR_META_DATA, |
| QCAMERA3_DUALCAM_LINK_META_DATA, |
| QCAMERA3_DUALCAM_CALIB_META_DATA, |
| QCAMERA3_HAL_PRIVATEDATA, |
| QCAMERA3_JPEG_ENCODE_CROP, |
| QCAMERA3_VIDEO_HDR, |
| QCAMERA3_IR, |
| QCAMERA3_AEC_CONVERGENCE, |
| QCAMERA3_AWB_CONVERGENCE, |
| QCAMERA3_SECTIONS_END |
| }; |
| |
| enum qcamera3_ext_section_ranges { |
| QCAMERA3_PRIVATEDATA_START = QCAMERA3_PRIVATEDATA << 16, |
| QCAMERA3_CDS_START = QCAMERA3_CDS << 16, |
| QCAMERA3_OPAQUE_RAW_START = QCAMERA3_OPAQUE_RAW << 16, |
| QCAMERA3_CROP_START = QCAMERA3_CROP << 16, |
| QCAMERA3_TUNING_META_DATA_START = QCAMERA3_TUNING_META_DATA << 16, |
| QCAMERA3_TEMPORAL_DENOISE_START = QCAMERA3_TEMPORAL_DENOISE << 16, |
| QCAMERA3_AV_TIMER_START = QCAMERA3_AV_TIMER << 16, |
| QCAMERA3_SENSOR_META_DATA_START = QCAMERA3_SENSOR_META_DATA << 16, |
| QCAMERA3_DUALCAM_LINK_META_DATA_START = QCAMERA3_DUALCAM_LINK_META_DATA << 16, |
| QCAMERA3_DUALCAM_CALIB_META_DATA_START = QCAMERA3_DUALCAM_CALIB_META_DATA << 16, |
| QCAMERA3_HAL_PRIVATEDATA_START = QCAMERA3_HAL_PRIVATEDATA << 16, |
| QCAMERA3_JPEG_ENCODE_CROP_START = QCAMERA3_JPEG_ENCODE_CROP << 16, |
| QCAMERA3_VIDEO_HDR_START = QCAMERA3_VIDEO_HDR << 16, |
| QCAMERA3_IR_START = QCAMERA3_IR << 16, |
| QCAMERA3_AEC_CONVERGENCE_SPEED_START = QCAMERA3_AEC_CONVERGENCE << 16, |
| QCAMERA3_AWB_CONVERGENCE_SPEED_START = QCAMERA3_AWB_CONVERGENCE << 16 |
| }; |
| |
| enum qcamera3_ext_tags { |
| QCAMERA3_PRIVATEDATA_REPROCESS = QCAMERA3_PRIVATEDATA_START, |
| QCAMERA3_PRIVATEDATA_END, |
| QCAMERA3_CDS_MODE = QCAMERA3_CDS_START, |
| QCAMERA3_CDS_INFO, |
| QCAMERA3_CDS_END, |
| |
| //Property Name: org.codeaurora.qcamera3.opaque_raw.opaque_raw_strides |
| // |
| //Type: int32 * n * 3 [public] |
| // |
| //Description: Distance in bytes from the beginning of one row of opaque |
| //raw image data to the beginning of next row. |
| // |
| //Details: The strides are listed as (raw_width, raw_height, stride) |
| //triplets. For each supported raw size, there will be a stride associated |
| //with it. |
| QCAMERA3_OPAQUE_RAW_STRIDES = QCAMERA3_OPAQUE_RAW_START, |
| |
| //Property Name: org.codeaurora.qcamera3.opaque_raw.opaque_raw_format |
| // |
| //Type: byte(enum) [public] |
| // * LEGACY - The legacy raw format where 8, 10, or 12-bit |
| // raw data is packed into a 64-bit word. |
| // * MIPI - raw format matching the data packing described |
| // in MIPI CSI-2 specification. In memory, the data |
| // is constructed by packing sequentially received pixels |
| // into least significant parts of the words first. |
| // Within each pixel, the least significant bits are also |
| // placed towards the least significant part of the word. |
| // |
| //Details: Lay out of opaque raw data in memory is decided by two factors: |
| // opaque_raw_format and bit depth (implied by whiteLevel). Below |
| // list illustrates their relationship: |
| // LEGACY8: P7(7:0) P6(7:0) P5(7:0) P4(7:0) P3(7:0) P2(7:0) P1(7:0) P0(7:0) |
| // 8 pixels occupy 8 bytes, no padding needed |
| // min_stride = CEILING8(raw_width) |
| // LEGACY10: 0000 P5(9:0) P4(9:0) P3(9:0) P2(9:0) P1(9:0) P0(9:0) |
| // 6 pixels occupy 8 bytes, 4 bits padding at MSB |
| // min_stride = (raw_width+5)/6 * 8 |
| // LEGACY12: 0000 P4(11:0) P3(11:0) P2(11:0) P1(11:0) P0(11:0) |
| // 5 pixels occupy 8 bytes, 4 bits padding at MSB |
| // min_stride = (raw_width+4)/5 * 8 |
| // MIPI8: P0(7:0) |
| // 1 pixel occupy 1 byte |
| // min_stride = raw_width |
| // MIPI10: P3(1:0) P2(1:0) P1(1:0) P0(1:0) P3(9:2) P2(9:2) P1(9:2) P0(9:2) |
| // 4 pixels occupy 5 bytes |
| // min_stride = (raw_width+3)/4 * 5 |
| // MIPI12: P1(3:0) P0(3:0) P1(11:4) P0(11:4) |
| // 2 pixels occupy 3 bytes |
| // min_stride = (raw_width+1)/2 * 3 |
| //Note that opaque_raw_stride needs to be at least the required minimum |
| //stride from the table above. ISP hardware may need more generous stride |
| //setting. For example, for LEGACY8, the actual stride may be |
| //CEILING16(raw_width) due to bus burst length requirement. |
| QCAMERA3_OPAQUE_RAW_FORMAT, |
| QCAMERA3_OPAQUE_RAW_END, |
| |
| QCAMERA3_CROP_COUNT_REPROCESS = QCAMERA3_CROP_START, |
| QCAMERA3_CROP_REPROCESS, |
| QCAMERA3_CROP_ROI_MAP_REPROCESS, |
| QCAMERA3_CROP_END, |
| |
| QCAMERA3_TUNING_META_DATA_BLOB = QCAMERA3_TUNING_META_DATA_START, |
| QCAMERA3_TUNING_META_DATA_END, |
| |
| QCAMERA3_TEMPORAL_DENOISE_ENABLE = QCAMERA3_TEMPORAL_DENOISE_START, |
| QCAMERA3_TEMPORAL_DENOISE_PROCESS_TYPE, |
| QCAMERA3_TEMPORAL_DENOISE_END, |
| |
| QCAMERA3_USE_AV_TIMER = QCAMERA3_AV_TIMER_START, |
| QCAMERA3_AV_TIMER_END, |
| |
| QCAMERA3_SENSOR_DYNAMIC_BLACK_LEVEL_PATTERN = QCAMERA3_SENSOR_META_DATA_START, |
| QCAMERA3_SENSOR_IS_MONO_ONLY, |
| QCAMERA3_SENSOR_META_DATA_END, |
| |
| QCAMERA3_DUALCAM_LINK_ENABLE = QCAMERA3_DUALCAM_LINK_META_DATA_START, |
| QCAMERA3_DUALCAM_LINK_IS_MAIN, |
| QCAMERA3_DUALCAM_LINK_RELATED_CAMERA_ID, |
| QCAMERA3_DUALCAM_LINK_META_DATA_END, |
| |
| QCAMERA3_DUALCAM_CALIB_META_DATA_BLOB = QCAMERA3_DUALCAM_CALIB_META_DATA_START, |
| QCAMERA3_DUALCAM_CALIB_META_DATA_END, |
| |
| QCAMERA3_HAL_PRIVATEDATA_REPROCESS_FLAGS = QCAMERA3_HAL_PRIVATEDATA_START, |
| QCAMERA3_HAL_PRIVATEDATA_DDM_DATA_BLOB, |
| QCAMERA3_HAL_PRIVATEDATA_END, |
| |
| /* Property Name: org.codeaurora.qcamera3.jpeg_encode_crop.enable |
| Type: byte |
| Description: If JPEG crop is enable |
| */ |
| QCAMERA3_JPEG_ENCODE_CROP_ENABLE = QCAMERA3_JPEG_ENCODE_CROP_START, |
| /* Property Name: org.codeaurora.qcamera3.jpeg_encode_crop.rect |
| Type: int32[4] |
| Description: Crop image into size width x height |
| from [left, top] coordinate |
| rect[0] = left |
| rect[1] = top |
| rect[2] = width |
| rect[3] = height |
| */ |
| QCAMERA3_JPEG_ENCODE_CROP_RECT, |
| /* Property Name: org.codeaurora.qcamera3.jpeg_encode_crop.roi |
| Type: int32[4] |
| Description: Scale the crop image into size width x height |
| from [left, top] coordinate. |
| roi[0] = left |
| roi[1] = top |
| roi[2] = width |
| roi[3] = height |
| */ |
| QCAMERA3_JPEG_ENCODE_CROP_ROI, |
| QCAMERA3_JPEG_ENCODE_CROP_END, |
| |
| QCAMERA3_VIDEO_HDR_MODE = QCAMERA3_VIDEO_HDR_START, |
| QCAMERA3_AVAILABLE_VIDEO_HDR_MODES, |
| QCAMERA3_VIDEO_HDR_END, |
| |
| QCAMERA3_IR_MODE = QCAMERA3_IR_START, |
| QCAMERA3_IR_AVAILABLE_MODES, |
| QCAMERA3_IR_END, |
| |
| QCAMERA3_AEC_CONVERGENCE_SPEED = QCAMERA3_AEC_CONVERGENCE_SPEED_START, |
| QCAMERA3_AEC_CONVERGENCE_SPEED_END, |
| |
| QCAMERA3_AWB_CONVERGENCE_SPEED = QCAMERA3_AWB_CONVERGENCE_SPEED_START, |
| QCAMERA3_AWB_CONVERGENCE_SPEED_END |
| }; |
| |
| // QCAMERA3_OPAQUE_RAW_FORMAT |
| typedef enum qcamera3_ext_opaque_raw_format { |
| QCAMERA3_OPAQUE_RAW_FORMAT_LEGACY, |
| QCAMERA3_OPAQUE_RAW_FORMAT_MIPI |
| } qcamera3_ext_opaque_raw_format_t; |
| |
| |
| // QCAMERA3_VIDEO_HDR_MODE |
| typedef enum camera_metadata_enum_android_video_hdr_mode { |
| QCAMERA3_VIDEO_HDR_MODE_OFF, |
| QCAMERA3_VIDEO_HDR_MODE_ON |
| } camera_metadata_enum_android_video_hdr_mode_t; |
| |
| // QCAMERA3_IR_MODE |
| typedef enum camera_metadata_enum_android_ir_mode { |
| QCAMERA3_IR_MODE_OFF, |
| QCAMERA3_IR_MODE_ON, |
| QCAMERA3_IR_MODE_AUTO |
| } camera_metadata_enum_android_ir_mode_t; |
| |
| class QCamera3VendorTags { |
| |
| public: |
| static void get_vendor_tag_ops(vendor_tag_ops_t* ops); |
| static int get_tag_count( |
| const vendor_tag_ops_t *ops); |
| static void get_all_tags( |
| const vendor_tag_ops_t *ops, |
| uint32_t *tag_array); |
| static const char* get_section_name( |
| const vendor_tag_ops_t *ops, |
| uint32_t tag); |
| static const char* get_tag_name( |
| const vendor_tag_ops_t *ops, |
| uint32_t tag); |
| static int get_tag_type( |
| const vendor_tag_ops_t *ops, |
| uint32_t tag); |
| |
| static const vendor_tag_ops_t *Ops; |
| }; |
| |
| }; // namespace qcamera |
| |
| #endif /* __QCAMERA3VENDORTAGS_H__ */ |